CB-WP-0016: the drop target that was never there
Some checks failed
ci / check (push) Failing after 4s
Some checks failed
ci / check (push) Failing after 4s
Provenance (tier S, one paragraph in lieu of survey and ADR): the human check that kept INTENT stage 1 open was run and the drag was broken. Root cause, worth more than the instance: drop targets were ids, and an id must be unique, so exactly one element could ever be seat-0. The relationship-graph circle took it and the seat card that every action card's own text points at -- 'drag Attack onto a seat' -- silently had none. A seat is drawn twice and both drawings are the seat; the document model could not express that. Drop keys are now data-drop. Any number of elements may carry the same key, so a seat is droppable on its card and on its graph node. Measured on a live server: seat-0/1/2 each appear twice, id survives only on cb-status which is the one element the script looks up, and down=action-attack&up=seat-1 returns ok. Second defect: a drop on nothing returned without posting and without touching the status line, so a broken target was indistinguishable from a working page. resolve already refuses rather than defaulting, which is right; refusing SILENTLY is not. The page now reports the raw fact -- 'took action-attack, let go over nothing droppable' -- which names elements, not moves, so ADR-0007 control 5 holds. And the honest part: the general check added here -- every offered affordance names a key that exists, driven through Policy::choose over four real bot games -- does NOT catch the reported defect. seat-0 did exist, on the graph circle. It is kept because a wholly absent target is a real class, and paired with a targeted regression test that does catch it. Three mutations, each red for its stated reason, including the reported defect reintroduced; only the targeted test fires on that one. A cb-play assertion matched id="action-ground" as a substring while describing itself as checking the page; rewritten through drop_keys. make all exits 0. Stage 1 stays open: verified by tests, mutation and a live server, not by a human dragging. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
4df2d0a4ae
commit
bf72a1863a
9 changed files with 496 additions and 27 deletions
|
|
@ -295,9 +295,13 @@ mod tests {
|
|||
let replies = client.join().expect("client thread");
|
||||
assert!(replies[0].contains("200 OK"), "{}", replies[0]);
|
||||
assert!(replies[0].contains("GROUND"), "the page was not the table");
|
||||
// Through the parser, not a raw attribute match: this assertion
|
||||
// read `id="action-ground"` and CB-WP-0016 moved drop keys to
|
||||
// `data-drop`, so a substring test drifts silently on the next
|
||||
// rename while still describing itself as checking the page.
|
||||
assert!(
|
||||
replies[0].contains("id=\"action-ground\""),
|
||||
"the offered action was not on the page"
|
||||
cb_render_html::doc::drop_keys(&replies[0]).contains("action-ground"),
|
||||
"the offered action was not a drop target on the page"
|
||||
);
|
||||
assert!(replies[1].contains("200 OK"));
|
||||
assert!(server.refusals().is_empty());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue