Skip to main content

AEROSIM-TS-20

Project task

Verify transactional persistence and pilot isolation

Real PostgreSQL integration tests prove committed transactions survive reads, failed transactions roll back, duplicate commands do not overwrite data, and one pilot cannot read another pilot’s records.

AEROSIM-TS-20Canonical ID TASK-0020
Verified flow state
Done
Owner
AeroSim Architecture and Delivery
Component
API Service and Pilot Data Store — persistence integration tests
Repository
corp-v1-aerosim/corp-v1-aerosim

Delivery scope

Exercise the real Prisma adapter on migrated PostgreSQL with subjects pilot-alpha and pilot-bravo, including successful writes and reads, duplicate idempotency keys, rollback injection, invalid JSON, and attempted cross-subject lookup. Primary files: applications/api/tests/integration/pilot-isolation.test.ts, applications/api/tests/fixtures/pilot-records.ts, applications/api/tests/helpers/postgres.ts.

Implementation contract

Implementation artifacts

  • applications/api/tests/integration/pilot-isolation.test.ts
  • applications/api/tests/fixtures/pilot-records.ts
  • applications/api/tests/helpers/postgres.ts

Inputs

  • Migrated disposable PostgreSQL database
  • AuthenticatedSubject fixtures pilot-alpha and pilot-bravo plus valid, duplicate, and invalid SavePilotRecordCommand fixtures

Outputs

  • Repeatable integration-test report proving committed read/write behavior and subject isolation
  • Database row snapshot showing only successful subject-owned transactions

Failure boundaries

  • The suite fails if pilot-bravo can read pilot-alpha by UUID or if an error discloses ownerSubject.
  • The suite fails if duplicate or rollback cases change the row count or overwrite the original payload.

Excluded scope

  • Load testing, replication failover, retention erasure, and multi-tenant administration are not persistence acceptance for FT-43.

Verification steps

  • pnpm --filter @aerosim/api test:integration -- pilot-isolation.test.ts --runInBand
  • Run the suite twice against freshly migrated databases and compare normalized row snapshots.

Traceability

Requirements

Dependencies

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 #40 reviewed head 46dffe704e3d01a5b58e0a897890bf562b8aea63, exact-head validation task 1887 succeeded, merged as 8f87c9f6214aba3bb5ec498dd99c86cfad8c23d1; Wave 7 integrated application head b75d00b8c3864752bf5b1ea0298097add346f0aa passed publish task 1899 and validate task 1900. 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.