2026-08-03 21:19:12 +02:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
|
"""Baseline harness: how findable, reproducible and answered are the
|
|
|
|
|
design findings this project has already produced?
|
|
|
|
|
|
|
|
|
|
The comparator is US, today. The external candidates (rulings databases,
|
|
|
|
|
model-checker traces, W3C provisional marks) are practices rather than
|
|
|
|
|
runnable software, so per InnerLoop Step 1 their rows are DIRECTIONAL and
|
|
|
|
|
cap at `parity`. This is the row that can be measured.
|
|
|
|
|
"""
|
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
|
|
|
#
|
|
|
|
|
# ── SUPERSEDED 2026-08-05 by tools/design.py (ADR-0012 D8) ──────────────
|
|
|
|
|
#
|
|
|
|
|
# Kept as CB-RES-0007's dated snapshot, NOT as a live instrument. Deleting
|
|
|
|
|
# it would erase the evidence for how a wrong number got into a survey.
|
|
|
|
|
#
|
|
|
|
|
# The adversarial review (C2) dismantled it and every point is true:
|
|
|
|
|
# * FINDINGS below is a hand-maintained dict; `n = len(FINDINGS)` counts
|
|
|
|
|
# the rows someone typed, not findings that exist.
|
|
|
|
|
# * `has_reproduction` is `startswith("scenarios/")` and never stats the
|
|
|
|
|
# file, so the self-test's YES-control is GREEN against a path that
|
|
|
|
|
# 2da19a4 deleted. A positive control that controls nothing.
|
|
|
|
|
# * It rejects a named test, which the admissibility rule admits, so its
|
|
|
|
|
# 33% is biased downward.
|
|
|
|
|
# * The 4-day figure is two date literals subtracted. Mutated to
|
|
|
|
|
# 2020-01-01 it reports 2406 days with every check still green.
|
|
|
|
|
#
|
|
|
|
|
# **Its 33% is withdrawn as a measured rate.** What survived: 11 files,
|
|
|
|
|
# no index, 0 of 10 ruled — all checkable without this tool.
|
|
|
|
|
#
|
2026-08-03 21:19:12 +02:00
|
|
|
import os, re, subprocess, sys, datetime
|
|
|
|
|
|
|
|
|
|
ROOT = "/home/worsch/clay-borg"
|
|
|
|
|
os.chdir(ROOT)
|
|
|
|
|
|
|
|
|
|
# The findings this project has actually produced, and where each lives.
|
|
|
|
|
FINDINGS = {
|
|
|
|
|
"U1..U10 underdetermined points": ["specs/GroundRules.md"],
|
|
|
|
|
"SOLVE on a face-down Problem": ["workplans/CB-WP-0018-the-browser-is-a-client.md",
|
|
|
|
|
"evidence/CB-EV-0016-the-browser-is-a-client.md"],
|
|
|
|
|
"GR-A13 wasted SOLVE": ["evidence/CB-EV-0007-stage-0.md"],
|
CB-WP-0021 T06: fix AM-7's measurement, not its floor
The row folded a 5,000-event log against a 100,000-event log and compared
throughputs, which confounds 'does cost per event grow with history'
(the property it claims) with 'does streaming a 20x longer Vec cost more
per element' (a memory-hierarchy fact true of any program). It measured
the second and reported it as the first: importing the edition enlarged
the aggregate and the ratio fell to 0.845 with the state bounded.
Corrected to time the SAME 5,000 events on a state at depth 0 and on a
state at depth 100,000. Equal windows, equal event mix, so the only
difference left is history depth.
corrected: clean 1.004, mutated 0.589 (red)
old: clean 0.845 (red on healthy code), mutated 0.751
It also runs in 8.5s instead of timing out: the first version re-walked
the 100k prefix every repetition, 200M untimed folds per sample, which
under the mutation never finished. A control that cannot be run is not a
control. It now advances to depth once per sample and clones.
Two of my own measurements here were wrong and both were caught by
measuring again. A 2-minute timeout killed the shell line before its
restoring cp ran, so three readings were taken on MUTATED code -- I
diagnosed an event-mix confound that did not exist and 'fixed' it. The
fix is kept on its merits; the justification was fiction. And the probe
that proved state was bounded had checked four of eleven collections.
make all exits 0.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-04 01:10:38 +02:00
|
|
|
# RESOLVED 2026-08-04: ground-game ruled GR-S01's deal, the engine
|
|
|
|
|
# imports the edition, and the scenario was renamed from
|
|
|
|
|
# `-unreachable-` to `-reachable-`. Kept in the baseline because the
|
|
|
|
|
# baseline is a snapshot of what the survey measured, and a register
|
|
|
|
|
# that drops findings when they close cannot report a close rate.
|
|
|
|
|
"GR-E01 unreachable below 5 seats [RESOLVED]": [
|
|
|
|
|
"evidence/CB-EV-0007-stage-0.md",
|
|
|
|
|
"scenarios/ground/gr-e01-threshold-reachable-2p.yaml",
|
|
|
|
|
"workplans/CB-WP-0021-import-the-edition.md"],
|
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
|
|
|
# FROZEN 2026-08-05. This globbed `provisional: true` live, so it was
|
|
|
|
|
# never a snapshot -- it drifted with the repo. CB-WP-0026 lifted the
|
|
|
|
|
# last five flags (ground-game ruled them 2026-08-03) and the glob went
|
|
|
|
|
# empty, turning this file's own pinned self-test red at 1/6. A dated
|
|
|
|
|
# snapshot that recomputes is a contradiction; the literal list it
|
|
|
|
|
# measured on 2026-08-03 is what belongs here.
|
|
|
|
|
"six provisional defaults": [
|
|
|
|
|
"scenarios/ground/gr-a04-bond-support.yaml",
|
|
|
|
|
"scenarios/ground/gr-d01-darvo-trigger.yaml",
|
|
|
|
|
"scenarios/ground/gr-d05-darvo-reverse.yaml",
|
|
|
|
|
"scenarios/ground/gr-e02-shared-ground.yaml",
|
|
|
|
|
"scenarios/ground/gr-e04-coalitions.yaml",
|
|
|
|
|
],
|
2026-08-03 21:19:12 +02:00
|
|
|
"GR-E03/GR-E04 never played": ["evidence/CB-EV-0007-stage-0.md"],
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
def has_reproduction(paths):
|
|
|
|
|
"""A runnable thing: a scenario file, or a named test/command."""
|
|
|
|
|
for p in paths:
|
|
|
|
|
if p.startswith("scenarios/"):
|
|
|
|
|
return True
|
|
|
|
|
return False
|
|
|
|
|
|
|
|
|
|
def self_test():
|
|
|
|
|
"""The control that matters: a harness that read nothing must not
|
|
|
|
|
report a clean baseline. Every path this survey cites must exist, and
|
|
|
|
|
the reproduction test must be able to say NO — one that answered yes
|
|
|
|
|
for everything would report 100% and look excellent."""
|
|
|
|
|
results = []
|
|
|
|
|
|
|
|
|
|
def check(name, ok, detail=""):
|
|
|
|
|
results.append((name, ok, detail))
|
|
|
|
|
|
|
|
|
|
missing = [p for paths in FINDINGS.values() for p in paths
|
|
|
|
|
if not os.path.exists(p)]
|
|
|
|
|
check("every cited location exists", not missing, ", ".join(missing[:3]))
|
|
|
|
|
check("the finding set is not empty", len(FINDINGS) >= 6, f"{len(FINDINGS)}")
|
|
|
|
|
check("reproduction detection can say NO",
|
|
|
|
|
not has_reproduction(["evidence/CB-EV-0007-stage-0.md"]),
|
|
|
|
|
"a detector that always says yes would report 100%")
|
|
|
|
|
check("reproduction detection can say YES",
|
|
|
|
|
has_reproduction(["scenarios/ground/gr-e01-threshold-unreachable-2p.yaml"]))
|
|
|
|
|
# The number this survey turns on, pinned so a later edit cannot move
|
|
|
|
|
# it silently: 2 of 6 today.
|
|
|
|
|
repro_now = sum(has_reproduction(v) for v in FINDINGS.values())
|
|
|
|
|
check("the measured baseline is 2 of 6", repro_now == 2, f"{repro_now}/6")
|
|
|
|
|
|
|
|
|
|
print("design-baseline self-test (positive control)")
|
|
|
|
|
ok = True
|
|
|
|
|
for name, passed, det in results:
|
|
|
|
|
print(f" [{'ok ' if passed else 'FAIL'}] {name}" + (f" — {det}" if det else ""))
|
|
|
|
|
ok &= passed
|
|
|
|
|
return 0 if ok else 1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if "--self-test" in sys.argv:
|
|
|
|
|
raise SystemExit(self_test())
|
|
|
|
|
|
|
|
|
|
print("BASELINE — design findings as they stand, 2026-08-03\n")
|
|
|
|
|
places = set()
|
|
|
|
|
repro = 0
|
|
|
|
|
for name, paths in FINDINGS.items():
|
|
|
|
|
places.update(paths)
|
|
|
|
|
r = has_reproduction(paths)
|
|
|
|
|
repro += r
|
|
|
|
|
print(f" {'repro' if r else ' - '} {len(paths)} location(s) {name}")
|
|
|
|
|
|
|
|
|
|
n = len(FINDINGS)
|
|
|
|
|
print(f"\n findings {n}")
|
|
|
|
|
print(f" with a runnable reproduction {repro}/{n} = {100*repro//n}%")
|
|
|
|
|
print(f" distinct files holding them {len(places)}")
|
|
|
|
|
print(f" single register? NO — {len(places)} files, no index")
|
|
|
|
|
|
|
|
|
|
# Time from raised to READ, for the one finding with a timestamp trail.
|
|
|
|
|
raised = datetime.date(2026, 7, 30) # hub message from clay-borg-custodian
|
|
|
|
|
read = datetime.date(2026, 8, 3) # marked read this session
|
|
|
|
|
print(f"\n U1..U10: raised {raised}, first READ {read} — {(read-raised).days} days")
|
|
|
|
|
print(f" U1..U10: answered? NO — {(read-raised).days}+ days open, 0 of 10 ruled")
|