The note channel closed at the moment it is worth most — a player who has just seen the outcome is the one with something to say, and that reading was collectable at every moment of the game except the one after it. Two independent defects: doc::ending never rendered the box, and serve_end had no POST /note arm, so even a hand-built post fell through to 404. Fixing either alone leaves the channel shut, so the test asserts both and is mutation-proven to fail on each half separately. A post-game note binds to the final position but is not an observation made at the last decision point. RoundStep::End is the last step of a ROUND, not the end of the game, so record_note now takes the step as an argument and the post-game path passes "after the end" — otherwise an after-the-fact reading is filed as an in-play one, which is the wrong-subject family ADR-0018 was written for. A note does not end the session: every other POST in that loop breaks it, and a player must be able to write a second one and then still play again. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
b9efa327ab
commit
499d9fe3d7
7 changed files with 512 additions and 45 deletions
|
|
@ -1360,7 +1360,7 @@ mod ending_page {
|
|||
use crate::{doc, jsrun};
|
||||
|
||||
fn page() -> String {
|
||||
doc::ending(None, "the game ended", "/command?t=x", &[], &[])
|
||||
doc::ending(None, "the game ended", "/command?t=x", None, &[], &[])
|
||||
}
|
||||
|
||||
/// The label must say what the control DOES. Asserted on the rendered
|
||||
|
|
@ -1439,7 +1439,7 @@ mod ending_page {
|
|||
#[test]
|
||||
fn click_targets_do_not_wear_the_drag_affordance() {
|
||||
let pages = [
|
||||
doc::ending(None, "m", "/command?t=x", &[], &[]),
|
||||
doc::ending(None, "m", "/command?t=x", None, &[], &[]),
|
||||
doc::document(
|
||||
&crate::testfix::view(Some(PlayerId(0))),
|
||||
&[games_ground::GroundCommand::SelectAction {
|
||||
|
|
@ -1490,7 +1490,7 @@ mod ending_page {
|
|||
o.group_success = false;
|
||||
}
|
||||
let head = |v: &games_ground::view::GroundView| {
|
||||
crate::text_of(&doc::ending(Some(v), "m", "/command?t=x", &[], &[]))
|
||||
crate::text_of(&doc::ending(Some(v), "m", "/command?t=x", None, &[], &[]))
|
||||
};
|
||||
assert!(
|
||||
head(&won).contains("game solved"),
|
||||
|
|
@ -1511,6 +1511,7 @@ mod ending_page {
|
|||
None,
|
||||
"P1 ran out of input",
|
||||
"/command?t=x",
|
||||
None,
|
||||
&[],
|
||||
&[],
|
||||
));
|
||||
|
|
@ -1525,7 +1526,7 @@ mod ending_page {
|
|||
fn a_cooperative_game_shows_contributions_and_refuses_to_rank_them() {
|
||||
let mut v = crate::testfix::view(None);
|
||||
v.mode = games_ground::ScoringMode::SharedGround;
|
||||
let text = crate::text_of(&doc::ending(Some(&v), "m", "/command?t=x", &[], &[]));
|
||||
let text = crate::text_of(&doc::ending(Some(&v), "m", "/command?t=x", None, &[], &[]));
|
||||
|
||||
assert!(
|
||||
text.contains("problems solved"),
|
||||
|
|
@ -1548,7 +1549,7 @@ mod ending_page {
|
|||
fn a_ranked_mode_cites_the_games_own_tiebreak() {
|
||||
let mut v = crate::testfix::view(None);
|
||||
v.mode = games_ground::ScoringMode::BondedCoalitions;
|
||||
let text = crate::text_of(&doc::ending(Some(&v), "m", "/command?t=x", &[], &[]));
|
||||
let text = crate::text_of(&doc::ending(Some(&v), "m", "/command?t=x", None, &[], &[]));
|
||||
|
||||
assert!(
|
||||
text.contains("Lower combined Stress"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue