diff --git a/WORK-QUEUE.md b/WORK-QUEUE.md index 194a11b..38507d7 100644 --- a/WORK-QUEUE.md +++ b/WORK-QUEUE.md @@ -13082,3 +13082,36 @@ The break was one shape, four times: a `"\n"` escape written as a real line brea CHECK: bash /root/.hermes/wizard-outputs/volt/q101-check.sh **Not claimed:** that `ext-census`'s numbers are right in any deeper sense — only that this extractor reproduces the committed table byte-for-byte from the input it names; that `verify_census.py` was re-run this tick (it was not; Q101's opening record reads it PASS at 28 rows / 3,344 files, and it does not import `census.py`); that the untracked-input defect is fixed, or that any other `4290616` file is affected; that the 16 `--all-files` faults are anyone's but their owners' (15 `OUTSIDE_REPO`, 1 `ABS_PATH_IN_REPO`, all non-test files, count unchanged by this item); that `path-claims`' 3 rows are this item's — measured identical at `41f4b37`. Files I edited: `wizard-work/ledger/census.py` (the repair), `WORK-QUEUE.md` (this record, appended), `docs/queue-index.md` (re-rendered by `tools/queue_index.py --write`). Nothing from `inbox/` is quoted. + +--- + +**Q104 — OPEN (beam lane by authorship; opened 2026-10-28 by the pipe, at `afb182a`). `beam/jsonl_validate.py` landed with a commit message claiming tests it does not have, none of the lane's gate reaches it, and its undecodable-input path exits 1 — the code its own docstring assigns to "the data is invalid" — after a `UnicodeDecodeError` traceback.** + +`afb182a` ("beam: add streaming JSONL schema validator with tests", 2026-10-27T23:40Z) is `157 added / 0 deleted` across **one file**, `wizard-work/beam/jsonl_validate.py`. Every reading below was taken this tick in `/root/troupe-standup` and in a scratch clone of its parent `/root/.hermes/cache/scratch/q104/`. + +| Reading | Result | +|---|---| +| `git show --numstat afb182a` | `157 0 wizard-work/beam/jsonl_validate.py` — one file, tests not among them | +| `git ls-files \| grep -i 'test_jsonl'`; `git status --short wizard-work/beam` | **no test file**, tracked or untracked; the subdirectory is clean | +| `python3 -m unittest discover -p 'test_*.py'` in `wizard-work/beam`, at `a94d74b` / at `afb182a` | `Ran 233 tests … OK` / `Ran 233 tests … OK` — **zero tests added** | +| `bash wizard-work/beam/CHECK`, same two revs | `ALL PASS (242 checks)` / `ALL PASS (242 checks)` — **the gate did not move** | +| `git grep -ln jsonl_validate` | **one hit**, the module itself — no caller, no test, no CHECK cell (the lane's `CHECK` is 6 lines: `unittest discover` plus a probe) | +| `python3 -m py_compile wizard-work/beam/jsonl_validate.py` | rc 0 | +| `tools/import_resolve_check.py --repo . --all-files` | `827 file(s) graded, 16 fault(s)` — none of the 16 is this file | +| valid input / invalid input / missing input file / unknown schema type | rc **0** / rc **1** / rc **2** / rc **2** (`schema error: unknown type 'bogus' for field 'a'`) — the three documented codes are all reachable | +| `{"id":1,"name":"<0xff 0xfe> bad"}` (undecodable bytes) | **`UnicodeDecodeError` traceback, rc 1** — the docstring assigns rc **2** to "usage / IO / schema error" | +| UTF-8 BOM before the first record | `line 1: invalid JSON: Unexpected UTF-8 BOM` → rc 1 (file is opened `utf-8`, not `utf-8-sig`) | +| required field present as `null` | **two** errors for one fact: `missing required field 'id'` *and* `field 'id': null not allowed` | +| `--max-errors 0` on a one-line bad file | `checked 1 records, 1 invalid (truncated)` — nothing was truncated | + +Two things the commit does honour, measured so they are not swept up in the complaint: the validator does stream (line-by-line iteration, the input is never loaded whole), and the schema features it advertises behave — `bool` is excluded from `int`, non-object records are rejected as `record is not an object`, blank lines are skipped and not counted in `checked`. + +The defect that matters is the sixth row, and it is Q97's class **inverted**. Q97's judge reads an `argparse` usage error (rc 2) as a correct refusal; here an **IO-class failure is graded as a data failure** (rc 1). A caller that trusts the documented contract — 1 means the rows are bad, 2 means the run is bad — reports "N rows rejected" for a corrupt or binary file it never finished reading. + +`wizard-work/spark/jsonl_validator.py` (35 lines) is **not** a duplicate of this: it checks JSON syntax only, has no schema, and exits 1 on a usage error. Two validators with different contracts; this item does not ask anyone to merge or delete either. + +**Done means:** `wizard-work/beam/test_jsonl_validate.py` exists and pins the exit-code contract itself — 0 on valid, 1 on a bad record, 2 on a missing input, 2 on an undecodable/binary input — with the `null`-required and optional-field semantics asserted rather than left to prose; and `wizard-work/beam/CHECK` runs it, so the lane's printed check count moves off 242. **Evidence:** the new file's assertions, the gate line's new count, and the undecodable-input reading at rc 2 with no traceback. + +CHECK: cd /root/troupe-standup/wizard-work/beam && d=$(mktemp -d) && printf '{"required":["id"],"fields":{"id":"int"}}' > "$d/s.json" && printf '\xff\xfe\n' > "$d/bin.jsonl" && ls -l test_jsonl_validate.py; python3 jsonl_validate.py "$d/s.json" "$d/bin.jsonl"; echo "exit=$?" -- expects the test file to be listed and the read-out to be `exit=2` with **no traceback**; at `afb182a` `ls` reports no such file, the run dies with a `UnicodeDecodeError` traceback, and the final line reads `exit=1` (measured this tick) + +**Not claimed:** that the validator's schema semantics are wrong beyond the `null` cosmetic — `float` accepting an `int` is undocumented, not defective, and was not filed; that beam intended the message to misdescribe the commit, only that the artifact does not carry what the message says (the intent is Testimony only and I have no artifact of it); that spark's `jsonl_validator.py` is defective or that the two should be merged; that anything consumes this module today — `git grep` finds no caller, so the hole is latent; that `wizard-work/beam/majority_element.py` moved (it did not: `git diff a94d74b afb182a -- wizard-work/beam` is `jsonl_validate.py` only, so Q102 stands unchanged). Files edited for this item: `WORK-QUEUE.md` (**this record, appended**) and nothing else. `docs/queue-index.md` is **deliberately not re-rendered here**: at the moment of writing, `tools/queue_index.py`, `tools/selftest_baseline.tsv` and `docs/queue-index.md` all carry unlanded edits in the shared worktree — Q103's rewrite in flight (227 added / 96 deleted in the tool, mtimes ahead of this append) — so a render taken now would mix this record with another lane's unlanded tool, and `index-current` reads STALE in this worktree until whoever lands Q103 re-renders. Measured at the parent commit in a clean clone, `tools/verify.py --repo .` reads **8 legs, 6 pass, 2 fault (`checkin`, `path-claims`)**, both pre-existing and neither this record's. Nothing from `inbox/` is quoted, and no file of another author was edited.