AEROSIM-TS-65
Define canonical pilot progress and activity records
Governed flight, lesson, progression, outcome, and resumable-context state has one versioned, pilot-owned persistence model.
- Verified flow state
- Done
- Owner
- AeroSim Architecture and Delivery
- Feature
- AEROSIM-FT-33
- Component
- Pilot Data Store — Progress, Flight-session metadata, and Prisma schema/migrations
- Repository
- corp-v1-aerosim/corp-v1-aerosim
Delivery scope
Define Prisma entities and constraints for canonical progress, activity type and identifier, governed state payload version, selected configuration reference, outcome, resumability, and update timestamps; add reversible migrations and reject unversioned or unowned progress records. Concrete artifacts are prisma/schema.prisma and tests/integration/define-canonical-pilot-progress-and-activity-records.spec.ts; ownership is limited to the listed artifacts and their focused verification.
Implementation contract
Implementation artifacts
- prisma/schema.prisma
- prisma/migrations/define-canonical-pilot-progress-and-activity-records/migration.sql
- tests/integration/define-canonical-pilot-progress-and-activity-records.spec.ts
Inputs
- Governed activity type and identifier, state-payload version, selected configuration reference, and pilot owner
- Progress checkpoint or terminal outcome with resumability flag and update timestamp
- Current Prisma schema and migration baseline
Outputs
- Governed flight, lesson, progression, outcome, and resumable-context state has one versioned, pilot-owned persistence model.
Failure boundaries
- Reject unowned records, unknown activity types, absent payload versions, invalid outcomes, and resumable records without required context
- Database constraints must prevent ambiguous duplicate canonical updates for the same pilot activity and migration rollback must preserve prior records
Excluded scope
- Raw telemetry streams, replay recordings, and ungoverned client snapshots
- Progress records that cannot be associated with one authenticated pilot and one governed activity
Verification steps
- Run tests/integration/define-canonical-pilot-progress-and-activity-records.spec.ts against the exact implementation revision and retain the complete passing result.
- Exercise the positive contract with governed activity type and identifier, state-payload version, selected configuration reference, and pilot owner, then assert: Governed flight, lesson, progression, outcome, and resumable-context state has one versioned, pilot-owned persistence model.
- Exercise every negative boundary: Reject unowned records, unknown activity types, absent payload versions, invalid outcomes, and resumable records without required context; Database constraints must prevent ambiguous duplicate canonical updates for the same pilot activity and migration rollback must preserve prior records
Traceability
Dependencies
- AEROSIM-TS-20Canonical ID: TASK-0020
- AEROSIM-TS-60Canonical ID: TASK-0060
UI/UX applicability
non_visual
This Task owns technical or behavioral acceptance and does not claim direct visual conformance to the approved UI/UX package.
Acceptance evidence
Verified delivery: application PR #88 reviewed head 6925ea20f95166d9f2196a488949f1750ff35ef6 passed exact-head application validation run 3929, merged as 8bdc4fabaadb563121cb0036dc92dd6ab54bcbc5, and integration runs 3930 and 3931 succeeded. Final forward-fix PR #89 reviewed head ec9ffc1819066c39f9d0d477bf13d896372d30c0 passed exact-head application validation run 3933, merged as 5f3fc008abbb7a7de2a3c47a4ffaa63090a3a855, and final integration runs 3934 and 3935 succeeded. 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.