Repository navigation
Description
A roster proposal still behaves like something that can be retried: approval claims the gate, a failed spawn hands the card back with "retry with the same request key", a declined or failed proposal can be reopened, and a boot sweep settles decisions the server lost mid-way. Once every approval launches once and reports what happened, none of that machinery has a job. Jackson and I agreed on #235 and #271 that this lands next, before anything else goes in against the code it removes.
Where it breaks today:
CrewLaunchService.spawnSeatsstops at the first seat that fails, so later seats are never attempted and the Captain hears nothing about them.- A seat whose
thread.createfailed keeps the member row it got from record-before-spawn. It has no thread, so nothing can message it, and it still counts against the twelve. - Spawn failures go back to the card as a retry prompt, and
CrewLaunchReporteronly watches seats whose brief went out, so a spawn-time failure never reaches the launch report. - The claim states (
approving,declining), reopen, and the proposal boot sweep inCrewProposalService/AgentCrewProposalService(claims from migration 016) exist only to make retries converge.
What should change:
- A proposal resolves once. Approve records the Crew and writes the proposal-to-Crew link before the first spawn, then attempts every seat: whatever failed, failed.
spawnSeatscarries on past a failed seat and returns each seat's outcome.- A seat whose
thread.createfailed has its member row dropped at launch, so the roster matches what exists, and the launch report names it as not created. - Spawn-time failures go in the launch report, and the card resolves instead of offering a retry.
- Remove the claim states, reopen, and the proposal boot sweep, with a J5 migration for any schema they leave behind. Remove the leftover
approvedSeatsseeding inCrewProposalCard. - Rewrite crews.md AC7 for launch-once, and update the tool contract in
agent-tools.md.
Keep: the admission transaction and the twelve-seat cap from #239, the link-write failure from #221 that fails the approval before any seat spawns, and deterministic ids, so a second click on the same approval is still safe.
Tests to ship:
- a roster where the second of three seats fails to create launches the first and third, drops the second's row, and reports all three outcomes
- a spawn-time failure resolves the card and lands in the launch report
- a second approval of a resolved proposal spawns nothing
- a restart mid-launch leaves no proposal waiting on a sweep, and the launch report still posts once
- drive the flow with receipts, never sleeps or polling
Done when every approval launches once, the Captain's launch report names every seat's outcome including seats that were never created, and no retry, reopen, or claim path is left.
Related criteria: crews.md AC6, AC7. Follows #271 and #279. #239 lands after this.
Activity
evidence: #311 before launch card
evidence: #311 after launch card
fix(crews): a proposal launches once and reports every seat (#313)
fix(crews): a Crew follows its Captain through every lifecycle step (#…
feat(crews): custom seats default to Full access and the roster flags…