Repository navigation
ci(spec): spec-quote drift checking in CI (copy of #357 with reviewer fixes) - #376
Merged
c03rad0r merged 2 commits intoSep 7, 2026
Merged
Conversation
…t placement - NUT-03 swap quote: 'generate new Proofs' -> 'generate new `Proofs`' (spec added backticks; the one genuinely drifted quote found by review) - NUT-05 melt quote added at GonutsWallet.RequestMeltQuote (per reviewer feedback: above the request-method, not above Melt()) - merchant.go: reword 'NUT-00' marker prefix to 'Spec (NUT 00)' so it doesn't parse as a malformed quote marker - port.go: reword 'NUT-04 spec' to 'spec (NUT 04)' for the same reason - CHANGELOG: note spec-quote drift checking entry superseding OpenTollGate#357 - .gitignore: add *.cov to exclude greatspectate coverage artifacts
…e step - Contract-lint job: new 'Spec-quote drift check' step that installs greatspectations, clones cashubtc/nuts, and verifies all NUT spec quotes in source comments against spec — drift fails the build. - make/speccheck.sh: supports both local drift-report mode and CI fail mode. Vacuous-pass fix: tool/config/usage errors (exit 2+) propagate non-zero; exit 0 only for clean runs or drift-only (exit 1, loud banner). Coverage step folded in from main's OpenTollGate#354 but corrected for the real greatspectate CLI (--coverage=FILE). - Correct command name: greatspectations installs 'greatspectate' as its only console script (no 'spectate'). Both CI and local scripts use the correct name. - Correct --comment-start '// ' (trailing space) — without the trailing space the checker passes vacuously (matches nothing). - Pinned deps: greatspectations at SHA 0f226495 with scheduled-bump comment; cashubtc/nuts at SHA 49a909c in CI for reproducibility. - No silenced pip output (install logs visible).
c03rad0r
approved these changes
Sep 7, 2026
felixfelix-bot
added a commit
to felixfelix-bot/tollgate-module-basic-go
that referenced
this pull request
Sep 20, 2026
…ith reviewer fixes) (OpenTollGate#376) * fix(spec): fix drifted NUT-03 quote, malformed markers, NUT-05 comment placement - NUT-03 swap quote: 'generate new Proofs' -> 'generate new `Proofs`' (spec added backticks; the one genuinely drifted quote found by review) - NUT-05 melt quote added at GonutsWallet.RequestMeltQuote (per reviewer feedback: above the request-method, not above Melt()) - merchant.go: reword 'NUT-00' marker prefix to 'Spec (NUT 00)' so it doesn't parse as a malformed quote marker - port.go: reword 'NUT-04 spec' to 'spec (NUT 04)' for the same reason - CHANGELOG: note spec-quote drift checking entry superseding OpenTollGate#357 - .gitignore: add *.cov to exclude greatspectate coverage artifacts * ci(spec): wire spec-quote drift check with vacuous-pass fix + coverage step - Contract-lint job: new 'Spec-quote drift check' step that installs greatspectations, clones cashubtc/nuts, and verifies all NUT spec quotes in source comments against spec — drift fails the build. - make/speccheck.sh: supports both local drift-report mode and CI fail mode. Vacuous-pass fix: tool/config/usage errors (exit 2+) propagate non-zero; exit 0 only for clean runs or drift-only (exit 1, loud banner). Coverage step folded in from main's OpenTollGate#354 but corrected for the real greatspectate CLI (--coverage=FILE). - Correct command name: greatspectations installs 'greatspectate' as its only console script (no 'spectate'). Both CI and local scripts use the correct name. - Correct --comment-start '// ' (trailing space) — without the trailing space the checker passes vacuously (matches nothing). - Pinned deps: greatspectations at SHA 0f226495 with scheduled-bump comment; cashubtc/nuts at SHA 49a909c in CI for reproducibility. - No silenced pip output (install logs visible). --------- Co-authored-by: Felix <301398501+felixfelix-bot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This is a clean copy of Amperstrand's #357 with the reviewer's blocking and non-blocking findings resolved, plus a merge with main's existing
make/speccheck.shcoverage step from #354.Why a copy: Amperstrand's PR #357 has a merge conflict with main and CHANGES_REQUESTED blocking findings unrelated to its scope. Since we cannot modify their branch, we replicated the spec-quote drift CI check on our fork with all fixes applied.
Changes vs #357 (fixes applied)
Vacuous-pass fix (blocking finding):
make/speccheck.shno longer uses|| truethen unconditionalexit 0. Tool/config/usage errors (exit 2+) propagate non-zero viaset -ebreakout; exit 0 only for clean runs. A loudSPEC DRIFT DETECTEDbanner appears on drift-only findings (exit 1, still non-fatal locally).NUT-05 quote placement (reviewer nit): Moved from
Melt()toRequestMeltQuote()where the request logic lives.Combined with main's coverage step:
make/speccheck.shnow includes thegreatspectate coveragereport (from feat: token recovery tool + AI audit prompts + speccheck (rebased onto main) #354's version), so both drift checking and coverage reporting work.Pinned upstream deps (non-blocking): greatspectations and cashubtc/nuts are pinned to commit SHAs with a comment noting scheduled bump.
Unsensitized install output (non-blocking): Install failures now surface their stderr so a silent "command not found" is replaced by the actual error.
Corrected
--comment-startinvocation: Uses"// "(trailing space), fixing the vacuous-pass bug in feat: token recovery tool + AI audit prompts + speccheck (rebased onto main) #354's version.Verification
gofmt -l— clean on touched filesmake/speccheck.sh— exit 0, all 9 spec quotes match cashubtc/nuts HEADRelated
make/speccheck.shfrom feat: token recovery tool + AI audit prompts + speccheck (rebased onto main) #354 (vacuous-pass bug fixed here)