Skip to content

fix(ci): resolve pre-existing CI debt — config_manager buildinfo tests + merchant in go-test matrix - #365

Merged
c03rad0r merged 3 commits into
OpenTollGate:mainfrom
felixfelix-bot:fix/ci-debt-config-manager-merchant
Aug 27, 2026
Merged

c03rad0r merged 3 commits into
OpenTollGate:mainfrom
felixfelix-bot:fix/ci-debt-config-manager-merchant

Conversation

@felixfelix-bot

Copy link
Copy Markdown
Contributor

Summary

Fixes pre-existing CI debt on main (SEC-AUDIT T10):

  1. go-test (src/config_manager) was failing — buildinfo_test.go expectations were stale after fix: stop injecting test mint in release builds #359 added five more production mints (lnserver.com, macadamia.cash, westernbtc.com, kashu.me, cubabitcoin.org) and made IsDevBuild() treat unknown/empty branches as non-dev. Tests now assert 7 production mints on main/unknown/empty and 8 (7 + testnut) on feature branches, matching the merged behavior.

  2. src/merchant was excluded from the go-test matrix — it now builds and tests standalone (its go.mod gained the ltcsuite/ltcd exclude directive and a full re-tidy in fix(deps): drop felixfelix-bot fork replace — build against OpenTollGate gonuts-tollgate v0.11.1 #361), so it is added to the matrix. src/cli, src/upstream_detector and src/upstream_session_manager remain omitted pending the same rewrite.

  3. deps-and-imports job — verified passing locally (check-deps-sync.py and check-import-paths.py both exit 0). The stale merchant go.mod (pinning gonuts v0.10.0) was already resolved on main by fix(deps): drop felixfelix-bot fork replace — build against OpenTollGate gonuts-tollgate v0.11.1 #361 (now v0.11.1).

Verification (all green)

  • go build ./... — exit 0
  • go vet ./... — exit 0
  • go test -race -count=1 -tags testenv . (main pkg) — ok, 16.1s
  • go test -race -count=1 ./... (config_manager) — ok, 1.27s
  • go test ./... (merchant) — ok, 197.9s
  • go test ./... (utils, tollgate-cli, lightning, tollgate_protocol, tollwallet, valve, wireless_gateway_manager) — all ok
  • node tests/contract/js-schema-lint.mjs — PASS
  • bash tests/contract/build-purity.sh — 3 passed, 0 failed
  • python3 tests/contract/check-deps-sync.py — ✅ 124 deps in sync
  • python3 tests/contract/check-import-paths.py — ✅ 117 files correct

Docs

  • docs/cashu-compatibility-matrix.md updated to list all 7 production mints (same commit as the test sync).
  • CHANGELOG.md entries added under [Unreleased] → Changed / Internal.

Out of scope

W-3 (reseller auto-spend to self-signed fake upstream, Amperstrand #72) is a separate security change (signature verification + key allowlisting in upstream_session_manager/session.go) and will be addressed in its own focused PR.

OpenTollGate#359 added five more production mints (lnserver.com, macadamia.cash,
westernbtc.com, kashu.me, cubabitcoin.org) and made IsDevBuild() treat
unknown/empty branches as non-dev, but buildinfo_test.go was never
updated. Tests now assert 7 production mints on main/unknown/empty and
8 (7 + testnut) on feature branches, matching the merged behavior.

Docs: cashu-compatibility-matrix.md now lists all 7 production mints.
The merchant module now builds and tests standalone after its go.mod
gained the ltcsuite/ltcd exclude directive and a full re-tidy (OpenTollGate#361).
Verified locally: go test -race -count=1 ./... passes (199s, exit 0).
src/cli, src/upstream_detector and src/upstream_session_manager remain
omitted pending the same rewrite.
@felixfelix-bot

Copy link
Copy Markdown
Contributor Author

Cold review (Gate 2.5)

Cross-family reviewer verdict (cold, no prior context):

{
  "verdict": "approve",
  "blocking_issues": [],
  "non_blocking_notes": [
    "The 'main' branch subtest in TestNewDefaultConfig_MintsForBranch only asserts the count (7) and testnut absence; it does not verify the specific 7 production mint URLs. Consider asserting the full expected set to guard against a wrong-but-7-mint config.",
    "The docs/cashu-compatibility-matrix.md change asserts the 5 newly added mints use V1 keysets; this factual claim is not verifiable from the diff alone and relies on the author's prior verification.",
    "No empty-branch subtest appears in TestNewDefaultConfig_MintsForBranch (only in TestIsDevBuild_DefaultBranch). If a stale empty-branch subtest with the old 3-mint expectation exists, it would fail — worth confirming CI passes.",
    "TestDefaultProductionMints only checks mints[0].URL (coinos.io); the remaining 6 mint URLs are unverified by the test."
  ],
  "summary": "This PR cleanly resolves pre-existing CI debt with three tightly-scoped, mutually consistent changes. The buildinfo_test.go expectations are correctly synced to the post-#359 behavior: unknown/empty branches are now non-dev, main/unknown/empty yield 7 production mints, feature branches yield 8 (7 + testnut), and the unknown-branch subtest now explicitly asserts testnut is absent. The CI matrix change adds src/merchant with a clear rationale and correctly trims the omission comment. The docs and CHANGELOG are consistent with the code changes. No scope creep and no blocking issues."
}

All non-blocking notes are minor test-strengthening opportunities; none block merge.

@c03rad0r
c03rad0r self-requested a review August 27, 2026 14:48
@c03rad0r
c03rad0r merged commit 492dab3 into OpenTollGate:main Aug 27, 2026
19 of 20 checks passed
c03rad0r added a commit that referenced this pull request Sep 8, 2026
* docs(changelog): backfill [Unreleased] for v0.6.0

Add entries for PRs #331, #312, #299, #347, #361, #365, #366, #368,
#369, #370 under [Unreleased] (Added / Changed / Internal), matching
existing Keep-a-Changelog style. Ref #339.

* docs(changelog): backfill #359 and #353 entries

---------

Co-authored-by: Felix <301398501+felixfelix-bot@users.noreply.github.com>
Co-authored-by: c03rad0r <1100745+c03rad0r@users.noreply.github.com>
felixfelix-bot added a commit to felixfelix-bot/tollgate-module-basic-go that referenced this pull request Sep 20, 2026
…s + merchant in go-test matrix (OpenTollGate#365)

* test(config_manager): sync buildinfo tests to 7 production mints

OpenTollGate#359 added five more production mints (lnserver.com, macadamia.cash,
westernbtc.com, kashu.me, cubabitcoin.org) and made IsDevBuild() treat
unknown/empty branches as non-dev, but buildinfo_test.go was never
updated. Tests now assert 7 production mints on main/unknown/empty and
8 (7 + testnut) on feature branches, matching the merged behavior.

Docs: cashu-compatibility-matrix.md now lists all 7 production mints.

* ci: add src/merchant to go-test matrix

The merchant module now builds and tests standalone after its go.mod
gained the ltcsuite/ltcd exclude directive and a full re-tidy (OpenTollGate#361).
Verified locally: go test -race -count=1 ./... passes (199s, exit 0).
src/cli, src/upstream_detector and src/upstream_session_manager remain
omitted pending the same rewrite.

---------

Co-authored-by: Felix <301398501+felixfelix-bot@users.noreply.github.com>
Co-authored-by: c03rad0r <1100745+c03rad0r@users.noreply.github.com>
felixfelix-bot added a commit to felixfelix-bot/tollgate-module-basic-go that referenced this pull request Sep 20, 2026
* docs(changelog): backfill [Unreleased] for v0.6.0

Add entries for PRs OpenTollGate#331, OpenTollGate#312, OpenTollGate#299, OpenTollGate#347, OpenTollGate#361, OpenTollGate#365, OpenTollGate#366, OpenTollGate#368,
OpenTollGate#369, OpenTollGate#370 under [Unreleased] (Added / Changed / Internal), matching
existing Keep-a-Changelog style. Ref OpenTollGate#339.

* docs(changelog): backfill OpenTollGate#359 and OpenTollGate#353 entries

---------

Co-authored-by: Felix <301398501+felixfelix-bot@users.noreply.github.com>
Co-authored-by: c03rad0r <1100745+c03rad0r@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants