Skip to content

test(doc-count): enforce the count guard in the cold gate - #752

Merged
maxmoneycash merged 1 commit into
mainfrom
a7/enforce-doc-count-gate
Jun 22, 2026
Merged

maxmoneycash merged 1 commit into
mainfrom
a7/enforce-doc-count-gate

Conversation

@maxmoneycash

Copy link
Copy Markdown
Member

scripts/check-doc-counts.sh was hardened to 9/9 form coverage (#738/#749/#750/#751) but only ran when someone remembered to. This wires it into test:offline via a thin test that runs the guard and asserts it passes — so a Move test added without npm run sync:count fails npm test (with that one-command fix surfaced in the failure message), instead of a judge running sui move test and seeing a doc mismatch.

Mirrors test:doc-links (the doc-link consistency check already in the gate). The fleet's count flurry has settled at 695, so no transient mid-sync failures.

Verified: test passes on the consistent tree; test:cold-gate-coverage accepts the new wired test; package.json valid.

🤖 Generated with Claude Code

…en-remembered)

scripts/check-doc-counts.sh hardened to 9/9 form coverage (#738/#749/#750/#751) but
only ran when someone remembered to. Wire it into test:offline via a thin test that
runs the guard and asserts it passes — so a Move test added WITHOUT 'npm run
sync:count' fails 'npm test' (with that one-command fix surfaced in the failure),
instead of a judge running 'sui move test' and seeing a number that mismatches a
doc. Mirrors test:doc-links (the doc-link consistency check already in the gate).

The fleet's count flurry has settled at 695, so this won't cause transient mid-sync
failures. Verified: test passes on the consistent tree; test:cold-gate-coverage
accepts the new wired test; package.json valid.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@maxmoneycash
maxmoneycash merged commit df7fb45 into main Jun 22, 2026
3 of 4 checks passed
@vercel

vercel Bot commented Jun 22, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
wick-markets Building Building Preview, Comment Jun 22, 2026 10:30pm

Request Review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b500e47839

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

let out = "";
try {
// The guard cd's to the repo root itself; run from there for good measure.
out = execFileSync("bash", ["scripts/check-doc-counts.sh"], {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Accept four-digit Move test counts

When the Move suite reaches 1000 tests, this new cold-gate test will fail even after the documented npm run sync:count fix: sync-move-count.mjs already accepts and writes 3–4 digit counts, but scripts/check-doc-counts.sh only extracts [0-9]{3} groups, so synced text like 1000/1000 is parsed as 000 and 100 and exits with a disagreement. Since this invocation is now part of npm test, please make the checker accept four-digit counts before gating on it.

Useful? React with 👍 / 👎.

maxmoneycash added a commit that referenced this pull request Jun 22, 2026
…) + add SAFETY.md ref guard (#756)

Two cold-gate guards, both wiring into test:offline:
- test:doc-counts — re-instates #752, which was silently reverted when a later PR
  with a pre-#752 package.json was squash-merged (--admin bypasses the up-to-date
  check), dropping the script AND the wiring. The durable guard (check-doc-counts.sh)
  survived; only the cold-gate enforcement was lost. Restored the test file + wiring.
- test:safety-refs — NEW: asserts every test named in move/SAFETY.md exists as a Move
  fun, so a renamed/removed test doesn't leave a judge's 'sui move test <name>'
  finding 0 tests. 155 refs verified present.

Both mirror test:doc-links. Verified: both pass; cold-gate-coverage accepts both; JSON valid.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
maxmoneycash added a commit that referenced this pull request Jun 24, 2026
…gged) (#761)

The doc-count reality guard (#738) caught the drift: a5's #758 (post-rug-open drain
fix) added a Move test (count → 696) but the docs stayed at 695, so the
cold-gate-enforced guard (#752) was failing. Ran 'npm run sync:count' to rewrite all
four docs (README badge+body, move/SAFETY.md, deployments/ADDRESSES.md, the runbook)
to 696. Verified: guard green — consistent across all docs AND matches the 696
#[test] functions in move/. This is the machinery working as designed (catch + one-
command fix), unblocking the cold gate.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
maxmoneycash added a commit that referenced this pull request Jun 24, 2026
…gged) (#769)

The doc-count reality guard (#738) caught the drift: a5's #767 (gate enable_rug on
the vault admin cap — closes the rug bootstrap front-run) added a Move test (count
→ 697), but the docs stayed at 696, so the cold-gate-enforced guard (#752) was
failing — and CI goes red on it (as it did for the last count drift, fixed by my
#761). Ran 'npm run sync:count' to rewrite all four docs to 697. Verified: guard
green — consistent across all docs AND matches the 697 #[test] functions. Unblocks
the cold gate and the CI badge.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
maxmoneycash added a commit that referenced this pull request Jun 24, 2026
…ffline (#773)

verify:offline is the judge-facing zero-network proof command (DEMO.md). My #765
made it delegate to test:offline so it can't drift stale (it previously carried a
hand-maintained list that silently dropped the /pro fairness proofs). But that fix
is a single package.json line — exactly the kind a stale-base --admin merge
silently reverts (cf. the #752 revert, where my doc-count wiring vanished the same
way). The existing leaf-coverage assertion can't catch a verify:offline revert
(it's not a test:* leaf), so this adds a direct guard: verify:offline must include
'npm run test:offline'. A revert to a parallel hand-list now fails the cold gate.

Verified: both cold-gate-coverage tests pass (2/2).

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

This branch was successfully deployed

1 active deployment
Preview — b500e478 Deployed Jun 22, 2026 by vercel[bot]
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.

1 participant