AEROSIM-TS-82
Verify invalid-state recovery, retry, and exit scenarios
Every governed invalid-state scenario yields a repeatable clear outcome and exposes no invalid or dead-end action.
- Verified flow state
- Done
- Owner
- AeroSim Architecture and Delivery
- Feature
- AEROSIM-FT-11
- Component
- Web flight shell — invalid-state end-to-end verification harness
- Repository
- corp-v1-aerosim/corp-v1-aerosim
Delivery scope
Run browser scenarios from initial FlightSessionConfig through controlled recovery, unsafe terrain crash, obstacle crash, horizontal/altitude limit, repeated violation, corrupt snapshot, non-finite state, permitted action, retry, and exit. Capture InvalidStateScenarioReport with ordered event/outcome/action/session transitions and compare five repetitions per certified browser.
Implementation contract
Implementation artifacts
- applications/web/test/flight/invalid-state-outcomes.browser.spec.ts
- applications/web/test/fixtures/invalid-state/scenarios.json
Inputs
- InvalidStateScenario {scenarioId,buildSha,launchRequest,initialState,trigger,expectedOutcome,selectedAction,expectedTerminalState} with fixed timestep, seed, asset/config digests, and five repetitions.
Outputs
- InvalidStateScenarioReport {scenarioId,browser,inputDigest,transitions:[{tick,type,id,state}],outcome,offeredActions,actionResult,finalSessionId,finalRoute,violations,passed}.
Failure boundaries
- Fail with INVALID_OUTCOME_MISMATCH when outcome kind/reason, offered actions, selected action result, final session, or final route differs from the scenario contract.
- Fail with INVALID_TRANSITION_ORDER when physics advances after a terminal outcome, an action precedes classification, cleanup follows claimed exit completion, or any ID changes unexpectedly.
- Fail with INVALID_SCENARIO_NOT_REPEATABLE when event ticks/IDs/outcomes exceed deterministic tolerances across repetitions or browsers.
- Fail with INVALID_SCENARIO_INCOMPLETE when any scenario/browser lacks five complete reports tied to the same build and input digest.
Excluded scope
- Manual exploratory acceptance, unsupported browsers, analytics persistence, multiplayer state, score/achievement consequences, and crash types absent from scenarios.json are excluded.
Verification steps
- Run applications/web/test/flight/invalid-state-outcomes.browser.spec.ts in Chromium, Firefox, and WebKit.
- Execute every declared scenario five times and assert transition order, outcome reason, offered action set, action side effect, final session/route, and repeatability.
- Perturb expected outcome, reorder transitions, allow one post-terminal physics tick, alter one repeat, and omit one browser report; assert every exact failure code.
- Retain test-results/invalid-state/scenario-report.json keyed to exact build SHA and scenario input digest.
Traceability
Dependencies
- AEROSIM-TS-81Canonical ID: TASK-0081
Acceptance evidence
Verified delivery: application PR #132 merged reviewed head 4cac2ccac5eeec5e379d8e07f88a90ad181d7943 as 3250ad37ce1e9526eaa1c43c68cddbc7480ae0e7. Production-path correction PR #133 merged reviewed head 41b874d21f391228d915bc9a95bd4b458e71854f as 94ddb9fa3f6b12bd1e6d55e2a63bd668d3525054; exact-head CI runs 4310-4311 and post-merge integration/publication runs 4312-4313 passed. Eight governed invalid-state scenarios cover controlled recovery, unsafe terrain and obstacle crashes, horizontal and altitude limits, repeated violation, corrupt snapshot, non-finite state, and permitted Recover/Retry/Exit actions. Chromium, Firefox, and WebKit each passed five repetitions per scenario; retained scenario-report.json contains 120 complete reports bound to source revision a053e91acd532a22764701ab8f02402d60c75210 and stable input digests. Negative mutations prove INVALID_OUTCOME_MISMATCH, INVALID_TRANSITION_ORDER, INVALID_SCENARIO_NOT_REPEATABLE, and INVALID_SCENARIO_INCOMPLETE. Web tests passed 1,095/1,095 plus invalid-action 11/11 and environment-presentation 27/27; lint, typecheck, formatting, production build, production audit, exact-head CI runs 4303-4304, and integration/publication runs 4305-4306 passed. Release completion verified on product 1.0.0.0 at GitOps revision 5d3712d89dfbf7dacd993348e55f497d126c7bf9 with Argo Synced/Healthy, exact image digests, authenticated API/database access, and three-world configured-flight acceptance.
Current evidence boundary
No current implementation, acceptance, release, or deployment evidence is claimed for this planned Task. Any prior implementation may be used only as prototype and discovery evidence.