Skip to content

Unit stop and archive complete when a reserved seat was never created #224

Closed

Description

@bryantderosier

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.readFacts delegates every member row to ArchiveAgentService.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.
  • CrewStopService reads seats sequentially (CrewStopService.ts:112-125) and fails the whole stop with CrewStopOperationError on 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.

Activity

  1. added this to the Crews milestone on Sep 21, 2026
  2. added
    size:M
    on Sep 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

size:M

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions