Repository navigation
Closed
Description
A roster launch records every planned member before any seat thread exists. That is the right order for recovery, but the unit lifecycle verbs assume every member row has a thread behind it, so a Crew whose launch failed partway cannot be stopped or archived as a unit.
Where it breaks:
ArchiveCrewService.readFactsdelegates every member row toArchiveAgentService.readState(apps/server/src/j5/a2a/ArchiveAgentService.ts:352-362), which requires both a registered participant and a thread projection. A never-created seat fails that read. The Captain archive cascade (CrewCaptainArchiveCascade.ts) retries the same impossible read and never retires the Crew, so archiving the Captain leaves the partial Crew live.CrewStopServicereads seats sequentially (CrewStopService.ts:112-125) and fails the whole stop withCrewStopOperationErroron the first missing projection, before later seats with running turns are interrupted.- The person's Archive crew on the Fleet header hits the same read.
What should change:
- Distinguish a reservation whose thread was provably never created (no projection, no registration, and the member row predates any spawn receipt) from a store that could not be read. Skip only the former, and report it in the result as "never created".
- Unit archive, the Captain cascade, and unit stop complete on the threads that exist and stamp the record retired.
- A genuine SQL or projection error still fails the operation loudly; absence is never inferred from an outage.
Tests to ship (ArchiveCrewService.test.ts, CrewStopService.test.ts, CrewCaptainArchiveCascade.test.ts):
- a roster with one live seat and one never-created seat: Fleet archive finishes, the Captain delete cascade finishes, stop finishes
- a partial addition (reserved, never spawned) on an otherwise healthy Crew
- a missing row ahead of a running seat in stop: the running seat is still interrupted
- a projection read that errors is not treated as a missing seat
Done when a Crew whose launch failed partway can be stopped and archived as a unit from every door, and the Captain cascade retires it.
Related criteria: crews.md AC17, AC19, AC21.
Blocks #223. Its retirement race leaves reservations with no thread, and unit archive must complete over them first.
Metadata
Metadata
Assignees
Labels
size:M30-99 effective changed lines (test files excluded in mixed PRs).
Activity
fix(crews): unit stop and archive finish over a seat that was never c…