CB-WP-0023: SOLVE is legal only where it can do something
Some checks failed
ci / check (push) Failing after 4s
Some checks failed
ci / check (push) Failing after 4s
Implements ground-game's ruling of 2026-08-03. make all exits 0, 26 scenarios, rule coverage 59/59, and no scenario encoded the bug. The rule ended up somewhere other than where I put it, and a gate moved it. It went into legal_commands first; the AM-1 coverage gate then demanded a scenario for the new GR-P05, and scenarios drive validate, not the offer layer. A rule enforced only by the offer is enforced only for clients that ask what is legal -- the browser would be filtered and a scenario file would walk straight past it. Once GR-P05 moved into validate, every condition in legal_commands was dead code, and the layering test said so in those words. And the reported case was not the one I reported. CB-WP-0018 and the message to ground-game described SOLVE offered on a FACE-DOWN Problem. Measured: validate already rejected face-down, so it never was offered. Problem 1 is the Surface Problem, face-up from the deal -- the maintainer's three inert SOLVEs were the HAND case, holding no Clarify for a Clarify Problem. The ruling covers both so nothing is invalidated, but the record was wrong. Four conditions asserted separately, because one 'SOLVE is filtered' test would pass with three of four implemented. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
46c2fb652e
commit
6487d33f27
7 changed files with 321 additions and 16 deletions
|
|
@ -1756,6 +1756,28 @@ impl GroundState {
|
|||
"GR-A13: Problem {problem} is not a face-up, non-Denied Problem"
|
||||
)));
|
||||
}
|
||||
// GR-P05, ruled by ground-game 2026-08-03: SOLVE is legal
|
||||
// only where it can do something. This lives in `validate`
|
||||
// and not only in `legal_commands` because a rule enforced
|
||||
// by the offer alone is enforced only for clients that ask
|
||||
// what is legal — the browser would be filtered and a
|
||||
// scenario file would not.
|
||||
Action::Solve if target.claimed_by.is_some() => {
|
||||
return Err(bad(format!(
|
||||
"GR-P05: Problem {problem} was claimed in an earlier round"
|
||||
)));
|
||||
}
|
||||
Action::Solve
|
||||
if !self
|
||||
.players
|
||||
.get(&actor)
|
||||
.is_some_and(|p| p.hand.iter().any(|c| c.suit == target.suit)) =>
|
||||
{
|
||||
return Err(bad(format!(
|
||||
"GR-P05: no {:?} Solution in hand for Problem {problem}",
|
||||
target.suit
|
||||
)));
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
} else if problem.is_some() {
|
||||
|
|
@ -2482,7 +2504,11 @@ mod replay_probe {
|
|||
println!(
|
||||
" {seats}p: {} problem(s) worth {best} against a threshold of {need} \u{2014} {}",
|
||||
state.problems.len(),
|
||||
if best >= need { "reachable" } else { "UNREACHABLE" }
|
||||
if best >= need {
|
||||
"reachable"
|
||||
} else {
|
||||
"UNREACHABLE"
|
||||
}
|
||||
);
|
||||
}
|
||||
let unreachable: Vec<u8> = verdicts
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue