docs-audit: let a SCREAMING_SNAKE literal mint an anchor, and pin the predicate pair - #13782
Merged
os-project-manager merged 1 commit intoAug 31, 2026
Merged
Conversation
… predicate pair `isCodeShaped` has called `OS_MODE` an identifier since the shape guard was written (it is pinned as `SCREAMING_SNAKE` in the self-test's shape cases), while `literalAnchorsFromLines` accepted only three lowercase-initial shapes and so declined to mint any anchor from it. One predicate in the pair called the token an identifier, the other silently called it prose, and nothing reported the split. Measured both ways over the 60 most recent `packages/**` commits, attributing every added row to the declaration that minted it (the provenance published by #13738): rows 374 -> 383 (+2.4%), zero rows lost, `overbroadAnchors` unchanged at 8, and only 2 of 60 runs moved. On `b6d3d76b5` the advisory went from 0 to 2 of the 3 docs pages that commit edited itself. Also pins the agreement as an invariant, and pins the disagreements that remain as deliberate: delegating the literal test to `isCodeShaped` was measured at +9.1% and admits quoted sentence fragments. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Pk26oZ12t5N1hwGW1m1MgC
Contributor
📓 Docs Drift CheckNothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 0 changed package(s)), so this run has no opinion about the docs. What this run could not see
Coarse fallback — 0 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
os-project-manager
marked this pull request as ready for review
August 31, 2026 12:08
os-project-manager
deleted the
claude/issue-13471-screaming-snake-anchor
branch
August 31, 2026 12:30
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.
Fixes #13471
isCodeShapedhas calledOS_MODEan identifier since the shape guard was written — it ispinned as
SCREAMING_SNAKEin the self-test's own shape cases — whileliteralAnchorsFromLinesaccepted only three lowercase-initial shapes and so declined to mintany anchor from it. One predicate in the pair called the token an identifier, the other
silently called it prose, and nothing reported the split. This makes the pair agree on that
shape, and then pins the agreement so neither side can drift back out of step quietly.
Re-derived against today's file first
The card warned its own shape description might be stale, and it was worth checking: the file
has drifted three times since the record window (blob
0a42496…to61e0f44c…tobe1584869today, the last move being #13738 at 09:40Z). The description survived — theliteral test was still exactly three lowercase-initial regexes. Both predicates, run on the
same tokens, on today's implementation:
Measured before changing anything
Two arms of the real tool over the 60 most recent
packages/**commits, with every added rowattributed to the declaration that minted it — the per-row provenance published by #13738 is
what turned "will widening get noisier?" from a judgement call into a count.
overbroadAnchors(hub terms the corpus-share guard caught)Every new anchor named its declaration:
FlowRefusalCode,AUTHZ_STORE_UNAVAILABLE_CODE,codes. Four of the nine were vendor MySQL driver codes (ER_DUP_KEYNAMEand friends) whichmatched no page at all, so they cost nothing — an anchor no doc names is not a row.
Ground truth. On
b6d3d76b5, whose own commit edited three docs pages, the advisory wentfrom 0 of those 3 (it listed two
releases/**pages and nothing else) to 2 of 3 —api/client-sdk.mdxandautomation/flows.mdx, both minted fromFlowRefusalCode.The structural alternative was measured too, and rejected
Collapsing the literal test into
isCodeShapedlooks like the tidier fix — one predicateinstead of two — and the same 60 commits say no: rows 374 to 408 (+9.1%), and it admits
'unchanged.','means.'and'version.', quoted sentence fragments that reachisCodeShaped's.arm. The two predicates run over different populations — adeclaration NAME versus an arbitrary quoted span that may be prose — so they must stay
separate. Those three fragments are now pinned as non-anchors, so a future collapse goes red
with the reason attached.
Blast radius, kept as small as the card measured it
⛔ The card's own pull commit
4d98d9eabgains zero rows from this. That page was alreadylisted there, through the
routeanchor/api/v1/runtime/config; all this adds is a secondviaclause namingOS_TELEMETRY_CLIENT_ERROR_REPORTING_ENABLED. The recall win is real andit is
b6d3d76b5-shaped, not4d98d9eab-shaped. The three sibling misses in #13306's recordwindow remain out of scope and unfixed by this — those env vars were new to the page, so no
anchor of any shape could have matched.
Also unchanged, deliberately: a bare all-caps word such as
EEXITis not admitted, because theshape requires a segment break. Prose does not shout in underscores; it can shout in one word.
Verification
--self-test503 to 516 cases, all pass (exit 0, captured before any pipe).describe this diff rather than a throwaway mutant.
--self-testto exit 1, 7 casesfailing, the agreement pin among them. Restore proven by observed state — working blob
f1315ee83874ece9fdaba707005ff79f295ff020equal to HEAD's, emptygit diff HEAD, emptygit status. No rebuild is involved: this script is dependency-free and node runs the sourcedirectly, so there is no
dist/between the edit and the run.node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstackafter the final commit (
4a26def1c): 18 GREEN, 0 RED, 1 NOT MEASURED —check-test-completeness.mjsexits 3PREREQUISITE NOT METbecause it grades a savedturbo run testlog that only CI produces, which its own failure text says to record as NOTMEASURED rather than as a red. Both convention-triggered obligations for a gate-script edit
(
bare-root-worklist.mjs --self-test,check:pm-dispatch-gates) are in that green set, as arecheck:docs-audit-scope,check-affected-docs.mjs,check-drift-comment.mjsandcheck:nul-bytes.skip-changeset: the diff is one repo-root dev script. The root manifest isprivate: trueandno package manifest covers
scripts/, so nothing is published.Check Changesethas nopath-based exemption — it enforces on any diff unless labelled — so the label is applied rather
than assumed.
Generated by Claude Code