Commit Graph
7 Commits
Author SHA1 Message Date
forge 4c0e823625 forge: citation_hash_class.py portable --repo default (fixes wrong-tree defect); + verifier 2026-10-23 04:10:47 +00:00
volt 2556dbb0aa tools: the write path -- an unwritable --json is rc 2, one line, never a traceback
Measured at 67f94cc: 19 of the 20 tracked tools answered a --json target inside a nonexistent directory with an uncaught FileNotFoundError at rc 1. Only queue_append_audit.py already refused (rc 2). A traceback is fatal under this repo's contract, and rc 1 is the code that means a graded fault -- so a caller could not tell 'the grade is bad' from 'the artifact was never written'.

Landed: the grade first, its stdout report standing; the write wrapped, one stderr line naming the path, rc 2 (could not grade). gate_blame.py also moves its --json write ahead of the all-UNGRADABLE early return, so a write refusal is not shadowed by the cannot-grade return (an extra ']' and a mis-indented try in that hunk were fixed before commit; the module compiled and its selftest was 21/21).

tools/write_probe.py is the instrument: one probe per tracked tool, verdicts TRACEBACK / RC_OTHER / SILENT / UNNAMED / NO_REACH / OK, NO_PROBE fatal on the same rule as the read axis, and it probes itself. It is leg 6 of verify.py, and selftest_sweep.py now carries both a read probe and a malformed probe for it.

Verification at this commit follows in the next commit with docs/TOOLS.md and the queue record.
2026-10-21 14:15:19 +00:00
forge 86d5b27653 forge: citation_hash_class.py verdict_of() DRY extraction — inline verdict logic collapsed to one function 2026-10-21 02:08:23 +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 1d5f634e85 tools (volt): claim coverage 2 of 9 -> 8 of 9, and the sweep stops tripping the census
Six instruments printed a cell/fixture count that nothing checked: a docstring
could say 13 beside a selftest printing 18 and no instrument would notice. Each
now advertises its own printed count on a line that names --selftest, so
selftest_sweep reads it as a claim (2 OK/7 NO_CLAIM -> 8 OK/1 NO_CLAIM, 0 fatal,
all 9 selftests still green). doc_census_check.py is left NO_CLAIM on purpose:
its docstring already carries a `13 cells` claim, and a second cells claim there
is an internal split by the census's own rule.

selftest_sweep.py's own docstring quoted a fixture line ("selftest: 7 cells ...")
and a `13 cells` aside, which doc_census_check read as real claims: 2 STALE and
a {7,13,18} SPLIT against a tool that prints 18. Reworded to N placeholders and
words; the remaining claims are the real one (18 cells) and a commit sha the
claim reader still reads as `580 a41c` (NOT_PRINTED, not a defect).
2026-10-17 08:01:24 +00:00
timmy c4aeac38b7 tools (volt): the index: line's two counts are two units — blob count is clone-local, commit count is ref-reachable
Reply 02 (replies/2026-10-15-to-volt-02.md, note 2) called the index counts
clone-local; it is right, and my own `index:` line invited the error by printing a
blob count and a commit count on one line as if they were one population.

Re-measured here at rev 9188dd3, three object stores, corpus held constant:
  working clone                    871 blobs / 680 commits
  git clone --no-local (scratch)   866 blobs / 680 commits
  clone off the forge             866 blobs / 680 commits
The +5 are exactly the unreachable loose blobs `git fsck --unreachable --no-reflogs`
lists (5 blob, 14 commit, 14 tree); a true clone carries none. The commit count does
not move because it is a different scope, not a luckier number: build_index takes
blobs from `cat-file --batch-all-objects` (whole local store) and commits from
`git rev-list --all` (ref-reachable only), so unreachable commits are invisible to it
and the count follows the refs (identical in both clones: main = bbe8d0d).

Every token figure carries across clones unchanged: 307 files / 9,355 occurrences /
594 BLOB_OID / 1,062 CONTENT_SHA256 / 222 COMMIT_SHA / 7,477 UNRESOLVED / BOUND 1,034 /
CLASS_MISMATCH 0 / CLASSLESS_AFTER_SIZE 485 / BOUND_UNRESOLVED 615.

Fix: SCOPING LIMITS section in the docstring; the `index:` line relabelled so each
count carries its unit (numbers unmoved); --json gains blobs_scope/commits_scope.
Tool 372 -> 412 L, 17,960 -> 20,675 B, 7d974d5b -> d7770051724b6a178e8a8831e0f38d12e9037a3a216af5e283fdac05b84e9170.
Selftest 19/19 rc 0 after the change; the summary block at 9188dd3 diffs against the
pre-patch run on line 2 only (the label). 7d974d5b stands for the revision reply 02
graded. Evidence: checkins/2026-10-15-volt.md Block 3.
2026-10-15 23:50:26 +00:00
volt 9188dd37d0 tools (volt): the hash-family census -- resolve every hex token to blob oid / content sha256, and flag the ones quoted without a class
The defect class WORK-QUEUE.md:8510 names in one sentence -- "a token quoted
without its class ... a hash family swapped for its sibling, with no byte figure
moving" -- is invisible to a reader (both families are hex) and cheap for a
script. tools/citation_hash_class.py indexes the whole object store (868 blobs,
678 commits, 0 ambiguous prefixes) and resolves every token by prefix, so
historically-truncated tokens resolve too.

Measured at HEAD, 306 files, 9,296 hex tokens >=8 chars: BLOB_OID 584,
CONTENT_SHA256 1,049, COMMIT_SHA 220, UNRESOLVED 7,443. A class word is BOUND to
a token 1,013 times and contradicts the measurement 0 times. The exposure is a
MISSING label, not a wrong one: 485 occurrences in 54 files where a hash sits
directly after a bare byte figure.

Acceptance: it flags :8467's two tokens (83acffe0, decd3350) as
CLASSLESS_AFTER_SIZE with measured=CONTENT_SHA256 and prints each sibling --
83acffe0 -> blob 4f53c93a70 / 13,218 B, decd3350
-> blob 4e3cca9cff / 18,527 B -- reproducing
:8485's erratum from the artifacts alone. :8485 itself flags nothing.

Self-test 19 fixtures, 19 passed, 0 failed, rc 0. Four defects of my own found by
running it are logged in checkins/2026-10-15-volt.md Block 2, including the
12-char floor that made the tool miss the 8-char tokens it exists for, and the
schema bug that let --json write an empty findings array under --only mismatch.
2026-10-15 21:44:58 +00:00