2.1 KiB
2.1 KiB
Issue #302 Evidence — canonical bluff → guess → reveal → scoreboard regression
Runnable command
python manage.py migrate --noinput
python manage.py smoke_staging --artifact docs/artifacts/issue-302-canonical-loop-smoke.json
migrate is the normal local bootstrap precondition when the database has not been initialized yet; the regression evidence itself is produced by smoke_staging.
What the regression proves
smoke_staging now exercises one full canonical round and fails fast with step-specific diagnostics if any of these break:
start_roundlands the session inlieand returns a concreteround_question_id.- Final
submit_lieauto-advances the session toguessand exposes mixed answers containing both the correct answer and player bluffs. - Final
submit_guessauto-advances the session torevealand returns the canonical reveal payload. - The reveal payload includes:
- correct answer
- all lies
- all guesses
- fooled-player references for bluff hits
- The first canonical state read after reveal promotes the session to
scoreboard. - Scoreboard promotion preserves the same reveal payload and exposes a leaderboard with
scoreboard_ready=true.
Artifact shape
When --artifact is provided, the JSON file records:
- the exact smoke command
- session code and round question id
- deterministic guess plan used to produce both bluff hits and one correct guess
- per-step evidence for:
create_sessionjoin_playersstart_roundauto_guess_transitionsubmit_guessesauto_reveal_transitionauto_scoreboard_transitionfinish_game
- reveal summary (
correct_answer, lie/guess counts, fooled-player ids, correct guess player ids) - promoted scoreboard leaderboard payload
Targeted test coverage
Backend regression coverage lives in lobby/tests.py:
test_smoke_staging_command_runs_full_flowtest_smoke_staging_writes_phase_evidence_artifact_when_requested
Together they ensure the command stays runnable in normal workflow and that the evidence artifact contains phase-by-phase proof instead of only a generic pass/fail.
Refs #287 #302