# 080 — Fixed Matrix demo

## Fixture goal

Primary implementation/acceptance target: **The Matrix (1999)**, the original film, TMDb ID 603. Reuse identity/art from the existing `resources/demo/millionaire/titles/matrix.json`; do not alter its nine-question quiz.

The initial Matrix-only implementation was subsequently expanded under D42/D43. All three Matrix files remain byte-for-byte unchanged; all other titles/scopes and current verification are in [140-demo-catalog.md](140-demo-catalog.md).

Add authored Czech Story packs with exactly 10/15/20 scenes under `resources/demo/story/matrix/`. All are validated by the production content contract and run through the real Story engine/adapter/shared modal. Use no LLM, network plot retrieval, TTS, or time delays for the text demo.

Metadata artwork may use the existing cached/demo art paths as Millionaire does; “offline content” does not assert that an uncached remote image was downloaded without network. Keep fixture validation/playable backend completely independent of artwork fetching.

## Canonical coverage reference

The following is a story outline for fixture authors to review against the film, not a verified question pack. The planning session did not watch the film or query external sources. Verify wording/facts when authoring; do not copy an uncertain outline statement into a supposedly verified fixture.

| Chapter | Film-presentation landmarks |
|---|---|
| 1 — Beginning | Trinity's opening escape; Thomas Anderson/Neo; computer message, rabbit tattoo, club encounter; contact from Morpheus and agent pressure |
| 2 — Development | Surveillance/tracking and contact with Trinity; meeting Morpheus; pill choice; awakening and the revelation of the simulated world |
| 3 — Turning point | Training and the rules of the Matrix; Neo's limits; Oracle visit and the apparent choice concerning Morpheus; betrayal being set up/revealed |
| 4 — Climax | Ambush, capture and betrayal consequences; Neo/Trinity's decision to rescue Morpheus; infiltration and rescue |
| 5 — Ending | Escape and confrontation; Neo's apparent death/return; his changed relationship to the Matrix and the film's final message/flight |

Place each landmark at its actual screen-order position. Do not reorder disclosures merely because a later event causally began earlier. End at the first film's actual ending; no Reloaded/Revolutions content.

## Difficulty construction

- Easy: two scenes per chapter; choose strong recognizable turning events.
- Medium: three per chapter; include meaningful connective actions.
- Hard: four per chapter; include reliable finer plot steps, not obscure timestamps, trivia or ambiguous symbolism.
- Every pack is complete in its own right. Do not obtain Easy by taking the first ten Hard scenes; that could cut off the ending.
- Author each variant explicitly. A shared outline can guide authorship, but no runtime fixture-generating mini-engine is needed.
- Different difficulties may share important canonical events. Within a pack avoid repeating an event/question to fill a slot.
- Fixed letter ordering, fixed reveals, fixed ending, no runtime shuffle. Include correct answers across A–D without a predictable obvious pattern.

## Fixture review checklist

For every scene record during review: the moment queried, what the setup already reveals, the single actual answer, why each distractor is false at that moment, and how the reveal connects to the next setup. These notes may be authored fixture-review documentation; they are not fields presented to the player or prompts asking for chain-of-thought.

Verify specifically: adaptation/year, names, order, no answer leak, no later spoilers, no scenes outside the film, concise Czech, option fit, complete ending. The protagonist is a common viewpoint, not a mandatory one.

## Required deterministic scenarios

| Scenario | Expected behavior |
|---|---|
| All correct at 10/15/20 | Full story, five chapters, three lives, closing and correct counts |
| One wrong, then finish | Reveal real event, two lives, continue through actual ending |
| Two wrong, then finish | One life, successful completion |
| Third wrong early | Immediate loss, reached progress, no later scenes/ending |
| Third wrong in final scene | Loss takes precedence over completion |
| Wrong final scene with lives remaining | Successful completion with reduced lives |
| Double answer / repeated Continue | Exactly one evaluation/advance per legal input |
| Replay after win/loss | Identical authored content, fresh lives/counters |
| Back/close during loading | No stale response/property/focus updates |
| Mode switch at title | Correct source and fields for each mode; no AI fallback |
| Non-Matrix offline title | Both authored modes available under D42/D43; missing/unknown fixtures remain unavailable without AI fallback |

Add malformed/unavailable/timeout and long-text/missing-art cases with small test fixtures, not corruptions of the canonical Matrix JSON. Keep text tests silent even when the real user has some TTS options enabled.

## Launch and harness integration

The existing `milionar_demo&demo=matrix` launch must expose both modes through the shared title card. Preserve the source context throughout mode changes and replay.

The existing harness now supports `--mode story`, `--difficulty easy|medium|hard`, and `--mistakes N,N`. Current Millionaire commands/defaults remain compatible. Story snapshots and count/life assertions reuse the existing probe/driver.

```bash
python3 scripts/game_harness/game.py open --demo matrix --mode story
python3 scripts/game_harness/game.py run --demo matrix --mode story --difficulty easy --mistakes 2,10
python3 scripts/game_harness/game.py run --demo matrix --mode story --difficulty hard --mistakes 1,16,20 --live --input click --shots
```

Live testing requires session authorization (D37 authorized Matrix demo testing). The live runner changes difficulty through the actual settings controls and restores its previous value. It asserts the **played pack count**, not just the title chip. Standa accepted the demo and authorized paid tests in D41; the separate `story-review` command now reviews fresh AI packs through production boundaries. Millionaire prompt override/resend commands do not apply to Story.

Use fixed demo metadata and seeded randomness only where a shared component actually needs it. The authored Story pack itself requires no random seed. Do not rewrite existing Millionaire golden files to match Story behavior.
