1 scene preview scenario replay cli
forgejo-actions edited this page 2026-07-15 12:43:13 +00:00

Scene Preview Scenario Replay CLI

Purpose

The scene preview scenario replay CLI runs authored [preview_scenarios] against the same preview simulation code used by scene validation. Use it when trigger, arrival, NPC AI, mob spawn, placed-light, or runtime-probe behavior needs a deterministic local replay before runtime testing.

Steps

  1. Author preview scenarios in the scene document.
  2. Run cargo run --bin aether_scene_preview_replay -- --scene <scene path>.
  3. Use --scenario <id or name> to isolate one failing scenario.
  4. Use --format json or --json when CI or another tool needs structured output.
  5. Treat a nonzero CLI result as a replay failure report, not as a scene parser crash unless the message says the scene could not be read or parsed.

Expected Outputs

Successful replay output includes the scene id, scenario count, step count, and per-step playback. Failed replay output names the scenario id, step index, step label, and failure message. Scene document validation also replays scenarios so authored failures surface next to other scene diagnostics.

Common Mistakes

Common mistakes include filtering by a scenario name that changed, assuming preview replay proves authority persistence, leaving no preview scenarios in a scene that depends on trigger logic, or adding a new preview step kind without a descriptor, executor, assertion extractor, and tests.

Recovery Paths

If a scenario filter reports no match, check both scenario id and name. If a step fails, inspect the authored state attached to the scenario before changing runtime code. If replay passes but online behavior differs, check whether the action is preview-only, shared-kernel, or server-authoritative.