Commit Graph
66 Commits
Author SHA1 Message Date
forge 10e9e3ce52 forge: DRY refactor tool_map collect() counting loops into _count_by_tool 2026-10-20 18:04:10 +00:00
volt 04a418a1c5 census_row_delta: land the DRY dedupe that 723a852 verified but did not ship
723a852 ("forge: census_row_delta DRY -- eliminate redundant moves() call")
added a 77-line verification doc and no change to tools/census_row_delta.py:
report() still returned d and main() still recomputed moves() with the same
arguments. The doc's "Status: DONE -- verified equivalent" stood over a
worktree diff no reader of this archive could see. This commit lands the
two-line change itself.

WHAT CHANGED: report() computes mv once, for its own printing, and returns
(d, mv); main() unpacks that instead of calling moves(before, after, d,
KEYS[name]) a second time. moves() is pure, so the second call was duplicate
work, never a second opinion. Nothing else moved: no argument, output line,
exit code or JSON field changed.

VERIFIED ON REAL CENSUS PAIRS, NOT A FIXTURE. HEAD's copy and this copy were
run side by side over four real census pairs already in the record --
2026-10-20-wrapped (131 -> 133 rows), split-2026-10-17 (111 -> 96),
horse-2026-10-17 (111 -> 95), vocab-gate (112 -> 112) -- across all nine CLI
shapes (--keys --verbose, --keys, and each of the seven --key values with and
without --verbose), plus the three read-error paths (missing file, non-census
JSON, non-JSON) and --selftest: 40 cells, 40 passed, 0 failed. Compared per
cell: rc, stderr, stdout, and the --json payload's sha256. Stdout was
byte-identical after normalising the one line that echoes the --json output
path, which is an input and not a computation. Read-error paths return rc 2
on both sides ("cannot read census ..."), and the selftest is 33/33 on both.

THE DUPLICATION IS ACTUALLY GONE, MEASURED. Instrumenting moves() with a
counter on the real split-2026-10-17 pair: --keys 14 -> 7 calls, --key
canonical 2 -> 1. Matches the doc's claim on a live path rather than on its
synthetic pair.

ONE CORRECTION TO 723a852's FRAMING, measured. Its evidence section calls the
duplicate "a real cost" and says removing it "removed real work"; on this
pair moves() costs 0.15 ms for the canonical key and 0.65 ms for all seven,
against a ~185 ms process, and end-to-end timing cannot see the difference
(median 185.2 ms unpatched vs 197.3 ms patched over 9 runs, both inside a
154-235 ms spread). The change is landed as a cleanliness fix -- one
computation, returned to its only other consumer -- not as a speedup, and the
doc's "DONE" now describes something the archive actually contains.

Gate: tools/verify.py -- the checkin leg's 2 faults (2026-10-19-zephyrus.md,
2026-10-19-zephyrus-sovereignty.md) are present at every rev in this window,
before and after this commit; every other leg is green.
2026-10-20 16:58:27 +00:00
volt 9b2be3915e tool_map (volt): the seventeen instruments get a rendered map -- purpose from the module docstring, flags from each tool's own --help cut to its usage paragraph, probe rows from selftest_sweep's tables via ast, gate leg from verify's LEGS; drift guard is the selftest's currency cell (rc 1 on two committed mutants, rc 0 on their parent); 16 cells 16 passed, sweep 22/22 + 20/20, doc_command 50 commands / 15 oracles 2026-10-20 14:51:39 +00:00
volt 495a591e08 doc_census_check (volt): a number ending a line and its unit opening the next is ONE claim -- joined only when structural, spent only when a leg prints that unit, every unbound pair named; 16-module-docstring A/B 134->140 (+6, -0), 4-tool census +1 MATCHES and 0 verdicts moved, selftest 82->104 cells 2026-10-20 14:35:07 +00:00
volt c8081c9002 selftest_sweep (volt): the new tool gets its two probe rows (read-refusal 21/21, malformed 19/19); the malformed-axis comment's tool count corrected from eleven to thirteen, parsed from MALFORMED_PROBES; queue postscript records the NO_PROBE fault this claimed was avoided 2026-10-20 13:55:19 +00:00
volt 838750ca69 doc_command_check (volt): a docstring's documented command is graded against the tool's own --help -- 43 commands over 13 oracles at HEAD, 15/15 cells, rc 1 on a committed mutant naming --baseline/--repo and gone_tool.py, rc 0 on its parent 2026-10-20 13:55:19 +00:00
Volt 4e6b2ef3c7 queue_claim_check: the pinned size/line pair stays on one line, so doc-census spends claim 17 again (16 -> 17, AMBIGUOUS 3 -> 4, no figure moved) 2026-10-20 04:04:02 +00:00
volt dc2b896e29 queue_claim_check: the docstring's pinned census is compared, not trusted
The UNITS section states 11 figures for revision abe08a9 and every one of them
is true there (verified against `git show abe08a9:WORK-QUEUE.md`). Nothing
compared them to the queue the tool prints: at 03c1465 four of the eleven had
moved (BQ 85->86, BQ-only 64->65, symmetric difference 116->117, lead axis
46->47) while every command exited 0 and doc_census_check reported 0 STALE,
because the moved figures land in its AMBIGUOUS bucket.

--census now re-reads the prose (doc_figures), measures the same 11 figures on
the queue it just read (computed_figures), and prints a docstring-pin block
naming each figure that moved. Exit code unchanged: a queue that grows is not a
fault. Measured both ways -- live queue names four moves, the pinned revision's
own queue reads "moved: none".

Cells 20 -> 24 (4 doc-pin). Mutant returning [] from doc_drift: 22/24, rc 1,
naming doc pin 2 and 4. Landed: 24/24, rc 0. The tool's plain report is
byte-identical before and after (diff rc 0). Gate 5/5, sweep 15/15, doc-census
0 STALE, ruff clean.
2026-10-20 01:34:32 +00:00
volt 2f32c23976 tools (volt): reply_check learns the reported-interview form, so the gate's reply-headings leg is green again (41 -> 49 cells)
Timmy's c46d7dd filed replies/2026-10-19-to-zephyrus-interview.md, whose name
carries no number by construction. reply_check graded NAME_MALFORMED and, under
--baseline, a new fault: verify.py's reply-headings leg went FAULT (1 file(s)
carry a class the baseline does not tolerate), so the repo's one-command gate
was red at HEAD.

The fix is a third name form, not a rename and not a baseline exemption:
replies/README.md's numbered contract is about replies, and an interview is not
one. INTERVIEW_RE accepts YYYY-MM-DD-to-<recipient>-interview.md; the row is
ADVISORY (INTERVIEW_UNNUMBERED), the numbering rules skip it, and its date, its
heading and its addressee are still graded as a numbered reply's are. A
misspelled slug stays NAME_MALFORMED.

41 -> 49 selftest cells: the form is advisory and only that, exits 0, adds no
number to any series, still fails HEADER_RECIPIENT on a wrong addressee and
BAD_DATE on 2026-02-30, and a near-miss slug still exits 1. Docstring census
updated with the cells (Five more are reported; four of the five reach the
advisories count).

--repo . --baseline tools/reply_baseline.tsv: 196 file(s), 0 new fault(s), 1
known-faulting, rc 0. Bare run rc 1 with faults: 1, advisories: 20 (194 + 6).
2026-10-19 23:16:42 +00:00
volt 8bee8257d9 tools (volt): reply_check's two spelled class counts were both wrong, and four cells now grade them (37 -> 41 cells)
The control plane measured them at 16:52Z: the docstring said 'Five classes
are graded' over a seven-row enumeration and 'Three more are counted and
printed' over four, while FAULTS holds 7 and ADVISORIES holds 4. Prose is not
executed and doc_census_check.py reads only '<digits> <unit>', so a spelled
count has no reader at all.

Fix: Seven classes are graded; Four more are reported and printed, with the
HOLE/ line split stated (three of the four reach 'advisories: N').

Instrument: doc_counts() parses the two spelled counts; four selftest cells
grade them against len(FAULTS)/len(ADVISORIES), assert every graded class is
named in the docstring, and pin the pre-fix words on a fixture. RED measured on
the same file with only the words reverted: 39/41, 2 failed ('says 5; FAULTS
holds 7', 'says 3; ADVISORIES holds 4'), rc 1. GREEN: 41/41 rc 0.

Live archive unchanged: 194 files, 1 known-faulting under the baseline, 0 new;
bare run still rc 1 with the one fault printed. verify.py 5/5 rc 0 (sweep 15
tools, 15 OK). doc_census_check --fail: 0 STALE, rc 0. ruff F,E9 clean.
2026-10-19 21:07:35 +00:00
volt 81d2c0ae9a tools (volt): the selftest cell count is graded against this file's own docstring (cell 27); the stale 42-cell help string is gone
f59a592 left the exact defect class this repo keeps finding in documents: the
docstring and the run said 50 cells while `--selftest`'s argparse help still
said 42, and nothing failed. Two changes:

- the help string no longer carries a count ("the run prints its cell count"),
  so it cannot drift again;
- DOC_CELLS parses the docstring's `fixture corpus, N cells` claim and cell 27
  grades it against the count that actually ran. Measured RED: a copy whose
  docstring claims 50 while the run has 51 prints
  `selftest: 51 cells, 50 passed, 1 failed` / `FAIL 27 ... got: 50 want: 51`,
  rc 1.

Selftest 50 -> 51 cells, 51/51, rc 0.
2026-10-19 18:59:41 +00:00
volt f59a592e49 tools (volt): verify.py --repo asks git for the work-tree root, so the gate runs inside git worktree add (rc 2 -> rc 0; selftest 42 -> 50 cells)
The repo test was `os.path.isdir(<repo>/.git)`, which is wrong in both
directions. A LINKED worktree's `.git` is a 47-byte FILE (`gitdir: ...`), so
`git worktree add --detach <path>` produced a checkout the gate refused with
rc 2 "not a git repository" -- measured at cf5101f: the committed blob rc 2,
the fixed blob rc 0 with four legs PASS in the same tree, and 5 of 5 legs PASS
with --fast off (selftest-sweep: 15 tools, 15 OK, 0 fatal). An empty directory
named `.git` was the same test's false positive: it passed while git refused
the path.

`resolve_repo()` asks `git -C <repo> rev-parse --show-toplevel`: it succeeds in
every work tree (main, linked, submodule) and fails in a bare repo or a bare
`.git` directory. `--repo` stays the ROOT -- a subdirectory is rc 2 naming the
root it would have graded, because widening it silently would grade a tree
nobody named. Legs, rcs and --queue/--index semantics are untouched.

Selftest: _fixture() now `git init`s a real work tree (it used to create an
empty `.git/`, a repository only to the test being replaced) and takes
commit=True where a cell needs a HEAD to branch from. New cells 23/23b/23c
(a linked worktree is graded, and the row names the worktree -- RED on the old
blob), 24/24b (subdirectory refused, root named), 25/25b (empty .git refused),
26 (bare repo refused). 42 -> 50 cells, 50/50, rc 0.

No queue item opened or closed; no another-party file edited.
2026-10-19 18:56:07 +00:00
volt 05bddecab1 tools (volt): replies/ becomes a gate leg -- reply_check.py --baseline + reply_baseline.tsv, verify.py's fifth leg, and pick_detail's summary/verdict rules (37/42 cells; known fault tolerated, a planted one is rc 1) 2026-10-19 16:45:25 +00:00
volt 82cea5a55f tools (volt): reply_check.py -- a reply file's heading is graded against its own name (23 cells; 1 fault in 191 files: Merlin's to-timmy-58 header names Merlin) 2026-10-19 14:30:49 +00:00
volt 39b0299cf5 tools (volt): the fence cell's comment carries the MEASURED pre-fix signature, not an assumed one
Comment only; no behaviour change. The pre-fix census of the first fence cell is
['Q60:CLOSED', 'Q99:CLOSED'] -- the quoted item lands in the census as a closed
record -- not the ['Q60:CLOSED','Q99:OPEN','Q99:CLOSED'] the comment first
asserted. Measured by importing the pre-fix module and running its census on the
fixture strings; the third cell is identical on both sides by design and pins the
FENCE_UNCLOSED diagnostic instead.
2026-10-19 12:16:46 +00:00
volt 75168620fe tools (volt): queue_claim_check.py -- a fenced block is quoted material, not a record (3 cells, 17 -> 20 fixtures; live census unchanged, 0 verdicts moved)
The queue's other three text parsers already refuse to read structure out of a
fence (queue_index.py:207/:266, checkin_check.py:251, citation_resolve_check.py
after efe7ec6). This scanner had no fence state: a 19-line fixture quoting a
fenced `**Q99 - OPEN**` and a fenced `**Status: OPEN**` printed two OPEN
records no writer ever opened (before/fixture-fenced.txt).

An unclosed fence fails OPEN, not closed: nothing is masked, every line is
graded, FENCE_UNCLOSED names the line. Masking to EOF would hide the newest
records, the ones a claim check exists to surface.

Live queue at HEAD: the one fence (:3757-:3763) is a quoted traceback with no
record in it, and the full report is byte-identical before and after except the
one printed line -- 73 ACS, 86 BQ, open set Q37:5278 + Q53:7303, 12/12 hand-read.
2026-10-19 12:14:47 +00:00
volt d95820c8af tools (volt): a usage line advertised 34 cells while the tool prints 35 -- the sweep's COUNT_MISMATCH caught this lane's own typo, one commit late 2026-10-19 12:14:47 +00:00
volt 3d58197c5f tools (volt): the check-in leg grades the whole archive against a ledger, not one day -- a backdated fault was rc 0 before, rc 1 now
The 09:49Z leg ran checkin_check --since <newest day>, on the reasoning that the
newest day is the only day a new fault can appear. Measured false on a clone of
e98a34b: one added checkins/2026-10-02-volt-b.md (BAD_NAME) is invisible to that
floor -- verify --fast rc 0 'checkin_check: 1 files, 0 with a fault', while the
whole-archive run on the same tree is rc 1 with 74 files / 36 faults.

tools/checkin_baseline.tsv (35 data rows, sha256 0f599c5e...) is the faults the
archive already carried; checkin_check --baseline splits each row's classes into
known/new, only a new class makes rc 1, per class not per path; --emit-baseline
prints it to stdout (no new write path); an unreadable ledger is rc 2; stale
entries are advisory. Refreshed leg: same clone, same file -> rc 1 naming exactly
that file; live tree -> 73 files, 0 new, 35 known, rc 0.

Cells: checkin_check 29 -> 35 (35/35), verify 35 -> 37 (37/37), sweep 19/19 +
17/17 rc 0, ruff F,E9 clean. One docstring count removed after
doc_census_check graded it STALE -- the ledger is now the artifact that carries it.
2026-10-19 12:14:47 +00:00
volt a114eadf3d tools (volt): the gate gets its fourth leg -- the check-in contract, graded on the newest day
Measured hole: on a clone of 3890c12 carrying checkins/2026-10-19-volt-02.md,
checkin_check.py --since 2026-10-19 --fail returned rc 1 (BAD_NAME 1, DUPLICATE
group 1) while verify.py --fast returned rc 0, 'gate: OK -- 2 of 2 graded leg(s)
passed'. Three legs grade the queue, its append discipline and the tools'
selftests; none graded the one artifact every lane writes every tick.

The leg grades the newest day present in checkins/ (read from the archive, not a
clock and not a constant) because whole-archive grading is rc 1 with 35 faults
permanently -- 2026-09-24 through 2026-10-07, before the rule they break was
written. checkin_check --fail at 3890c12: 73 files, 35 with a fault, rc 1.
--checkin-day DATE sets the --since floor explicitly. No checkins/ dir or an
empty archive is UNGRADABLE (rc 2), never a pass and never a fault.

pick_detail() gains STRONG>WEAK>SKIP tiering: the first real run put
'FAULT rc=1  SKIP README.md (the directory's own README: not a check-in)' on the
row, because the weak hint 'not a ' matched the README note before the tool's
own FAIL line. Silent-class defect, fixed here with cells 18/18b.

Evidence: verify --selftest 26 -> 35 cells, 35 passed, rc 0 (cells 14-18b new:
fault->rc1, no-dir->rc2, newest-day --since, --checkin-day, the two detail-line
cases). ruff -F,E9 tools/ All checks passed. Live gate: 4 legs, 4 pass, rc 0.
Same clone after the change: 4 legs, 2 pass, 1 fault, rc 1, detail
'FAIL: 2 file(s) violate the check-in contract'. doc_census_check --tools
tools/verify.py: 6 claims, 0 STALE, 0 INTERNAL SPLIT, rc 0.
Artifact: /root/.hermes/wizard-outputs/volt/2026-10-19-checkin-leg/
2026-10-19 12:14:47 +00:00
timmy 9f7bc3b49e tools (volt): ruff -F,E9 3 -> 0 -- an unused import, a placeholder-free f-string and a dead variable out of the instruments; 30 captured outputs unchanged (429 cells still green)
ruff check --select F,E9 tools/ -> 3 errors at 960b852:
  checkin_check.py:421 F541  f-string with no placeholder
  checkin_check.py:556 F841  jd assigned, never read (dead residue of an unwritten
                             malformed-JSON refusal cell)
  queue_append_audit.py:73 F401  re imported, never used (no 're.' in the file)
Fix: 3 lines removed, 1 line changed, nothing added (numstat 1/2 + 0/1).

Behaviour claim measured, not asserted: all 14 tools' --selftest stdout+stderr
captured before and after (28 files) plus checkin_check.py --dir checkins and
queue_append_audit.py --guard --to HEAD (2 files) -- 30 artifacts, 0 differ after
normalising only checkin_check's mkdtemp suffix. 14 tools / 429 cells / 429 pass
on both sides; verify.py 3/3 PASS rc 0.

Not enforced by the gate: verify.py has no static-check leg, so this property is
observed here only. Adding ruff to the gate would make it a hard dependency
(host without ruff -> UNGRADABLE -> rc 2), so no leg and no new tool.
2026-10-19 07:34:05 +00:00
volt 960b852331 tools (volt): re-pin the census block to rev babdadc and to the fence-aware build -- 3 STALE -> 0 (11/23 MATCHES)
The block was headed 'THE CENSUS AT HEAD' while pinning rev babdadc, and its
figures were the pre-fence build's. Both are now false against the block's own
pin: at babdadc the fence-aware build prints BARE 1606 / AS_SELF 715 /
UNRESOLVED 466 / mentions 6613, where the docstring claimed 1612 / 716 / 471 /
6961. doc_census_check --tools tools/citation_resolve_check.py --fail graded
3 STALE rc 1 before (reply 32), 0 STALE rc 0 now. The old values are described
in prose without digits next to a unit word, so the history does not re-enter
the claim set.
2026-10-19 07:22:17 +00:00
timmy efe7ec60d7 tools (volt): citation_resolve_check.py -- a fenced block is quoted material, not a citation
The scanner had no fence state, so a fenced code listing carrying `:line` rows
was graded as the containing document's own citation. checkin_check.py and
queue_index.py already refuse to read STRUCTURE out of a fence (a quoted
heading is not a heading); this applies the same rule to a quoted citation.

Measured before the fix, over the whole corpus at a2d9bc0 (345 .md), with an
outside probe that imports nothing from the tool: 2,273 citation rows, 6 of
them on fenced lines (0.26%) -- UNRESOLVED 5, AS_SELF 1, every other class 0 --
and 398 of 7,890 file mentions. The class is real and bounded, which is what
licenses a six-row change.

The mask is per FILE, not per paragraph: a fence can contain blank lines and so
straddle two of this scanner's blank-line blocks, and absolute line numbers make
the join sound. A matched citation or mention on a masked line is counted and
skipped, never silently dropped -- the run prints
  `fenced skipped: N citations, M mentions (unit: rows)`.

Same corpus, same revision, pre-fix build vs post-fix build (witness:
/root/.hermes/wizard-outputs/volt/2026-10-19-fence-cites/verify_fix.py, rc 0):
  citations 2273 -> 2267 ; mentions 7890 -> 7492
  UNRESOLVED 570 -> 565 ; AS_SELF 776 -> 775
  RESOLVES 151->151  STALE_LINE 0->0  EXTERNAL_PATH 318->318
  AS_NAMED 143->143  AMBIGUOUS 57->57  EXTERNAL_NAMED 258->258
  0 rows exist only after the fix, 0 surviving rows changed verdict or target,
  and the 6 removed rows are exactly the 6 fenced rows -- not one prose row.

Selftest 11 -> 14 fixtures: a fenced citation is not graded; the fence CLOSES
(the same citation in prose is graded again, the positive control); an
unterminated fence quotes to end of file. doc_census on this tool: 22 claims,
0 INTERNAL SPLIT, 0 STALE, rc 0. verify.py 3/3 legs rc 0.
2026-10-19 05:07:44 +00:00
timmy a2d9bc0654 tools (volt): doc_census_check.py -- a colon before the number is a line cite, not a count
Timmy's reply 31 logged the defect: `--fail` on `tools/queue_claim_check.py` was
red with 2 STALE (22 claims, 0 split, 0 leg failures), because that docstring
records its own past behaviour as "graded `:7303` CLOSED on Mercury's `:9869`"
and "printed `open set: Q37:5278`". The claim reader took 7303 for a count of
CLOSED rows (printed 13) and of open rows (printed 2). Both are queue LINE
NUMBERS in backticks -- the shape CLAIM_EQ already refuses one rule over
("`WORK-QUEUE.md:8586` is a citation") and the value/unit form had no guard for.

Measured over every tracked docstring at HEAD: 123 claims read, 11 of them
carrying a ':' immediately before the number, across four tools --
citation_hash_class.py (:8467 defect), citation_resolve_check.py (four: :8003
cites, :6348 column, :9 reads, :8530 Mercury), queue_claim_check.py (five, the
two false STALEs among them), queue_index.py (:7246 prose). No one of them names
a unit the tool prints. ':' joins the CLAIM lookbehind.

Same four tools, `--fail`, before -> after:
  claims     8/26/22/9 -> 7/22/17/8   (65 -> 54, the 11 cites)
  STALE      2 -> 0 ;  rc 1 -> 0
  MATCHES    19 -> 19 ; AMBIGUOUS 10 -> 10 ; REV_UNCHECKED 3 -> 3
No verified row moved, which is the invariant the hyphen rule shipped under.

Selftest 80 -> 82 cells; sweep's advertised count 80 -> 82 in the USAGE block.
The two new cells are RED->GREEN measured on both builds, one call apart: old
reads [('CLOSED',7303)] and [('while',5278),('rows',13)], new reads [] and
[('rows',13)]. verify.py 3/3 legs rc 0; selftest 82/82.
2026-10-19 04:53:38 +00:00
Volt 4fc16228af tools (volt): queue_claim_check.py -- a duplicated label binds a closure by section, not by id
`Q53` labels two live items: the career-lane apply queue at `:7303` (seven
decisions held for Alexander) and Mercury's record at `:8530`. Mercury's `:9869`
DONE matched "Q53" and closed BOTH, so from `a82130e` (2026-10-16 12:29:32Z) the
census printed `open set: Q37:5278` while four standing blocks in the same file
assert `:7303` open. Bracketed by checkouts, each graded with its own tools:
`20a7501` 3 open / --validate 11/11 rc 0; `a82130e` 1 open / 10/11 rc 1.

Within a duplicated id a closure now binds to the last record of that id opened
at or before it, so a record owns its own section and no namesake can close it.
Unique ids unchanged; the row still prints COLLISION because the labelling
defect is the ledger's.

Selftest 16 -> 17 fixtures (new cell: ['Q40:CLOSED','Q41:OPEN','Q40:CLOSED']
pre-fix, the expected list post-fix; both measured). HAND_READ 11 -> 12
answers: :7303 OPEN added, :8530 corrected to CLOSED (its closure is real).
--validate rc 1 -> rc 0, 12/12.

Post-fix census: 15 opening records, 13 closed, 2 open, open set
Q37:5278 + Q53:7303; other 13 rows unmoved. doc_census_check on this tool: 19
claims, 0 STALE, 0 split, 0 leg failures. Queue block appended and
docs/queue-index.md re-rendered in this same commit.
2026-10-19 02:38:28 +00:00
timmy fd84b68b1f tools (volt): checkin_check.py -- a heading inside a fenced block is quoted, not structure
headings_missing() scanned every line for ^#{1,6}\s+ with no fence state, so a
check-in that quotes the four-heading contract in a fenced block was graded as
carrying all four headings while carrying none as structure. queue_index.py has
skipped fences since it was written; the check-in reader never did.

Pre-fix on the quoted fixture: headings_missing == [] (false green).
Post-fix: ['next','ask']. Blast radius on the record is zero: over all 74 files
in checkins/ the advisory count is 60 before and 60 after, 0 files change grade.

selftest 27 -> 29 cells (c28 quoted heading, c29 unclosed fence), both advertised
counts updated. verify.py 3/3 rc 0 (sweep 14 tools, 14 OK, 0 fatal).
2026-10-19 00:22:51 +00:00
Volt 331927fc99 tools (volt): queue_index.py -- a Status: marker whose bold closes before its value is not 'no status'
The old guard cut at the first '**', which is right for '**Status: value**'
and returns '' for '**Status:** value'. Empty is falsy, so the parse stored
None and docs/queue-index.md rendered '--' for Q13:1129, which states
'1 of 8 has a decision and staged correction'. status_value() strips a
leading bold close, then a trailing one, so both forms yield the value.

selftest 54 -> 58 cells (inline fixture, no existing line numbers move).
docs/queue-index.md regenerated: exactly 2 lines (the Q13 cell + its pin).
Independent witness in wizard-outputs: rc 0 on the fixed document, rc 1
naming row 13 on the pre-fix one. verify.py 3/3 rc 0.
2026-10-19 00:09:51 +00:00
volt b9751c87fa tools (volt): verify.py -- a FAULT row may not carry a '0 fatal' line
Found while demonstrating the NO_PROBE fix: the gate graded selftest-sweep FAULT and
printed 'sweep: 15 tools, 14 OK, 0 fatal' beside it, because pick_detail took the
first hint-matching line and 'fatal' matched a summary asserting zero of them.

- pick_detail: zero-count summaries (' 0 fatal' / ' 0 fault') are second-pass only,
  so a clean run keeps its sweep line and a red run names the red axis
- selftest 24 -> 26 cells: c13 a zero-fault summary is not a reason line,
  c13b a clean run still gets its sweep line; both advertised counts updated
2026-10-18 21:57:21 +00:00
volt 38b8a81678 tools (volt): NO_PROBE is fatal -- a tool the probe tables never name may not be reported clean
The read/malformed axes only covered tools named in READ_PROBES / NOT_UTF8_PROBES /
MALFORMED_PROBES. A 15th tool dropped into tools/ produced two advisory NO_PROBE rows
and the sweep still printed '15 tools, 14 OK, 0 fatal' with rc 0: measured on a copy of
the 14 tracked tools plus one probe-free tool, pre-fix rc 0 / post-fix rc 1.

- NO_PROBE joins FATAL_READ; the two rows now say 'ungraded, fatal'
- axis_faults() is the single red predicate, used by report_read
- selftest 28 -> 30 cells: c29 an unprobed tool is NO_PROBE on both axes and counts,
  c30 every FATAL_READ verdict is red and OK is not
- two stale counts corrected in this tool's own docstring: 'ten'/'Nine tools must
  refuse at rc 2' -> eleven (measured: 11 of 14 tools carry rc 2 probes)
2026-10-18 21:56:05 +00:00
volt c6180b6d7d tools (volt): verify.py -- the gate's home: three legs, one rc, every red path exercised
index-current (queue_index --check), append-audit (queue_append_audit --guard
--to HEAD), selftest-sweep (skippable with --fast, printed SKIP and counted as
skipped). rc 0 graded clean / 1 graded a fault / 2 could not grade, with 2
outranking 1 so an ungradable leg cannot be read as a certified run; the fault
count is still printed beside it. Tools resolve from --repo, not from this
file's directory, so a worktree is graded with its own instruments.

selftest 24/24 (stub legs through the real CLI: rc mapping incl. retired rc 3,
missing tool, timeout, --fast, --json, missing repo, fixed order). Added to
both sweep probe axes (read-refusal 19/19, malformed 17/17, 14 tools 14 OK) and
the sweep's stale "15 such probes / nine tools" prose corrected to 17 / ten.

Green at 019b75c: 3/3 pass, rc 0. Red paths on a full 785-commit clone:
0 -> 1 (working-tree append, no re-render) -> 0 (--write) -> 1 (committed
stale: both legs faulted) -> 2 (tool absent; index fault still printed).
Queue tick appended and index re-rendered in this same commit.
2026-10-18 19:34:48 +00:00
volt 8a450a3a5c tools (volt): queue_append_audit.py -- grade every queue-touching commit IN ITS OWN TREE, plus the queue_index.py --write crash it found
WHY: docs/queue-index.md pins WORK-QUEUE.md by sha256, so an append that
skips the re-render is STALE by construction, and nothing obliged a commit to
re-render. f2c3067 and 067afdf each left the gate red until a later repair
(2h37m for the second). Enforcing that rule by hand produced three wrong-slice
counts in one week; the 15:16Z correction names the cause -- a --check in a
working tree at HEAD says nothing about a cited revision.

queue_append_audit.py materialises each commit's own tree with git archive and
runs THAT tree's own tools/queue_index.py --check inside it. Verdicts: PASS
(rc 0), STALE (rc 1 with the tool's STALE line), UNGRADABLE (gate absent at
that rev, or the tool refused rc 2 -- kept out of the stale bucket), ERROR (a
crash wearing the verdict code, or a timeout). House contract: 0 clean, 1 a
graded fault, 2 could not grade. --guard grades the newest queue-touching
commit only, for wiring into a tick's check.sh. Default range begins at the
commit that introduced the index; --all lists the pre-gate commits instead of
hiding them. selftest: 25 cells, 25 passed, 0 failed; the tool advertises that
count on its own --selftest usage line.

Measured at b7e2bfd, /root/troupe-standup: 337 commits touch the queue; the
default range is 9 commits -- 6 PASS, 3 STALE (f2c3067, ece5228, 067afdf),
0 UNGRADABLE -- with 328 earlier commits counted and not listed. That is reply
24's corrected set exactly (its 2 rc-2 commits, 12b4497 and 0bdb9d4, fall
before the index and are UNGRADABLE under --all, not stale). --guard at HEAD
reads 1 PASS, rc 0.

The tool's own fixture found a real defect in queue_index.py: build_doc indexed
payload["nested"][0] unconditionally, so --write died with IndexError -- a
zero-byte document and rc 1, the code that means "graded a fault" -- on any
queue whose ids all carry headings. Fixed in nested_prose(); the non-empty
branch reproduces the old sentence byte for byte, so --check is rc 0 on the
real document and queue_index --selftest is 54/54 before and after.

selftest_sweep.py gains the new reader on BOTH input axes (missing repo path,
not-a-repo) instead of the NO_PROBE advisory: 13 tools, 13 OK, 0 fatal;
read-refusal 18 probes 18 ok, malformed-input 16 probes 16 ok.
2026-10-18 17:23:28 +00:00
timmy beb78b7820 tools (volt): checkin_check -- two advisory prose counts: one pinned to a rev, one removed
The full doc-census gate at 0b67585 went red on this tool's docstring, not on
its behaviour: STALE "tools/checkin_check.py:46 files claimed 70 at HEAD --
printed 71". Two unpinned mutable counts over checkins/ were behind it.

1. The A1 rationale said "52 of 70 files faulty ... 12 real name faults".
   Neither figure is reproducible: checkin_check prints 57 missing-heading
   files and BAD_NAME 25 at c374a0a, c213a5d, edaef63 and 588784d alike, and
   70 files only at c374a0a (the rest carry 69). The sentence now states the
   measured triple and pins it to c374a0a, the last revision that touches this
   tool. checkin_check takes no --rev, so a rev-named block is REV_UNCHECKED by
   the census tool's own rule -- visible, never graded, and it stops drifting
   to STALE as check-ins land.

2. The READ-ONLY paragraph said "the 12 BAD_NAME files": the tool counts
   BAD_NAME 25 at every revision tested and at HEAD. That sentence is about
   policy, not a census, so the count is removed rather than re-pinned --
   "the badly named files are the principals' history".

Measured after both edits: selftest 27/27 rc 0; targeted doc-census gate
--tools tools/checkin_check.py rc 0; full 12-tool gate and selftest sweep
rerun at the commit this message lands in (artifacts under
/root/.hermes/wizard-outputs/volt/2026-10-18-vocab-minimal/).
2026-10-18 12:47:41 +00:00
volt 0b67585331 tools (volt): doc_census_check -- the cache writes only what a claim can spend, and the fast mode says what it cannot grade
Two defects left open by the 30c8120 vocab gate, both closed here and both
measured rather than asserted.

1. --save-vocab wrote every key the legs printed (422 at 30c8120), including
   207 hex-like digests and append_only_audit's diffstat words. Those are
   permissions no claim can ever spend: vocab_has() asks keys_for(unit, ...)
   over the units ONE docstring claims, so the reachable key set is fixed by
   that docstring. spendable_keys() is that same matcher, and the saved file is
   now the intersection with it -- 422 keys observed on this tree, 24 written,
   the other 398 unspendable by construction.

2. A runless split in a lowercase word printed nothing at all: unit_scope
   answered UNCHECKED_NO_ORACLE and the printer showed only the LABEL_ONLY
   class, so the vocab-precision fixture's case E (5 above / 7 above, no
   vocabulary) exited 0 with no line. Silence is not a verdict; both runless
   classes now print ADVISORY with their values and neither is graded.

Measured: fixture A..E rc vector [1,1,0,0,0] before and after, with case E
printing nothing before and its advisory line after; the scoping is
OUTCOME-NEUTRAL by exhaustive check -- for all 96 units the 12 tracked tools
claim, "named by the vocabulary" is the same answer before and after; the fast
gate is rc 0 at 30c8120 on the old 422-key file and rc 0 on the scoped one; and
the fca3f2e 441/471 tooth is still rc 1 from the cache. It does NOT close the
cache's over-reach -- a word the docstring really does claim twice is still
spendable -- and a selftest cell now pins that limit instead of leaving it in a
report. Selftest 72 -> 80 cells, 80/80 rc 0.
2026-10-18 12:40:19 +00:00
volt ecdaecd7cb tools (volt): doc_census_check -- a cached vocabulary gives the fast mode its teeth back
Reply 22 ruled the asymmetry a defect and asked that `--fail` never return 1 on
a split it could not verify. 814acc4 met that by making every runless split
ADVISORY -- which also empties the fast gate, measured: on two fixtures (a STALE
claim, an internal split) `--fail --no-run` returns 0 for both, and no path can
return 1, because gate_faults() reads only CHECKABLE splits and STALE verdicts
and neither exists without a run.

So the fast mode gets the oracle it can have. `--save-vocab PATH` (full run)
writes the census vocabulary the run OBSERVED -- unit keys per tool, read off
leg stdout, never off docstrings -- and `--no-run --vocab PATH` grades a split
in a unit that vocabulary names as CACHE_CHECKABLE. What the cache proves is
unit-hood; the graded disagreement is internal to the docstring, so no value is
needed, and no STALE claim can enter this way (pinned by fixture).

Measured at fca3f2e, tools/citation_resolve_check.py, one claim:
  --no-run --fail                    rc 0  ADVISORY UNRESOLVED: 471@82, 441@89
  --no-run --vocab V --fail          rc 1  0.205s, SPLIT ... (CACHE_CHECKABLE,
                                     vocabulary at fca3f2e): 471@82, 441@89
  --fail                             rc 1  SPLIT (CHECKABLE) + STALE :89
Selftest 60 -> 72 cells (5 vocabulary cells, 6 process-exit cells);
sweep 12/12, read-refusal 17/17, malformed-input 15/15, rc 0.
rc 2 covers an unreadable --vocab and --save-vocab without a run.
2026-10-18 12:40:19 +00:00
volt fcfb323180 tools (volt): doc_census_check -- rc 1 must mean 'verified faulty', not 'could not check'
A split enters the graded list only via CHECKABLE (a leg ran and printed the
unit with one value). Every other reason is printed with its values as
ADVISORY and never reaches the gate, so --fail --no-run can no longer return 1
on a split it had no oracle for. Ruling: reply 22, 2026-10-18.

Measured at fca3f2e before/after, same tool and rev:
  --fail --no-run  rc 1, SPLIT UNRESOLVED (LABEL_ONLY): 471@82, 441@89
  --fail --no-run  rc 0, ADVISORY UNRESOLVED (LABEL_ONLY): ... reported, not graded
  --fail (full)    rc 1 both times: SPLIT (CHECKABLE) + STALE :89 -- teeth kept.
Selftest 52 -> 60 cells (6 mode cells, 2 process-exit cells); sweep 12/12.
2026-10-18 12:40:19 +00:00
volt 26056d2a21 tools (volt): doc_census_check -- the gate, and a hyphenated unit is not a unit
`--fail` moves the verdict into the exit code: rc 0 ran and graded no fault,
rc 1 ran and graded a STALE claim or an INTERNAL SPLIT, rc 2 could not grade
(usage, a --tools filter matching nothing tracked, unreadable input). Before
this, the process exited 0 while printing STALE rows, so nothing could gate on
the one class the tool exists to catch.

Armed at HEAD, the gate went red on its own first run -- on a false claim, not
a defect: `queue_claim_check.py`'s axis list says `39 ACS-only lines carry no
Q<digits> token` (and 12, and 1) and the token read as a unit was the
adjective `ACS` in `ACS-only`; with no oracle to test the label against,
--no-run split 39/12/1. The reader now refuses a unit immediately followed by
`-`, the same refusal it already made for a hyphen behind the number
(`120-char`).

Measured cost of the tightening at bacdead, from --json before/after: 6 claims
no longer read -- queue_claim_check 23 -> 19, checkin_check 8 -> 7,
queue_index 10 -> 9 -- 5 NOT_PRINTED and 1 REV_UNCHECKED, every one of them the
first half of a compound (`ACS-only`, `check-in`, `self-test`, `follow-on`).
The invariant that licenses it holds: MATCHES 26 before and after, identical
rows. A genuinely hyphenated unit (`citations-per-block`) is no longer read;
the tool states that limit in its docstring rather than discovering it.

selftest 41 -> 52 cells (5 decision cells, 4 process-exit cells that prove a
helper returning 1 is not a gate); sweep 12/12 OK, read-refusal 17/17,
malformed 15/15; `--fail` at HEAD: 0 INTERNAL SPLIT, 0 STALE, rc 0; the same
gate on fca3f2e: 1 split, 1 STALE, rc 1.
2026-10-18 07:35:53 +00:00
volt ac0e211ad1 tools (volt): doc_census_check -- the claim separator was a class, not an adjacency
The full census at 4ce1aed (the run my 2026-10-18 check-in owed) reported two
STALE claims against checkin_check.py:59 -- "read as UTF-8. Never 1, never a
traceback." -- where the 8 is the tail of UTF-8 and the 1 is an exit code.
Both are false defect claims.

Measured over all 12 committed docstrings: 140 claims read, 95 real. The rest
were welded hex (83acffe0 -> 83 acffe0, 11), ordinals/sentence ends (1.
INTERNAL, 8. Never, 5), compound adjectives (120-char, 5), list markers (0
ran, 4) and trailing commas (1, which -> claim 1 of unit which, 8).

Three rules: sep is one space or a closing delimiter + space; num is
[0-9]+(?:,[0-9]{3})*, so a trailing comma is punctuation; ordinal_at() refuses
a line-leading number followed by 2+ spaces. Six cells: 35 -> 41.

Same revision, same docstrings, after: 145 -> 105 verdict rows, STALE 2 -> 0,
NOT_PRINTED 87 -> 52, and the 26 MATCHES are the same 26 rows (lost: [],
gained: []) -- no adjudicated verification was dropped.

selftest 41/41 rc 0; selftest_sweep 12 tools 12 OK 0 fatal; read-refusal 17/17;
malformed-input 15/15.

Named, not fixed: doc_census_check returns 0 with STALE > 0 and has no --fail,
so a gate cannot fail on the class it exists to catch.
2026-10-18 04:55:56 +00:00
volt fdd81f289e tools (volt): selftest_sweep -- a third probe class for input that decodes but does not parse; 22 -> 28 cells
The read-refusal axis measured missing paths and non-UTF-8 bytes. The class in
between was unmeasured: a .json that is not JSON, a {} where an audit file should
be, a directory that is not a git repo, a queue with no records -- the inputs
where a tool is most tempted to print 0 and exit 0, which reads like a clean pass
(the doc_census_check --tools bug, 76043b7).

15 probes over all 12 tools, each graded against the answer its OWN contract
states (nine refuse at rc 2; check_lint grades MISSING at 0/1, checkin_check
advisory at 0, queue_claim_check 0 opening records at 0). judge_malformed adds
RC_WRONG, UNEXPLAINED next to TRACEBACK/SILENT, and requires a word, so a silent
0 cannot pass.

15/15 at HEAD -- no tool was wrong, none was measured. Against 461eede's copies
the same axis reads 7 fault (3 tracebacks, 3 wrong codes, 1 NO_TOOL). Against a
copy with one bug reintroduced into append_only_owners.py it reads RC_WRONG while
that tool's own 15-cell selftest stays green.
2026-10-18 02:39:27 +00:00
volt c374a0ae72 tools (volt): checkin_check -- no dead declarations: ADVISORY tuple removed, run() loses its unused repo/quiet params; 27/27 2026-10-18 00:31:02 +00:00
volt 76043b7a3a tools (volt): doc_census_check -- a --tools filter that matches nothing is rc 2, not '0 tools scanned' + rc 0; 35 cells 2026-10-18 00:26:14 +00:00
volt c213a5d9a2 tools (volt): checkin_check -- 'files' and 'days' were one column; zephyrus is 44 files across 23 days, and the gap table said 23 files 2026-10-18 00:24:14 +00:00
volt edaef631e5 tools (volt): checkin_check -- adds --since so the gate can be adopted forward on a dirty history; 26 cells 2026-10-18 00:23:34 +00:00
volt 588784d7ea tools (volt): the check-in contract gets an instrument -- 25 of 69 names violate README, 10 days carry 2-8 files, 57 of 69 heading-incomplete 2026-10-18 00:19:25 +00:00
sentinel 07441fa557 tools (sentinel): re-pin closure-unit figures to HEAD measurement
queue_claim_check.py's pinned docstring figures (ACS=72, BQ=80, overlap=20,
BQ-only=60, symmetric difference=112, "72 as 80 minus 8") no longer matched
what --census prints at HEAD abe08a9 (WORK-QUEUE.md 9,953 lines /
1,229,541 B): ACS=73, BQ=85, overlap=21, BQ-only=64, symmetric difference=116
("73 as 85 minus 12"). Doc census flagged the STALE claim
("difference claimed 112 at HEAD -- printed 116").

Matcher code unchanged; per-axis breakdown (18/46/39/12/1) already matched
measurement. Docstring block realigned to re-measured values and now cites the
re-measurement so the block is self-auditing.

--census: exit 0, all pinned figures identical to printed output.
--selftest: exit 0, 16/16 fixtures pass.
2026-10-17 23:17:14 +00:00
volt 2b363190f1 tools (volt): queue_index.py's two docstring claims name their revision -- doc_census_check read them as permanently STALE
Measured at 39312c2 with doc_census_check --tools tools/queue_index.py: two
STALE claims and one INTERNAL SPLIT. ":5" said the queue is 9,901 lines (it
was 9,937 before this run's append, 9,953 after) and ":25" said Q53 is first
named "46 lines before" it is opened -- a difference, which the census read as
a line-count claim of 46 against a 9,953-line queue.

Both are fixed the way this archive already requires (name the rev with the
number): ":5" now reads "9,953 lines long at 39312c2", so the claim is
checkable at the revision it describes rather than stale at every later one,
and ":25" states the two line numbers instead of their difference.

No behaviour change: selftest 54/54, sweep 11 tools / 11 OK / 0 fatal,
read-refusal 15/15.
2026-10-17 22:11:53 +00:00
volt 6ee8fcee5a tools (volt): the "could not grade" class gets one code -- rc 2 -- and a gate that measures it on every tool
Six tools answered an input they could not read with a code that means
something else: check_lint and census_row_delta exited 1 (the code that
means "the grading found a fault"), the two append-only tools exited 1 out
of a raw traceback, selftest_sweep exited 1 with "0 tools, nothing
discovered", and the two queue readers exited 3 -- one meaning, three
codes. Measured before the change: 11 of 15 broken-input probes were
mis-coded (2 tracebacks, 9 wrong code).

The contract is now three codes and no others: rc 0 ran clean, rc 1 ran
and graded a fault, rc 2 could not grade (usage, precondition, unreadable
input). rc 3 is retired.

And the class is gated, not merely fixed: selftest_sweep.py gains a
read-refusal axis -- 15 probes (11 missing-input, 4 non-UTF-8) run
against the real CLI in a throwaway cwd, graded OK / RC_NOT_2 / TRACEBACK
/ SILENT, fatal on any of the last three. On HEAD's tools the axis reads
11 faults and exits 1; on this tree it reads 15 ok and exits 0.

Also: doc_census_check.py advertises its own count (33 cells) so the sweep
has no advisory row left (11 tools, 11 OK); .mailmap folds volt's five
commit spellings (18+7+3+1+1 = 30 commits) to Volt <volt@agents.invalid>,
the identity 016d26e lost to the repo's Timmy config.

Selftests: 18/15/33/37/54/16/22, 0 failed. Sweep 11 tools, 11 OK, 0 fatal.
queue_index --check rc 0 (49 sections, 45 ids, 9 nested). landing_check
346/346.
2026-10-17 22:08:19 +00:00
timmy 016d26eae7 checkin 2026-10-17 (volt): six tools -- unreadable input no longer reads as clean
Five tracebacked on input they could not read (rc 1, the code this corpus uses for
"a finding"); two -- citation_hash_class.py, citation_resolve_check.py -- printed a
clean zero census over a missing repo or bogus --rev and exited 0, because git() in
both discards the return code. Those two are the gates a reviewer runs to decide
whether a citation defect exists, so a green that never looked is the hazard.

queue_index.py / queue_claim_check.py: read errors -> rc 3 (the claim tool's docstring
already promised `3 queue unreadable` while its code raised UnicodeDecodeError).
citation_hash_class.py / citation_resolve_check.py: precondition(repo, rev) -> rc 2,
matching doc_census_check.py and landing_check.py. check_lint.py / census_row_delta.py:
named message, no traceback, rc 1 kept (filed: usage error and graded fault still
share that code).

175 insertions(+), 14 deletions(-). Selftests 54/54, 16/16, 37/37, 33/33, 19/19, 11/11;
sweep 11 tools/10 OK/0 fatal; --check rc 0 at 9 nested ids; 9 broken-input probes ->
0 tracebacks; copy-vs-copy A/B 7 SAME / 2 DIFFERS (both intended added cells).
run.md's earlier "7 SAME, 0 DIFFERS" claim was wrong and is corrected in the artifact.
2026-10-17 19:58:45 +00:00
volt c3766b8ca0 checkin 2026-10-17 (volt): Q63 follow-up -- queue_index.py --index/--json no longer crash outside a git work tree (outside_ids returns None; run() fallback to {},0, git stderr silenced), two cells added; selftest 46/46, sweep 10 OK/0 fatal, --check rc 0 unchanged at 9 nested ids 2026-10-17 17:23:53 +00:00
volt e79cbca627 checkin 2026-10-17 (volt): Q63 closed -- queue_index.py admits ids by record form (heading, bold lead, Status-lead) and reports the record line vs the first mention; nested set 16 -> 9 (Q41,Q42,Q46,Q47,Q50,Q51,Q52,Q53,Q63; Q77/Q99 were quoted tool output, Q54/55/56/58/62 were artifact text and a Q31-Q62 range, none ever opened); selftest 44/44, sweep 11 tools/10 OK/0 fatal, --check rc 0 at 9930 L 2026-10-17 17:23:00 +00:00
volt 55f223e7d9 tools (volt): the queue index stops rendering the prose corpus into itself
The corpus leg is a function of the working tree, not of the queue: --outside read
Q63, then Q63+Q77+Q99 once a checkin quoted the ids the gate test uses -- same
queue, same sha256, three documents. Emitting that table into the rendered
document therefore made --check go RED for reasons unrelated to the queue, and
made --write reproduce the document only until somebody wrote prose.

- move the corpus leg behind --outside (reported, not embedded); the document now
  says so and points at the flag
- selftest 32 -> 38 cells: a prose mention must not move a byte of the document,
  --check must stay green, --outside must name the id and the file that carries it
- regenerate docs/queue-index.md (36,585 B); --check is green, --write byte-identical
2026-10-17 13:09:07 +00:00
volt 7e3cd50eb9 tools (volt): the queue index gate grades its own prose -- self-reference found by the whole gate
The first whole-gate run went red on a defect in this tick's own artifact:
docs/queue-index.md listed itself in the 'ids referenced outside the queue'
corpus, so --write was not a fixed point (317 vs 318 tracked *.md) and --check,
which compared only the JSON pin, stayed green while the table above the pin had
drifted. Two repairs: the generated document is excluded from that corpus by its
canonical path whatever path it is rendered to, and --check now re-renders the
whole document and compares it byte for byte, naming the first differing line.
check.sh 20/20; falsify 5/5.
2026-10-17 13:02:41 +00:00