CB-WP-0044: the page says which rules it plays
Some checks failed
ci / check (push) Failing after 4s

Reported as "I did a session and noted no changes" — correct, and the
fault was ours twice.

make ground passes no --variant, so the session was baseline, and
CB-WP-0043 deliberately leaves the baseline layout untouched because a
variant that redraws the baseline invalidates every prior look at it.

But the deeper defect is that nothing said so. The page named the round,
the step, the Lead, the scoring mode and the viewer, and never which rules
it was playing — GroundView did not even carry the variant. There was no
way from the screen to tell baseline from H1 from H2. A session that
cannot say which rules it is playing cannot report a rules change; the
player did the right thing and the instrument had nothing to tell them.

Now: variant on GroundView, `rules <id>` in the page header beside the
scoring mode, `rules <id>` in the inspector because a replay that cannot
say which rules produced it is the same defect in the other tool, and
make ground VARIANT=h2 so the capability is reachable.

Both coverage probes caught the new field independently — the render
crate's and cb-play's — the second time in two passes that they have
turned an addition into a legibility requirement instead of letting it be
silent state.

Verified by fetching the served page rather than by reading the code:
make ground VARIANT=h2 prints "rules: h2" and the page carries
"rules h2-scoped-problem-stress" with the scope labels; the baseline says
"rules ground-darvo-r0" and keeps its row.

Still open: nothing explains what a scope DOES, and the trial log header
does not record the variant either — the same defect one artifact along.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
tegwick 2026-08-08 17:47:31 +02:00
parent 471de44632
commit 25b18bddf7
9 changed files with 271 additions and 2 deletions

View file

@ -1044,11 +1044,17 @@ pub fn document_with_log(
"<h1>GROUND \u{2014} round {round}, step {step:?}</h1>\
<div><span class=\"k\">lead</span> {lead} \
<span class=\"k\">scoring</span> {mode:?} \
<span class=\"k\">rules</span> {variant} \
<span class=\"k\">viewing as</span> {who}</div>",
round = view.round,
step = view.step,
lead = seat_name(view.lead),
mode = view.mode,
// CB-WP-0044: the page must say which rules it is playing. It did
// not, so a player who ran the default and was told the layout had
// changed reported "no changes" — correctly, because the baseline
// is deliberately unchanged and nothing on screen said so.
variant = esc(view.variant.id()),
who = match view.viewer {
Some(p) => format!("{} (their hand only)", seat_name(p)),
None => "a spectator (no hands)".to_string(),

View file

@ -187,6 +187,7 @@ mod coverage {
// that could only be satisfied by geometry would have to be
// OMITTED, and the page would be illegible to `text_of` and to a
// screen reader alike.
("variant", "ground-darvo-r0"),
("problem_markers.*.owner", "P1\u{2019}s alone"),
("problem_markers.*.scope", "P2\u{2019}s Bond network"),
("outcome.total", "total 9"),

View file

@ -82,6 +82,7 @@ pub fn view(viewer: Option<PlayerId>) -> GroundView {
(Pair::new(p2, p3), Relation::Bond),
]),
problems,
variant: games_ground::Variant::Baseline,
focus: BTreeMap::from([(p1, p3)]),
selections: BTreeMap::from([
(