Skip to content

docs: a tested dependency census for the backlog, and #1250's measured numbers (BACKLOG #1250) - #867

Open
wshallwshall wants to merge 4 commits into
mainfrom
worktree-agent-a3d383e125d7303dc
Open

docs: a tested dependency census for the backlog, and #1250's measured numbers (BACKLOG #1250)#867
wshallwshall wants to merge 4 commits into
mainfrom
worktree-agent-a3d383e125d7303dc

Conversation

@wshallwshall

Copy link
Copy Markdown
Collaborator

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.py walks the tracked corpus (git ls-files, or git ls-tree at --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:

mechanism count at 975c13c1 how it fails
path-literal 64 the open fails, or silently reads nothing
path-pattern 3 a regex or glob spelling; invisible to a literal search
parse-items 31 survives a file move; breaks on a DEFAULT_SOURCES change
bare-filename 95 prose or a relative link
markdown-link 30 a dead link a link checker reports
archive-sibling 26 also names the archive half of the namespace

A file carries a set and the sets overlap, so those sum above the 100 total.

Two findings a better grep would not have produced

  1. .pre-commit-config.yaml depends on the ledger through a REGEX. Its backlog-parses hook is scoped files: ^docs/(BACKLOG\.md|archive/backlog/.*\.md)$. A grep -F docs/BACKLOG.md over that file returns exactly one line -- a prose comment -- and misses the functional filter. backlog-hygiene.yml carries 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.
  2. Five dependents name no path at all. 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.py read the ledger through parse_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 found docs/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

what filed re-scored measured at 975c13c1
tracked files depending on the ledger 66 78 100
of those, test files 13 15 29
open items with "ASVS" in the heading 103 106 107

Positive 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: at c2241cfe the backlog-parses hook (BACKLOG #1259) had not landed, so .pre-commit-config.yaml carried 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.py reds 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

  • The vault -- the migration's destination, and the whole of the unbuilt precondition.
  • Anything outside this repository: other clones, the published history, sdists on PyPI, branch protection.
  • Untracked and ignored files; a path built at run time; a dependency that never names the file.
  • The parked deficits, and I am not guessing at a number. The 2026-08-14 ruling parks a coordination-tooling or seat-topology item outside the public ledger, and with no private ledger those land in <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

  • The score line and the banner's own historical counts were left exactly as written. The brief says do not re-score, and the item itself says the priority line predates the 2026-08-14 ruling and is left unchanged deliberately. Editing the counts inside a dated re-score rationale would rewrite a record rather than supersede it, so the new measurement is a dated body paragraph that names which three figures it replaces. If the owner wants the banner and the priority-table row rewritten in place, that is a one-line follow-up.
  • archive-sibling alone does not count as a dependency on docs/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.
  • The census is not wired as a gate. Only its test runs in CI. Making the census itself a required check is a separate decision.

Checks

Interpreter verification, per the brief -- it imports from this worktree:

$ /c/Users/Scott/Code/MessageFoundry/.venv/Scripts/python.exe -c "import messagefoundry; print(messagefoundry.__file__)"
C:\Users\Scott\Code\MessageFoundry\.claude\worktrees\agent-a3d383e125d7303dc\messagefoundry\__init__.py

Run and green:

  • ruff format --check + ruff check on both new files

  • mypy --strict on scripts/docs/backlog_dependency_census.py (CI's mypy scope is messagefoundry + messagefoundry_webconsole, so this is beyond the gate)

  • scripts/hooks/ledger_check.py -- exit 0

  • scripts/docs/backlog_status_check.py -- OK, 664 items, each declaring exactly one status

  • scripts/docs/backlog_citation_check.py --base origin/main --head HEAD -- OK, 0 citations in scope

  • pytest tests/test_backlog_dependency_census.py -- 23 passed

  • pytest tests/test_tooling_partition.py tests/test_cp1252_console_safety.py tests/test_script_root_anchoring.py -- 47 passed

  • every 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 passed

Not run: the full suite (BACKLOG #1014, port collision).

Legs that must be read after this process is gone: the tooling job on both OS legs (the new test is registered in tests/tooling_manifest.txt), backlog-hygiene, and the CI gate. gh pr checks renders CANCELLED as a fail -- tally the check-runs API instead.

Commits

Four, one layer each, and the last touches docs/BACKLOG.md alone. 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

wshallwshall and others added 4 commits September 4, 2026 17:51
…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>
@wshallwshall wshallwshall added the reviewed A reviewer has read this. Removed automatically when new commits arrive. label Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

reviewed A reviewer has read this. Removed automatically when new commits arrive.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant