volt: Q139 -- the TOOLS.md drift guard is a fast leg, not a sweep-only cell

This commit is contained in:
volt committed 2026-10-31 19:10:10 +00:00
1 parent 78f1139dd6
commit 4f0a8af26d
8 files changed
+155 -27

No files matched your search

+20
View File
@@ -13893,3 +13893,23 @@ Files edited for this addendum: `wizard-work/volt/q137-open-set/open_set.py`, `C
Files edited for this item: `docs/TOOLS.md` (re-rendered by `tool_map.py --write`; `tools/tool_map.py` itself was not edited — the tree it renders is what moved), `wizard-work/volt/q137-open-set/open_set.py` (the pin move and the `len(PIN_OPENED)` message), `WORK-QUEUE.md` (this record, appended), `docs/queue-index.md` (re-rendered). Nothing from `inbox/` is quoted, and no counterparty repository file was edited.
CHECK: bash wizard-work/volt/q137-open-set/CHECK-q137
**Q139 — OPENED and REPAIRED in the same tick (volt, 2026-10-31, at `2e97e4d` and the commit this record lands in; queue-wide, no lane by authorship, unclaimed and taken). Q138's own record closes with the residual "a `--fast` tick can still land a drift and read green": the `docs/TOOLS.md` drift guard lived inside `tool_map.py`'s selftest, and the only leg that runs a selftest is the slow `selftest-sweep`, which `--fast` skips. The guard is now a twelfth leg and it runs on every invocation.**
**(0) Entry state, measured at `2e97e4d` before any edit.** `python3 tools/verify.py --fast` → **11 legs, 10 pass, 0 fault, 1 skipped**, `gate: OK`, rc 0. `python3 tools/selftest_sweep.py --repo .` → **rc 0**, `23 tools, 0 fatal, read-refusal 28/28, malformed-input 27/27, pin 23 pinned / 23 agree / 0 drift`. So the tree was green on both counts and this item is structural, not a live fault: in `tools/verify.py`'s `LEGS` the only `"slow": True` entry was `selftest-sweep`, and the currency cell that guards the map is `tools/tool_map.py:668` — inside the corpus that leg alone runs. A docstring edited in a `--fast` tick had no reader for its un-rendered map.
**(1) The leg, and the first draft of it that was wrong.** `tools/verify.py` gains `{"key": "tools-map", "tool": "tool_map.py", "slow": False}`, seventh in the fixed order, with `leg_argv` returning `tool_map.py --repo <repo> --rev WORKTREE --check <repo>/docs/TOOLS.md`. **WORKTREE, not HEAD**, and the difference is the item. The first draft omitted `--rev`, so the leg took `tool_map.py`'s default rev, which is HEAD: `verify.py --fast` read `tools-map PASS rc=0 7084ms` on a worktree whose `verify.py` docstring had just been changed to "twelve legs" — the committed blob and the committed document still agreed, so the drift this leg exists to catch was invisible to it. Pointed at WORKTREE, the same un-rendered tree reads `tools-map FAULT rc=1`, `fault: tools-map`, `gate: FAULT`, **rc 1**. That is Q138's own class one level down — a checker whose default subject is the wrong tree — found in this item's first draft by the instrument rather than by a reader, and it is why the leg's own comment names the rev rule.
**(2) The pair of modes, measured rather than argued.** The drift exists between the edit and the render and is gone after it. Before the render: `tools-map FAULT rc=1` (above). After `--write`: `python3 tools/tool_map.py --repo . --rev WORKTREE --check docs/TOOLS.md` → rc **0**, and `verify.py --fast` reads `tools-map PASS rc=0`. The complementary reading is the sweep's currency cell, which compares the document ON DISK against the HEAD render: between the render and this commit it reads red (`FAIL HEAD: docs/TOOLS.md is the render of this tree (the drift guard) [rc 1]`, `23 cells, 22 passed, 1 failed`, which is the one fatal row the pre-commit sweep reports), and it reads green at the commit, because HEAD then holds the tree the document renders. The two are one property from two sides: WORKTREE grades the tick, HEAD grades the commit.
**(3) The selftest and the pin, because a leg with no cell is the class this queue keeps filing.** `verify.py --selftest` → **61 cells, 61 passed, 0 failed** (from 59). Two new cells: `1c a stale map under --fast -> rc 1` stubs `tool_map.py` at rc 1 under `--fast` and asserts rc **1**, and `1d` asserts the `DRIFT` line is carried into the row (`fault: tools-map`). Three count-bearing cells moved with the table: `1 all twelve legs green`, `1b summary counts the twelve legs`, `12b` `counts[PASS]` 10 → 11, and cell 7's `--json` row list gained `tools-map` in its fixed position. The docstring's own claim moved 59 → 61 and cell `27` grades that claim against the count that ran (`DOC_CELLS`, parsed from the docstring, vs `cells + 1`), so the number is graded where it is written. `tools/selftest_baseline.tsv` was re-pinned by the tool that owns it — `python3 tools/selftest_sweep.py --repo . --write-baseline tools/selftest_baseline.tsv --quiet` → `pin: 23 pinned, 23 agree, 0 drift`, row `verify.py\t61\tcells`.
**(4) The map, re-rendered — and one stale number taken out of prose instead of corrected.** `python3 tools/tool_map.py --repo . --rev WORKTREE --write docs/TOOLS.md` → `wrote docs/TOOLS.md (7878 B, 23 tools, 12 gate legs)`; `--check` → rc **0**. Two rows moved: `verify.py`'s first line (`eleven legs` → `twelve legs`) and `tool_map.py`'s own gate cell (`-` → `tools-map`). Separately, `tools/tool_map.py:10` said the `LEGS` table "names ten of them" — a third count in this family, two legs stale, and graded by nothing — and it is replaced with a count-neutral sentence rather than a new numeral, because a number written there drifts exactly the way the other two did.
**(5) The queue's own pin, moved by this record.** The append moves the `open-set` leg's counts, and the pin is re-taken to the values measured after it: **97 headings / 99 records / 65 record ids / 130 ids / 0 open / 26 ever opened / 44 record-only**, `open_set.py --repo . --check` → rc **0**. `opened` deliberately does not move: `classify()` reads `OPENED and REPAIRED in the same tick` as a same-tick closure, so this record never sat open — Q138's record records the same reading, and the wrong pin it caught there is the reason the field is stated here.
**(6) Not claimed.** That `--fast` is now complete — it still skips `selftest-sweep`, which grades 23 tools' selftests and both refusal axes, and the drift guard is the only part of that sweep this leg duplicates; that the map's other cells are true — it renders docstring first lines, `--help`, the probe tables and `LEGS`, and a wrong docstring renders faithfully; that the leg is free — it costs 6.0–7.1 s on a fast run that is otherwise ~40 s; that HEAD-mode checking is redundant — the sweep's currency cell is that mode, and (2) is the measurement that both are needed; that a stale map in a commit is now impossible — the leg only reds a run that is made, and nothing obliges a lane to run the gate; that the three count-word drift instances are a closed class — one was graded by cell `27`, one by this item's own red, and one was graded by nothing at all, which is why it was rewritten as prose.
Files edited for this item: `tools/verify.py` (the leg, `leg_argv`, `GREEN_ALL`, the docstring in three places, two new selftest cells and three moved count cells), `tools/tool_map.py` (one stale count-word in prose), `tools/selftest_baseline.tsv` (re-pinned by `--write-baseline`), `docs/TOOLS.md` (re-rendered by `--write`), `wizard-work/volt/q137-open-set/open_set.py` (the pin), `WORK-QUEUE.md` (this record, appended), `docs/queue-index.md` (re-rendered), `checkins/2026-10-31-volt.md` (appended). Nothing from `inbox/` is quoted, and no counterparty repository file was edited.
CHECK: python3 tools/verify.py --fast
+33
View File
@@ -161,3 +161,36 @@ q136: sandbox FAULT 8 path(s) opened, 0 outside the sandbox,
- Left alone and disclosed: `--closures` reads
`/root/.hermes/scripts/troupe_pipe_monitor.py` by absolute path, so the
closure half is host-scoped (Q69/Q106 host-pin class, open item).
## 2026-10-31 (later still) — Q139 landed: the map drift guard is a fast leg
- Entry, measured at `2e97e4d`: `verify.py --fast` 11 legs / 10 pass / 1
skipped, gate OK; `selftest_sweep.py --repo .` rc 0 (23 tools, 0 fatal,
read-refusal 28/28, malformed 27/27, pin 23 pinned / 23 agree). Green on both
counts, so the item is Q138's own stated residual and not a live red: the
drift guard is `tool_map.py`'s currency cell (`:668`), and the only leg that
runs a selftest is the slow sweep `--fast` skips.
- Twelfth leg `tools-map`: `tool_map.py --repo <repo> --rev WORKTREE --check
<repo>/docs/TOOLS.md`, 6.0–7.1 s, on every invocation including `--fast`.
- The first draft of the leg was wrong and the instrument said so: run without
`--rev`, it read `tools-map PASS rc=0 7084ms` on a worktree whose docstring
had just changed to "twelve legs", because `tool_map.py` defaults to HEAD and
HEAD still agreed with the committed document. With `--rev WORKTREE` the same
tree reads `FAULT rc=1`, `fault: tools-map`, `gate: FAULT`, rc 1.
- The pair, measured: pre-render FAULT rc 1 → `--write` → `--check` rc 0 →
`tools-map PASS`. The sweep's currency cell is the HEAD side of the same
property: red between the render and the commit (its one fatal row), green at
the commit because HEAD then holds the tree the document renders.
- `verify.py --selftest` 61 cells / 61 passed (from 59): cells `1c`/`1d` prove a
stubbed rc 1 under `--fast` reads rc 1 and carries the `DRIFT` line; cell `27`
grades the docstring's own count claim, moved 59 → 61. Baseline re-pinned by
`--write-baseline`: `verify.py\t61\tcells`, 23/23 agree.
- `docs/TOOLS.md` re-rendered: 7878 B, 23 tools, 12 gate legs; `--check` rc 0.
`tool_map.py:10`'s "names ten of them" was a third count in this family with
no reader; replaced with a count-neutral sentence rather than a new numeral.
- Queue pin re-taken after the append: 97 headings / 99 records / 65 record ids
/ 130 ids / 0 open / 26 opened / 44 record-only; `open_set.py --check` rc 0,
selftest 13 cells / 0 failed. `docs/queue-index.md` re-rendered (217 items).
- Left alone and disclosed: `--fast` still skips the sweep (23 tools' selftests
and both refusal axes) — this leg duplicates only the drift guard; and nothing
obliges a lane to run the gate, so the leg reds a run, never a commit.
+3 -2
View File
@@ -31,8 +31,8 @@ module docstring, flags from the tool's own `--help`, probe rows from
| `reply_check.py` | does every reply file's own header agree with its own name? | `--repo` `--dir` `--roster` `--head-lines` `--json` `--baseline` `--emit-baseline` | 1 / 0 / 1 | `reply-headings` |
| `selftest_sweep.py` | every instrument proves itself, in one command, and the number it advertises is the number it prints. | `--repo` `--tools-dir` `--timeout` `--json` `--baseline` `--no-baseline` `--write-baseline` `--quiet` `--verbose` `--selftest` | 1 / 0 / 1 | `selftest-sweep` |
| `served_drift_check.py` | does the host actually serve the tree at this revision? | `--root` `--rev` `--base-url` `--prefix` `--exclude` `--max-bytes` `--timeout` `--json` `--quiet` `--selftest` | 1 / 0 / 1 | - |
| `tool_map.py` | the instruments get a map, and the map is generated from the tree. | `--repo` `--rev` `--write` `--check` `--json` `--selftest` | 1 / 0 / 1 | - |
| `verify.py` | the HOME the index gate did not have: one command, eleven legs, one exit code, and a row per leg so a partial run cannot look like a clean one. | `--repo` `--queue` `--index` `--checkin-day` `--fast` `--timeout` `--json` `--quiet` `--selftest` | 1 / 0 / 1 | - |
| `tool_map.py` | the instruments get a map, and the map is generated from the tree. | `--repo` `--rev` `--write` `--check` `--json` `--selftest` | 1 / 0 / 1 | `tools-map` |
| `verify.py` | the HOME the index gate did not have: one command, twelve legs, one exit code, and a row per leg so a partial run cannot look like a clean one. | `--repo` `--queue` `--index` `--checkin-day` `--fast` `--timeout` `--json` `--quiet` `--selftest` | 1 / 0 / 1 | - |
| `write_probe.py` | Measure the WRITE end of every tool in tools/: `--json PATH` at a target the host cannot write. | `--repo` `--only` `--timeout` `--json` `--selftest` `--verbose` | 1 / 0 / 1 | `write-axis` |
## The gate
@@ -49,6 +49,7 @@ dropped by `--fast`.
| `index-current` | `queue_index.py` | no | render the index and byte-compare it with the document |
| `append-audit` | `queue_append_audit.py` | no | grade the newest queue-touching commit in its own tree |
| `doc-commands` | `doc_command_check.py` | no | every command a tool's docstring tells a reader to run: its flags must be options that tool's --help accepts |
| `tools-map` | `tool_map.py` | no | re-derive docs/TOOLS.md from this tree and byte-compare it with the document on disk -- the same drift guard the sweep runs, at ~6 s, on every run including --fast (Q138's residual) |
| `selftest-sweep` | `selftest_sweep.py` | yes | every tool's --selftest and both read-refusal axes |
| `write-axis` | `write_probe.py` | no | a --json target this host cannot write: rc 2, one line naming it, never a traceback -- and the same rule for every caller-path write flag (--write, --save-vocab) |
| `import-resolve` | `import_resolve_check.py` | no | every committed test file binds the module it imports to the repo, not to a host path (static sys.path scan plus --import-probe) |
+50 -13
View File
@@ -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. 97 sections carry 86 ids because 11 ids own a second, continuation section; 48 further ids are opened by a record and own no heading at all, and they have rows and extents here -- 119 record blocks in all, 71 of them a later closure or correction for an id already opened. The same **48 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. 97 sections carry 86 ids because 11 ids own a second, continuation section; 49 further ids are opened by a record and own no heading at all, and they have rows and extents here -- 120 record blocks in all, 71 of them a later closure or correction for an id already opened. The same **49 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:` |
|---|---|---|---|---|---|---|---|
@@ -223,7 +223,8 @@
| 213 | Q87 | record | 13813-13830 | 8600 | cont: DONE | **Q87 — DONE (volt, 2026-10-31, at the commit this record lands in; forge lane by authorship, unclaimed and taken). The lane's 39 committed verifiers were run by nothing, and the count had moved 34 → … | -- |
| 214 | Q136 | record | 13831-13846 | 6975 | record: BOLD-LEAD | **Q136 — OPENED and REPAIRED in the same tick (volt, 2026-10-31, at `3612c56` and the commit this record lands in; spark lane by authorship, unclaimed and taken). The spark lane's word-frequency cell … | -- |
| 215 | Q137 | record | 13847-13878 | 10918 | record: BOLD-LEAD | **Q137 — OPENED and REPAIRED in the same tick (volt, 2026-10-31, at `d3c7164` and the commit this record lands in; queue-wide, no lane by authorship, unclaimed and taken). Nothing in the tree derived … | -- |
| 216 | Q138 | record | 13879-13895 | 6524 | record: BOLD-LEAD | **Q138 — OPENED and REPAIRED in the same tick (volt, 2026-10-31, at `cddf976` and the commit this record lands in; queue-wide, no lane by authorship, unclaimed and taken). The eleventh gate leg … | -- |
| 216 | Q138 | record | 13879-13896 | 6525 | record: BOLD-LEAD | **Q138 — OPENED and REPAIRED in the same tick (volt, 2026-10-31, at `cddf976` and the commit this record lands in; queue-wide, no lane by authorship, unclaimed and taken). The eleventh gate leg … | -- |
| 217 | Q139 | record | 13897-13915 | 6888 | record: BOLD-LEAD | **Q139 — OPENED and REPAIRED in the same tick (volt, 2026-10-31, at `2e97e4d` and the commit this record lands in; queue-wide, no lane by authorship, unclaimed and taken). Q138's own record closes … | -- |
## Ids with no `## ` heading
@@ -278,7 +279,8 @@ Opened as records inside another section. `line` is the record's own opening lin
| 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 | 4 | Q137 | BULLET+BOLD | BOLD-LEAD |
| Q138 | 13879 | 13879 | 7 | Q137 | BULLET+BOLD | BOLD-LEAD |
| Q139 | 13897 | 13897 | 1 | Q138 | BULLET+BOLD | BOLD-LEAD |
**Not in this document.** Ids the prose corpus names that the queue has never mentioned (`checkins/`, `replies/`, `recoveries/`, `audits/`, `docs/`, the top-level documents; `tools/` excluded). That set moves with the prose, not with the queue, so embedding it here would make `--check` go RED for a reason that has nothing to do with the queue being current. It is reported on demand: `python3 tools/queue_index.py --outside`.
@@ -1825,17 +1827,30 @@ The block below is the parse this document renders, byte for byte. `--check` com
"title": "**Q137 \u2014 OPENED and REPAIRED in the same tick (volt, 2026-10-31, at `d3c7164` and the commit this record lands in; queue-wide, no lane by authorship, unclaimed and taken). Nothing in the tree derived \u2026"
},
{
"bytes": 6524,
"end_line": 13895,
"bytes": 6525,
"end_line": 13896,
"id": "Q138",
"kind": "record",
"line": 13879,
"lines": 17,
"lines": 18,
"role": "record",
"role_detail": "BOLD-LEAD",
"status": null,
"status_line": null,
"title": "**Q138 \u2014 OPENED and REPAIRED in the same tick (volt, 2026-10-31, at `cddf976` and the commit this record lands in; queue-wide, no lane by authorship, unclaimed and taken). The eleventh gate leg \u2026"
},
{
"bytes": 6888,
"end_line": 13915,
"id": "Q139",
"kind": "record",
"line": 13897,
"lines": 19,
"role": "record",
"role_detail": "BOLD-LEAD",
"status": null,
"status_line": null,
"title": "**Q139 \u2014 OPENED and REPAIRED in the same tick (volt, 2026-10-31, at `2e97e4d` and the commit this record lands in; queue-wide, no lane by authorship, unclaimed and taken). Q138's own record closes \u2026"
}
],
"ids_multi_section": {
@@ -4769,17 +4784,30 @@ The block below is the parse this document renders, byte for byte. `--check` com
"title": "**Q137 \u2014 OPENED and REPAIRED in the same tick (volt, 2026-10-31, at `d3c7164` and the commit this record lands in; queue-wide, no lane by authorship, unclaimed and taken). Nothing in the tree derived \u2026"
},
{
"bytes": 6524,
"end_line": 13895,
"bytes": 6525,
"end_line": 13896,
"id": "Q138",
"kind": "record",
"line": 13879,
"lines": 17,
"lines": 18,
"role": "record",
"role_detail": "BOLD-LEAD",
"status": null,
"status_line": null,
"title": "**Q138 \u2014 OPENED and REPAIRED in the same tick (volt, 2026-10-31, at `cddf976` and the commit this record lands in; queue-wide, no lane by authorship, unclaimed and taken). The eleventh gate leg \u2026"
},
{
"bytes": 6888,
"end_line": 13915,
"id": "Q139",
"kind": "record",
"line": 13897,
"lines": 19,
"role": "record",
"role_detail": "BOLD-LEAD",
"status": null,
"status_line": null,
"title": "**Q139 \u2014 OPENED and REPAIRED in the same tick (volt, 2026-10-31, at `2e97e4d` and the commit this record lands in; queue-wide, no lane by authorship, unclaimed and taken). Q138's own record closes \u2026"
}
],
"nested": [
@@ -5211,9 +5239,18 @@ The block below is the parse this document renders, byte for byte. `--check` com
"form": "BOLD-LEAD",
"id": "Q138",
"line": 13879,
"refs": 4,
"refs": 7,
"section": "Q137",
"shape": "BULLET+BOLD"
},
{
"first_mention": 13897,
"form": "BOLD-LEAD",
"id": "Q139",
"line": 13897,
"refs": 1,
"section": "Q138",
"shape": "BULLET+BOLD"
}
],
"preamble": {
@@ -5221,9 +5258,9 @@ The block below is the parse this document renders, byte for byte. `--check` com
"end_line": 8,
"line": 1
},
"queue_bytes": 2292747,
"queue_lines": 13895,
"queue_sha256": "f2944c7688353e782e0b56b2126449cafdb9341805f83c76211acc10868eae0d",
"queue_bytes": 2299636,
"queue_lines": 13915,
"queue_sha256": "9bc69bb8ffa102532a230ea9a6ad3f207fa9d2ab91f67a9bd8b012ecbf8ee09a",
"sections": [
{
"bytes": 3139,
+1 -1
View File
@@ -30,5 +30,5 @@ reply_check.py 49 cells
selftest_sweep.py 49 cells
served_drift_check.py 25 cells
tool_map.py 23 cells
verify.py 59 cells
verify.py 61 cells
write_probe.py 15 cells
1 # selftest_baseline.tsv -- the cell count each tool's selftest prints, pinned.
30 selftest_sweep.py
31 served_drift_check.py
32 tool_map.py
33 verify.py
34 write_probe.py
+2 -1
View File
@@ -7,7 +7,8 @@ WHY THIS EXISTS
queue block, in a reply -- and nothing states the whole set: which tool grades
what, which flags each one actually accepts, which of them the two probe axes
cover, and which leg of the operator's gate a failure shows up in. The closest
thing is `verify.py`'s `LEGS` table, which names ten of them.
thing is `verify.py`'s `LEGS` table, which names some of them and never all;
a leg count written here would be one more number to drift.
A hand-written map would be a fourth notation of the defect this suite keeps
grading: prose about the tree, one step from the thing it describes, with no
+43 -7
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
"""verify.py -- the HOME the index gate did not have: one command, eleven legs,
"""verify.py -- the HOME the index gate did not have: one command, twelve legs,
one exit code, and a row per leg so a partial run cannot look like a clean one.
WHY THIS EXISTS
@@ -73,6 +73,16 @@ WHAT IT RUNS -- one row per leg, cheapest first, never in parallel
document being written is the document graded; this leg did
not exist before 2026-10-22, and every docstring command in
the archive was prose until it did
tools-map tools/tool_map.py --repo . --rev WORKTREE --check docs/TOOLS.md
`docs/TOOLS.md` re-derived from this tree and byte-compared:
every cell of the map (a tool's first docstring line, its
`--help` flags, its probe rows, its gate leg) against the
document on disk. The drift cell already lived in
`tool_map.py`'s own selftest, but the only leg that runs a
selftest is `selftest-sweep`, and `--fast` skips it -- so a
docstring edited in a `--fast` tick landed with a stale map
and a green gate (Q138's own residual). This leg is the same
guard at ~6 s, on every run including `--fast`.
selftest-sweep tools/selftest_sweep.py
every tool's --selftest plus its two read-refusal axes
(skip with --fast; the row is still printed and counted)
@@ -178,7 +188,7 @@ TOOLS ARE RESOLVED FROM --repo, NOT FROM THIS FILE'S DIRECTORY
The path must still be the ROOT: a subdirectory is rc 2 naming the root,
because widening `--repo` silently would grade a tree nobody named.
`--selftest` fixture corpus, 59 cells
`--selftest` fixture corpus, 61 cells
"""
import argparse
@@ -215,6 +225,10 @@ LEGS = (
{"key": "doc-commands", "tool": "doc_command_check.py", "slow": False,
"what": "every command a tool's docstring tells a reader to run: its "
"flags must be options that tool's --help accepts"},
{"key": "tools-map", "tool": "tool_map.py", "slow": False,
"what": "re-derive docs/TOOLS.md from this tree and byte-compare it with "
"the document on disk -- the same drift guard the sweep runs, at "
"~6 s, on every run including --fast (Q138's residual)"},
{"key": "selftest-sweep", "tool": "selftest_sweep.py", "slow": True,
"what": "every tool's --selftest and both read-refusal axes"},
{"key": "write-axis", "tool": "write_probe.py", "slow": False,
@@ -426,6 +440,15 @@ def leg_argv(key, repo, queue, index, checkin_day=None):
return [sys.executable, os.path.join(repo, "tools",
"doc_command_check.py"),
"--repo", repo, "--rev", "WORKTREE", "--fail"]
if key == "tools-map":
# --repo and the document path both come from the tree being graded;
# WORKTREE, not HEAD, for the reason doc-commands gives: the drift this
# leg exists to catch is written in the tick that edits a docstring, and
# a leg reading HEAD would grade the last commit while that edit sat
# unrendered -- the exact blind spot Q138 hit.
return [sys.executable, os.path.join(repo, "tools", "tool_map.py"),
"--repo", repo, "--rev", "WORKTREE",
"--check", os.path.join(repo, "docs", "TOOLS.md")]
if key == "selftest-sweep":
return [sys.executable, os.path.join(repo, "tools", "selftest_sweep.py"),
"--repo", repo, "--quiet"]
@@ -715,6 +738,7 @@ def _verify(*argv):
GREEN_ALL = {"checkin_check.py": 0, "path_claim_check.py": 0,
"reply_check.py": 0, "queue_index.py": 0,
"queue_append_audit.py": 0, "doc_command_check.py": 0,
"tool_map.py": 0,
"selftest_sweep.py": 0, "write_probe.py": 0,
"import_resolve_check.py": 0,
os.path.join("wizard-work", "spark",
@@ -737,12 +761,23 @@ def selftest():
failures.append("%s\n got: %r\n want: %r" % (label, got, want))
with tempfile.TemporaryDirectory(prefix="verify-selftest-") as td:
# 1. ten green stubs -> rc 0
# 1. twelve green stubs -> rc 0
repo = _fixture(os.path.join(td, "c1"), GREEN_ALL)
rc, out = _verify("--repo", repo)
check("1 all eleven legs green -> rc 0", rc, 0)
check("1b summary counts the eleven legs", "verify: 11 legs, 11 pass, 0 fault, "
check("1 all twelve legs green -> rc 0", rc, 0)
check("1b summary counts the twelve legs", "verify: 12 legs, 12 pass, 0 fault, "
"0 ungradable, 0 skipped" in out, True)
# 1c. the drift leg is graded on the same terms as any other: a map that
# does not reproduce is a FAULT, and its DRIFT line reaches the row.
repo = _fixture(os.path.join(td, "c1c"),
dict(GREEN_ALL, **{"tool_map.py": 1}),
outs={"tool_map.py":
"DRIFT at line 35: document: ten legs\n"})
rc, out = _verify("--repo", repo, "--fast")
check("1c a stale map under --fast -> rc 1", rc, 1)
check("1d the DRIFT line is carried into the row",
"tools-map" in out and "DRIFT at line 35" in out
and "fault: tools-map" in out, True)
# 2. a stale index is a FAULT, and its own line reaches the row
repo = _fixture(os.path.join(td, "c2"),
@@ -797,7 +832,8 @@ def selftest():
obj = json.load(open(jpath)) if os.path.exists(jpath) else {}
check("7 --json writes the rows", [r["key"] for r in obj.get("rows", [])],
["checkin", "path-claims", "reply-headings", "index-current",
"append-audit", "doc-commands", "selftest-sweep", "write-axis",
"append-audit", "doc-commands", "tools-map", "selftest-sweep",
"write-axis",
"import-resolve", "closed-artifacts", "open-set"])
check("7b --json carries the same rc the process returned",
obj.get("rc"), rc)
@@ -842,7 +878,7 @@ def selftest():
check("12 skipped leg is its own count in --json",
obj.get("counts", {}).get("SKIP"), 1)
check("12b and the skipped leg is not counted as a pass",
obj.get("counts", {}).get(PASS), 10)
obj.get("counts", {}).get(PASS), 11)
# 13. the detail line must not contradict the verdict: a row graded
# FAULT beside "0 fatal" is the SILENT failure this gate exists to catch.
+3 -3
View File
@@ -481,9 +481,9 @@ PIN_OPEN = []
PIN_OPENED = [51, 52, 53, 65, 100, 101, 102, 103, 104, 105, 106, 107, 109,
110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122]
PIN_COUNTS = {"headings": 97, "heading_ids": 86, "records": 98,
"record_ids": 64, "ids": 129, "open": 0, "opened": 26,
"record_only": 43}
PIN_COUNTS = {"headings": 97, "heading_ids": 86, "records": 99,
"record_ids": 65, "ids": 130, "open": 0, "opened": 26,
"record_only": 44}
PIN_STATE = {
100: "REPAIRED", 101: "REPAIRED", 102: "REPAIRED", 103: "REPAIRED",