Skip to content

Commit 6aa1d09

Browse files
claude[bot]claude
andauthored
gate(spec): register packages/spec/src/** doc blocks as the fourth symbol-anchor corpus, censused first (#17241)
* feat(gates): register packages/spec/src/** doc blocks as a symbol-anchor corpus The fourth corpus of the shared symbol-anchor resolver (scripts/symbol-anchors.mjs), joined by a `defineCorpus` call in the deliberately thin shape check-adr-symbol-anchors.mjs and check-scripts-symbol-anchors.mjs already use -- no second resolver. The census came first and the exit contract second. Measured on 08e38c6 in --list / --list-unresolvable reporting mode over 1,317 tracked .ts files: 198 raw extractAnchors over the whole file (counts spec's own fixture data) 189 through the commentProse projection (doc prose only) 6 ...and the cited path names a tracked file -- what this gate judges 7 hard findings across 6 files (6 line-anchor + 1 unresolved-path), 183 declined citations naming no tracked file, 3 soft cross-repo rows. That is a gate, not a migration -- the opposite of docs/adr/**'s 243-of-337 (72.1%). Repairing those 7 edits packages/spec/** text, which is domain:spec work with its own cards, so the exit contract is a pinned day-one residual: CENSUS_RESIDUAL enumerates the 7 sites with their repairs, every finding outside it is a hard red from day one, and a row whose citation gets repaired goes STALE and reds until it is deleted. Rows are keyed by citation TEXT, never by line -- a line-keyed row would be a line anchor inside the line-anchor gate. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012GKcPZbMoGq7WPzKLfRBTU * fix(gates): stop the new corpus header from quoting a broken anchor verbatim `scripts/**` is itself a registered corpus, so the new gate's own header is swept by check-scripts-symbol-anchors. Quoting the websocket.zod.ts citation in anchor form -- and spelling the bare-word-colon-path shape literally -- made this file a finding against that corpus (1 unresolved-path, 1 soft cross-repo). Both are now described in words, with the reason stated inline so the next author does not reintroduce them. The citation itself is unchanged: it stays pinned in CENSUS_RESIDUAL as a string literal, which the commentProse projection blanks as code. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012GKcPZbMoGq7WPzKLfRBTU --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 87ad73b commit 6aa1d09

4 files changed

Lines changed: 778 additions & 2 deletions

File tree

.github/workflows/lint.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2503,6 +2503,7 @@ jobs:
25032503
run_self_test node scripts/symbol-anchors.mjs --self-test
25042504
run_self_test node scripts/check-adr-symbol-anchors.mjs --self-test
25052505
run_self_test node scripts/check-scripts-symbol-anchors.mjs --self-test
2506+
run_self_test node scripts/check-spec-docblock-symbol-anchors.mjs --self-test
25062507
if [ -n "$failed" ]; then
25072508
echo ""
25082509
echo "Symbol-anchor self-tests — the following FAILED:"
@@ -2521,6 +2522,20 @@ jobs:
25212522
- name: scripts/** symbol anchors resolve (no line citations on tracked targets survive)
25222523
run: node scripts/check-scripts-symbol-anchors.mjs
25232524

2525+
# The THIRD corpus (#17065) — `packages/spec/src/**` doc blocks, again a
2526+
# `defineCorpus` registration and ⛔ not a second resolver. Separate sweep
2527+
# step for the same `check-step-collectors` reason stated above.
2528+
#
2529+
# ⭐ Its exit contract is a PINNED DAY-ONE RESIDUAL, not a clean tree: the
2530+
# census (7 findings across 6 of 1,317 files, taken in reporting mode
2531+
# BEFORE any exit code was chosen) is enumerated in the gate's
2532+
# `CENSUS_RESIDUAL`, every finding outside it is a hard red, and a row
2533+
# whose citation gets repaired goes STALE and reds until it is deleted.
2534+
# Repairing those 7 edits `packages/spec/**` text, which is `domain:spec`
2535+
# work with its own cards — the registration does not do it.
2536+
- name: packages/spec/src/** doc-block symbol anchors resolve (no NEW line citations on tracked targets)
2537+
run: node scripts/check-spec-docblock-symbol-anchors.mjs
2538+
25242539
# NOTE: the standing platform test checklist (docs/qa/platform-checklist/)
25252540
# is validated by `pnpm check:platform-checklist`, but by MAINTAINER
25262541
# DECISION it is NOT wired into CI — it runs on a periodic manual cadence

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@
9191
"check:adr-links": "node scripts/check-adr-links.mjs --self-test && node scripts/check-adr-links.mjs",
9292
"check:adr-symbol-anchors": "node scripts/symbol-anchors.mjs --self-test && node scripts/check-adr-symbol-anchors.mjs --self-test && node scripts/check-adr-symbol-anchors.mjs",
9393
"check:scripts-symbol-anchors": "node scripts/symbol-anchors.mjs --self-test && node scripts/check-scripts-symbol-anchors.mjs --self-test && node scripts/check-scripts-symbol-anchors.mjs",
94+
"check:spec-docblock-symbol-anchors": "node scripts/symbol-anchors.mjs --self-test && node scripts/check-spec-docblock-symbol-anchors.mjs --self-test && node scripts/check-spec-docblock-symbol-anchors.mjs",
9495
"check:platform-checklist": "node scripts/checklist-select.mjs --self-test && node scripts/check-platform-checklist.mjs --self-test && node scripts/check-platform-checklist.mjs",
9596
"check:org-identifier": "node scripts/check-org-identifier.mjs --self-test && node scripts/check-org-identifier.mjs",
9697
"check:runner-env-posture": "node scripts/check-runner-env-posture.mjs --self-test && node scripts/check-runner-env-posture.mjs",

0 commit comments

Comments
 (0)