AEROSIM-TS-69
Classify the latest resumable activity in the Progress service
The API returns a most-recent activity only when its pilot-owned canonical state is complete, supported, and actually resumable.
- Verified flow state
- Done
- Owner
- AeroSim Architecture and Delivery
- Feature
- AEROSIM-FT-34
- Component
- API Service — Progress service and Prisma data adapter
- Repository
- corp-v1-aerosim/corp-v1-aerosim
Delivery scope
Implement deterministic latest-activity selection, validate activity type, state version, required context, governed resource references, and resumability flags, and return a typed no-resumable-activity result rather than exposing malformed, completed, failed, aborted, unsupported, or another pilot's state. Concrete artifacts are prisma/schema.prisma and tests/integration/classify-the-latest-resumable-activity-in-the-progress.spec.ts; ownership is limited to the listed artifacts and their focused verification.
Implementation contract
Implementation artifacts
- prisma/schema.prisma
- prisma/migrations/classify-the-latest-resumable-activity-in-the-progress/migration.sql
- tests/integration/classify-the-latest-resumable-activity-in-the-progress.spec.ts
Inputs
- Pilot-owned canonical activity records ordered by committed update semantics
- Supported activity types and state-payload versions with required resume-context fields
- Current governed resource references, outcome, and resumability flag
Outputs
- The API returns a most-recent activity only when its pilot-owned canonical state is complete, supported, and actually resumable.
Failure boundaries
- Return no resumable activity for malformed, completed, failed, aborted, unsupported-version, missing-context, or deleted-resource records
- Never inspect or return another pilot’s activity when selecting the latest candidate
Excluded scope
- Repairing invalid progress records during read
- Ranking suggested or previously completed activities as resumable
Verification steps
- Run tests/integration/classify-the-latest-resumable-activity-in-the-progress.spec.ts against the exact implementation revision and retain the complete passing result.
- Exercise the positive contract with pilot-owned canonical activity records ordered by committed update semantics, then assert: The API returns a most-recent activity only when its pilot-owned canonical state is complete, supported, and actually resumable.
- Exercise every negative boundary: Return no resumable activity for malformed, completed, failed, aborted, unsupported-version, missing-context, or deleted-resource records; Never inspect or return another pilot’s activity when selecting the latest candidate
Traceability
Dependencies
- AEROSIM-TS-68Canonical ID: TASK-0068
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 #128 merged reviewed head 90927140f1d2f9ee0a95039af6f331f9e7e0794d as 46eb3134d2852a8badfdab3b99b146bd05756e59; latestResumablePilotActivity returns the highest committed supported, governed, complete, resumable activity for only the authenticated pilot, or a typed NO_RESUMABLE_ACTIVITY result; focused tests pass 12/12, all integration tests pass 124/124, lint, typecheck, security, build, formatting, and production dependency audit pass; exact-head CI tasks 3620–3628 and integration validation/publication tasks 3629–3632 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.