tools/queue_index.py, one defect in two places. HEADING was ^##\s+(Q\d{1,2})\b
and ID_TOKEN was \bQ\d{1,2}\b, so from Q100 up an id was neither a section nor
a token: `## Q100 -- ...` parsed as body text of the section before it. Both are
now `Q\d+` with the trailing \b kept. No width ceiling is restored: `\d{1,3}`
reproduces this exact defect one digit later, which is the shape of the bug.
Second half, same item: an id opened by a `**Qnn -- ...**` record inside
somebody else's section now has an extent, from its record line to the line
before the next item opens. Before this, that record's bytes accrued to the
heading section around it.
Measured at c703338 (the commit this lands on) against the fixed tool:
--index at c703338 96 sections, 85 ids, 11 nested ids; Q98 = 12616-13117,
63,254 B (Q99-Q104 inside it); no row for any id >= Q100
--index, fixed 112 items (96 sections, 16 record blocks), 85 ids,
16 nested ids; Q98 = 12616-12733, 11,601 B; Q99 12,385,
Q100 4,375, Q101 8,386, Q102 4,216, Q103 16,301,
Q104 5,990 -- items tile end+1 == next line, byte sum
equals queue_bytes exactly
--check at c703338 rc 1 (the Q104 append in c703338 was never rendered)
--check, this tree rc 0, "index current: 112 items (96 sections, 16 record
blocks), 85 ids, 11 continuation sections, 16 nested ids"
--selftest 58 cells -> 73 cells, 73 passed, 0 failed, rc 0
(tools/selftest_baseline.tsv follows: queue_index.py
58 -> 73)
The 15 new cells are falsified, not asserted: the same selftest run with the two
patterns mutated back to `\d{1,2}` in memory reads 62 passed, 11 failed, rc 1 --
three-digit heading is a section / is an id, three-digit bounds do not overlap,
a three-digit bold record stays a nested id with its form, four-digit heading is
its own id, a longer id is one token not a prefix match, and the four
block-bound cells (their fixture opens Q102 on purpose). Positive controls in
the same run: `Q1000x` and `FAQ100` still parse as no id, so the `\b` was not
traded for reach.
Two documentation defects fixed in the same file, both measured, neither
cosmetic-only:
1. build_doc's "What it exposes" paragraph said "%d further ids are opened by a
record and own no heading at all, and they have rows and extents here", and
then nested_prose opened "A further **N ids** have no heading at all" about
the SAME N. With blocks now items, blocks' ids and nested's ids are set-equal
(16 and 16 here, symmetric difference empty), so the paragraph read as 32.
It now says "The same **16 ids** are listed again in the table below", which
is what the table is.
2. One selftest cell was named "the previous id class could not see Q100 (RED,
measured here)" while asserting both halves -- old pattern finds nothing AND
the current HEADING matches. Renamed to say both.
Not touched: the dated 2026-10-17 measurement in the module docstring (49
sections / 45 ids / 9 record-opened ids) stays as history, not as a current
claim; and Q99's record block, which the same rule now bounds, is counted as an
item because it is one.
docs/queue-index.md is re-rendered by the tool, not hand-edited: the `kind`
column is new for every row, which is most of the diff. verify.py's
index-current leg reads it.
Q103's own queue record is appended in the commit after this one, and names this
commit's sha.
1.3 KiB
1.3 KiB
| 1 | # selftest_baseline.tsv -- the cell count each tool's selftest prints, pinned. | ||
|---|---|---|---|
| 2 | # Written by: python3 tools/selftest_sweep.py --repo . --write-baseline tools/selftest_baseline.tsv | ||
| 3 | # | ||
| 4 | # WHY THIS FILE EXISTS: the count a tool advertises lives in its own docstring, | ||
| 5 | # so a commit that deletes fixtures and decrements that number agrees with | ||
| 6 | # itself and every leg stays green. This ledger is the outside witness. | ||
| 7 | # `selftest_sweep.py` reads it on every run: a printed count that differs is | ||
| 8 | # PIN_DRIFT and fatal; a tool with no row is PIN_UNPINNED and fatal; a row | ||
| 9 | # whose tool is gone is PIN_ORPHAN and fatal. Re-pin on purpose, in the diff. | ||
| 10 | # | ||
| 11 | # tool<TAB>count<TAB>unit | ||
| 12 | append_only_audit.py | 18 | cells |
| 13 | append_only_owners.py | 15 | cells |
| 14 | census_row_delta.py | 37 | cells |
| 15 | check_lint.py | 37 | cells |
| 16 | checkin_check.py | 36 | cells |
| 17 | citation_hash_class.py | 19 | fixtures |
| 18 | citation_resolve_check.py | 14 | fixtures |
| 19 | doc_census_check.py | 104 | cells |
| 20 | doc_command_check.py | 18 | cells |
| 21 | gate_blame.py | 21 | cells |
| 22 | import_resolve_check.py | 38 | cells |
| 23 | landing_check.py | 26 | cells |
| 24 | manifest_audit.py | 17 | cells |
| 25 | path_claim_check.py | 31 | cells |
| 26 | queue_append_audit.py | 25 | cells |
| 27 | queue_claim_check.py | 24 | fixtures |
| 28 | queue_index.py | 73 | cells |
| 29 | reply_check.py | 49 | cells |
| 30 | selftest_sweep.py | 44 | cells |
| 31 | served_drift_check.py | 25 | cells |
| 32 | tool_map.py | 20 | cells |
| 33 | verify.py | 59 | cells |
| 34 | write_probe.py | 15 | cells |