Repository navigation
feat(scripts): census cross-file line-address citations tree-wide (report-only, objectui#8875) - #8881
Merged
Conversation
…jectui#8875) objectui#7853 ruled the class -- cite the assertion by CONTENT, not by line address. objectui#8047 mechanized it for TEST NAMES only, carving out comments and failure messages because "a human reads them beside the code they annotate". objectui#8875 observes that the justification holds for a same-file citation and not for a cross-file one, rules on nothing, and says the choice between its three candidate remedies needs the tree-wide population that has not been measured. This is that measurement, and nothing else. Report-only, named `census:*` rather than `check:*` because the two existing `census:*` scripts appear in no workflow -- so the name is what keeps this out of CI without a reader having to take it on trust. It repairs no citation: shifting an already-false address by a hunk delta moves a wrong pointer to a differently wrong place while making the diff look diligent, which is the trap the card exists to name. Five syntaxes, because a one-syntax probe under-reads this class by construction: `path:line`, the `#L` permalink, the address written before or after the name, and the bare continuation address that carries no filename at all. Released changelog sections are carved out and counted -- a changelog entry is a dated record of what was true at that release. Every citation is judged against what is at the cited line TODAY, never against whether a diff moved it. Two tree controls and four classifier controls run on every invocation and are fatal, as is an empty population. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FhBNJcLRZLe8M87VcUgpKr
baozhoutao
marked this pull request as ready for review
September 9, 2026 19:03
This was referenced Sep 9, 2026
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.
Refs #8875 (the census)
⛔ Deliberately not
Fixes. #8875's subject is that objectui#8047's cite-by-content rulecovers test names only and its comment carve-out does not hold across files. This pull request
delivers the measurement that card said any choice needs — 1267 citations, 540 false today —
and ⛔ deliberately repairs nothing and rules on nothing. The gap itself is still open, and the
three directions the card named are still unchosen. Closing it here would retire a measured
population of 540 false citations from every open-issue sweep. On merge the card returns to
pm:queuecarrying the number, with the direction question routed to triage.What this is, and what it deliberately is not
objectui#8875 rules on nothing. It names three candidate directions and says the choice "needs the tree-wide population that has not been measured". This PR is that measurement, and nothing else.
eslint-rules/no-line-address-in-test-name.jsis untouched — not extended to comments, not to message strings.The number
Measured on
5a47dcdb6bypnpm census:cross-file-line-citations:Excluded and counted, never silently dropped: 61 hits under released
CHANGELOG.mdversion headings, 2 same-file citations, 57 fixture addresses inside the census and its own test. Citations reaching a test name: 0 — objectui#8047's rule is holding that sub-population, and that zero is a reading only because the classifier controls below fire in the same run.The false 540 splits three ways:
drifted411 (the cited content is elsewhere in the cited file, and the census says where),non-substantive112 (the cited line is blank or delimiters only),out-of-range17 (past the end of the file). The 432 unjudged areno-such-file144 — dominated by citations into build artifacts such aspackages/types/dist/overlay.d.ts, which are untracked and regenerated, so nothing can ever check them —ambiguous-basename131 (a bare basename naming several tracked files at once),anchor-absent123 andno-anchor34.By directory, top of the table:
packages/typesscriptsdocs.changesetscripts/__tests__packages/app-shellpackages/layoutpackages/plugin-detailapps/consoleeslint-rules35 buckets in all; the script prints the rest. ⛔ This PR takes no position on which of the card's three directions the number favours — that decision is reserved to objectui#8875.
Why a
census:*script and not acheck:*gateMeasured, not assumed:
census:body-dialectappears in no file under.github/workflows/, while the controlcheck:entry-guardresolves tolint.yml. Socensus:*is already this repo's spelling for "runnable, reported, not blocking", and choosing it is how this stays report-only without a reader taking it on trust. It also keeps objectui#3653's obligation out of the way — that card pinscontent/docs/guide/ci-cd-pipeline.md's table by command, so a CI step here would owe a documentation row for a gate nobody has decided to have.The two controls the card asked for, both in the output, both fatal
Both are addressed by content — the citing file and the file it cites — never by their own line numbers; a control pinned by a line address would be an instance of the defect being measured, and a test asserts they carry no line number.
Five syntaxes, because a one-syntax probe under-reads by construction
path:line; the#Lpermalink;line NNN of NAME;NAME line NNN; and the bare continuation address, which carries no filename at all. Ablation, measured: making syntax 5 unreachable drops the population from 1267 to 1115 and the false count from 540 to 460 — so 12% of the population, and 80 of the false readings, are invisible to any basename-anchored probe. A second ablation removingnon-substantivefrom the false verdicts flips the firing control to FAIL and exits non-zero, which is what shows the control can fail. Both ablations mutate on disk, prove the mutation landed by counting the changed text, and restore under a trap; the restored blob hash equals theHEADblob andgit diff HEADis empty.Two defects found in the instrument itself, both fixed
ts|tsxalternation matched.tsinsideListView.tsx, so the singleline NNN of NAMEinstance in the repo was scored against aListView.tsthat does not exist. Thepath:linesyntaxes hid it — their required colon forces a backtrack intotsx— so only the syntax with nothing after the name was wrong. That is this card's own subject one level up.eslint-rules/no-line-address-in-test-name.js's own header quoting the false positive it was written to avoid. Replaced by a title-extent walk anchored at the statement start, with four fixture controls that run on every census.Checks
pnpm exec vitest run scripts/— 133 files, 3864 tests passed, 2 skipped, 0 failed (31 of them new).pnpm type-check:scripts— exit 0.packages/*,apps/*,examples/*,docs/**ignored; nothing here lives in a package, soturbo run lintreaches none of it) — 307 files linted, 0 errors, and the JSON report names both new files, so the narrowing is a measurement rather than a gap.check-changeset-presence,check-changeset-no-major,check-entry-guard,check-control-bytes,check-unreferenced-sources,check-governed-queue-guard --test— all exit 0. The guard reports NOT GOVERNED: 4 paths, none matched.⛔ Left in draft; not enqueued, no auto-merge armed.
🤖 Generated with Claude Code
https://claude.ai/code/session_01FhBNJcLRZLe8M87VcUgpKr
Generated by Claude Code
Generated by Claude Code