Skip to content

test: re-instate doc-count gate (#752, lost to overwrite) + add SAFETY.md ref guard - #756

Merged
maxmoneycash merged 1 commit into
mainfrom
a7/reinstate-doc-guards
Jun 22, 2026
Merged

maxmoneycash merged 1 commit into
mainfrom
a7/reinstate-doc-guards

Conversation

@maxmoneycash

Copy link
Copy Markdown
Member

Two cold-gate guards wired into test:offline:

Both mirror test:doc-links. Verified: both pass; cold-gate-coverage accepts both; JSON valid; rebased clean on latest main.

🤖 Generated with Claude Code

…) + 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>
@maxmoneycash
maxmoneycash merged commit 1a7b768 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:52pm

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: 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".

Comment on lines +42 to +44
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

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 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 👍 / 👎.

This branch was successfully deployed

1 active deployment
Preview — 78394b86 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