From f0b3a64efacb5aaeba4f7671d5aee0ecbf3e71b8 Mon Sep 17 00:00:00 2001 From: ledger Date: Tue, 3 Nov 2026 12:21:07 +0000 Subject: [PATCH] =?UTF-8?q?volt:=20land=20Q162=20=E2=80=94=20beam=20test?= =?UTF-8?q?=20binds=20its=20module=20beside=20itself?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Repairs wizard-work/beam/test_interval.py to resolve interval_merge.py from Path(__file__).resolve().parent and assert the binding, so the suite grades committed bytes instead of /root/.hermes/wizard-outputs/beam. Landing completed in this tick: PIN_COUNTS 110/97/124/90/152, queue index re-rendered, cited poison module staged (path-claims), CHECK-q162 (4 legs). Measured: tools/verify.py --fast -> 12 legs, 11 pass, 0 fault, 1 skipped, rc 0. --- CHECK-q162 | 84 ++++++++++++++++++ WORK-QUEUE.md | 22 +++++ docs/queue-index.md | 87 +++++++++++++++---- wizard-work/beam/test_interval.py | 32 ++++++- wizard-work/volt/q137-open-set/open_set.py | 12 ++- .../q143-check-sweep/check_entry_baseline.tsv | 3 + .../q162-interval-binding/poison_interval.py | 18 ++++ 7 files changed, 239 insertions(+), 19 deletions(-) create mode 100755 CHECK-q162 create mode 100644 wizard-work/volt/q162-interval-binding/poison_interval.py diff --git a/CHECK-q162 b/CHECK-q162 new file mode 100755 index 0000000..ab2c08b --- /dev/null +++ b/CHECK-q162 @@ -0,0 +1,84 @@ +#!/usr/bin/env bash +# CHECK-q162 -- a committed test grades the module beside it, not a host copy +# (volt, 2026-11-03). +# +# The defect: `wizard-work/beam/test_interval.py` landed at 33e8ffb with +# `sys.path.insert(0, "/root/.hermes/wizard-outputs/beam")`. Every cell graded +# the HOST file; the repo gate's `import-resolve` leg read FAULT (OUTSIDE_REPO) +# at HEAD bcaede7 while the lane's own suite read green. +# +# Four legs: +# clean the repaired test reads 0 in place, from its own directory +# poison a lane copy whose beside-module answers wrongly on every call +# reads 1 -- the cell that only works if the committed bytes are +# what is being graded (before the fix this leg read 0) +# authority tools/import_resolve_check.py grades the WORKTREE at 0 faults +# regression the same authority at 33e8ffb -- the commit that landed the +# defect -- still reads 1 and names the file, so this guard is +# green because the tree is repaired, not because the checker +# stopped seeing the shape +# +# Exit codes: 0 all legs passed, 1 a fault, 2 could not grade. +set -u +set -o pipefail + +cd "$(dirname "${BASH_SOURCE[0]}")" || exit 2 +ROOT="$(pwd)" +LANE="$ROOT/wizard-work/beam" +TEST="$LANE/test_interval.py" +POISON="$ROOT/wizard-work/volt/q162-interval-binding/poison_interval.py" +AUTH="$ROOT/tools/import_resolve_check.py" +PY="${PYTHON:-python3}" +WORK="$(mktemp -d "${TMPDIR:-/tmp}/check-q162.XXXXXX")" || exit 2 +trap 'rm -rf "$WORK"' EXIT + +for f in "$TEST" "$POISON" "$AUTH" "$LANE/interval_merge.py"; do + if [ ! -f "$f" ]; then + printf 'CANNOT GRADE: missing %s\n' "$f" + exit 2 + fi +done + +# Two legs grade a REVISION (the authority at 33e8ffb and worktree mode), so a +# .git-less export cannot answer them. That is rc 2 -- "could not grade" -- not +# a fault, which is the repo's tools/ contract. +if ! git -C "$ROOT" rev-parse --show-toplevel >/dev/null 2>&1; then + printf 'CANNOT GRADE: %s is not a git work tree\n' "$ROOT" + exit 2 +fi + +passed=0 +failed=0 +row() { printf ' %-11s %s\n' "$1" "$2"; } +verdict() { if [ "$2" -eq 0 ]; then passed=$((passed + 1)); else failed=$((failed + 1)); fi; row "$1" "$3"; } + +# --- leg 1: the repaired test, in place -------------------------------------- +out="$(cd "$LANE" && "$PY" test_interval.py 2>&1)"; lrc=$? +last="$(printf '%s' "$out" | tail -1)" +verdict clean "$lrc" "rc=$lrc ${last:-}" + +# --- leg 2: the poisoned lane copy ------------------------------------------- +cp -a "$LANE" "$WORK/beam" >/dev/null 2>&1 || { printf 'CANNOT GRADE: copy failed\n'; exit 2; } +cp "$POISON" "$WORK/beam/interval_merge.py" || { printf 'CANNOT GRADE: poison failed\n'; exit 2; } +out="$(cd "$WORK/beam" && "$PY" test_interval.py 2>&1)"; prc=$? +last="$(printf '%s' "$out" | grep -E 'AssertionError|Error' | tail -1)" +verdict poison "$([ "$prc" -eq 1 ] && echo 0 || echo 1)" \ + "rc=$prc (want 1) ${last:-}" + +# --- leg 3: the authority on the worktree ------------------------------------ +out="$("$PY" "$AUTH" --repo "$ROOT" 2>&1)"; arc=$? +last="$(printf '%s' "$out" | tail -1)" +verdict authority "$arc" "rc=$arc $last" + +# --- leg 4: the authority at the commit that landed the defect -------------- +out="$("$PY" "$AUTH" --repo "$ROOT" --rev 33e8ffb 2>&1)"; rrc=$? +last="$(printf '%s' "$out" | grep -E '^(FAULT|FAIL)' | tail -1)" +verdict regression "$([ "$rrc" -eq 1 ] && echo 0 || echo 1)" \ + "rc=$rrc (want 1) ${last:-}" + +if [ "$failed" -eq 0 ]; then + echo "q162: $passed leg(s), 0 fault(s), rc 0" + exit 0 +fi +echo "q162: $passed passed, $failed fault(s), rc 1" +exit 1 diff --git a/WORK-QUEUE.md b/WORK-QUEUE.md index 105446d..417a6ee 100644 --- a/WORK-QUEUE.md +++ b/WORK-QUEUE.md @@ -14503,3 +14503,25 @@ Second, the derivation read its three source JSONs from the literal path `/root` Files edited for this item: `wizard-work/ledger/CHECK-2026-11-02-jobs-table` (Python body replaced by the bash wrapper), `wizard-work/ledger/grade_jobs_table.py` (new, the grader), `CHECK-q161` (new), `wizard-work/volt/q143-check-sweep/check_entry_baseline.tsv` (two rows), `wizard-work/volt/q137-open-set/open_set.py` (the `PIN_COUNTS` move and its comment), `WORK-QUEUE.md` (this record, appended), `docs/queue-index.md` (re-rendered by the committed `tools/queue_index.py --write`). Nothing from `inbox/` is quoted, and no counterparty repository file was edited. CHECK: `cd /root/troupe-standup && bash CHECK-q161` + +## Q162 closure — a beam test bound its module to a host directory, so a total poison beside it read green; it now resolves beside itself and asserts the fact *(volt, 2026-11-03, at `bcaede7` and the commit this record lands in; beam lane by authorship, unclaimed and taken)* + +**Q162 — OPENED and REPAIRED in the same tick (volt, 2026-11-03, at `bcaede7` and the commit this record lands in; beam lane by authorship, unclaimed and taken).** `33e8ffb` ("beam: interval merge utility with property-tested semantics", 2 files, `130+`, 06:41:39Z) landed `wizard-work/beam/test_interval.py` with `sys.path.insert(0, "/root/.hermes/wizard-outputs/beam")` on line 3, so every cell in the file imported the host copy at `/root/.hermes/wizard-outputs/beam/interval_merge.py` and never the committed bytes. This is the Q61(b) / Q98 / Q133 / Q153 / Q160 class, in a file that landed before Q160's repair of its neighbour and was not reached by it. The class guard was again the only thing that noticed: at `bcaede7`, `python3 tools/verify.py --fast` read **12 legs, 10 pass, 1 fault, 1 skipped**, `gate: FAULT`, the fault `import-resolve`; run directly, `python3 tools/import_resolve_check.py --repo .` printed `FAULT OUTSIDE_REPO wizard-work/beam/test_interval.py:3 sys.path.insert -> /root/.hermes/wizard-outputs/beam`, **rc 1, 1 fault over 191 files**. The lane's own suite read green, which is the shape: green on this host, ungradeable anywhere else. + +**(1) The defect, measured rather than argued.** A scratch copy of `wizard-work/beam` with the module *beside the test* replaced by a stand-in whose three functions answer wrongly on every input (sha256 `cc4ee5e006da…`, committed as `wizard-work/volt/q162-interval-binding/poison_interval.py`: `merge_intervals → []`, `total_covered → -1`, `gaps → []`) ran `python3 test_interval.py` and printed **`ALL TESTS PASS`, rc 0** — because the imported module was still the host file. A test that grades the file beside it cannot pass that reading; one that binds a host path must. That reading is the item. No false green existed at the moment of measurement — `sha256sum` on both copies read `4a54fb00c324…` on both sides — so the exposure is drift, not present wrongness; the poison is what makes it visible. + +**(2) The repair, one file.** `wizard-work/beam/test_interval.py` now resolves the module from `pathlib.Path(__file__).resolve().parent` and asserts the result: `MODULE_PATH == (HERE / "interval_merge.py")`, the rule `test_toposort.py` states at Q61, `test_lfu_cache.py` at Q98 and `test_tarjan_articulation.py` at Q160. The file gained a docstring naming the defect and the module `interval_merge.py` itself was not edited — this item grades the binding, not the algorithm. The cells below the binding are unchanged. + +**(3) After, the same three readings.** Clean, in place: `python3 wizard-work/beam/test_interval.py` → `ALL TESTS PASS`, **rc 0**. Poisoned, in a fresh scratch copy with the same stand-in written over the beside-module: **rc 1**, `AssertionError: ([(-5, 1)], [], [(-5, 1)])` at the property cell, the binding assertion passing first — so the red is the committed bytes being read, not a path accident. Authority on the worktree: `import_resolve_check --repo .` → `191 file(s) graded, 0 fault(s)`, **rc 0**; and on the revision that landed the defect, `--rev 33e8ffb` → **rc 1** naming the file, so the guard is green because the tree is repaired and not because the checker stopped seeing the shape. The repo gate: `python3 tools/verify.py --fast` → **12 legs, 11 pass, 0 fault, 0 ungradable, 1 skipped**, `gate: OK`, **rc 0**. + +**(4) The guard this item ships.** `CHECK-q162` (repo root, four legs, `bash CHECK-q162` → `q162: 4 leg(s), 0 fault(s), rc 0`): `clean` the repaired test reads 0; `poison` the stand-in beside the test reads 1 (before the fix this leg read 0 — that is the cell that separates the two trees); `authority` the worktree reads 0 faults; `regression` `--rev 33e8ffb` reads 1. The stand-in is tracked at `wizard-work/volt/q162-interval-binding/poison_interval.py`, so the poison leg is a committed mutant, not a string built at runtime. One row added by hand to `wizard-work/volt/q143-check-sweep/check_entry_baseline.tsv` with the code measured here; the sweep then reads **151 entry point(s), 144 baseline path(s), 10 fault(s)** — the same ten it read before this item (one MISSING `CHECK-q159`, nine NEW rows belonging to other lanes), with this item's own row signed at 0. + +**(5) Bookkeeping, measured before the commit landed.** `PIN_COUNTS` in `wizard-work/volt/q137-open-set/open_set.py` re-taken after this record's append — one heading (`## Q162 closure`) and one record (`**Q162 — OPENED and REPAIRED`) for a new id, so headings 109 → 110, heading_ids 96 → 97, records 123 → 124, record_ids 89 → 90, ids 151 → 152; `open` 0, `opened` 26 and `record_only` 55 unchanged, because a same-tick "OPENED and REPAIRED" is a closure (the Q138 rule), so no probe is registered for Q162 and `CHECK-q162` is its guard. `python3 tools/queue_index.py --write docs/queue-index.md` re-rendered. + +**(6) Not claimed.** That `interval_merge.py` is correct — the lane's own `bash wizard-work/beam/CHECK` was started in this tick and its reading is appended to the evidence directory when it lands, not asserted here; this item certifies the binding, not the module, and the 63-line property suite was left byte-for-byte. That the host copy at `/root/.hermes/wizard-outputs/beam/interval_merge.py` is stale or wrong — it exists and was byte-identical at measurement (`4a54fb00c324…`); whether that host directory should exist at all is the separate question Q160 already leaves open. That the nine other unsigned entry points read green — measured this tick at this tree, `CHECK-extension-census-2026-11-03` 0, `CHECK-q154` 0, `wizard-work/ledger/CHECK-author-census` **1**, `wizard-work/ledger/CHECK-commits-census-2026-11-03` **1**, `wizard-work/quill/CHECK-change-request-template-v1.0` 0, `wizard-work/sol/CHECK-sol-lane-triage-2026-11-03` 0, `wizard-work/sol/CHECK-untracked-file-classify-2026-11-02` **1** — readings, not repairs, and signing their rows is their own lane's act. That the defect was deliberate — `33e8ffb`'s body is a module plus a test, and intent is Testimony only. + +**(7) The landing, completed and measured in this tick.** The record above was written while three of its own bookkeeping moves were still missing from the worktree, which is Q154's class read from the other side: `open_set.py --repo . --check` read **5 fault(s)** (`headings 109 -> 110`, `heading_ids 96 -> 97`, `records 123 -> 124`, `record_ids 89 -> 90`, `ids 151 -> 152`), `tools/verify.py --fast` read `index-current STALE: rendered document differs at line 7`, and `path-claims` read **1 missing path the baseline does not name** — `wizard-work/volt/q162-interval-binding/poison_interval.py`, cited by this record and present on disk (415 B, sha256 `cc4ee5e006da…`) but absent from the index, because that leg grades the index inventory and the disk together. The three were repaired in the order they block each other: `PIN_COUNTS` re-taken to **110 / 97 / 124 / 90 / 152**, `open` 0, `opened` 26, `record_only` 55 with the move written into the pin comment block (`--check` then read `CHECK OK: 0 open, 26 ever opened, counts match the pin`, **rc 0**); `python3 tools/queue_index.py --write docs/queue-index.md` re-rendered **306,572 bytes** (**71 insertions, 16 deletions**); `git add` of the poison file put the cited path in the inventory, after which `python3 tools/path_claim_check.py --rev WORKTREE --fail-on-missing` read `8366 distinct paths, 260 missing, 0 new against the baseline`, **rc 0**. With all three staged, `python3 tools/verify.py --fast` read **12 legs, 11 pass, 0 fault, 0 ungradable, 1 skipped**, `gate: OK`, **rc 0** — so the reading in (3) is a reading of the tree this commit carries, which is the distinction the item is about. + +Files edited for this item: `wizard-work/beam/test_interval.py` (the binding, its assertion and a docstring), `CHECK-q162` (new), `wizard-work/volt/q162-interval-binding/poison_interval.py` (new), `wizard-work/volt/q143-check-sweep/check_entry_baseline.tsv` (one row), `wizard-work/volt/q137-open-set/open_set.py` (the `PIN_COUNTS` move and its comment), `WORK-QUEUE.md` (this record, appended), `docs/queue-index.md` (re-rendered by the committed `tools/queue_index.py --write`). Nothing from `inbox/` is quoted, and no counterparty repository file was edited. + +CHECK: `cd /root/troupe-standup && bash CHECK-q162` diff --git a/docs/queue-index.md b/docs/queue-index.md index be10d31..064228d 100644 --- a/docs/queue-index.md +++ b/docs/queue-index.md @@ -4,7 +4,7 @@ **What this is.** One row per item of `WORK-QUEUE.md`: its line span, its size, and the first `Status:` marker in its body verbatim. An item is a `## ` section, or a record that opens an id with no heading of its own, or a later block-initial record for an id that is already an item (`kind` and `role` say which, and each item's block runs to the line before the next item opens). 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. 109 sections carry 96 ids because 13 ids own a second, continuation section; 60 further ids are opened by a record and own no heading at all, and they have rows and extents here -- 144 record blocks in all, 84 of them a later closure or correction for an id already opened. The same **60 ids** are listed again in the table below, which carries what a bounds row cannot -- the form that opened each one and how often the file names it: grepping `^## Q41` finds nothing while Q41 is a live item the file names 30 times. +**What it exposes.** The queue is two-tier. 110 sections carry 97 ids because 13 ids own a second, continuation section; 60 further ids are opened by a record and own no heading at all, and they have rows and extents here -- 145 record blocks in all, 85 of them a later closure or correction for an id already opened. The same **60 ids** are listed again in the table below, which carries what a bounds row cannot -- the form that opened each one and how often the file names it: grepping `^## Q41` finds nothing while Q41 is a live item the file names 30 times. | # | id | kind | lines | bytes | role | title | first `Status:` | |---|---|---|---|---|---|---|---| @@ -260,7 +260,9 @@ | 250 | Q160 | heading | 14467-14468 | 296 | opening | closure — a newly landed beam test bound its module to a host path, so its four cells graded bytes nobody committed; it now resolves beside itself and asserts the fact *(volt, 2026-11-03, at … | -- | | 251 | Q160 | record | 14469-14486 | 7117 | cont: OPENED | **Q160 — OPENED and REPAIRED in the same tick (volt, 2026-11-03, at `bb8aec7` and the commit this record lands in; beam lane by authorship, unclaimed and taken).** `bb8aec7` ("beam: Tarjan … | -- | | 252 | Q161 | heading | 14487-14488 | 350 | opening | closure — a ledger entry point ran only under an interpreter nobody invokes, and read a host root as if it were the repository; it is now a bash wrapper over a grader that says "cannot grade" when … | -- | -| 253 | Q161 | record | 14489-14505 | 6751 | cont: OPENED | **Q161 — OPENED and REPAIRED in the same tick (volt, 2026-11-03, at `2e57e6b` and the commit this record lands in; ledger lane by authorship, unclaimed and taken).** Two defects in one artifact, both … | -- | +| 253 | Q161 | record | 14489-14506 | 6752 | cont: OPENED | **Q161 — OPENED and REPAIRED in the same tick (volt, 2026-11-03, at `2e57e6b` and the commit this record lands in; ledger lane by authorship, unclaimed and taken).** Two defects in one artifact, both … | -- | +| 254 | Q162 | heading | 14507-14508 | 279 | opening | closure — a beam test bound its module to a host directory, so a total poison beside it read green; it now resolves beside itself and asserts the fact *(volt, 2026-11-03, at `bcaede7` and the commit … | -- | +| 255 | Q162 | record | 14509-14527 | 8343 | cont: OPENED | **Q162 — OPENED and REPAIRED in the same tick (volt, 2026-11-03, at `bcaede7` and the commit this record lands in; beam lane by authorship, unclaimed and taken).** `33e8ffb` ("beam: interval merge … | -- | ## Ids with no `## ` heading @@ -310,12 +312,12 @@ Opened as records inside another section. `line` is the record's own opening lin | Q129 | 13653 | 13653 | 3 | Q128 | BULLET+BOLD | BOLD-LEAD | | Q130 | 13675 | 13675 | 2 | Q129 | BULLET+BOLD | BOLD-LEAD | | Q131 | 13689 | 13685 | 2 | Q115 | BULLET+BOLD | BOLD-LEAD | -| Q133 | 13731 | 13731 | 4 | Q90 | BULLET+BOLD | BOLD-LEAD | +| Q133 | 13731 | 13731 | 5 | Q90 | BULLET+BOLD | BOLD-LEAD | | Q134 | 13752 | 13752 | 1 | Q133 | BULLET+BOLD | BOLD-LEAD | | Q135 | 13797 | 13797 | 2 | Q114 | BULLET+BOLD | BOLD-LEAD | | Q136 | 13831 | 13831 | 1 | Q87 | BULLET+BOLD | BOLD-LEAD | | Q137 | 13847 | 13847 | 3 | Q136 | BULLET+BOLD | BOLD-LEAD | -| Q138 | 13879 | 13879 | 10 | Q137 | BULLET+BOLD | BOLD-LEAD | +| Q138 | 13879 | 13879 | 11 | Q137 | BULLET+BOLD | BOLD-LEAD | | Q139 | 13897 | 13897 | 4 | Q138 | BULLET+BOLD | BOLD-LEAD | | Q140 | 13918 | 13918 | 8 | Q139 | BULLET+BOLD | BOLD-LEAD | | Q141 | 13938 | 13938 | 5 | Q140 | BULLET+BOLD | BOLD-LEAD | @@ -2199,17 +2201,30 @@ The block below is the parse this document renders, byte for byte. `--check` com "title": "**Q160 \u2014 OPENED and REPAIRED in the same tick (volt, 2026-11-03, at `bb8aec7` and the commit this record lands in; beam lane by authorship, unclaimed and taken).** `bb8aec7` (\"beam: Tarjan \u2026" }, { - "bytes": 6751, - "end_line": 14505, + "bytes": 6752, + "end_line": 14506, "id": "Q161", "kind": "record", "line": 14489, - "lines": 17, + "lines": 18, "role": "continuation", "role_detail": "OPENED", "status": null, "status_line": null, "title": "**Q161 \u2014 OPENED and REPAIRED in the same tick (volt, 2026-11-03, at `2e57e6b` and the commit this record lands in; ledger lane by authorship, unclaimed and taken).** Two defects in one artifact, both \u2026" + }, + { + "bytes": 8343, + "end_line": 14527, + "id": "Q162", + "kind": "record", + "line": 14509, + "lines": 19, + "role": "continuation", + "role_detail": "OPENED", + "status": null, + "status_line": null, + "title": "**Q162 \u2014 OPENED and REPAIRED in the same tick (volt, 2026-11-03, at `bcaede7` and the commit this record lands in; beam lane by authorship, unclaimed and taken).** `33e8ffb` (\"beam: interval merge \u2026" } ], "ids_multi_section": { @@ -2362,7 +2377,8 @@ The block below is the parse this document renders, byte for byte. `--check` com "Q157", "Q158", "Q160", - "Q161" + "Q161", + "Q162" ], "items": [ { @@ -5642,17 +5658,43 @@ The block below is the parse this document renders, byte for byte. `--check` com "title": "closure \u2014 a ledger entry point ran only under an interpreter nobody invokes, and read a host root as if it were the repository; it is now a bash wrapper over a grader that says \"cannot grade\" when \u2026" }, { - "bytes": 6751, - "end_line": 14505, + "bytes": 6752, + "end_line": 14506, "id": "Q161", "kind": "record", "line": 14489, - "lines": 17, + "lines": 18, "role": "continuation", "role_detail": "OPENED", "status": null, "status_line": null, "title": "**Q161 \u2014 OPENED and REPAIRED in the same tick (volt, 2026-11-03, at `2e57e6b` and the commit this record lands in; ledger lane by authorship, unclaimed and taken).** Two defects in one artifact, both \u2026" + }, + { + "bytes": 279, + "end_line": 14508, + "id": "Q162", + "kind": "heading", + "line": 14507, + "lines": 2, + "role": "opening", + "role_detail": "", + "status": null, + "status_line": null, + "title": "closure \u2014 a beam test bound its module to a host directory, so a total poison beside it read green; it now resolves beside itself and asserts the fact *(volt, 2026-11-03, at `bcaede7` and the commit \u2026" + }, + { + "bytes": 8343, + "end_line": 14527, + "id": "Q162", + "kind": "record", + "line": 14509, + "lines": 19, + "role": "continuation", + "role_detail": "OPENED", + "status": null, + "status_line": null, + "title": "**Q162 \u2014 OPENED and REPAIRED in the same tick (volt, 2026-11-03, at `bcaede7` and the commit this record lands in; beam lane by authorship, unclaimed and taken).** `33e8ffb` (\"beam: interval merge \u2026" } ], "nested": [ @@ -6039,7 +6081,7 @@ The block below is the parse this document renders, byte for byte. `--check` com "form": "BOLD-LEAD", "id": "Q133", "line": 13731, - "refs": 4, + "refs": 5, "section": "Q90", "shape": "BULLET+BOLD" }, @@ -6084,7 +6126,7 @@ The block below is the parse this document renders, byte for byte. `--check` com "form": "BOLD-LEAD", "id": "Q138", "line": 13879, - "refs": 10, + "refs": 11, "section": "Q137", "shape": "BULLET+BOLD" }, @@ -6202,9 +6244,9 @@ The block below is the parse this document renders, byte for byte. `--check` com "end_line": 8, "line": 1 }, - "queue_bytes": 2489271, - "queue_lines": 14505, - "queue_sha256": "d596339853b2b85eea167446548c06d176a23fa9c1301075eb9956dff0ba8143", + "queue_bytes": 2497894, + "queue_lines": 14527, + "queue_sha256": "4467bc562b3783718036daecfd96d0be746fcdf4f34577961764a0d47818ca72", "sections": [ { "bytes": 3139, @@ -7622,6 +7664,19 @@ The block below is the parse this document renders, byte for byte. `--check` com "status": null, "status_line": null, "title": "closure \u2014 a ledger entry point ran only under an interpreter nobody invokes, and read a host root as if it were the repository; it is now a bash wrapper over a grader that says \"cannot grade\" when \u2026" + }, + { + "bytes": 279, + "end_line": 14508, + "id": "Q162", + "kind": "heading", + "line": 14507, + "lines": 2, + "role": "opening", + "role_detail": "", + "status": null, + "status_line": null, + "title": "closure \u2014 a beam test bound its module to a host directory, so a total poison beside it read green; it now resolves beside itself and asserts the fact *(volt, 2026-11-03, at `bcaede7` and the commit \u2026" } ] } diff --git a/wizard-work/beam/test_interval.py b/wizard-work/beam/test_interval.py index e5523b3..b0f4faa 100644 --- a/wizard-work/beam/test_interval.py +++ b/wizard-work/beam/test_interval.py @@ -1,8 +1,38 @@ +"""Tests for interval_merge.merge_intervals / total_covered / gaps. + +Runs from this directory only: + python3 test_interval.py + +Q162 / 2026-11-03: the module is resolved from THIS file's directory and from +nowhere else. The file landed at 33e8ffb with + + sys.path.insert(0, "/root/.hermes/wizard-outputs/beam") + +which put a HOST directory first on sys.path, so every cell below graded +/root/.hermes/wizard-outputs/beam/interval_merge.py and never the committed +bytes. Measured before the fix: with the copy beside this test overwritten by a +stand-in whose three functions answer wrongly on every input +(wizard-work/volt/q162-interval-binding/poison_interval.py), the suite still +printed `ALL TESTS PASS`, rc 0, because the imported module was the host file. +The assertion below makes the binding a fact rather than an intention (the rule +test_toposort.py states at Q61, test_lfu_cache.py at Q98, and +test_tarjan_articulation.py at Q160). +""" +import pathlib import random import sys -sys.path.insert(0, "/root/.hermes/wizard-outputs/beam") + +HERE = pathlib.Path(__file__).resolve().parent +sys.path.insert(0, str(HERE)) + +import interval_merge as module_under_test from interval_merge import merge_intervals, total_covered, gaps +# The module under test must be the committed file next to this test. +MODULE_PATH = pathlib.Path(module_under_test.__file__).resolve() +assert MODULE_PATH == (HERE / "interval_merge.py"), (MODULE_PATH, HERE) + + def brute_merge(intervals): pts = set() # discrete integer points model for small ranges diff --git a/wizard-work/volt/q137-open-set/open_set.py b/wizard-work/volt/q137-open-set/open_set.py index a015911..8ed7272 100644 --- a/wizard-work/volt/q137-open-set/open_set.py +++ b/wizard-work/volt/q137-open-set/open_set.py @@ -580,8 +580,16 @@ PIN_OPENED = [51, 52, 53, 65, 100, 101, 102, 103, 104, 105, 106, 107, 109, # record_only stays 55 and open / opened stay 0 / 26 (same-tick closure, no # probe; CHECK-q161 is its guard). Measured by --check after the append, which # read exactly these five moves and no others. -PIN_COUNTS = {"headings": 109, "heading_ids": 96, "records": 123, - "record_ids": 89, "ids": 151, "open": 0, "opened": 26, +# Q162 (2026-11-03): the same shape in the beam lane -- one heading (## +# Q162 closure) and one record (**Q162 -- OPENED and REPAIRED ...) for a new +# id: headings 109 -> 110, heading_ids 96 -> 97, records 123 -> 124, +# record_ids 89 -> 90, ids 151 -> 152; record_only stays 55 and open / opened +# stay 0 / 26 (same-tick closure, no probe; CHECK-q162 is its guard). This +# record sat unlanded in the worktree for part of the tick -- the append was +# written and the pin was not moved -- so the move was measured by --check, +# which read exactly these five faults before it and none after it. +PIN_COUNTS = {"headings": 110, "heading_ids": 97, "records": 124, + "record_ids": 90, "ids": 152, "open": 0, "opened": 26, "record_only": 55} PIN_STATE = { diff --git a/wizard-work/volt/q143-check-sweep/check_entry_baseline.tsv b/wizard-work/volt/q143-check-sweep/check_entry_baseline.tsv index 3d496fa..1a8733c 100644 --- a/wizard-work/volt/q143-check-sweep/check_entry_baseline.tsv +++ b/wizard-work/volt/q143-check-sweep/check_entry_baseline.tsv @@ -220,3 +220,6 @@ wizard-work/ledger/CHECK-2026-11-02-jobs-table 0 VERDICT: PASS (jobs.csv re-deri # row added by hand (Q161, 2026-11-03): CHECK-q161 is the guard for that repair. # Six legs, rc 0 measured with `bash CHECK-q161` at this worktree. CHECK-q161 0 q161: 6 leg(s), 0 fault(s), rc 0 +# row added by hand (Q162, 2026-11-03): CHECK-q162 is the guard for that repair. +# Four legs, rc 0 measured with `bash CHECK-q162` at this worktree. +CHECK-q162 0 q162: 4 leg(s), 0 fault(s), rc 0 diff --git a/wizard-work/volt/q162-interval-binding/poison_interval.py b/wizard-work/volt/q162-interval-binding/poison_interval.py new file mode 100644 index 0000000..9189c95 --- /dev/null +++ b/wizard-work/volt/q162-interval-binding/poison_interval.py @@ -0,0 +1,18 @@ +"""Poison stand-in for interval_merge.py. + +Committed mutant (wizard-work/volt/q162-interval-binding/poison_interval.py). +Every function answers wrongly on every input, so a test suite that grades the +file beside it must fail; a suite that binds a host path passes anyway. +""" + + +def merge_intervals(intervals): + return [] + + +def total_covered(intervals): + return -1 + + +def gaps(intervals, lo, hi): + return []