Skip to main content

AEROSIM-TS-92

Project task

Restore the preserved attempt through the resume transition

Resume restarts fixed-step processing from the snapshot without a time jump, duplicate command, reset, or changed attempt identity.

AEROSIM-TS-92Canonical ID TASK-0092
Verified flow state
Done
Owner
AeroSim Architecture and Delivery
Component
Web Application / Flight shell — resume coordinator
Repository
corp-v1-aerosim/corp-v1-aerosim

Delivery scope

Implement applications/web/src/flight/session/resume-coordinator.ts, applications/web/test/flight/pause-resume.browser.spec.ts. Consume only the inputs listed in this contract, publish only its listed outputs, enforce every failure boundary before commit, and prove the listed exclusions remain unchanged through the verification steps.

Implementation contract

Implementation artifacts

  • applications/web/src/flight/session/resume-coordinator.ts
  • applications/web/test/flight/pause-resume.browser.spec.ts

Inputs

  • ResumeRequested { attemptId, commandId, requestedAt } for the current PAUSED attempt.
  • The PausedAttemptSnapshot captured by EP4-FT13-PAUSE for the same attempt, including last committed step and simulation time.

Outputs

  • ResumeAccepted { attemptId, commandId, firstScheduledStep: pausedStep + 1 } followed by state PAUSED to ACTIVE.
  • The first resumed SimulationSnapshot preserves attemptId and starts at paused step plus one using the stored aircraft, input-owner, camera, and selection context; wall-clock pause duration is not added to simulationTimeMs.

Failure boundaries

  • Reject resume when no paused snapshot exists, attemptId differs, snapshot integrity fails, or session state is not PAUSED; do not start the scheduler.
  • Treat a repeated commandId as idempotent and schedule no additional loop or command application.
  • If restoration fails before scheduler activation, remain PAUSED with the original snapshot; emit ResumeRejected and expose a retryable reason.

Excluded scope

  • Creating a new attempt, retry/reset behavior, and restart-to-selection behavior.
  • Changing camera choice, input ownership, aircraft configuration, or recorded outcomes during resume.

Verification steps

  • Run applications/web/test/flight/pause-resume.browser.spec.ts with a deterministic trace; assert preserved attemptId/state and first resumed step equals pausedStep + 1.
  • Hold the attempt paused with a long wall-clock advance and assert resumed simulationTimeMs advances by one fixed step rather than the wall-clock gap.
  • Submit missing, corrupt, stale-attempt, duplicate, and non-PAUSED resume requests and inject restore failure; assert one scheduler, no duplicate command, and either unchanged PAUSED state or the specified idempotent response.

Traceability

Requirements

Dependencies

Acceptance evidence

Verified delivery: application PR #145 reviewed head 846345eaba22ea95788c18430ff971125e0c700a merged as 7f81ada4e79ef85f89baa3ae42abc37580044ab3. Resume restores the preserved attempt and context at pausedStep + 1 and advances simulation time by exactly one fixed step, excludes wall-clock pause time, starts one scheduler, handles duplicate commands idempotently, and fails closed for missing, corrupt, stale, non-PAUSED, and restoration-failure cases. Focused tests pass 10/10; full root tests, lint, typecheck, build, format, security, integration, container, Helm, and production audit passed. Candidate runs 4461-4462 and integration/publication runs 4465-4466 passed, including immutable image digest readback for the exact merge revision. 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.