CB-WP-0021 T01/T02/T05: the engine plays its own data — AM-7 blocks

ADR-0011 decided it: vendor the CSV with a checked digest, read it with
a ~50-line reader, and let the hashes move.

The declaration's constraint was measured against the WRONG BUDGET. It
said a CSV crate costs 21,613 against AM-4a's 3,798 of headroom, '5.7x
over, settled by measurement'. But setup and problem_priorities are
cfg(scenarios) and are not in the shipped runtime at all, so AM-4a never
sees them. Against AM-4b, csv costs 17,651 against 19,742 -- it FITS,
with 2,091 to spare. It is refused anyway, on proportion: 89% of the
budget's remaining capacity to read 20 rows. The revisit condition is
stated (nested quoting, embedded newlines, multiple dialects).

GR-S01 now deals Surface + hidden 1..=k as ruled, with edition values and
suits. Measured: 6/9/12 available against thresholds 5/7/9 -- the game is
winnable at every seat count, which is what the maintainer could not do.
gd0001 is INVERTED, not deleted, and now also asserts the 6/9/12 so a
deal that is reachable for the wrong reason still fails.

Blast radius was scenario expectations, exactly as the ADR predicted: no
scenario pinned a hash and no bundle is committed. Six scenarios and two
unit tests updated, each with a note. gr-e01-threshold-unreachable-2p is
RENAMED to -reachable- and rewritten as the non-provisional import check
ground-game asked for by name. gr-e03's setup was restructured, not just
renumbered: with values 2,2,2 its personal-edge test would have tied
three ways and asserted nothing.

BLOCKING: AM-7 fails at median 0.845 against its 0.9 floor. Isolated
across three runs -- 3 problems + stand-in 0.97, 3 problems + edition
0.909, 4 problems + edition 0.845. State is BOUNDED (proven: identical
after 5k and 100k events), so this is not the unbounded-growth defect
AM-7 exists to catch; it is a bigger working set streaming a long log.
Whether AM-7's floor is still right for a larger aggregate is a spec
question and lowering it requires an ADR, so it is not being tuned here.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
tegwick 2026-08-04 00:47:56 +02:00
parent f2281fa86c
commit 2da19a49b7
16 changed files with 593 additions and 167 deletions

View file

@ -11,8 +11,8 @@ setup:
preset: standard-3p
patch:
"lead": 0
"players.0.hand": [{ suit: Clarify }]
"players.1.hand": [{ suit: Clarify }]
"players.0.hand": [{ suit: Repair }]
"players.1.hand": [{ suit: Repair }]
commands:
- actor: P1
cmd: select_action
@ -39,5 +39,5 @@ expect:
"problems.1.claimed_by": 0
"players.0.hand": []
# GR-A02: P2 resolved second, so its Solution is not spent.
"players.1.hand": [{ suit: Clarify }]
"players.1.hand": [{ suit: Repair }]
rejects: []

View file

@ -0,0 +1,66 @@
scenario: ground/gr-e01-threshold-reachable-2p
description: >
GR-E01's threshold against the EDITION's Problem values, at the
2-player boundary — the tightest band. Rewritten from
`gr-e01-threshold-unreachable-2p` on ground-game's ruling of
2026-08-04, which called the old gap "not a design gap" and asked for
"a non-provisional import/fixture check: for every seat band,
sum(point_value of dealt Problems) >= threshold".
The old scenario recorded a real defect: the engine dealt Surface +
(N-1) hidden, worth 3/6/10 against thresholds of 5/7/9, and a
maintainer could not win a 3-player game. GR-S01 was then ruled as
Surface + hidden 1..=k, giving 6/9/12. It is renamed rather than
deleted, because the record of why the numbers changed is worth more
than a clean directory.
At 2p the deal is Surface(Repair,2) + hidden 1(Clarify,2) +
hidden 2(Boundary,2) = 6 against a threshold of 5. Reachable, and
ground-game kept it unforgiving on purpose: any TWO Problems sum to 4,
so success needs a full clear.
covers: [GR-E01, GR-E02, GR-O01]
provisional: false
seed: 42
setup:
players: 2
preset: standard-2p
patch:
"round": 5
"mode": SharedGround
# A full clear: all three dealt Problems claimed. Anything less than
# all three cannot reach 5, which is the point of the band.
"problems.1.claimed_by": 0
"problems.2.claimed_by": 1
"problems.2.face_up": true
"problems.3.claimed_by": 0
"problems.3.face_up": true
commands:
- actor: P1
cmd: select_action
args: { action: GROUND }
- actor: P2
cmd: select_action
args: { action: GROUND }
- actor: SYSTEM
cmd: reveal
- actor: P1
cmd: choose_ground_mode
args: { mode: GR }
- actor: P2
cmd: choose_ground_mode
args: { mode: GR }
- actor: SYSTEM
cmd: resolve
- actor: SYSTEM
cmd: end_round
expect:
events:
- kind: GameEnded
state:
# 2 + 2 + 2 = 6, the maximum a 2-player game can score, against 5.
"outcome.total": 6
"outcome.threshold": 5
"outcome.group_success": true
"round": 5
"step": End
rejects: []

View file

@ -1,53 +0,0 @@
scenario: ground/gr-e01-threshold-unreachable-2p
description: >
GR-E01's threshold against the standard preset's Problem values, at the
2-player boundary. Both Problems are claimed — the best case available
— and the total is 3 against a threshold of 5. With the placeholder
fixture (value = priority) group success is unreachable at 2, 3 and 4
players; only 56p can reach its 9. Recorded here so the gap has a
failing-in-fact scenario rather than a paragraph, and marked provisional
because the fixture is explicitly a stand-in for scenario Problem data.
covers: [GR-E01, GR-E02, GR-O01]
provisional: true
provisional_owner: ground-game
provisional_raised: 2026-08-01
seed: 42
setup:
players: 2
preset: standard-2p
patch:
"round": 5
"mode": SharedGround
"problems.1.claimed_by": 0
"problems.2.claimed_by": 1
"problems.2.face_up": true
commands:
- actor: P1
cmd: select_action
args: { action: GROUND }
- actor: P2
cmd: select_action
args: { action: GROUND }
- actor: SYSTEM
cmd: reveal
- actor: P1
cmd: choose_ground_mode
args: { mode: GR }
- actor: P2
cmd: choose_ground_mode
args: { mode: GR }
- actor: SYSTEM
cmd: resolve
- actor: SYSTEM
cmd: end_round
expect:
events:
- kind: GameEnded
state:
# 1 + 2 = 3, the maximum any 2-player game of this preset can score.
"outcome.total": 3
"outcome.threshold": 5
"outcome.group_success": false
"round": 5
"step": End
rejects: []

View file

@ -15,11 +15,15 @@ setup:
patch:
"round": 5
"mode": CommonProblem
# Every Problem claimed: 1+2+3+4 = 10, over the 5-6p threshold of 9.
# Four of the five dealt Problems claimed: 2+2+3+2 = 9, exactly the
# 5-6p threshold. P3 takes the 3-value Problem so the personal edge
# this scenario exists to test has a unique winner — with the edition
# values (2,2,2,3,3) an even spread would tie three ways and the test
# would assert nothing about GR-E03.
"problems.1.claimed_by": 0
"problems.2.claimed_by": 1
"problems.3.claimed_by": 2
"problems.4.claimed_by": 3
"problems.4.claimed_by": 2
"problems.3.claimed_by": 3
"problems.2.face_up": true
"problems.3.face_up": true
"problems.4.face_up": true
@ -66,11 +70,11 @@ expect:
events:
- kind: GameEnded
state:
"outcome.total": 10
"outcome.total": 9
"outcome.threshold": 9
"outcome.group_success": true
# GR-E03: claimed value 1 per Blame held.
"outcome.personal.3": 2
"outcome.personal.3": 0
"outcome.personal.2": 3
# P4 claimed 4 and still loses: the Blame is load-bearing here.
"outcome.winners": [2]

View file

@ -15,7 +15,8 @@ setup:
"lead": 0
"round": 5
"mode": BondedCoalitions
# Values 1+2+3 = 6 claimed; 3p threshold is 7, so no group success.
# Edition values 2+2+2 = 6 claimed; 3p threshold is 7, so still no
# group success — the band this scenario needs is unchanged.
"problems.1.claimed_by": 0
"problems.2.claimed_by": 1
"problems.3.claimed_by": 2
@ -45,12 +46,12 @@ expect:
"outcome.total": 6
"outcome.group_success": false
# P1 claimed value 1 less one Blame; P2 value 2; P3 value 3.
"outcome.personal.0": 0
"outcome.personal.0": 1
"outcome.personal.1": 2
"outcome.personal.2": 3
"outcome.personal.2": 2
# GR-E04: P1+P2 are Bonded; the Rivalry leaves P3 solo.
"outcome.coalitions.0.members": [0, 1]
"outcome.coalitions.0.score": 2
"outcome.coalitions.0.score": 3
"outcome.coalitions.1.members": [2]
"outcome.coalitions.1.score": 3
"outcome.coalitions.1.score": 2
rejects: []

View file

@ -12,8 +12,8 @@ setup:
"lead": 0
"players.0.stress": 3
"players.1.stress": 4
"players.0.hand": [{ suit: Clarify }]
"players.1.hand": [{ suit: Clarify }]
"players.0.hand": [{ suit: Repair }]
"players.1.hand": [{ suit: Repair }]
commands:
# GR-F02: Stress 3 is below the gate, so SOLVE is available.
- actor: P1

View file

@ -22,7 +22,7 @@ setup:
patch:
"lead": 1
"players.0.hand": [{ suit: Change }]
"players.1.hand": [{ suit: Clarify }]
"players.1.hand": [{ suit: Repair }]
commands:
# 0 — P1 holds no Clarify: refused.
- actor: P1