CB-WP-0022 T05/T06/T07: the register, and what its first run found
T05. tools/design.py, make design, and the register in GroundRules.md --
14 rows, no new file, because ADR-0012 D2 made §Underdetermined the
register rather than building one beside it.
Backfill was the test and it caught two things the ADR did not have.
First, a `role` column. The first report alarmed on U2 and was wrong to:
U2's scenario is green BECAUSE the provisional default it documents is
implemented, which says nothing about whether ground-game agrees. GR-E01's
was a counterexample that went green. Same colour, opposite meaning -- a
register that cannot tell them apart either alarms constantly or never.
Only a green counterexample alarms. Folded back into GameDesign §1.3.
Second, it contradicted the survey. CB-RES-0007 said "six of the ten
already have provisional scenarios." Measured -- grep -lE "\bU<n>\b" over
scenarios/ground -- exactly ONE U-item names itself. Five provisional
scenarios exist and four probably encode U-item defaults, but the mapping
is not written down, so it is not checkable. Same defect class as the
wrong premises, found inside the survey that proposed the fix. Now a
reported debt: open, lacking a reproduction: 9, target 0.
design.py carries the control design-baseline.py never had, asserted
directly: a row citing a nonexistent file must not count as reproduced,
using the exact path 2da19a4 deleted -- which the old tool called green.
design-baseline.py is marked superseded rather than deleted; it is the
evidence for how a wrong number got into a survey.
T06. The report is a FILE in ground-game under GROUND-WP-0002, committed
there, with a hub message that only points at it. It asks for no ruling:
it carries GR-E01's withdrawal, our reproduction debt, and two notes that
are explicitly not findings.
And it had to acknowledge something nobody anticipated. GROUND-WP-0002 is
finished -- all ten U-items were RULED 2026-08-03, every one confirmed as
the default we simulate, plus five of six provisional scenarios. The
survey said "0 of 10 ruled" two days later and this register was built
saying `reported`. That is the unread-inbox failure running in the
opposite direction: they answered and we did not collect it. The
instrument's first run surfaced it. They are `ruled`, not `applied` --
lifting the now-settled provisional flags is owed and is not done, and
make design shows them open until it is.
T07. evidence/CB-EV-0021. Two of six catches in this pass came from
execution rather than process (the role distinction from building it, the
ten uncollected rulings from running it), which is InnerLoop §Design
goal's prediction holding.
make self-tests, facts-check, loop-lint: clean.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-05 15:22:33 +02:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
|
"""design — report the finding register (CB-WP-0022 T05).
|
|
|
|
|
|
|
|
|
|
Implements the metrics in `specs/GameDesign.md` §4 over the register in
|
CB-WP-0026: collect the rulings -- ten answers that arrived and were never applied
ground-game ruled all ten U-items on 2026-08-03, every one CONFIRMED as
the default clay-borg simulates, and confirmed five of six provisional
scenarios. clay-borg never collected the answers: CB-RES-0007 reported "0
of 10 ruled" the same day, and CB-WP-0022 built the finding register two
days later still recording them as `reported`. make design's first run is
what noticed -- not a human, not the adversarial review that found four
other things.
That is the unread-inbox failure running in the opposite direction, and it
appears nowhere in the declaration, survey, ADR or spec of the pass that
was built entirely around the forward version. It is arguably worse: an
unread message is visible as silence, while a collected-but-unapplied
ruling looks exactly like work in progress.
Ten rulings quoted into §Underdetermined (the three conditional ones
verbatim -- U1's designer note, U2's End-only trigger, U8's
consume-only-if-it-cancels). Five provisional flags lifted, replaced by
ruled/ruled_by/ruled_note so the flag went and the provenance stayed.
Register queue 9 -> 0.
T02's control came back clean: make sim is 26 passed, 59 rules covered,
nothing red. Had a scenario gone red it would have meant we described our
own behaviour incorrectly to ground-game.
I wrote two U-item mappings and both were wrong. gr-a04 -> U1 (it asserts
consent is REQUIRED; U1 asks WHEN the target accepts) and gr-d05 -> U5 (it
exercises the UNREJECTED Reverse; U5 is the rejected one). Both plausible
from covers:, neither survived reading the description. Third and fourth
instance of this defect; the first two reached ground-game. So encodes_u_item
is now a declaration and design.py asserts the file names what it claims --
and that check's own first version grepped for mentions and went red when
two files recorded why they do NOT encode U1 and U5. A mention is not a
claim, which is exactly the looseness that let "six of the ten have
provisional scenarios" stand.
Two positive controls went red for the best possible reason, both broken
the same way -- asserting against live repo data instead of constructing
their condition. rule-coverage.py required at least one provisional item
to EXIST; it now builds a fixture and reports the live count as a
diagnostic, because there is no number of provisional items this project
should have. design-baseline.py pinned "2 of 6" while recomputing one row
from a live glob, so the dated snapshot was never a snapshot; frozen to
its 2026-08-03 list and unwired from self-tests, since per ADR-0012 D8 it
is no longer a reporting tool.
ScenarioFile is deny_unknown_fields and refused the four new fields until
declared -- correct: a corpus accepting unknown metadata would let a typo'd
encodes_u_iem sit there claiming nothing.
DEVIATION: ADR-0012 D2 said "no new file". GroundRules.md crossed the
loadability limit, so the register moved to specs/FindingRegister.md. D2's
substance holds -- one register, same machinery, nothing competing -- but
the literal instruction did not, and it resolves an awkwardness D2 named
itself.
make all: exit 0. loop-lint clean.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-05 16:13:37 +02:00
|
|
|
`specs/FindingRegister.md`. ADR-0012 D8 retired `design-baseline.py`, which
|
CB-WP-0022 T05/T06/T07: the register, and what its first run found
T05. tools/design.py, make design, and the register in GroundRules.md --
14 rows, no new file, because ADR-0012 D2 made §Underdetermined the
register rather than building one beside it.
Backfill was the test and it caught two things the ADR did not have.
First, a `role` column. The first report alarmed on U2 and was wrong to:
U2's scenario is green BECAUSE the provisional default it documents is
implemented, which says nothing about whether ground-game agrees. GR-E01's
was a counterexample that went green. Same colour, opposite meaning -- a
register that cannot tell them apart either alarms constantly or never.
Only a green counterexample alarms. Folded back into GameDesign §1.3.
Second, it contradicted the survey. CB-RES-0007 said "six of the ten
already have provisional scenarios." Measured -- grep -lE "\bU<n>\b" over
scenarios/ground -- exactly ONE U-item names itself. Five provisional
scenarios exist and four probably encode U-item defaults, but the mapping
is not written down, so it is not checkable. Same defect class as the
wrong premises, found inside the survey that proposed the fix. Now a
reported debt: open, lacking a reproduction: 9, target 0.
design.py carries the control design-baseline.py never had, asserted
directly: a row citing a nonexistent file must not count as reproduced,
using the exact path 2da19a4 deleted -- which the old tool called green.
design-baseline.py is marked superseded rather than deleted; it is the
evidence for how a wrong number got into a survey.
T06. The report is a FILE in ground-game under GROUND-WP-0002, committed
there, with a hub message that only points at it. It asks for no ruling:
it carries GR-E01's withdrawal, our reproduction debt, and two notes that
are explicitly not findings.
And it had to acknowledge something nobody anticipated. GROUND-WP-0002 is
finished -- all ten U-items were RULED 2026-08-03, every one confirmed as
the default we simulate, plus five of six provisional scenarios. The
survey said "0 of 10 ruled" two days later and this register was built
saying `reported`. That is the unread-inbox failure running in the
opposite direction: they answered and we did not collect it. The
instrument's first run surfaced it. They are `ruled`, not `applied` --
lifting the now-settled provisional flags is owed and is not done, and
make design shows them open until it is.
T07. evidence/CB-EV-0021. Two of six catches in this pass came from
execution rather than process (the role distinction from building it, the
ten uncollected rulings from running it), which is InnerLoop §Design
goal's prediction holding.
make self-tests, facts-check, loop-lint: clean.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-05 15:22:33 +02:00
|
|
|
was a hand-maintained dict counting itself; the difference that matters is
|
|
|
|
|
that **every number here is computed over rows that name real files, and
|
|
|
|
|
the reproduction check stats the file.**
|
|
|
|
|
|
|
|
|
|
`design-baseline.py`'s `has_reproduction` was `p.startswith("scenarios/")`
|
|
|
|
|
and nothing else, so its own positive control was green against a path
|
|
|
|
|
that had been deleted. The self-test below asserts the opposite property
|
|
|
|
|
directly: a row citing a nonexistent file must NOT count as reproduced.
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
import os, re, sys, subprocess, datetime
|
|
|
|
|
|
|
|
|
|
ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
CB-WP-0026: collect the rulings -- ten answers that arrived and were never applied
ground-game ruled all ten U-items on 2026-08-03, every one CONFIRMED as
the default clay-borg simulates, and confirmed five of six provisional
scenarios. clay-borg never collected the answers: CB-RES-0007 reported "0
of 10 ruled" the same day, and CB-WP-0022 built the finding register two
days later still recording them as `reported`. make design's first run is
what noticed -- not a human, not the adversarial review that found four
other things.
That is the unread-inbox failure running in the opposite direction, and it
appears nowhere in the declaration, survey, ADR or spec of the pass that
was built entirely around the forward version. It is arguably worse: an
unread message is visible as silence, while a collected-but-unapplied
ruling looks exactly like work in progress.
Ten rulings quoted into §Underdetermined (the three conditional ones
verbatim -- U1's designer note, U2's End-only trigger, U8's
consume-only-if-it-cancels). Five provisional flags lifted, replaced by
ruled/ruled_by/ruled_note so the flag went and the provenance stayed.
Register queue 9 -> 0.
T02's control came back clean: make sim is 26 passed, 59 rules covered,
nothing red. Had a scenario gone red it would have meant we described our
own behaviour incorrectly to ground-game.
I wrote two U-item mappings and both were wrong. gr-a04 -> U1 (it asserts
consent is REQUIRED; U1 asks WHEN the target accepts) and gr-d05 -> U5 (it
exercises the UNREJECTED Reverse; U5 is the rejected one). Both plausible
from covers:, neither survived reading the description. Third and fourth
instance of this defect; the first two reached ground-game. So encodes_u_item
is now a declaration and design.py asserts the file names what it claims --
and that check's own first version grepped for mentions and went red when
two files recorded why they do NOT encode U1 and U5. A mention is not a
claim, which is exactly the looseness that let "six of the ten have
provisional scenarios" stand.
Two positive controls went red for the best possible reason, both broken
the same way -- asserting against live repo data instead of constructing
their condition. rule-coverage.py required at least one provisional item
to EXIST; it now builds a fixture and reports the live count as a
diagnostic, because there is no number of provisional items this project
should have. design-baseline.py pinned "2 of 6" while recomputing one row
from a live glob, so the dated snapshot was never a snapshot; frozen to
its 2026-08-03 list and unwired from self-tests, since per ADR-0012 D8 it
is no longer a reporting tool.
ScenarioFile is deny_unknown_fields and refused the four new fields until
declared -- correct: a corpus accepting unknown metadata would let a typo'd
encodes_u_iem sit there claiming nothing.
DEVIATION: ADR-0012 D2 said "no new file". GroundRules.md crossed the
loadability limit, so the register moved to specs/FindingRegister.md. D2's
substance holds -- one register, same machinery, nothing competing -- but
the literal instruction did not, and it resolves an awkwardness D2 named
itself.
make all: exit 0. loop-lint clean.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-05 16:13:37 +02:00
|
|
|
REGISTER = os.path.join(ROOT, "specs", "FindingRegister.md")
|
CB-WP-0022 T05/T06/T07: the register, and what its first run found
T05. tools/design.py, make design, and the register in GroundRules.md --
14 rows, no new file, because ADR-0012 D2 made §Underdetermined the
register rather than building one beside it.
Backfill was the test and it caught two things the ADR did not have.
First, a `role` column. The first report alarmed on U2 and was wrong to:
U2's scenario is green BECAUSE the provisional default it documents is
implemented, which says nothing about whether ground-game agrees. GR-E01's
was a counterexample that went green. Same colour, opposite meaning -- a
register that cannot tell them apart either alarms constantly or never.
Only a green counterexample alarms. Folded back into GameDesign §1.3.
Second, it contradicted the survey. CB-RES-0007 said "six of the ten
already have provisional scenarios." Measured -- grep -lE "\bU<n>\b" over
scenarios/ground -- exactly ONE U-item names itself. Five provisional
scenarios exist and four probably encode U-item defaults, but the mapping
is not written down, so it is not checkable. Same defect class as the
wrong premises, found inside the survey that proposed the fix. Now a
reported debt: open, lacking a reproduction: 9, target 0.
design.py carries the control design-baseline.py never had, asserted
directly: a row citing a nonexistent file must not count as reproduced,
using the exact path 2da19a4 deleted -- which the old tool called green.
design-baseline.py is marked superseded rather than deleted; it is the
evidence for how a wrong number got into a survey.
T06. The report is a FILE in ground-game under GROUND-WP-0002, committed
there, with a hub message that only points at it. It asks for no ruling:
it carries GR-E01's withdrawal, our reproduction debt, and two notes that
are explicitly not findings.
And it had to acknowledge something nobody anticipated. GROUND-WP-0002 is
finished -- all ten U-items were RULED 2026-08-03, every one confirmed as
the default we simulate, plus five of six provisional scenarios. The
survey said "0 of 10 ruled" two days later and this register was built
saying `reported`. That is the unread-inbox failure running in the
opposite direction: they answered and we did not collect it. The
instrument's first run surfaced it. They are `ruled`, not `applied` --
lifting the now-settled provisional flags is owed and is not done, and
make design shows them open until it is.
T07. evidence/CB-EV-0021. Two of six catches in this pass came from
execution rather than process (the role distinction from building it, the
ten uncollected rulings from running it), which is InnerLoop §Design
goal's prediction holding.
make self-tests, facts-check, loop-lint: clean.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-05 15:22:33 +02:00
|
|
|
|
|
|
|
|
BEGIN = "<!-- design-register:begin -->"
|
|
|
|
|
END = "<!-- design-register:end -->"
|
|
|
|
|
|
|
|
|
|
KINDS = {"underdetermined", "inconsistent", "inert", "degenerate", "unplayed"}
|
|
|
|
|
OPEN_STATES = {"raised", "reported", "ruled"} # the queue: not yet applied
|
|
|
|
|
CLOSED_STATES = {"applied", "withdrawn"} # the log
|
|
|
|
|
NOTE = "note"
|
|
|
|
|
NOTE_EXPIRY_DAYS = 30 # GameDesign §3.1, same figure as rule-coverage.py
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def parse(text):
|
|
|
|
|
"""Rows between the register markers. Raises if the block is absent —
|
|
|
|
|
a register that silently reports zero findings is worse than one that
|
|
|
|
|
fails."""
|
|
|
|
|
try:
|
|
|
|
|
block = text.split(BEGIN)[1].split(END)[0]
|
|
|
|
|
except IndexError:
|
|
|
|
|
raise SystemExit(f"no design-register block in {REGISTER}")
|
|
|
|
|
rows = []
|
|
|
|
|
for line in block.splitlines():
|
|
|
|
|
line = line.strip()
|
|
|
|
|
if not line.startswith("|") or line.startswith("|---"):
|
|
|
|
|
continue
|
|
|
|
|
cells = [c.strip() for c in line.strip("|").split("|")]
|
|
|
|
|
if len(cells) != 7 or cells[0] in ("id",):
|
|
|
|
|
continue
|
|
|
|
|
rows.append(dict(zip(
|
|
|
|
|
("id", "kind", "state", "repro", "role", "raised", "owner"), cells)))
|
|
|
|
|
return rows
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def reproduced(row, root=ROOT):
|
|
|
|
|
"""GameDesign §1.1: the artifact must resolve. A named test is admitted
|
|
|
|
|
by its `crate::module::name` shape; anything else must be a real path
|
|
|
|
|
on disk, and that is checked by stat, not by prefix."""
|
CB-WP-0047: all four boards, and every mode named on the page
The modes were already implemented; nothing had ever COMPARED them. The
scenarios were not implemented at all: edition::deal has taken a
scenario_id since it was written and the only caller passed the literal
"SCN_01", so 15 of 20 Problem cards had never been dealt by anything.
The seam was the whole mechanism and it sat unused, with nothing red
because nothing asked.
Scenario is now state (serde default SCN_01, so all 26 recordings replay
unchanged), selected by preset `scn-03-4p` with `standard-Np` still
meaning SCN_01, and by --scenario/SCENARIO= accepting ids, numbers or
titles, validated against the edition rather than a pattern.
The threshold now comes off the Scenario card, closing F25's hardcoded
5/7/9. The first version of that control was worthless and mutation said
so: all four scenarios print 5/7/9, so reverting to the bands left it
green. Split threshold_from() so it can be handed a card that disagrees.
The header read `scoring CommonProblem` where the Mode card is titled
COMMON PROBLEM, PERSONAL EDGE -- the defect CB-WP-0034 deleted from the
move buttons, still standing on the line that says what winning means.
The coverage probe was matching that Debug output and went red when it
was fixed: third instance (CB-WP-0024, CB-WP-0034). Page now carries the
premise, the mode's rules text, and the tiebreak.
scenario-panel plays 4x3x3. Findings: SCN_01 and SCN_02 are the same
board (identical cells, pinned by a characterisation test); SCN_04 is
the hard board at 2p (52% vs 67/73%, the only deck needing two Repair);
and group success is EXACTLY equal across all three modes in all 36
cells, because greedy never reads state.mode -- filed F27, the two
competitive modes are scoring lenses over cooperative play.
F28: SHARED GROUND's mastery subtracts penalties from the claimed COUNT
where the mode card's shared score is claimed VALUE. Raised, not fixed;
scoring is ground-game's to rule on.
Also fixes design.py reporting a backticked path as no reproduction.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-08 20:51:46 +02:00
|
|
|
# **Backticks are markdown, not part of the path** (CB-WP-0047).
|
|
|
|
|
#
|
|
|
|
|
# The register writes code spans, and every NAMED TEST survived that
|
|
|
|
|
# because `::` short-circuits before the stat. A backticked FILE path
|
|
|
|
|
# did not: os.path.exists("`games/.../x.rs`") is False, so a
|
|
|
|
|
# reproduction sitting on disk was reported as absent and its finding
|
|
|
|
|
# counted as debt against a target of zero. Same shape as ADR-0018:
|
|
|
|
|
# the computation was right and the string was not what it looked
|
|
|
|
|
# like. Found by F27, whose panel existed and did not count.
|
|
|
|
|
p = row["repro"].strip().strip("`").strip()
|
CB-WP-0022 T05/T06/T07: the register, and what its first run found
T05. tools/design.py, make design, and the register in GroundRules.md --
14 rows, no new file, because ADR-0012 D2 made §Underdetermined the
register rather than building one beside it.
Backfill was the test and it caught two things the ADR did not have.
First, a `role` column. The first report alarmed on U2 and was wrong to:
U2's scenario is green BECAUSE the provisional default it documents is
implemented, which says nothing about whether ground-game agrees. GR-E01's
was a counterexample that went green. Same colour, opposite meaning -- a
register that cannot tell them apart either alarms constantly or never.
Only a green counterexample alarms. Folded back into GameDesign §1.3.
Second, it contradicted the survey. CB-RES-0007 said "six of the ten
already have provisional scenarios." Measured -- grep -lE "\bU<n>\b" over
scenarios/ground -- exactly ONE U-item names itself. Five provisional
scenarios exist and four probably encode U-item defaults, but the mapping
is not written down, so it is not checkable. Same defect class as the
wrong premises, found inside the survey that proposed the fix. Now a
reported debt: open, lacking a reproduction: 9, target 0.
design.py carries the control design-baseline.py never had, asserted
directly: a row citing a nonexistent file must not count as reproduced,
using the exact path 2da19a4 deleted -- which the old tool called green.
design-baseline.py is marked superseded rather than deleted; it is the
evidence for how a wrong number got into a survey.
T06. The report is a FILE in ground-game under GROUND-WP-0002, committed
there, with a hub message that only points at it. It asks for no ruling:
it carries GR-E01's withdrawal, our reproduction debt, and two notes that
are explicitly not findings.
And it had to acknowledge something nobody anticipated. GROUND-WP-0002 is
finished -- all ten U-items were RULED 2026-08-03, every one confirmed as
the default we simulate, plus five of six provisional scenarios. The
survey said "0 of 10 ruled" two days later and this register was built
saying `reported`. That is the unread-inbox failure running in the
opposite direction: they answered and we did not collect it. The
instrument's first run surfaced it. They are `ruled`, not `applied` --
lifting the now-settled provisional flags is owed and is not done, and
make design shows them open until it is.
T07. evidence/CB-EV-0021. Two of six catches in this pass came from
execution rather than process (the role distinction from building it, the
ten uncollected rulings from running it), which is InnerLoop §Design
goal's prediction holding.
make self-tests, facts-check, loop-lint: clean.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-05 15:22:33 +02:00
|
|
|
if p in ("", "—", "-"):
|
|
|
|
|
return False
|
|
|
|
|
if "::" in p: # a named test
|
|
|
|
|
return True
|
|
|
|
|
return os.path.exists(os.path.join(root, p))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_SIM = None
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def sim_passes(root=ROOT):
|
|
|
|
|
"""`make sim` is the authority on whether scenarios pass. Run once and
|
|
|
|
|
cache — asking per row costs a full suite per finding."""
|
|
|
|
|
global _SIM
|
|
|
|
|
if _SIM is None:
|
|
|
|
|
r = subprocess.run(["make", "sim"], cwd=root, capture_output=True, text=True)
|
|
|
|
|
_SIM = r.returncode == 0
|
|
|
|
|
return _SIM
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def alarming(row, root=ROOT):
|
|
|
|
|
"""§1.3, and the distinction the backfill discovered: **only a
|
|
|
|
|
counterexample alarms when green.**
|
|
|
|
|
|
|
|
|
|
A `default` reproduction encodes a provisional choice and is SUPPOSED
|
|
|
|
|
to pass — U2's scenario is green because the default it documents is
|
|
|
|
|
implemented, which says nothing about whether ground-game agrees. A
|
|
|
|
|
`counterexample` is the model-checker shape: it demonstrates the
|
|
|
|
|
defect, so it must be red while the finding is open. GR-E01's went
|
|
|
|
|
green when the edition landed and nothing noticed for four days.
|
|
|
|
|
"""
|
|
|
|
|
if row["role"] != "counterexample":
|
|
|
|
|
return False
|
|
|
|
|
if not row["repro"].startswith("scenarios/"):
|
|
|
|
|
return False
|
|
|
|
|
return sim_passes(root)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def report(root=ROOT, today=None):
|
|
|
|
|
today = today or datetime.date.today()
|
CB-WP-0026: collect the rulings -- ten answers that arrived and were never applied
ground-game ruled all ten U-items on 2026-08-03, every one CONFIRMED as
the default clay-borg simulates, and confirmed five of six provisional
scenarios. clay-borg never collected the answers: CB-RES-0007 reported "0
of 10 ruled" the same day, and CB-WP-0022 built the finding register two
days later still recording them as `reported`. make design's first run is
what noticed -- not a human, not the adversarial review that found four
other things.
That is the unread-inbox failure running in the opposite direction, and it
appears nowhere in the declaration, survey, ADR or spec of the pass that
was built entirely around the forward version. It is arguably worse: an
unread message is visible as silence, while a collected-but-unapplied
ruling looks exactly like work in progress.
Ten rulings quoted into §Underdetermined (the three conditional ones
verbatim -- U1's designer note, U2's End-only trigger, U8's
consume-only-if-it-cancels). Five provisional flags lifted, replaced by
ruled/ruled_by/ruled_note so the flag went and the provenance stayed.
Register queue 9 -> 0.
T02's control came back clean: make sim is 26 passed, 59 rules covered,
nothing red. Had a scenario gone red it would have meant we described our
own behaviour incorrectly to ground-game.
I wrote two U-item mappings and both were wrong. gr-a04 -> U1 (it asserts
consent is REQUIRED; U1 asks WHEN the target accepts) and gr-d05 -> U5 (it
exercises the UNREJECTED Reverse; U5 is the rejected one). Both plausible
from covers:, neither survived reading the description. Third and fourth
instance of this defect; the first two reached ground-game. So encodes_u_item
is now a declaration and design.py asserts the file names what it claims --
and that check's own first version grepped for mentions and went red when
two files recorded why they do NOT encode U1 and U5. A mention is not a
claim, which is exactly the looseness that let "six of the ten have
provisional scenarios" stand.
Two positive controls went red for the best possible reason, both broken
the same way -- asserting against live repo data instead of constructing
their condition. rule-coverage.py required at least one provisional item
to EXIST; it now builds a fixture and reports the live count as a
diagnostic, because there is no number of provisional items this project
should have. design-baseline.py pinned "2 of 6" while recomputing one row
from a live glob, so the dated snapshot was never a snapshot; frozen to
its 2026-08-03 list and unwired from self-tests, since per ADR-0012 D8 it
is no longer a reporting tool.
ScenarioFile is deny_unknown_fields and refused the four new fields until
declared -- correct: a corpus accepting unknown metadata would let a typo'd
encodes_u_iem sit there claiming nothing.
DEVIATION: ADR-0012 D2 said "no new file". GroundRules.md crossed the
loadability limit, so the register moved to specs/FindingRegister.md. D2's
substance holds -- one register, same machinery, nothing competing -- but
the literal instruction did not, and it resolves an awkwardness D2 named
itself.
make all: exit 0. loop-lint clean.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-05 16:13:37 +02:00
|
|
|
rows = parse(open(os.path.join(root, "specs", "FindingRegister.md")).read())
|
CB-WP-0022 T05/T06/T07: the register, and what its first run found
T05. tools/design.py, make design, and the register in GroundRules.md --
14 rows, no new file, because ADR-0012 D2 made §Underdetermined the
register rather than building one beside it.
Backfill was the test and it caught two things the ADR did not have.
First, a `role` column. The first report alarmed on U2 and was wrong to:
U2's scenario is green BECAUSE the provisional default it documents is
implemented, which says nothing about whether ground-game agrees. GR-E01's
was a counterexample that went green. Same colour, opposite meaning -- a
register that cannot tell them apart either alarms constantly or never.
Only a green counterexample alarms. Folded back into GameDesign §1.3.
Second, it contradicted the survey. CB-RES-0007 said "six of the ten
already have provisional scenarios." Measured -- grep -lE "\bU<n>\b" over
scenarios/ground -- exactly ONE U-item names itself. Five provisional
scenarios exist and four probably encode U-item defaults, but the mapping
is not written down, so it is not checkable. Same defect class as the
wrong premises, found inside the survey that proposed the fix. Now a
reported debt: open, lacking a reproduction: 9, target 0.
design.py carries the control design-baseline.py never had, asserted
directly: a row citing a nonexistent file must not count as reproduced,
using the exact path 2da19a4 deleted -- which the old tool called green.
design-baseline.py is marked superseded rather than deleted; it is the
evidence for how a wrong number got into a survey.
T06. The report is a FILE in ground-game under GROUND-WP-0002, committed
there, with a hub message that only points at it. It asks for no ruling:
it carries GR-E01's withdrawal, our reproduction debt, and two notes that
are explicitly not findings.
And it had to acknowledge something nobody anticipated. GROUND-WP-0002 is
finished -- all ten U-items were RULED 2026-08-03, every one confirmed as
the default we simulate, plus five of six provisional scenarios. The
survey said "0 of 10 ruled" two days later and this register was built
saying `reported`. That is the unread-inbox failure running in the
opposite direction: they answered and we did not collect it. The
instrument's first run surfaced it. They are `ruled`, not `applied` --
lifting the now-settled provisional flags is owed and is not done, and
make design shows them open until it is.
T07. evidence/CB-EV-0021. Two of six catches in this pass came from
execution rather than process (the role distinction from building it, the
ten uncollected rulings from running it), which is InnerLoop §Design
goal's prediction holding.
make self-tests, facts-check, loop-lint: clean.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-05 15:22:33 +02:00
|
|
|
|
|
|
|
|
findings = [r for r in rows if r["state"] != NOTE]
|
|
|
|
|
notes = [r for r in rows if r["state"] == NOTE]
|
|
|
|
|
queue = [r for r in findings if r["state"] in OPEN_STATES]
|
|
|
|
|
closed = [r for r in findings if r["state"] in CLOSED_STATES]
|
|
|
|
|
|
|
|
|
|
print("design — the finding register\n")
|
|
|
|
|
print(" QUEUE (open findings)")
|
|
|
|
|
for r in sorted(queue, key=lambda r: r["raised"]):
|
|
|
|
|
age = (today - datetime.date.fromisoformat(r["raised"])).days
|
|
|
|
|
mark = "repro" if reproduced(r, root) else " - "
|
|
|
|
|
print(f" {mark} {r['id']:<4} {r['kind']:<16} {r['state']:<9} {age:>4}d {r['owner']}")
|
|
|
|
|
|
|
|
|
|
if notes:
|
|
|
|
|
print("\n NOTES (not reportable — GameDesign §3.1)")
|
|
|
|
|
for r in sorted(notes, key=lambda r: r["raised"]):
|
|
|
|
|
age = (today - datetime.date.fromisoformat(r["raised"])).days
|
|
|
|
|
flag = " EXPIRED" if age > NOTE_EXPIRY_DAYS else ""
|
|
|
|
|
print(f" {r['id']:<4} {r['kind']:<16} {age:>4}d{flag}")
|
|
|
|
|
|
|
|
|
|
# ---- §4 metrics. The log is reported on request, not by default,
|
|
|
|
|
# because a default view mixing open and closed loses the queue
|
|
|
|
|
# property (ADR-0012 D5).
|
|
|
|
|
n = len(findings)
|
|
|
|
|
repro = sum(1 for r in findings if reproduced(r, root))
|
|
|
|
|
debt = [r for r in queue if not reproduced(r, root)]
|
|
|
|
|
expired = [r for r in notes
|
|
|
|
|
if (today - datetime.date.fromisoformat(r["raised"])).days > NOTE_EXPIRY_DAYS]
|
|
|
|
|
unresolved_green = [r for r in queue if reproduced(r, root) and alarming(r, root)]
|
|
|
|
|
|
|
|
|
|
print(f"\n findings {n} (+{len(notes)} note(s))")
|
|
|
|
|
print(f" with a resolving reproduction {repro}/{n}"
|
|
|
|
|
f"{'' if not n else f' = {100*repro//n}%'} target 100%")
|
|
|
|
|
print(f" open, lacking a reproduction {len(debt)} target 0"
|
|
|
|
|
+ (f" [{', '.join(r['id'] for r in debt)}]" if debt else ""))
|
|
|
|
|
print(f" reproductions green while open {len(unresolved_green)} target 0"
|
|
|
|
|
+ (" <-- ALARM, GameDesign §1.3" if unresolved_green else ""))
|
|
|
|
|
print(f" notes past {NOTE_EXPIRY_DAYS} days {len(expired)} target 0")
|
|
|
|
|
print(f" closed (log) {len(closed)}"
|
|
|
|
|
f" [{', '.join(r['id'] for r in closed)}]" if closed else "")
|
|
|
|
|
|
|
|
|
|
bad = [r for r in rows if r["kind"] not in KINDS]
|
|
|
|
|
if bad:
|
|
|
|
|
print(f"\n UNKNOWN KIND: {', '.join(r['id'] for r in bad)}"
|
|
|
|
|
" — a sixth kind means the taxonomy was invented (ADR-0012 D4)")
|
|
|
|
|
return 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def self_test():
|
|
|
|
|
ok = True
|
|
|
|
|
|
|
|
|
|
def check(name, cond, detail=""):
|
|
|
|
|
nonlocal ok
|
|
|
|
|
ok = ok and bool(cond)
|
|
|
|
|
print(f" {'ok ' if cond else 'FAIL'} {name}{' ' + detail if detail else ''}")
|
|
|
|
|
|
|
|
|
|
rows = parse(open(REGISTER).read())
|
|
|
|
|
check("the register parses", len(rows) >= 14, f"{len(rows)} row(s)")
|
|
|
|
|
check("every kind is one of the five",
|
|
|
|
|
all(r["kind"] in KINDS for r in rows),
|
|
|
|
|
"a sixth kind means the taxonomy was invented")
|
|
|
|
|
check("every state is known",
|
|
|
|
|
all(r["state"] in OPEN_STATES | CLOSED_STATES | {NOTE} for r in rows))
|
|
|
|
|
|
|
|
|
|
# THE control design-baseline.py did not have. Its YES-control passed a
|
|
|
|
|
# path that had been deleted and still returned True.
|
|
|
|
|
check("a nonexistent reproduction does NOT count",
|
|
|
|
|
not reproduced({"repro": "scenarios/ground/gr-e01-threshold-unreachable-2p.yaml"}),
|
|
|
|
|
"this exact path was deleted by 2da19a4 and the old tool said yes")
|
|
|
|
|
check("a real reproduction DOES count",
|
|
|
|
|
reproduced({"repro": "scenarios/ground/gr-p05-solve-legality.yaml"}))
|
|
|
|
|
check("a named test counts", reproduced({"repro": "games_ground::view::tests::a_spectator_sees_no_hands"}))
|
|
|
|
|
check("an em-dash does not count", not reproduced({"repro": "—"}))
|
|
|
|
|
|
CB-WP-0047: all four boards, and every mode named on the page
The modes were already implemented; nothing had ever COMPARED them. The
scenarios were not implemented at all: edition::deal has taken a
scenario_id since it was written and the only caller passed the literal
"SCN_01", so 15 of 20 Problem cards had never been dealt by anything.
The seam was the whole mechanism and it sat unused, with nothing red
because nothing asked.
Scenario is now state (serde default SCN_01, so all 26 recordings replay
unchanged), selected by preset `scn-03-4p` with `standard-Np` still
meaning SCN_01, and by --scenario/SCENARIO= accepting ids, numbers or
titles, validated against the edition rather than a pattern.
The threshold now comes off the Scenario card, closing F25's hardcoded
5/7/9. The first version of that control was worthless and mutation said
so: all four scenarios print 5/7/9, so reverting to the bands left it
green. Split threshold_from() so it can be handed a card that disagrees.
The header read `scoring CommonProblem` where the Mode card is titled
COMMON PROBLEM, PERSONAL EDGE -- the defect CB-WP-0034 deleted from the
move buttons, still standing on the line that says what winning means.
The coverage probe was matching that Debug output and went red when it
was fixed: third instance (CB-WP-0024, CB-WP-0034). Page now carries the
premise, the mode's rules text, and the tiebreak.
scenario-panel plays 4x3x3. Findings: SCN_01 and SCN_02 are the same
board (identical cells, pinned by a characterisation test); SCN_04 is
the hard board at 2p (52% vs 67/73%, the only deck needing two Repair);
and group success is EXACTLY equal across all three modes in all 36
cells, because greedy never reads state.mode -- filed F27, the two
competitive modes are scoring lenses over cooperative play.
F28: SHARED GROUND's mastery subtracts penalties from the claimed COUNT
where the mode card's shared score is claimed VALUE. Raised, not fixed;
scoring is ground-game's to rule on.
Also fixes design.py reporting a backticked path as no reproduction.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-08 20:51:46 +02:00
|
|
|
# CB-WP-0047: the register writes CODE SPANS, so this is fed markdown.
|
|
|
|
|
check("a BACKTICKED path that exists counts",
|
|
|
|
|
reproduced({"repro": "`scenarios/ground/gr-p05-solve-legality.yaml`"}),
|
|
|
|
|
"a reproduction on disk was reported as absent, and the finding "
|
|
|
|
|
"counted as debt against a target of zero")
|
|
|
|
|
check("a backticked path that does NOT exist still does not count",
|
|
|
|
|
not reproduced({"repro": "`scenarios/ground/nope.yaml`"}),
|
|
|
|
|
"stripping the span must not turn the check off")
|
|
|
|
|
check("a backticked em-dash does not count",
|
|
|
|
|
not reproduced({"repro": "`—`"}))
|
|
|
|
|
|
CB-WP-0022 T05/T06/T07: the register, and what its first run found
T05. tools/design.py, make design, and the register in GroundRules.md --
14 rows, no new file, because ADR-0012 D2 made §Underdetermined the
register rather than building one beside it.
Backfill was the test and it caught two things the ADR did not have.
First, a `role` column. The first report alarmed on U2 and was wrong to:
U2's scenario is green BECAUSE the provisional default it documents is
implemented, which says nothing about whether ground-game agrees. GR-E01's
was a counterexample that went green. Same colour, opposite meaning -- a
register that cannot tell them apart either alarms constantly or never.
Only a green counterexample alarms. Folded back into GameDesign §1.3.
Second, it contradicted the survey. CB-RES-0007 said "six of the ten
already have provisional scenarios." Measured -- grep -lE "\bU<n>\b" over
scenarios/ground -- exactly ONE U-item names itself. Five provisional
scenarios exist and four probably encode U-item defaults, but the mapping
is not written down, so it is not checkable. Same defect class as the
wrong premises, found inside the survey that proposed the fix. Now a
reported debt: open, lacking a reproduction: 9, target 0.
design.py carries the control design-baseline.py never had, asserted
directly: a row citing a nonexistent file must not count as reproduced,
using the exact path 2da19a4 deleted -- which the old tool called green.
design-baseline.py is marked superseded rather than deleted; it is the
evidence for how a wrong number got into a survey.
T06. The report is a FILE in ground-game under GROUND-WP-0002, committed
there, with a hub message that only points at it. It asks for no ruling:
it carries GR-E01's withdrawal, our reproduction debt, and two notes that
are explicitly not findings.
And it had to acknowledge something nobody anticipated. GROUND-WP-0002 is
finished -- all ten U-items were RULED 2026-08-03, every one confirmed as
the default we simulate, plus five of six provisional scenarios. The
survey said "0 of 10 ruled" two days later and this register was built
saying `reported`. That is the unread-inbox failure running in the
opposite direction: they answered and we did not collect it. The
instrument's first run surfaced it. They are `ruled`, not `applied` --
lifting the now-settled provisional flags is owed and is not done, and
make design shows them open until it is.
T07. evidence/CB-EV-0021. Two of six catches in this pass came from
execution rather than process (the role distinction from building it, the
ten uncollected rulings from running it), which is InnerLoop §Design
goal's prediction holding.
make self-tests, facts-check, loop-lint: clean.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-05 15:22:33 +02:00
|
|
|
# The distinction the backfill discovered: a green DEFAULT is expected,
|
|
|
|
|
# a green COUNTEREXAMPLE is the alarm. Without this the report cried
|
|
|
|
|
# wolf over U2, whose scenario is green precisely because the
|
|
|
|
|
# provisional default it documents is implemented.
|
|
|
|
|
check("a green default does not alarm",
|
|
|
|
|
not alarming({"role": "default", "repro": "scenarios/ground/gr-d01-darvo-trigger.yaml"}))
|
|
|
|
|
check("role is recorded for every reproduced row",
|
|
|
|
|
all(r["role"] in ("counterexample", "default")
|
|
|
|
|
for r in rows if r["repro"] not in ("—", "-", "")))
|
|
|
|
|
|
CB-WP-0026: collect the rulings -- ten answers that arrived and were never applied
ground-game ruled all ten U-items on 2026-08-03, every one CONFIRMED as
the default clay-borg simulates, and confirmed five of six provisional
scenarios. clay-borg never collected the answers: CB-RES-0007 reported "0
of 10 ruled" the same day, and CB-WP-0022 built the finding register two
days later still recording them as `reported`. make design's first run is
what noticed -- not a human, not the adversarial review that found four
other things.
That is the unread-inbox failure running in the opposite direction, and it
appears nowhere in the declaration, survey, ADR or spec of the pass that
was built entirely around the forward version. It is arguably worse: an
unread message is visible as silence, while a collected-but-unapplied
ruling looks exactly like work in progress.
Ten rulings quoted into §Underdetermined (the three conditional ones
verbatim -- U1's designer note, U2's End-only trigger, U8's
consume-only-if-it-cancels). Five provisional flags lifted, replaced by
ruled/ruled_by/ruled_note so the flag went and the provenance stayed.
Register queue 9 -> 0.
T02's control came back clean: make sim is 26 passed, 59 rules covered,
nothing red. Had a scenario gone red it would have meant we described our
own behaviour incorrectly to ground-game.
I wrote two U-item mappings and both were wrong. gr-a04 -> U1 (it asserts
consent is REQUIRED; U1 asks WHEN the target accepts) and gr-d05 -> U5 (it
exercises the UNREJECTED Reverse; U5 is the rejected one). Both plausible
from covers:, neither survived reading the description. Third and fourth
instance of this defect; the first two reached ground-game. So encodes_u_item
is now a declaration and design.py asserts the file names what it claims --
and that check's own first version grepped for mentions and went red when
two files recorded why they do NOT encode U1 and U5. A mention is not a
claim, which is exactly the looseness that let "six of the ten have
provisional scenarios" stand.
Two positive controls went red for the best possible reason, both broken
the same way -- asserting against live repo data instead of constructing
their condition. rule-coverage.py required at least one provisional item
to EXIST; it now builds a fixture and reports the live count as a
diagnostic, because there is no number of provisional items this project
should have. design-baseline.py pinned "2 of 6" while recomputing one row
from a live glob, so the dated snapshot was never a snapshot; frozen to
its 2026-08-03 list and unwired from self-tests, since per ADR-0012 D8 it
is no longer a reporting tool.
ScenarioFile is deny_unknown_fields and refused the four new fields until
declared -- correct: a corpus accepting unknown metadata would let a typo'd
encodes_u_iem sit there claiming nothing.
DEVIATION: ADR-0012 D2 said "no new file". GroundRules.md crossed the
loadability limit, so the register moved to specs/FindingRegister.md. D2's
substance holds -- one register, same machinery, nothing competing -- but
the literal instruction did not, and it resolves an awkwardness D2 named
itself.
make all: exit 0. loop-lint clean.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-05 16:13:37 +02:00
|
|
|
# CB-WP-0026 T03. A scenario may claim a U-item only if it names it,
|
|
|
|
|
# because two plausible mappings were written and both were wrong on
|
|
|
|
|
# reading what the scenario actually exercises (gr-a04 asserts consent
|
|
|
|
|
# is required, not U1's timing; gr-d05 is the unrejected REVERSE, not
|
|
|
|
|
# U5's rejected one). A claim nobody can check is how three wrong
|
|
|
|
|
# premises reached ground-game.
|
|
|
|
|
import glob
|
|
|
|
|
for path in glob.glob(os.path.join(ROOT, "scenarios", "ground", "*.yaml")):
|
|
|
|
|
body = open(path).read()
|
|
|
|
|
m = re.search(r"^encodes_u_item:\s*(\S+)", body, re.M)
|
|
|
|
|
if m:
|
|
|
|
|
check(f"{os.path.basename(path)} names the U-item it claims",
|
|
|
|
|
re.search(rf"\b{m.group(1)}\b", body) is not None, m.group(1))
|
|
|
|
|
|
|
|
|
|
# The measured claim: exactly one U-item has a scenario encoding it.
|
|
|
|
|
#
|
|
|
|
|
# **Asserted on the DECLARATION, not on a mention.** The first version
|
|
|
|
|
# grepped for `\bU<n>\b` and went red the moment two scenarios recorded
|
|
|
|
|
# *why they do not* encode U1 and U5 — a mention is not a claim, and a
|
|
|
|
|
# measurement that cannot tell them apart is the loose proxy that let
|
|
|
|
|
# "six of the ten have provisional scenarios" stand unchallenged.
|
|
|
|
|
claimed = sorted({re.search(r"^encodes_u_item:\s*(\S+)", open(p).read(), re.M).group(1)
|
|
|
|
|
for p in glob.glob(os.path.join(ROOT, "scenarios", "ground", "*.yaml"))
|
|
|
|
|
if re.search(r"^encodes_u_item:\s*\S+", open(p).read(), re.M)})
|
|
|
|
|
check("exactly one U-item is encoded by a scenario", claimed == ["U2"], f"{claimed}")
|
CB-WP-0022 T05/T06/T07: the register, and what its first run found
T05. tools/design.py, make design, and the register in GroundRules.md --
14 rows, no new file, because ADR-0012 D2 made §Underdetermined the
register rather than building one beside it.
Backfill was the test and it caught two things the ADR did not have.
First, a `role` column. The first report alarmed on U2 and was wrong to:
U2's scenario is green BECAUSE the provisional default it documents is
implemented, which says nothing about whether ground-game agrees. GR-E01's
was a counterexample that went green. Same colour, opposite meaning -- a
register that cannot tell them apart either alarms constantly or never.
Only a green counterexample alarms. Folded back into GameDesign §1.3.
Second, it contradicted the survey. CB-RES-0007 said "six of the ten
already have provisional scenarios." Measured -- grep -lE "\bU<n>\b" over
scenarios/ground -- exactly ONE U-item names itself. Five provisional
scenarios exist and four probably encode U-item defaults, but the mapping
is not written down, so it is not checkable. Same defect class as the
wrong premises, found inside the survey that proposed the fix. Now a
reported debt: open, lacking a reproduction: 9, target 0.
design.py carries the control design-baseline.py never had, asserted
directly: a row citing a nonexistent file must not count as reproduced,
using the exact path 2da19a4 deleted -- which the old tool called green.
design-baseline.py is marked superseded rather than deleted; it is the
evidence for how a wrong number got into a survey.
T06. The report is a FILE in ground-game under GROUND-WP-0002, committed
there, with a hub message that only points at it. It asks for no ruling:
it carries GR-E01's withdrawal, our reproduction debt, and two notes that
are explicitly not findings.
And it had to acknowledge something nobody anticipated. GROUND-WP-0002 is
finished -- all ten U-items were RULED 2026-08-03, every one confirmed as
the default we simulate, plus five of six provisional scenarios. The
survey said "0 of 10 ruled" two days later and this register was built
saying `reported`. That is the unread-inbox failure running in the
opposite direction: they answered and we did not collect it. The
instrument's first run surfaced it. They are `ruled`, not `applied` --
lifting the now-settled provisional flags is owed and is not done, and
make design shows them open until it is.
T07. evidence/CB-EV-0021. Two of six catches in this pass came from
execution rather than process (the role distinction from building it, the
ten uncollected rulings from running it), which is InnerLoop §Design
goal's prediction holding.
make self-tests, facts-check, loop-lint: clean.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-05 15:22:33 +02:00
|
|
|
|
|
|
|
|
print("design self-test (positive control)")
|
|
|
|
|
return 0 if ok else 1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
|
sys.exit(self_test() if "--self-test" in sys.argv else report())
|