Backlog triage Part C: every open row has a Category (11) and a Sev (P1-P4); OPEN-ITEMS grouped by category, severity order; register_shape_gate RULES 5-8 (columns by header, category, sev, defined state) with five decoys seen red; CLAUDE.md + PROMPT-TEMPLATE: new rows filed into their category
gates / gates (push) Successful in 29s

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
2026-10-03 09:18:42 +02:00
parent 71b8c8c62b
commit 9f77865c2a
6 changed files with 523 additions and 346 deletions
+32 -5
View File
@@ -48,7 +48,9 @@ COVERS = {
"row whose prose says 'closed' about another row, asserted to PASS"),
"register-shape": ("R-627: a row whose state cell was EATEN (no trailing pipe), a DUPLICATED "
"id, and a blank line splitting the table — each the exact shape the "
"2026-09-21 append produced; plus the genuine article, which must pass"),
"2026-09-21 append produced; plus the genuine article, which must pass; and "
"(2026-10-03) an old-shape row under the new header, a near-miss category, an "
"old rank tag as Sev, an undefined state word, and a pipe outside backticks"),
"decoy-coverage": "a gate registered in a runner with no decoy and no exemption (its red-proof)",
"guide-quote": ("R-596: SEVEN cases in scripts/test_guide_quote_gate.py, run from here so "
"this suite stays the single entry point. The load-bearing one is "
@@ -356,11 +358,12 @@ _spec = _ilu.spec_from_file_location("rsg", os.path.join(ROOT, "scripts", "regis
_rsg = _ilu.module_from_spec(_spec)
_spec.loader.exec_module(_rsg)
_HEADER = "| ID | Category | Sev | What | State | Blocked on | Next action | Owner |"
_HEALTHY = "\n".join([
"| ID | What | State |",
"|---|---|---|",
"| **R-901** | **A finding.** Its text mentions `owner: CC | and a literal pipe` on purpose. | **READY — owner: CC** |",
"| **R-902** | **Another finding.** | **CLOSED 2026-09-01** |",
_HEADER,
"|---|---|---|---|---|---|---|---|",
"| **R-901** | Backup & restore | P3 | **A finding.** Its text mentions `owner: CC | and a literal pipe` on purpose. | **READY — owner: CC** | — | — | CC |",
"| **R-902** | Process & tooling | P4 | **Another finding.** | **CLOSED 2026-09-01** | — | — | CC |",
"",
])
@@ -412,6 +415,30 @@ _rsg_case("suffix-row-eaten-state",
_HEALTHY.rstrip() + "\n| **R-903a** | **A split finding.** |\n".replace(" |\n", "\n"),
must_convict=True, expect_rule="RULE 1")
# 2026-10-03 — RULES 5–8: the columns, the category, the severity and the state word. Each decoy is a
# shape a session filing a row by hand would really produce.
_R901 = "| **R-901** | Backup & restore | P3 |"
# decoy 5 — a row filed with no category (the old 3-column habit, under the new header)
_rsg_case("old-shape-row-under-new-header",
_HEALTHY.rstrip() + "\n| **R-903** | **A finding filed the old way.** | **READY** |\n",
must_convict=True, expect_rule="RULE 5")
# decoy 6 — a near-miss category (the brief's own short name, not the defined one)
_rsg_case("unknown-category",
_HEALTHY.replace(_R901, "| **R-901** | Backup | P3 |"),
must_convict=True, expect_rule="RULE 6")
# decoy 7 — an old rank tag in the Sev cell instead of P1–P4
_rsg_case("old-rank-tag-as-sev",
_HEALTHY.replace(_R901, "| **R-901** | Backup & restore | P3-LOW |"),
must_convict=True, expect_rule="RULE 7")
# decoy 8 — a state word nobody defined (one of the 18 real ones the triage found)
_rsg_case("undefined-state-word",
_HEALTHY.replace("**READY — owner: CC**", "**PLUMBING COMPLETE** (controller v0.196.0)"),
must_convict=True, expect_rule="RULE 8")
# decoy 9 — a literal pipe in prose OUTSIDE backticks, which renders as an extra column
_rsg_case("pipe-outside-backticks",
_HEALTHY.replace("**A finding.**", "**A finding.** owner: CC | operator"),
must_convict=True, expect_rule="RULE 5")
print()
if fails:
for f in fails: