Repository navigation
test: re-instate doc-count gate (#752, lost to overwrite) + add SAFETY.md ref guard - #756
Conversation
…) + add SAFETY.md ref guard 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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 78394b8638
ℹ️ 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".
| for (const line of md.split("\n")) { | ||
| if (!line.startsWith("|") || line.includes("---")) continue; // data rows only | ||
| const testsCol = line.split("|")[2] ?? ""; // index 2 = the middle (tests) column |
There was a problem hiding this comment.
Only parse SAFETY tables that list tests
This treats the second column of every Markdown table as test references, but move/SAFETY.md also has tables such as Property | Proof | Where; the current parser already extracts proof prose identifiers like rug_chance_bps and multiplier_bps and validates them as if they were runnable tests. When a proof row legitimately mentions a field, script, or other non-fun identifier, the cold gate will fail even though no SAFETY test reference is stale, so the parser should track the table header and only scan Property | Test | File rows.
Useful? React with 👍 / 👎.
Two cold-gate guards wired into test:offline:
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; rebased clean on latest main.
🤖 Generated with Claude Code