Skip to content

ci(spec): spec-quote drift checking in CI (copy of #357 with reviewer fixes) - #376

Merged
c03rad0r merged 2 commits into
OpenTollGate:mainfrom
felixfelix-bot:spec/wire-speccheck-copy
Sep 7, 2026
Merged

c03rad0r merged 2 commits into
OpenTollGate:mainfrom
felixfelix-bot:spec/wire-speccheck-copy

Conversation

@felixfelix-bot

Copy link
Copy Markdown
Contributor

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.sh coverage 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)

  1. Vacuous-pass fix (blocking finding): make/speccheck.sh no longer uses || true then unconditional exit 0. Tool/config/usage errors (exit 2+) propagate non-zero via set -e breakout; exit 0 only for clean runs. A loud SPEC DRIFT DETECTED banner appears on drift-only findings (exit 1, still non-fatal locally).

  2. NUT-05 quote placement (reviewer nit): Moved from Melt() to RequestMeltQuote() where the request logic lives.

  3. Combined with main's coverage step: make/speccheck.sh now includes the greatspectate coverage report (from feat: token recovery tool + AI audit prompts + speccheck (rebased onto main) #354's version), so both drift checking and coverage reporting work.

  4. Pinned upstream deps (non-blocking): greatspectations and cashubtc/nuts are pinned to commit SHAs with a comment noting scheduled bump.

  5. Unsensitized install output (non-blocking): Install failures now surface their stderr so a silent "command not found" is replaced by the actual error.

  6. Corrected --comment-start invocation: 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 files
  • make/speccheck.sh — exit 0, all 9 spec quotes match cashubtc/nuts HEAD
  • Coverage: 955 spec lines across 4 NUT documents (00, 03, 04, 05) — clean

Related

…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
c03rad0r merged commit 3fa8336 into OpenTollGate:main 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>
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