AEROSIM-TS-94
Switch secondary cameras through a presentation-only coordinator
One deliberate valid selection activates the requested view while preserving the simulation attempt and input owner.
- Verified flow state
- Done
- Owner
- AeroSim Architecture and Delivery
- Feature
- AEROSIM-FT-14
- Component
- Web Application / Flight shell and R3F flight scene — camera switch coordinator
- Repository
- corp-v1-aerosim/corp-v1-aerosim
Delivery scope
Implement applications/web/src/flight/cameras/camera-switch-coordinator.ts, applications/web/test/flight/camera-switch-coordinator.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/cameras/camera-switch-coordinator.ts
- applications/web/test/flight/camera-switch-coordinator.spec.ts
Inputs
- SelectCamera { attemptId, commandId, cameraId } while the session is ACTIVE or PAUSED.
- The current ActiveCamera { cameraId, rigInstanceId } and immutable SecondaryCameraRegistry from EP4-FT14-REGISTRY.
Outputs
- CameraSelectionAccepted { attemptId, commandId, previousCameraId, activeCameraId } only after the requested rig is created and its first finite frame is ready.
- Exactly one active camera rig: the prior rig is disposed once after successful replacement; aircraft attempt and input-owner references are passed through unchanged.
Failure boundaries
- Reject unknown cameraId, stale attemptId, or an inapplicable session state and retain the current camera.
- Treat duplicate commandId and selection of the already-active camera as idempotent; create and dispose no rig.
- If requested-rig creation or first-frame validation fails, dispose the candidate, retain the prior rig, and emit CameraSelectionRejected without fallback.
Excluded scope
- Registration of camera definitions and implementation of the primary chase rig.
- Modification of aircraft pose, velocity, forces, simulation step, session attempt, or input owner.
Verification steps
- Run applications/web/test/flight/camera-switch-coordinator.spec.ts and assert one valid selection creates the requested rig, validates its first frame, publishes acceptance, then disposes the previous rig once.
- Exercise rapid A-to-B-to-C selection and assert command order, one active rig, and complete disposal of superseded candidates.
- Submit unknown, stale-attempt, duplicate, already-active, and candidate-failure cases; assert the current camera remains active and aircraft/session/input-owner snapshots are unchanged.
Traceability
Dependencies
- AEROSIM-TS-93Canonical ID: TASK-0093
Acceptance evidence
Verified delivery: application PR #169 reviewed head ec9f2cb43f031fd027561d6909bdc7e32a1d7532 merged as 7c0e6aa7e08274d1d2badf8eafe11df6e39ad3a5. The presentation-only coordinator accepts ACTIVE and PAUSED selections only after the requested registry rig produces its first finite frame, commits one active camera identity, disposes the prior rig exactly once, preserves aircraft-attempt and input-owner references, handles rapid A-to-B-to-C ordering, treats duplicate and already-active selections idempotently, and rejects stale, inapplicable, unknown, creation-failure, and invalid-frame requests without physics mutation or fallback. Focused coordinator tests pass 12/12; formatting, lint, typecheck, complete workspace tests, security checks, workflow/container/Helm contracts, production build, and production audit passed. Candidate CI run 4738, integration validation run 4740, and immutable image publication run 4739 passed. Harbor readback resolved Nebula digest sha256:80680b61de2144392119aa46d8a66fe0b694e8f87329752ac3af9f7a8f836759 and Singularity digest sha256:2dd1e7c7e8aa46c56e65be3fb018b1095d00bc2216c6e7bdbab91904b57275d4 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.