wizard-work/beam/test_jsonl_validate.py (new, 25 tests) pins the module's own
docstring contract as process exit codes: 0 valid, 1 bad rows, 2 usage/IO/schema/
decode. wizard-work/beam/jsonl_validate.py repaired in three places:
- undecodable input (and schema) now returns 2 with an `input error:` line and
no summary line, instead of a UnicodeDecodeError traceback and rc 1;
- utf-8-sig on both files, so a leading BOM is stripped not graded as bad data;
- a required field present as null yields one error, not "missing required
field" plus "null not allowed".
Measured: the new test file against the shipped module (md5 f53b6288...) fails
6 of 25 (3 decode, 2 BOM, 1 null); against the repair, 25/25 pass. bash CHECK:
rc 0 with Ran 243 -> Ran 268; with the shipped module swapped back in, rc 1
FAILED (failures=6) -- the gate was rc 0 and blind before. No edit to CHECK:
the file is a unittest.TestCase, so the existing -p 'test_*.py' leg collects it.
The 242-checks line is toposort's import-time counter and does not move (Q105).
verify.py --repo . reads 8 legs, 6 pass, 2 fault (checkin, path-claims) here and
identically at the parent cd5f5c9. path_claim_check's tolerated NOT_ADDED row
for the new file reads CLEARED on this tree. Q105's 27 uncollected files / 131
tests remain open and untouched.
Measured on this worktree (parent 4623724): py_compile rc 1 -> 0; default run rows=3344 total=3344; regeneration sha256 6288352e31a9f80de0913886c833214e0d8fc604b3f5de970169d9ecdd478c6f, identical to the committed table, diff empty; the Q98 guard's --all-files run goes rc 2 / "cannot grade: 1 file(s) unreadable" to rc 1 / 825 graded / 16 pre-existing non-test faults / no cannot-grade line (825 .py tracked); default guard run 104 graded 0 faults rc 0 and selftest 38/38 unchanged; verify.py 8 legs 7 pass, the path-claims fault (3 missing paths) pre-dating this item at 41f4b37.
Named and not fixed: the extractor's default input /root/troupe-standup/repo_files.tsv is untracked, and the tracked census beside it is 3,354 rows and regenerates a different table (md 832/py 656/sh 57 vs 829/653/56); the py""" row in the artifact is the census input's own heredoc artifact. The pipe's 3286a6b addendum measured this same worktree repair and declined to commit it; this is the author's commit.
The eight test files Q98 leaves open (plus test_bfs.py, added at 7439cf0 with the
same lock) now resolve their module from pathlib.Path(__file__).resolve().parent
instead of /root/.hermes/wizard-outputs/<lane>.
tools/import_resolve_check.py --repo . at 7439cf0: 95 files, 9 faults, rc 1
after: 95 files, 0 faults, rc 0
Behaviour-preserving: every host copy the tests were reading is byte-identical
(md5sum) to the repo copy. Three absolute literals in spark/test_validator.py
that the static leg does not grade (load_json(...) argument strings at pre-fix
lines 12/16/25) are re-pointed too.
ledger/test_scratch_manifest.py was red before any edit (str ROOT vs
gen_manifest ROOT.iterdir), would have written the tracked
ledger/wizardwork-file-manifest.tsv once that was fixed (MANIFEST derived from
OUT at import time), and asserted nothing. It now re-points ROOT/OUT/MANIFEST,
guards MANIFEST inside a tempfile.mkdtemp(), and asserts the exact manifest row.
Non-vacuity: scratch/q98b/poison_probe.py copies each lane, runs the test from a
foreign cwd (rc 0), poisons the module inside the copy, and re-runs -- 8/8 go
rc 1, so none of them still reads the host.
Lane gates unchanged: beam CHECK rc 0, spark CHECK rc 0 (VERIFIED), ledger CHECK
rc 1 on both sides (commit-census drift, red at the parent commit too).
Q99's subject was a single tracked name holding seven newline bytes,
`wizard-work/beam/CHECK\ncontent">\n#!/bin/bash\n...`, added by accident at
`a46547c` (a shell-quoting accident, printf/heredoc output used as a pathspec),
218 bytes, blob `763936956721f3ba047d25b884f17862469482c3`.
Before this commit at `47532eb`: `git ls-files -z` yields 3,816 names and seven
of those bytes are `\n`, so a newline-splitting consumer reads 3,823 rows for
3,816 entries. The one path does not merely inflate the total, it impersonates
files: `git ls-tree -r -z --name-only HEAD | tr '\0' '\n'` prints it as eight
consecutive rows (lines 670-677 at `47532eb`), the first four of which are
`wizard-work/beam/CHECK`, `content">`, `#!/bin/bash` and
`# CHECK: verify all beam reliability primitives` -- four names a per-file census
or a per-file gate would try to open.
Content is not lost and nothing is being decided about it: the blob is
byte-for-byte `wizard-work/beam/CHECK` minus its final newline, verified against
`a46547c:wizard-work/beam/CHECK` and against HEAD's copy (`bad == good[:-1]`,
185 B vs 186 B, no differing offset), and the real CHECK is untouched. The blob
remains reachable from `a46547c`, so `git cat-file blob 7639369` still resolves
after this commit.
Guards run before the unlink: the worktree bytes were asserted equal to the blob
the index pinned, and that blob was asserted reachable from a ref.
After this commit: tracked 3,816 -> 3,815, names containing `\n` 1 -> 0,
newline-split rows 3,823 -> 3,815 (== entry count). An index-derived census keyed
on backslash-escaped names (`q99_census.py`, scratch) reads before=3816
after=3815, removed=1, added=0, changed=0 -- the removal is the whole delta, and
Q99's done-means ("a census run before and after differs only by that entry") is
met under a key that can express the entry at all.
Gate A/B on a scratch clone, committed there so HEAD moved: `tools/verify.py`
reads 5 pass / 3 fault on both sides with the same three legs (path-claims,
selftest-sweep, write-axis) and the same counts, so the removal regresses no leg.
The two path-claims faults are the `inbox/` rows and are untouched by this
commit.
Probes (read-only, outside the repo, under the volt profile cache):
/root/.hermes/profiles/volt/cache/scratch/q99/
newpath_probe.py, pin_content.py, q99_census.py, q99_worktree_state.py,
q99_apply_live.py, census_before.tsv, census_after.tsv, verify_after.txt
Rebuild test_no_path_compression_find_stable on 4 nodes so the node it asks
about (3) sits two levels down under union-by-size; the old cell built
union(0,1);union(1,2) -> parent [0,0,0,0], so find(2) rewrote nothing and a
path-compressing find passed the cell that names the mechanism.
New test_refuses_out_of_range_index and test_refuses_non_int_index grade the
_check_index contract e33aa30 added and no cell graded: every entry point that
takes an index refuses -1/n/10 and bool/float/None, and a refused call leaves
parent, sz, history and components unchanged.
Docstring API block now states the raise contract instead of the pre-e33aa30
signatures.
Measured (scratch copies, mutants built from this head):
M-GUARD (6 call sites deleted) HEAD cells rc 0 -> these cells rc 1
M-SIZE still rc 1 on test_shape_union_by_size
M-COMPRESS (plain) HEAD only test_rollback_restores, now the
compression cell too
journalled compression HEAD 12 cells all pass; only the rebuilt
compression cell fails
Lane: bash wizard-work/beam/CHECK rc 0, Ran 232 (230 + 2).