AEROSIM-TS-109
Create exactly one session from one deliberate launch
One deliberate launch action freezes the displayed configuration and creates exactly one flight session from it.
- Verified flow state
- Done
- Owner
- AeroSim Architecture and Delivery
- Feature
- AEROSIM-FT-18
- Component
- Web Application — Flight shell
- Repository
- corp-v1-aerosim/corp-v1-aerosim
Delivery scope
Implement a launch coordinator with idle, creating, active, and failed states; accept one deliberate command carrying sourceRevision, summaryHash, and a clientLaunchId; atomically reserve that clientLaunchId, freeze the complete configuration, create one session, and bind sessionId to the same configuration hash.
Implementation contract
Implementation artifacts
- applications/web/src/session/launch/session-launch-coordinator.ts
- applications/web/src/session/launch/session-repository.ts
- applications/web/test/session/session-launch-coordinator.spec.ts
Inputs
- A ready PreflightSummary, its immutable PreflightConfiguration, and a unique clientLaunchId.
- One deliberate launch command initiated while the coordinator is idle or failed.
Outputs
- Exactly one SessionCreated result containing sessionId, clientLaunchId, sourceRevision, and configurationHash.
- A failed result with stage and retryAllowed when no session was committed.
Failure boundaries
- Not-ready, stale revision, hash mismatch, or already-used clientLaunchId is rejected before creation.
- Concurrent duplicate commands share the first terminal result and cannot allocate a second session.
- Failure before commit creates no session and allows one later deliberate command with a new clientLaunchId; failure after commit returns the existing SessionCreated result rather than recreating it.
Excluded scope
- No background, timed, or automatic launch retry is performed.
- Session debrief, progress updates, history retention, and training workflow orchestration begin only after a session outcome exists and are outside this task.
Verification steps
- Run applications/web/test/session/session-launch-coordinator.spec.ts and assert one valid command commits one configuration and one session.
- Send concurrent and replayed commands with the same clientLaunchId; assert one sessionId and the same terminal result.
- Inject failure before and after commit; assert zero sessions before commit, committed-session recovery after commit, and one session from a new deliberate retry.
Traceability
Dependencies
- AEROSIM-TS-108Canonical ID: TASK-0108
Acceptance evidence
Verified delivery: application PR #175 reviewed head 219878642b63ce3031c41f4770647d4137c3fdb5 merged as 76bea8a21a163b18f139d486919e9b5766cb2ad4. Thirteen focused tests prove idle, creating, active, and failed coordination; atomic clientLaunchId reservation; one immutable complete configuration and exactly one hash-bound session; same-process and cross-coordinator duplicate result sharing; rejection of not-ready, stale, changed, hash-mismatched, empty-ID, conflicting, competing, and post-active commands; one new deliberate retry after pre-commit failure with no automatic retry; and post-commit recovery without recreation. Full application, integration, certified-browser, security, format, lint, typecheck, build, container, Helm, and production audit gates passed. Candidate CI run 4800 attempt 1, integration run 4802 attempt 1, and immutable publication run 4801 attempt 1 passed. Harbor readback resolved Nebula digest sha256:db5bf47a4fd2263322844db8a84db6a59a95a45a5e59ea551e701f841e9b7b3f and Singularity digest sha256:416a375b93d5b674e6c20e661e210d05d25fd80cbc31a871846a063b2c780e53 for the exact integration 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.