tools (volt): queue_index.py -- a Status: marker whose bold closes before its value is not 'no status'

The old guard cut at the first '**', which is right for '**Status: value**'
and returns '' for '**Status:** value'. Empty is falsy, so the parse stored
None and docs/queue-index.md rendered '--' for Q13:1129, which states
'1 of 8 has a decision and staged correction'. status_value() strips a
leading bold close, then a trailing one, so both forms yield the value.

selftest 54 -> 58 cells (inline fixture, no existing line numbers move).
docs/queue-index.md regenerated: exactly 2 lines (the Q13 cell + its pin).
Independent witness in wizard-outputs: rc 0 on the fixed document, rc 1
naming row 13 on the pre-fix one. verify.py 3/3 rc 0.
This commit is contained in:
Volt committed 2026-10-19 00:09:51 +00:00
1 parent 2e8ae5a7d3
commit 331927fc99
3 files changed
+162 -8

No files matched your search

+126
View File
@@ -0,0 +1,126 @@
# Check-in — Volt, 2026-10-19 (00:00–00:2xZ)
## Did
Fixed a silent under-report in the queue's table of contents: **a `Status:`
marker whose bold run closes *before* its value was published as `--`**, i.e.
the table said "no status" about an item that states one.
The rule was written for one emphasis form and silently broke the other.
`tools/queue_index.py`'s `STATUS` pattern consumes the optional leading `**`,
so the value arrives as `value** tail` (bold closes *after* the value) or as
`** value` (bold closes *before* it). The old one-liner cut at the first `**`:
raw = m.group(1).strip()
if "**" in raw: # a bold status marker closes mid-line
raw = raw.split("**", 1)[0]
which is right for the first form and returns `""` for the second. Empty is
falsy, so the parse stored `None` and the index rendered `--`. The live case
was Q13 at `WORK-QUEUE.md:1129`:
**Status:** 1 of 8 has a decision and staged correction (`magazine-091`; reply 09 §3), ...
Measured over the real queue, the class is small and the failure is total for
the form it affects (`/root/.hermes/wizard-outputs/volt/probe-status-forms.py`,
run against `WORK-QUEUE.md` at `2e8ae5a`):
49 heading sections
bold-value 24 **Status: value**
plain 20 Status: value
bold-label 1 **Status:** value <- 1 of 1 emptied by the old rule (Q13:1129)
So: one row wrong today, and every future `**Status:**` line would have gone
wrong the same way without a sound.
**The fix** — `status_value()` strips a *leading* bold close until none is left,
then cuts a trailing one, so both emphasis forms yield the value:
def status_value(raw):
raw = raw.strip()
while raw.startswith("**"):
raw = raw[2:].strip()
if "**" in raw:
raw = raw.split("**", 1)[0].strip()
return raw
The call site keeps its break-on-first-marker semantics, so no section that was
previously read is read differently:
status = status_value(m.group(1)) or None
**Selftest 54 -> 58 cells**, four new ones on an inline fixture (so no existing
fixture line numbers move): the bold-label form extracts its value, it reports
its own `status_line`, a bold *value* still extracts, and a marker with no value
at all stays `None`.
$ python3 tools/queue_index.py --selftest
selftest: 58 cells, 58 passed, 0 failed # rc 0
**The derived document was regenerated, and the diff is exactly the two cells
that carry that parse** — no other row moved, which is the proof the blast
radius is one section:
$ git diff --numstat docs/queue-index.md
2 2 docs/queue-index.md
-| 13 | Q13 | 1111-1145 | 2788 | opening | ... | -- |
+| 13 | Q13 | 1111-1145 | 2788 | opening | ... | 1 of 8 has a decision and staged correction (`magazine-091`; reply 09 §3), but its decided note carries |
- "status": null,
+ "status": "1 of 8 has a decision and staged correction (`magazine-091`; reply 09 \u00a73), but its decided note carries",
**An independent witness, because every existing check of this parse runs
through the tool itself.** `--check` re-renders with the same `parse()` and
compares bytes; `--selftest` runs fixtures. Both are statements about one
implementation. `independent_index_witness.py` (in
`/root/.hermes/wizard-outputs/volt/tools/`, shares no code with the tool)
re-derives all 49 published rows, the header counts, the byte accounting and
the nested-record table from the queue's bytes with its own logic, and grades
`docs/queue-index.md` cell by cell. It agrees with the corrected document:
$ python3 independent_index_witness.py --repo /root/troupe-standup
note named but never opened as a record (correctly absent): Q54,Q55,Q56,Q58,Q62,Q77,Q99
witness: 49 sections / 45 ids / 4 continuation / 9 nested / 1261058 bytes graded against docs/queue-index.md
witness: agree -- every published cell re-derived from 1261342 bytes of WORK-QUEUE.md by independent logic
rc 0
and it goes RED on the pre-fix document, naming the row — so it is a witness,
not a rubber stamp:
$ python3 independent_index_witness.py --repo . --index <pre-fix copy>
FAULT row 13 (Q13) status: published '--', derived '1 of 8 has a decision and staged correction (`magazine-091`; reply 09 '
witness: 1 fault(s) -- the independent parse does NOT corroborate the published table
rc 1
Gate at the commit that follows, run whole:
$ python3 tools/verify.py
index-current PASS index: 49 sections, 45 ids, 4 continuation sections, 9 nested ids, 10046 lines / 1261342 bytes
append-audit PASS every graded commit left the index current in its own tree
selftest-sweep PASS sweep: 14 tools, 14 OK, 0 fatal
gate: OK -- 3 of 3 graded leg(s) passed # rc 0
Nothing else changed: `WORK-QUEUE.md` is untouched (`queue_sha256` in the pin is
unchanged), no other tool imports this one, and the census's tool set and LOC
totals are the repo's own business, not pinned to a number in any document
(`grep` for a pinned `queue_index.py` line count returns nothing).
## Blocked
`tools/doc_census_check.py` did not finish inside a 180 s foreground call on
this host (killed at the harness timeout, rc 124, no output captured). Not on
the gate's path — `verify.py`'s three legs all ran — but the census was not
re-measured this tick and I am not claiming it was.
## Next
- Re-run `doc_census_check.py` in the background and report its totals against
the same revision, so the tool set's LOC is measured at the new
`queue_index.py` (+34/−6) rather than assumed.
- The same emphasis-form question applies to any other marker this repo parses
by hand; `checkin_check.py` and `citation_resolve_check.py` are the next
candidates for a `**Label:**` fixture each.
## Ask
None. No item opened or closed, no decision needed.
+2 -2
View File
@@ -20,7 +20,7 @@
| 10 | Q10 | 693-948 | 24339 | opening | Summary fidelity for the non-magazine entries | COMPLETE 2026-10-10 (verified from raw sources; closure record below). Originally claimed by zephyrus-sparkborn at `3c9ad5b` (2026-10-07, `checkins/2026-10-07-zephyrus.md` §3). |
| 11 | Q11 | 949-984 | 2699 | opening | Close the eight pass-2 date mismatches | DONE — `recoveries/ledger-date-closure.md`, Merlin, 2026-10-09. 8 / 8 resolved, all |
| 12 | Q12 | 985-1110 | 12049 | opening | Are the evidence tiers earned? | DONE — `recoveries/evidence-tier-audit.md`, Merlin, 2026-10-10. 18/18 `justified`, 0 `too |
| 13 | Q13 | 1111-1145 | 2788 | opening | Publish the archive-side wording fixes, one at a time | -- |
| 13 | Q13 | 1111-1145 | 2788 | opening | Publish the archive-side wording fixes, one at a time | 1 of 8 has a decision and staged correction (`magazine-091`; reply 09 §3), but its decided note carries |
| 14 | Q14 | 1146-1264 | 11043 | opening | Put the Inbox on `alexanderwhitestone.com` behind a gate | DONE — finished by `616794c` (2026-09-26), then re-measured by a later run the same day instead of being |
| 15 | Q15 | 1265-1395 | 14450 | opening | Stop the monitor from waking on the pipe's own writes *(pipe; no dependencies)* | DONE — 2026-09-26 ≈19:05 UTC. |
| 16 | Q16 | 1396-1552 | 14833 | opening | Per-platform ATS gate census *(career lane; opened 2026-10-01 by reply 21 §3, drafted by zephyrus)* | draft v0.1 landed `f29425a` (`career-lane/ats-gate-census-draft.md`, 2026-10-01; check-in `2f83e08`); |
@@ -392,7 +392,7 @@ The block below is the parse this document renders, byte for byte. `--check` com
"lines": 35,
"role": "opening",
"role_detail": "",
"status": null,
"status": "1 of 8 has a decision and staged correction (`magazine-091`; reply 09 \u00a73), but its decided note carries",
"status_line": 1129,
"title": "Publish the archive-side wording fixes, one at a time"
},
+34 -6
View File
@@ -94,7 +94,7 @@ USAGE
python3 tools/queue_index.py --json out.json
python3 tools/queue_index.py --write docs/queue-index.md
python3 tools/queue_index.py --check docs/queue-index.md
python3 tools/queue_index.py --selftest # fixture corpus, 54 cells
python3 tools/queue_index.py --selftest # fixture corpus, 58 cells
Re-run `--write` after any append to the queue. The document carries the
queue's sha256, so a stale copy is a RED check, never a silent lie.
@@ -178,6 +178,23 @@ def line_bytes(line, is_last, trailing_newline):
return len(line.encode("utf-8")) + 1
def status_value(raw):
"""The value of a `Status:` marker, in either emphasis form.
`**Status: value**` puts the value *inside* the bold run; `**Status:** value`
closes the bold *before* it. The `STATUS` pattern consumes the optional
leading `**`, so cutting at the first `**` is right for the first form and
returns "" for the second -- which published a stated status as `--`.
Q13:1129 (`**Status:** 1 of 8 has a decision ...`) was the live case.
"""
raw = raw.strip()
while raw.startswith("**"):
raw = raw[2:].strip()
if "**" in raw:
raw = raw.split("**", 1)[0].strip()
return raw
def parse(text):
"""Return the structural parse: sections, nested ids, id map, byte accounting."""
lines, trailing_newline = split_lines(text)
@@ -212,10 +229,7 @@ def parse(text):
for off, ln in enumerate(body, start=line_no + 1):
m = STATUS.match(ln)
if m:
raw = m.group(1).strip()
if "**" in raw: # a bold status marker closes mid-line
raw = raw.split("**", 1)[0]
status = raw.strip()
status = status_value(m.group(1)) or None
status_line = off
break
title = rest.lstrip("—- ").strip()
@@ -652,6 +666,20 @@ def selftest():
check("status line number", secs[0]["status_line"], 7)
check("section with no marker is None", secs[1]["status"], None)
check("continuation status is its own", secs[2]["status"], "OPEN.")
# `**Status:** value` -- the bold run closes *before* the value. Cutting at
# the first `**` returned "" and the index published a stated status as
# `--` (Q13:1129 was the live case in the real queue).
lead = parse("## Q1 — a\n\n**Status:** 1 of 8 decided.\n\n"
"## Q2 — b\n\n**Status:** **OPEN.** tail.\n\n"
"## Q3 — c\n\n**Status:**\n")
check("status whose bold closes before its value",
lead["sections"][0]["status"], "1 of 8 decided.")
check("that marker still reports its own line",
lead["sections"][0]["status_line"], 3)
check("status lead with a bold value still extracts",
lead["sections"][1]["status"], "OPEN.")
check("a marker with no value at all stays None",
lead["sections"][2]["status"], None)
check("nested ids found", [r["id"] for r in p["nested"]], ["Q41", "Q43", "Q45"])
check("nested owner is the containing section", p["nested"][0]["section"], "Q3")
check("nested shape is bullet carrying a bold lead", p["nested"][0]["shape"], "BULLET+BOLD")
@@ -842,7 +870,7 @@ def main(argv=None):
ap.add_argument("--check", metavar="PATH", help="re-derive and compare a rendered index")
ap.add_argument("--outside", action="store_true",
help="report ids the prose corpus names that the queue never mentions")
ap.add_argument("--selftest", action="store_true", help="fixture corpus, 54 cells")
ap.add_argument("--selftest", action="store_true", help="fixture corpus, 58 cells")
args = ap.parse_args(argv)
if args.selftest:
return selftest()