Skip to content

Duo hardening: a game to the end, a matrix that can fail, the server going away - #2

Merged
lana-20 merged 1 commit into
mainfrom
duo-hardening
Oct 27, 2026
Merged

lana-20 merged 1 commit into
mainfrom
duo-hardening

Conversation

@lana-20

@lana-20 lana-20 commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Hardening the two-player game's tests, and covering what they skipped.

  • duo-matrix.sh can fail. It printed each run's exit and always exited 0. It now fails unless the game passes with no bug on and each bug fails it at the step that should catch it: out-of-turn at 2, match-hands-over at 3, score-swap at 3, turn-stuck at 4. With one expected step wrong on purpose it exits 1.
  • A new server bug, match-hands-over, with its Go test, so step 3's "A plays again" can come back red. It does, at step 3.
  • A mismatch held for 3 seconds in tests (/reset?hide=3s; a reset without it gives the game's 0.8 back). At 0.8 s the Quest missed the face-up pair three runs in three.
  • Played to the end: duo-play.sh plays seed 42 to a 4–4 draw, including a second mismatch that hands the turn back, and reads the draw line on both screens.
  • The server going away: duo-outage.sh runs its own server on 8788, stops it mid-game and starts it again. Both devices must say it did not answer, keep the last board, refuse a flip as unanswered, then drop the message and show the server's new game. The app needed a fix: it cleared neither "did not answer" nor a stale refusal; it now clears the first when the server answers and the second when the board changes. The app as on main fails step 4.

Measured on the Android 15 emulator and the Meta Spatial Simulator, each device as A in turn: duo-play.sh, duo-matrix.sh (4 of 4) and duo-outage.sh pass, and duo.sh still passes; go test passes.

The outage test needs mobiumdev/mobium#288 (merged): before it, mobium open cut a deep link at its &, so server= never arrived and every duo device played on the default :8787.

The README's duo video still shows the earlier five-move game.

…going away

- duo-matrix.sh fails unless the game passes with no bug on and each bug
  fails it at the step that should catch it; it only printed before.
- A new server bug, match-hands-over, so step 3's "A plays again" can fail.
- duo-play.sh plays seed 42 to a draw at 4 each, and resets with a
  mismatch held up for 3s (/reset?hide=3s): at the game's 0.8s the Quest
  missed the face-up pair three runs in three.
- duo-outage.sh runs its own server on 8788, stops it mid-game and starts
  it again. The app now clears "did not answer" once the server answers,
  and a refusal once the board changes; before, the message stayed.

Passes on the Android 15 emulator and the Meta Spatial Simulator in both
orders; the outage needs Mobium's quoted deep link (CHALLENGES 369).
@lana-20
lana-20 merged commit 88acfbc into main Oct 27, 2026
@lana-20
lana-20 deleted the duo-hardening branch October 27, 2026 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant