checkin 2026-10-17 (volt): Q63 closed -- queue_index.py admits ids by record form (heading, bold lead, Status-lead) and reports the record line vs the first mention; nested set 16 -> 9 (Q41,Q42,Q46,Q47,Q50,Q51,Q52,Q53,Q63; Q77/Q99 were quoted tool output, Q54/55/56/58/62 were artifact text and a Q31-Q62 range, none ever opened); selftest 44/44, sweep 11 tools/10 OK/0 fatal, --check rc 0 at 9930 L
This commit is contained in:
1 parent
ece5228a9e
commit
e79cbca627
4 files changed
+223
-93
No files matched your search
+113
-26
@@ -8,13 +8,24 @@ WHY THIS EXISTS
|
||||
reader who wants the shape of the whole queue has nothing to read at all.
|
||||
|
||||
The shape is not obvious even after a grep. Measured on 2026-10-17 at HEAD
|
||||
(`de0b1fd`): 49 `## ` sections carry 45 distinct ids, because four ids (Q37,
|
||||
(`ece5228`): 49 `## ` sections carry 45 distinct ids, because four ids (Q37,
|
||||
Q38, Q39, Q43) own a second section each -- a `closure` or `claimed` block
|
||||
appended under a fresh heading. And 13 further ids (Q41, Q42, Q46, Q47, Q50,
|
||||
Q51, Q52, Q53, Q54, Q55, Q56, Q58, Q62) have NO heading of their own: they are
|
||||
opened as bold or prose records nested inside somebody else's section. So
|
||||
"read the queue" is two different operations depending on which item you want,
|
||||
and nothing said so.
|
||||
appended under a fresh heading. And 9 further ids (Q41, Q42, Q46, Q47, Q50,
|
||||
Q51, Q52, Q53, Q63) have NO heading of their own: they are opened as bold
|
||||
records nested inside somebody else's section. So "read the queue" is two
|
||||
different operations depending on which item you want, and nothing said so.
|
||||
|
||||
THE RECORD RULE (Q63, 2026-10-17). An id is *opened by a record, not mentioned
|
||||
by prose*: a heading, a bold lead that opens with the id (`**Qnn -- ...**` /
|
||||
`**Qnn opened -- ...**`), or a line whose own lead is a `Status:` marker. Before
|
||||
that rule the detector admitted every id token that had no heading, so a tick
|
||||
quoting `--outside = Q63/Q77/Q99` opened three ids, an artifact path
|
||||
(`out/Q54-READBACK.txt`) opened Q54, and the range `Q31-Q62` opened Q62. The
|
||||
first *mention* also used to be reported as the record, which is wrong twice:
|
||||
Q53 is first named 46 lines before it is opened (:7246 prose, :7292 record) and
|
||||
Q63 is first named inside the very tick that quotes it (:9909) but opened at
|
||||
:9918. The table below now carries the record line, the first-mention line and
|
||||
the form that admitted the id, so the difference is visible instead of implied.
|
||||
|
||||
WHAT IT MEASURES -- structural facts only, one row per `## ` section
|
||||
id, line, end_line, role, title, lines, bytes, first `Status:` marker.
|
||||
@@ -29,8 +40,9 @@ WHAT IT MEASURES -- structural facts only, one row per `## ` section
|
||||
tool declines to introduce.
|
||||
|
||||
Plus the two legs that make the structure visible:
|
||||
nested ids first seen inside a section that has no heading of their own,
|
||||
with the section that contains them and the shape of that line
|
||||
nested ids opened by a record inside a section that has no heading of their
|
||||
own: the record's line, the first line that mentions it, the section
|
||||
that contains it, and the shape/form of the record line
|
||||
outside ids referenced by the prose corpus (checkins/ replies/ recoveries/
|
||||
audits/ access/ decisions/ docs/ and the top-level documents) but
|
||||
absent from the queue entirely -- `tools/` is excluded on purpose:
|
||||
@@ -76,7 +88,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, 38 cells
|
||||
python3 tools/queue_index.py --selftest # fixture corpus, 44 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.
|
||||
@@ -101,9 +113,50 @@ ID_TOKEN = re.compile(r"\bQ\d{1,2}\b")
|
||||
STATUS = re.compile(r"^\s*\*{0,2}Status:\s*(.*)$")
|
||||
FENCE = re.compile(r"^(```|~~~)")
|
||||
|
||||
# A record opens with its id; a mention merely carries it. `BULLET` strips the
|
||||
# markdown that can precede a record without being part of it, and `OPEN_SEP` is
|
||||
# what may follow the id in a bold lead that is *opening* an item (Q46's
|
||||
# "**Q46 (Helm lane) — OPEN ...**" and Q63's "**Q63 opened — ...**" both count;
|
||||
# a "**Q7, measured:**" bold run does not).
|
||||
BULLET = re.compile(r"^[\s>|]*(?:[-*+]\s+)?")
|
||||
OPEN_SEP = re.compile(r"\s*(?:—|–|-|:|\(|\bopened\b|\bopen\b|\bOPEN\b|\bOPENED\b)")
|
||||
|
||||
ROLE_WORDS = ("closure", "claimed", "§", "status")
|
||||
|
||||
|
||||
def record_form(line, qid):
|
||||
"""The form in which `line` opens `qid`, or None if it only mentions it.
|
||||
|
||||
The counting rule is settled in `WORK-QUEUE.md` at Q63 (2026-10-17): an id is
|
||||
*opened by a record, not mentioned by prose*. Three forms count --
|
||||
|
||||
HEADING `## Qnn ...` (a section; never nested)
|
||||
BOLD-LEAD after bullet/bold markers the line opens `**Qnn` and the id is
|
||||
followed by a separator or the word open/opened
|
||||
STATUS-LEAD the line's own lead is a `Status:` marker (bold or plain) and
|
||||
it names the id
|
||||
|
||||
A bare token inside a sentence, a tick quoting tool output (`= Q63/Q77/Q99`),
|
||||
an artifact filename (`out/Q54-READBACK.txt`) or a range (`Q31–Q62`) matches
|
||||
none of them, which is the point: those were opening ids before this rule.
|
||||
"""
|
||||
s = line.strip()
|
||||
m = HEADING.match(s)
|
||||
if m and m.group(1) == qid:
|
||||
return "HEADING"
|
||||
body = BULLET.sub("", s)
|
||||
if qid not in ID_TOKEN.findall(body):
|
||||
return None
|
||||
if body.startswith("**Status:") or body.startswith("Status:"):
|
||||
return "STATUS-LEAD"
|
||||
if body.startswith("**"):
|
||||
inner = body[2:].lstrip("*").lstrip()
|
||||
m = ID_TOKEN.match(inner)
|
||||
if m and m.group(0) == qid and OPEN_SEP.match(inner[m.end():]):
|
||||
return "BOLD-LEAD"
|
||||
return None
|
||||
|
||||
|
||||
def split_lines(text):
|
||||
"""Lines without their terminators, plus the byte length each line occupies."""
|
||||
lines = text.split("\n")
|
||||
@@ -177,8 +230,16 @@ def parse(text):
|
||||
for s in sections:
|
||||
ids.setdefault(s["id"], []).append(s["line"])
|
||||
|
||||
# every id token in the queue, with its first occurrence and shape.
|
||||
# Fenced lines are skipped: an id in a code block is quoted text, not a record.
|
||||
# every id token in the queue, counted as a mention, plus the first line that
|
||||
# opens it as a record. Fenced lines are skipped: an id in a code block is
|
||||
# quoted text, not a record.
|
||||
#
|
||||
# Q63 (2026-10-17): the first *mention* is not the record. Q53 is first named
|
||||
# in prose 46 lines before its `**Q53 opened -- ...**` line, and Q63 is named
|
||||
# inside a tick quoting tool output at :9909 but opened at :9918. So a nested
|
||||
# id is admitted by its first record-form line, and an id that never has one
|
||||
# (Q54/Q55/Q56/Q58 as artifact filenames, Q62 inside `Q31-Q62`, Q77/Q99 inside
|
||||
# a quoted `--outside` list) is not an item at all.
|
||||
mentioned = {}
|
||||
in_fence = False
|
||||
for i, ln in enumerate(lines, 1):
|
||||
@@ -191,14 +252,22 @@ def parse(text):
|
||||
qid = m.group(0)
|
||||
hit = mentioned.get(qid)
|
||||
if hit is None:
|
||||
mentioned[qid] = [i, ln, 1]
|
||||
else:
|
||||
hit[2] += 1
|
||||
hit = mentioned[qid] = {"line": i, "refs": 0, "record": None, "form": None}
|
||||
hit["refs"] += 1
|
||||
if hit["record"] is None:
|
||||
form = record_form(ln, qid)
|
||||
if form:
|
||||
hit["record"] = i
|
||||
hit["form"] = form
|
||||
nested = []
|
||||
for qid in sorted(mentioned, key=lambda s: int(s[1:])):
|
||||
if qid in ids:
|
||||
continue
|
||||
line_no, raw, refs = mentioned[qid]
|
||||
rec = mentioned[qid]
|
||||
if rec["record"] is None:
|
||||
continue # a mention, not a record -- not an item
|
||||
line_no = rec["record"]
|
||||
raw = lines[line_no - 1]
|
||||
owner = None
|
||||
for s in sections:
|
||||
if s["line"] <= line_no <= s["end_line"]:
|
||||
@@ -213,10 +282,11 @@ def parse(text):
|
||||
shape = "BOLD"
|
||||
else:
|
||||
shape = "PLAIN"
|
||||
if shape != "HEADING" and "**" in raw:
|
||||
if shape not in ("HEADING", "BOLD") and "**" in raw:
|
||||
shape += "+BOLD"
|
||||
nested.append({"id": qid, "line": line_no, "section": owner, "shape": shape,
|
||||
"refs": refs})
|
||||
"refs": rec["refs"], "form": rec["form"],
|
||||
"first_mention": rec["line"]})
|
||||
|
||||
first = headings[0][0] if headings else n + 1
|
||||
preamble_end = first - 1
|
||||
@@ -329,14 +399,17 @@ def build_doc(payload):
|
||||
lines.append("")
|
||||
lines.append("## Ids with no `## ` heading")
|
||||
lines.append("")
|
||||
lines.append("Opened as records inside another section. `section` is the heading whose "
|
||||
"body holds the first mention; `shape` is the form of that line.")
|
||||
lines.append("Opened as records inside another section. `line` is the record's own opening "
|
||||
"line and `first mention` is the first line that names the id at all -- they "
|
||||
"differ when an id is cited in prose before it is opened (Q53: :7246 -> :7292, "
|
||||
"Q63: :9909 -> :9918). `form` is the record form that admits it.")
|
||||
lines.append("")
|
||||
lines.append("| id | first line | refs | inside section | shape |")
|
||||
lines.append("|---|---|---|---|---|")
|
||||
lines.append("| id | record line | first mention | refs | inside section | shape | form |")
|
||||
lines.append("|---|---|---|---|---|---|---|")
|
||||
for r in payload["nested"]:
|
||||
lines.append("| %s | %d | %d | %s | %s |"
|
||||
% (r["id"], r["line"], r["refs"], r["section"] or "--", r["shape"]))
|
||||
lines.append("| %s | %d | %d | %d | %s | %s | %s |"
|
||||
% (r["id"], r["line"], r["first_mention"], r["refs"],
|
||||
r["section"] or "--", r["shape"], r["form"]))
|
||||
lines.append("")
|
||||
lines.append("**Not in this document.** Ids the prose corpus names that the queue has never "
|
||||
"mentioned (`checkins/`, `replies/`, `recoveries/`, `audits/`, `docs/`, the "
|
||||
@@ -503,8 +576,13 @@ Body with no status marker.
|
||||
|
||||
## Q3 §9 follow-on — odd shape
|
||||
|
||||
Prose that names Q41 before its record.
|
||||
- **Q41 — OPEN (pipe, 2026-10-13, unclaimed).** A nested record.
|
||||
- prose mentioning Q42 in passing.
|
||||
- **Q43 opened — a bold lead record for the fixture.**
|
||||
- a bullet carrying **Q44** mid-line, which is not a record.
|
||||
- a tick quoting `--outside` = Q77/Q99 as prose.
|
||||
**Status: OPEN.** The status lead opens Q45 on this line.
|
||||
"""
|
||||
|
||||
|
||||
@@ -531,10 +609,19 @@ 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.")
|
||||
check("nested ids found", [r["id"] for r in p["nested"]], ["Q41", "Q42"])
|
||||
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")
|
||||
check("nested shape is a plain bullet", p["nested"][1]["shape"], "BULLET")
|
||||
check("bold lead is a record form", p["nested"][0]["form"], "BOLD-LEAD")
|
||||
check("status lead is a record form", p["nested"][2]["form"], "STATUS-LEAD")
|
||||
check("record line follows the first mention of the same id",
|
||||
(p["nested"][0]["line"], p["nested"][0]["first_mention"]), (24, 23))
|
||||
check("prose mention is not a record (Q42)", "Q42" in [r["id"] for r in p["nested"]], False)
|
||||
check("mid-line bold mention is not a record (Q44)",
|
||||
"Q44" in [r["id"] for r in p["nested"]], False)
|
||||
check("quoted tool output opens nothing (Q77/Q99)",
|
||||
{"Q77", "Q99"} & {r["id"] for r in p["nested"]}, set())
|
||||
check("mentions are still counted as refs", p["nested"][0]["refs"], 2)
|
||||
check("sections tile the file with no gap",
|
||||
all(secs[i]["end_line"] + 1 == secs[i + 1]["line"] for i in range(len(secs) - 1)), True)
|
||||
check("last section ends at the last line", secs[-1]["end_line"], p["queue_lines"])
|
||||
@@ -656,7 +743,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, 38 cells")
|
||||
ap.add_argument("--selftest", action="store_true", help="fixture corpus, 44 cells")
|
||||
args = ap.parse_args(argv)
|
||||
if args.selftest:
|
||||
return selftest()
|
||||
|
||||
Reference in new issue
Block a user