docs: a tested dependency census for the backlog, and #1250's measured numbers (BACKLOG #1250) - #867
Open
wshallwshall wants to merge 4 commits into
Open
docs: a tested dependency census for the backlog, and #1250's measured numbers (BACKLOG #1250)#867wshallwshall wants to merge 4 commits into
wshallwshall wants to merge 4 commits into
Conversation
…OG #1250) #1250's blast radius has been a hand count three times and drifted between each: 66 tracked referencing files at filing, 78 at the re-score. A cross-repo migration steered by a number that moves on its own is how allocation collisions come back silently. scripts/docs/backlog_dependency_census.py enumerates the tracked corpus and classifies every dependent by ROLE and by MECHANISM, because a path literal and a parse_items import fail differently under a move. Every count carries a positive control and a negative one; a control that does not fire exits 2 and the counts are declared untrustworthy rather than printed. Measured: .pre-commit-config.yaml's ledger dependency is a REGEX, so a literal search for docs/BACKLOG.md over that file returns one prose comment and misses the functional filter. Five more dependents name no path at all and read the ledger through parse_items. Neither class was visible to any hand count. The move stays blocked on the vault precondition. This tool moves nothing. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…ensus The item carried three counts that moved on their own: 66 then 78 referencing files, 13 then 15 test files, 103 then 106 ASVS headings. Measured at 8a2854d they are 101, 29 and 107, and the paragraph names the tool and the command so the next reader re-derives rather than re-counts. Two classes no hand count could see are recorded: a path spelled as a regex (the pre-commit hook's own files: filter), and five dependents that name no path at all and read the ledger through parse_items. Also recorded: the item's filed directory table sums to 57, not 66. The score line is deliberately untouched. Re-scoring is the owner's call, and the item already says so. The move remains blocked on the vault precondition, unchanged. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…G #1250) Listing the path-pattern hits rather than reading the count found one false positive of four: docs/benchmarks/HANDOFF-enginebox-step2-step3.md says "pages scale with **BACKLOG**", and the closing bold marker matched the bare BACKLOG* arm. A quarter of the one class this tool exists to surface would have been reported as a migration target. Every arm now has to reach the md, so BACKLOG\.md, BACKLOG*.md and BACKLOG.*\.md still fire and the prose does not. Both directions are pinned: tightening a pattern until it catches nothing is the easy way to make a false positive disappear. The bare-filename comment also said "with no docs/ prefix", which was never what the pattern did. It is a deliberate superset of path-literal; the comment now says so. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The earlier paragraph was measured before the path-pattern detector stopped reading bold markdown as a wildcard, so it counted one file that carries no dependency: 101 becomes 100, four regex spellings become three, and the doc and document tallies drop by one each. Test files and ASVS headings are unchanged. The false positive is now recorded in the item rather than fixed out of sight. It was found by listing the hits, not by reading the count, which is the point the paragraph makes about why the census prints every file. Measured at 975c13c. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
What this is
A committed, tested dependency census for
docs/BACKLOG.md, plus the measured numbers written into BACKLOG #1250.THE BACKLOG WAS NOT MOVED, AND THE MOVE IS STILL BLOCKED. #1250's precondition is vault-side (atomic allocation, a high-water ratchet, installed hooks -- the Q5 ruling of 2026-08-13) and is unbuilt. The destination is still the weaker repository. Nothing here changes that, and the new tool moves nothing.
Why
#1250 has carried a hand count three times and it drifted between each: 66 tracked referencing files at filing, 78 at the 2026-08-20 re-score. A cross-repo migration steered by a number nobody can re-derive is how allocation collisions come back silently, which is the defect the ledger gate exists to prevent.
What was built
scripts/docs/backlog_dependency_census.pywalks the tracked corpus (git ls-files, orgit ls-treeat--ref) and classifies every dependent two ways.By role, so the four pieces of machinery the item names are findable by name: pre-commit gate, pre-commit config, status checker, citation checker, CI workflow, allocator, test, CI config, tooling, doc, engine, root.
By mechanism, because a path literal and a parser import fail differently under a move:
975c13c1path-literalpath-patternparse-itemsDEFAULT_SOURCESchangebare-filenamemarkdown-linkarchive-siblingA file carries a set and the sets overlap, so those sum above the 100 total.
Two findings a better grep would not have produced
.pre-commit-config.yamldepends on the ledger through a REGEX. Itsbacklog-parseshook is scopedfiles: ^docs/(BACKLOG\.md|archive/backlog/.*\.md)$. Agrep -F docs/BACKLOG.mdover that file returns exactly one line -- a prose comment -- and misses the functional filter.backlog-hygiene.ymlcarries the same shape in its own diff check. This is the shape of false zero the item exists to prevent, and it is pinned by a test asserting BOTH halves: the literal search misses it, the census does not.scripts/coord/landed_citation_screen.py,scripts/coord/throughput.py,scripts/quality/expiry_audit.py,tests/test_dangling_citation_check.py,tests/test_gate_ci_mirror_parity.pyread the ledger throughparse_items. Re-pointing them as path literals would fix nothing.Also recorded in the item: the filed blast-radius block's own eight directory buckets sum to 57, not 66. Nothing was wrong at the time and nothing reported the gap, because a hand count carries no control.
One false positive, found and recorded
The path-pattern detector originally accepted a bare
BACKLOG*. Listing the hits rather than reading the count founddocs/benchmarks/HANDOFF-enginebox-step2-step3.md-- prose reading "pages scale with BACKLOG", where a closing bold marker is a star. One wrong hit in a population of four is a quarter of the one class this tool exists to surface, and it would have gone into the item as a migration target.Fixed so every arm has to reach the
md, with both directions pinned: three prose shapes that must NOT fire, three real spellings that must. The finding is written into #1250 rather than fixed out of sight, because "found by listing the hits, not by reading the count" is the transferable part.Measured numbers, now in the #1250 body
975c13c1Positive controls
Seven must-fire controls name a file and the mechanism it must be found under. Three must-not-fire controls name ordinary tracked files that must carry none. A control that does not fire exits 2 and prints the counts as untrustworthy rather than as fact.
The historic arm is the strongest evidence available. Run at
c2241cfe-- the ref #1250 was filed on -- the census returns 103 ASVS headings, the number a human wrote into the banner that night, from an independently written instrument. That run also legitimately misses one control: atc2241cfethebacklog-parseshook (BACKLOG #1259) had not landed, so.pre-commit-config.yamlcarried no ledger dependency yet. The script says so explicitly rather than letting the exit code read as a broken detector, and a test pins that exact behaviour.tests/test_backlog_dependency_census.pyreds when a detector goes dead and when one goes generic. Either arm alone passes against a broken instrument, which is why both are there.What the census cannot see, stated in the tool and in the item
<git-common-dir>/mefor-coord/. That directory is untracked, machine-local, and carries no machine-readable marker separating a parked deficit from any other handoff note, so no count off it is reproducible on another clone. The population is known to be at least one -- the ruling's own instance -- and is not otherwise quantified.Assumptions taken, since a Builder gets one turn
archive-siblingalone does not count as a dependency ondocs/BACKLOG.md. One tracked file (docs/adr/0076-...md) names only the archive half; it is reported on its own line rather than in the headline, because counting it would answer a different question. The two ledger files themselves are reported as SUBJECT, not as dependents -- including them inflated every total by two.Checks
Interpreter verification, per the brief -- it imports from this worktree:
Run and green:
ruff format --check+ruff checkon both new filesmypy --strictonscripts/docs/backlog_dependency_census.py(CI's mypy scope ismessagefoundry+messagefoundry_webconsole, so this is beyond the gate)scripts/hooks/ledger_check.py-- exit 0scripts/docs/backlog_status_check.py-- OK, 664 items, each declaring exactly one statusscripts/docs/backlog_citation_check.py --base origin/main --head HEAD-- OK, 0 citations in scopepytest tests/test_backlog_dependency_census.py-- 23 passedpytest tests/test_tooling_partition.py tests/test_cp1252_console_safety.py tests/test_script_root_anchoring.py-- 47 passedevery pre-commit hook, on both commits (never
--no-verify)pytest tests/test_backlog_status_check.py tests/test_backlog_citation_check.py tests/test_dangling_citation_check.py tests/test_ledger_check.py tests/test_link_resolution.py tests/test_tooling_partition.py(with the census test) -- 182 passedNot run: the full suite (BACKLOG #1014, port collision).
Legs that must be read after this process is gone: the
toolingjob on both OS legs (the new test is registered intests/tooling_manifest.txt),backlog-hygiene, and the CI gate.gh pr checksrenders CANCELLED as a fail -- tally the check-runs API instead.Commits
Four, one layer each, and the last touches
docs/BACKLOG.mdalone. Commits 3 and 4 are the false-positive fix and the figures it corrects; they are separate commits rather than an amend because the branch was already pushed and a force-push is not recoverable.🤖 Generated with Claude Code