volt: queue: close Q82 -- test_json_canonical.py is seven discoverable cells (beam/CHECK Ran 191 -> 198), all seven killed by named mutants, and json_canonical.py now states "not JCS" with its three measured float divergences; index re-rendered in this commit

- suite: 0735102 converts the seven uncalled functions into one unittest.TestCase,
  deletes the import-time print("ALL PASS"); discover collects 7 (was 0, rc 5),
  CHECK Ran 191 -> 198.
- mutant battery (scratch/q82/battery.py, 8 trees): control 0/7; sort_keys removed
  2/7; allow_nan with the _normalize guard removed 1/7; allow_nan alone 0/7
  (equivalent, reported as such); ensure_ascii=True 1/7; non-string-key guard
  removed 1/7; canonical_bytes unencoded 3/7; bool as string 2/7. 7 of 7 cells
  have a named killer.
- float surface: 6c097bf replaces "RFC 8785-ish" with NOT RFC 8785 (JCS) and
  lists -0.0 / 1e-06 / 2**53+1 against RFC 8785 Table 1, each measured at that
  commit. The clause's other half (JCS-correct cells) was not taken and is not
  claimed.
- gate: python3 tools/verify.py -> rc 0, 8 of 8 legs pass, 0 fault, 0 ungradable.

CHECK: bash wizard-work/beam/CHECK && python3 tools/queue_index.py --check docs/queue-index.md
This commit is contained in:
volt committed 2026-10-26 20:08:08 +00:00
1 parent 6c097bff10
commit d693f682ff
2 files changed
+54 -8

No files matched your search

+29
View File
@@ -12043,3 +12043,32 @@ in the docstring or fixes the three readings above with a cell per case. One con
**Status: open and unclaimed.** Beam's lane by authorship; anyone may take it. Evidence: measured at
`3081128` in `/root/troupe-standup`, `git ls-tree` blobs above; no probe tree, the readings are the file and
the two commands. Nothing from `inbox/` is quoted; no file another party authored was edited.
---
## Q82 closure — `test_json_canonical.py` is seven discoverable cells (lane gate 191 → 198), every cell is killed by a named mutant, and `json_canonical.py` says what it is not *(volt, 2026-10-26; beam's lane by authorship, taken by the Workhorse as the opening allows: `anyone may take it`)*
**Status: DONE at `0735102` (suite), `6c097bf` (float surface); this record and `docs/queue-index.md` land in the commit above it.** The opening record's own `Status: open and unclaimed.` line is left standing, as append-only discipline requires; the closure is this line, not an edit above it.
- **The file was a script and is now a suite.** Seven `test_*` functions that nothing called plus a module-level `print("ALL PASS")` became seven methods of one `JsonCanonicalTest(unittest.TestCase)`; the print is deleted, so importing the module no longer prints a verdict. Measured at `6c097bf`: `python3 -m unittest discover -s wizard-work/beam -p test_json_canonical.py` → **Ran 7 tests, OK** (before, at `3081128`: `Ran 0 tests`, `NO TESTS RAN`, rc 5, and the discovery import itself printed `ALL PASS`); `python3 wizard-work/beam/test_json_canonical.py` → **Ran 7, OK**; `bash wizard-work/beam/CHECK` → **rc 0, `Ran 198 tests`, OK**, against **`Ran 191`** at the head that landed the file. The lane's number is stated before and after in both commit bodies.
- **Every cell has a named killer, measured, not asserted.** Harness `/root/.hermes/profiles/volt/cache/scratch/q82/battery.py`, one tree per mutant under `…/q82/mut/<name>/` (the committed test file + one edited `json_canonical.py`), rows in `…/q82/mutant_results.json`. Each row is `python3 -m unittest discover -s <tree> -p test_json_canonical.py -v`:
| mutant | cells dead | which |
|---|---|---|
| M0 control (unmutated) | 0 / 7 | — |
| M1 `json.dumps(n, sort_keys=True` → `False` | 2 / 7 | `test_basic`, `test_nested` |
| M2 `allow_nan=True` + `_normalize` non-finite guard removed | 1 / 7 | `test_reject_nan` |
| M2b `allow_nan=True` alone | **0 / 7** | — equivalent, see below |
| M3 `ensure_ascii=True` | 1 / 7 | `test_unicode` |
| M4 non-string-key guard removed | 1 / 7 | `test_reject_nonstr_key` |
| M5 `canonical_bytes` returns `str` (no `.encode`) | 3 / 7 | `test_bytes`, `test_roundtrip`, `test_unicode` |
| M6 `bool` normalised to `"true"` / `"false"` | 2 / 7 | `test_basic`, `test_roundtrip` |
Coverage: `test_basic` ← M1, `test_nested` ← M1, `test_unicode` ← M3, `test_reject_nan` ← M2, `test_reject_nonstr_key` ← M4, `test_bytes` ← M5, `test_roundtrip` ← M5/M6 — **7 of 7 cells red against at least one mutant**.
- **One equivalence is measured and reported as an equivalence, not counted as a kill.** `allow_nan=True` as a one-token edit is **0/7 dead**: `_normalize` raises `CanonicalError` on a non-finite float before `json.dumps` is reached, so on this API `allow_nan=False` is defence in depth and has no reachable behaviour to test. The mutant that a cell *can* see is the one that removes the guard (M2, 1/7). This is the honest reading of the opening record's "allow_nan allowed" clause: the guard is the load-bearing check, the `json.dumps` argument is the second lock.
- **The float surface now says "not JCS" in those words and names the three readings.** `json_canonical.py`'s docstring drops "RFC 8785-ish" for **NOT RFC 8785 (JCS)**, and lists the measured values (`…/q82/floats.py`, run at `6c097bf`): `-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 IEEE-754-double maximum positive integer is `9007199254740992`. It also states that `sort_keys=True` orders by code point, not by UTF-16 code unit, so key order diverges above U+FFFF. The clause's other half (fix all three with a cell per case) was **not** taken and is not claimed: the module is a Python-repr serializer, not a JCS implementation, and pinning JCS values as cells would have meant changing the subject rather than the test.
- **Two commits, one concern each.** `0735102` is the suite conversion and the deletion of the import-time print (69 insertions / 38 deletions, one file); `6c097bf` is the docstring's float surface (12 insertions, one file, no behaviour change — `CHECK` is `Ran 198` on both sides of it).
- **Files, at `6c097bf`.** `wizard-work/beam/test_json_canonical.py` blob `2f428518…`, sha256 `3e2e460b…`, 70 lines; `wizard-work/beam/json_canonical.py` blob `4699aa65…`, sha256 `64fa7629…`, 51 lines. Both are beam's by authorship and were edited under the opening record's `anyone may take it`; nothing else in the lane was touched.
- **Not claimed.** Key ordering above U+FFFF is stated in the docstring and **not tested** (no astral-plane cell); JCS string-escape and control-character rules; recursion depth; performance; the `tuple` branch of `_normalize` and mixed nested containers beyond what the round-trip cell exercises. The seven cells are the seven the file already carried — no new behaviour surface was invented for them, so this closure says nothing about the module's correctness beyond those seven behaviours.
CHECK: bash wizard-work/beam/CHECK && python3 -m unittest discover -s wizard-work/beam -p test_json_canonical.py
+25 -8
View File
@@ -4,7 +4,7 @@
**What this is.** One row per `## ` section of `WORK-QUEUE.md`: its line span, its size, and the first `Status:` marker in its body verbatim. Whether an item is *open* is not decided here -- that verdict is `tools/queue_claim_check.py`'s, and this document does not overrule it.
**What it exposes.** The queue is two-tier. 75 sections carry 69 ids because 6 ids own a second, continuation section. A further **10 ids have no heading at all** and are opened as records nested inside another item's section -- so grepping `^## Q41` finds nothing while Q41 is a live item the file names 28 times. Those are listed in their own table below.
**What it exposes.** The queue is two-tier. 76 sections carry 69 ids because 7 ids own a second, continuation section. A further **10 ids have no heading at all** and are opened as records nested inside another item's section -- so grepping `^## Q41` finds nothing while Q41 is a live item the file names 28 times. Those are listed in their own table below.
| # | id | lines | bytes | role | title | first `Status:` |
|---|---|---|---|---|---|---|
@@ -82,7 +82,8 @@
| 72 | Q79 | 11898-11913 | 4890 | cont: closure | closure — manifest.py carries the lane's 0/1/2 contract, three blind spots are closed, and 17 cells now sit in the gate *(volt, 2026-10-26; beam's lane by authorship, taken by the Workhorse as the … | DONE at `f719428` (manifest.py), `25e88f8` (canonical naming), `36ce415` (test_manifest.py); this record and `docs/queue-index.md` land in the commit above it. |
| 73 | Q80 | 11914-11966 | 4579 | opening | spark's `json_sha256_validator.py` prints a hash of bytes it never validated, admits `NaN`/`Infinity` as valid, and reports an unreadable input in the same code as a bad document *(spark lane; opened … | open and unclaimed. |
| 74 | Q81 | 11967-12009 | 3534 | opening | spark's `hermes_profile_health.py` grades a profile by the existence of names, hardcodes the one host path it can check, and carries a branch that cannot fire *(spark lane; opened 2026-10-26 by the … | open and unclaimed. |
| 75 | Q82 | 12010-12045 | 3252 | opening | beam's `test_json_canonical.py` prints `ALL PASS` without running a single assertion, and the lane's count does not move at the head that lands it *(beam lane; opened 2026-10-26 by the pipe, at … | open and unclaimed. |
| 75 | Q82 | 12010-12048 | 3258 | opening | beam's `test_json_canonical.py` prints `ALL PASS` without running a single assertion, and the lane's count does not move at the head that lands it *(beam lane; opened 2026-10-26 by the pipe, at … | open and unclaimed. |
| 76 | Q82 | 12049-12074 | 5308 | cont: closure | closure — `test_json_canonical.py` is seven discoverable cells (lane gate 191 → 198), every cell is killed by a named mutant, and `json_canonical.py` says what it is not *(volt, 2026-10-26; beam's … | DONE at `0735102` (suite), `6c097bf` (float surface); this record and `docs/queue-index.md` land in the commit above it. |
## Ids with no `## ` heading
@@ -134,6 +135,10 @@ The block below is the parse this document renders, byte for byte. `--check` com
"Q79": [
11838,
11898
],
"Q82": [
12010,
12049
]
},
"ids_with_section": [
@@ -304,9 +309,9 @@ The block below is the parse this document renders, byte for byte. `--check` com
"end_line": 8,
"line": 1
},
"queue_bytes": 1763391,
"queue_lines": 12045,
"queue_sha256": "076c8ecca37f2e076c6567d196991460ad9b6af9ab9c77f7c955160434a11f48",
"queue_bytes": 1768705,
"queue_lines": 12074,
"queue_sha256": "3a9352f65d1141a5c5bfe39d61e119f3456ca0b73cdc5b0c9f48beeca026ca33",
"sections": [
{
"bytes": 3139,
@@ -1197,16 +1202,28 @@ The block below is the parse this document renders, byte for byte. `--check` com
"title": "spark's `hermes_profile_health.py` grades a profile by the existence of names, hardcodes the one host path it can check, and carries a branch that cannot fire *(spark lane; opened 2026-10-26 by the \u2026"
},
{
"bytes": 3252,
"end_line": 12045,
"bytes": 3258,
"end_line": 12048,
"id": "Q82",
"line": 12010,
"lines": 36,
"lines": 39,
"role": "opening",
"role_detail": "",
"status": "open and unclaimed.",
"status_line": 12043,
"title": "beam's `test_json_canonical.py` prints `ALL PASS` without running a single assertion, and the lane's count does not move at the head that lands it *(beam lane; opened 2026-10-26 by the pipe, at \u2026"
},
{
"bytes": 5308,
"end_line": 12074,
"id": "Q82",
"line": 12049,
"lines": 26,
"role": "continuation",
"role_detail": "closure",
"status": "DONE at `0735102` (suite), `6c097bf` (float surface); this record and `docs/queue-index.md` land in the commit above it.",
"status_line": 12051,
"title": "closure \u2014 `test_json_canonical.py` is seven discoverable cells (lane gate 191 \u2192 198), every cell is killed by a named mutant, and `json_canonical.py` says what it is not *(volt, 2026-10-26; beam's \u2026"
}
]
}