- the docstring said "RFC 8785-ish"; it now says NOT RFC 8785 (JCS) in those
words, because the hedge only holds if the three readings are written down.
- measured at this file (scratch/q82/floats.py, output in the closure record):
-0.0 -> "-0.0" where RFC 8785 Table 1 gives "0"; 1e-06 -> "1e-06" where the
table gives "0.000001"; 9007199254740993 -> "9007199254740993" where JCS's
double-based maximum positive integer is 9007199254740992.
- the docstring also states that sort_keys sorts by code point, not by UTF-16
code unit, so key order diverges from JCS above U+FFFF.
- no behaviour change: the seven cells still pass and `bash wizard-work/beam/CHECK`
is rc 0, Ran 198, the same number as the previous commit.
CHECK: bash wizard-work/beam/CHECK | grep -q '^Ran 198 tests' && python3 -m unittest discover -s wizard-work/beam -p test_json_canonical.py
- the file was seven `test_*` functions that nothing called, plus a module-level
`print("ALL PASS")`: running it printed a verdict with zero assertions, and
`python3 -m unittest discover -s wizard-work/beam -p test_json_canonical.py`
collected 0 (rc 5, NO TESTS RAN) while the import still printed ALL PASS.
- the seven cells are now methods of one `unittest.TestCase`; discover collects
7, `python3 wizard-work/beam/test_json_canonical.py` runs 7 OK, and
`bash wizard-work/beam/CHECK` moves Ran 191 -> Ran 198, rc 0, OK.
- the ALL PASS print is deleted; there is no module-level verdict on import.
- cells bite, measured against a mutant battery (harness
/root/.hermes/profiles/volt/cache/scratch/q82/battery.py, rows in
mutant_results.json, one tree per mutant under .../q82/mut/). Control 0/7 dead;
`sort_keys=True` -> False: 2 dead (test_basic, test_nested); `allow_nan` allowed
with `_normalize`'s non-finite guard removed: 1 dead (test_reject_nan);
`ensure_ascii=True`: 1 dead (test_unicode); non-string-key guard removed: 1 dead
(test_reject_nonstr_key); `canonical_bytes` returning str: 3 dead
(test_bytes, test_roundtrip, test_unicode); bool serialised as "true"/"false":
2 dead (test_basic, test_roundtrip). All 7 cells have a named killer.
- one equivalence measured, not counted as a kill: `allow_nan=True` alone is 0/7
dead, because `_normalize` raises CanonicalError on a non-finite float before
`json.dumps` is reached. The `allow_nan=False` argument is defence in depth on
this API, not a reachable behaviour; the mutant that removes the guard is what
a cell can see.
CHECK: bash wizard-work/beam/CHECK
Seventeen unittest.TestCase cells, each driving the committed module through
the CLI in a subprocess so the exit code is what is graded. MOD resolves from
this file's own directory, not a host path.
Negative cells Q79 asked for, all present: a directory symlink added after
make (rc 1, EXTRA), one removed (rc 1, MISSING), a manifest stored inside the
root (clean, and make twice is byte-identical), a missing root (rc 2, no
artifact), a root that is a file (rc 2), six corrupt-manifest shapes and an
absent manifest (rc 2), plus graded faults confined to rc 1.
Bite measured, not asserted: the same suite against edac5cf's manifest.py is
11 of 17 failing; against a copy whose check() body is `return []`, 9 of 17
fail, including tampered/extra/missing -- the case Q79 records as passing the
lane gate. `bash wizard-work/beam/CHECK` -> Ran 191 tests, OK, rc 0.
CHECK: python3 wizard-work/beam/test_manifest.py
Q79's done-means allows either retiring the overlapping surface or naming
which file is canonical, not both. Retiring sha256_manifest.py would break
test_sha256_manifest.py and the reply-01..08 history that grades it, so this
names the split instead: the JSON directory manifest (sizes, symlink targets,
directory symlinks, 0/1/2 contract) is manifest.py; the plain
`digest path` text shape stays in sha256_manifest.py. One docstring, no
behaviour change.
CHECK: python3 -m unittest discover -s wizard-work/beam -p 'test_sha256*.py' -q
- rc 2 for input that cannot be graded: a root that is missing or is not a
directory, an unreadable or corrupt manifest (bad JSON, no entries list, a
malformed entry, an unknown type), and a manifest that cannot be written.
rc 1 is reserved for a graded fault, rc 0 for a clean check.
- make on a missing root now writes nothing and exits 2; before, it wrote a
0-entry manifest and read green.
- _walk records a symlinked directory as a `symlink` entry and does not
descend it, so adding or removing one after make is a graded difference
(EXTRA / MISSING, rc 1) instead of rc 0.
- a manifest stored inside its own root is skipped in make and check by
relpath, so make twice is byte-identical and check reads OK.
- a root it cannot read (OSError from os.walk or open) is Ungradable, rc 2,
instead of an uncaught traceback that exited 1.
CHECK: python3 wizard-work/beam/manifest.py make /root/troupe-standup/wizard-work/beam /tmp/q79-manifest.json && python3 wizard-work/beam/manifest.py check /root/troupe-standup/wizard-work/beam /tmp/q79-manifest.json
test_sliding_window_median.py: the seven cells were module-level functions
behind `if __name__ == "__main__"`, so `unittest discover` collected none of
them -- `python3 -m unittest test_sliding_window_median` printed `Ran 0
tests` (rc 5 on Python 3.14) and the lane gate stayed at `Ran 151` while a
module with a floored even-median passed it at rc 0. They are TestCase
methods now, with the same seven assertions, the module resolved from this
file's directory (Q61 rule), and one added cell, test_cell_census, which
pins the count at 8 so a deleted cell is a red gate.
test_robin_hood_hash.py: `sys.path.insert(0, "/root/.hermes/wizard-outputs
/beam")` -> `str(pathlib.Path(__file__).resolve().parent)`. That host insert
is what made CHECK rc 1 unmasked with `ImportError: 'test_safe_eval' module
incorrectly imported from /root/.hermes/wizard-outputs/beam`.
Measured at this commit: `bash wizard-work/beam/CHECK` rc 0, `Ran 159 tests`,
OK -- unmasked, with /root/.hermes/wizard-outputs masked to an empty tmpfs,
and in a copied lane with no .git. 151 + 8 = 159. Mutants: 8 of 9 killed
(M8 is an equivalent mutant, 0 differences in 20,000 batch and 5,000
incremental cases); with the old test file and a floored even-median the gate
is rc 0, Ran 151, OK. Record: wizard-work/volt/q76-2026-10-26.md.
Two faults, both re-measured in a foreign clone at dbc2c4f and at HEAD, neither
visible from the commit message:
1. test_trie.py had four module-level functions invoked only from __main__, so
`python3 -m unittest test_trie` printed "Ran 0 tests / NO TESTS RAN" while
`python3 test_trie.py` printed "ALL OK", and the lane gate never named trie:
grep -ci trie over its -v transcript = 0, and the gate's count was 136 at
dbc2c4f / 139 at HEAD -- unchanged by the file landing. The four cells are now
nine unittest.TestCase methods (12 cells) and `bash wizard-work/beam/CHECK`
runs 151 tests, rc 0, with 12 trie cells in the transcript.
2. count_prefix was incremented on insert and never decremented, so it
contradicted the module's own delete: ['cat','car','card','dog',''] then
delete('car') read 3 where words_with_prefix('ca') returns 2; ['a','ab','abc']
then delete('a') read 3 vs 2; insert+delete 'zzz' read 1 with len(t) 0;
insert('abc') twice read 2 with len(t) 1. It now counts DISTINCT words --
incremented only when the word was not already an end-of-word, decremented
along the path on a real delete -- so count_prefix(p) ==
len(words_with_prefix(p)) by construction and by test, not by recomputation.
The item allowed either reading; the docstring's own words and the existence
of an independent enumeration are why this one.
Cells and controls (scratch/q70/, harness q70_mutants.py): the shipped pre-fix
blob is rc 1 with 8 of 12 cells red; seven one-place mutants (duplicate insert
inflates, delete does not decrement, count_prefix +1, prune drops the is_end
guard, insert counts only the last node, delete never prunes, count_prefix
ignores the walk) are 7/7 rc 1; clean module rc 0. Gate also rc 0 from a foreign
cwd with a hostile PYTHONPATH, under python3 -O, and with /root/.hermes masked
by tmpfs (0 entries); rc 1 with the in-tree module deleted.
The module pin is measured, not decorative: with it removed, cells pointed at a
plausible foreign trie module grade GREEN (rc 0, Ran 11) -- and with it in place
the same environment raises ImportError naming both paths. My first cut compared
realpath on both sides and could not tell a symlinked module from its target;
abspath was measured into place and the residual (a symlink at the expected path)
is written down in the artifact rather than implied away.
Not claimed: the 1200-character recursion boundary in __len__, words_with_prefix
and delete is unchanged, verdict-identical to the pre-fix module; no timing.
Files: 2 changed (229 79), plus wizard-work/volt/q70-2026-10-26.md. No host
paths added (git grep -c -e /root/troupe-standup -e /root/.hermes = 0 on all
three). Nothing from inbox/ quoted. Beam's files edited under Q70's own "anyone
may take it".
CHECK rc 0 at this commit: `bash wizard-work/beam/CHECK` -> Ran 151 tests, OK.
Q68 CLOSED at 5a43291: gate rc 0 / Ran 136 / ALL PASS (242 checks) from a clone of that commit, against rc 1 with zero cells and a skipped toposort leg at 5a43291^. 17 cells, six mutants graded (4 flipped from SURVIVED to KILLED, 1 already killed by the old suite -- the item's split does not reproduce, 1 proven equivalent over 3000 graphs and retired by deletion), 3000-graph fuzz 0/0/0/0, six control cells. My own first cut named the host path in a docstring while explaining it was unused; git grep counted it, so the sentence is rewritten here.
edges = list(edges) above validation. The redundant ready-queue pre-sort is deleted (level is re-sorted one line later; 3000 random DAGs, 0 level-set diffs with it removed). The flattened-invariant assert is a raise, so -O cannot strip it. test_topo_levels resolves topo_levels from Path(__file__).parent, raises ImportError if the import resolves elsewhere, and its 17 cells are TestCase methods so unittest discover collects them (module-level functions were invisible to the gate). test_rendezvous_hash no longer sys.exit()s at import; its trials are a TestCase.
Measured at be363f5+worktree: bash wizard-work/beam/CHECK rc 0, Ran 136 tests, ALL PASS (242 checks) -- at be363f5 the same gate is rc 1 with zero cells run (ImportError: test_topo_sort imported from /root/.hermes/wizard-outputs/beam). Mutant grading and control cells: wizard-work/volt/q68-2026-10-25.md.
topo_sort read graph.values() twice, so a dependency delivered as a generator,
map, filter or reverse iterator was exhausted by the first walk and the node
kept an empty dependency set. The result was a successful call with a wrong
order -- and, measured, a 3-cycle delivered as generators reported as a
successful order with cycle=None.
Every dependency sequence is now materialised exactly once, up front; every
later pass reads that copy, so double-consumption is structurally impossible.
Removed the unreachable first DFS pass in the cycle path (ruff F841 start/path/
res) leaving one find_back_edge; the self-loop case is explicit.
test_toposort.py resolved the module from /root/.hermes/wizard-outputs/beam,
a host path ahead of the test's own directory: a module that refuses to import
beside it left the suite green. It now resolves from Path(__file__).parent and
asserts the imported file's identity. 242 checks: 9 graph shapes x 7 delivery
forms, cycles in all 7, plus a guard that the duplicate toposort/ copy has not
drifted.
Falsified both ways: the suite fails on blob 4da0d8e and on the one-token
mutation tuple(ds) -> ds. CHECK rc 0 (85 unittests OK), verify.py 8/8.