You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
An unreadable handoff is not reported to the Captain as missing #226
A seat's finish notice tells the Captain whether the handoff was written, missing, or never declared. Those are supposed to be measured facts. Today any failure to read the artifact is reported as "missing".
Where it breaks: CrewSeatFinishNotifier.handoffFact (apps/server/src/j5/a2a/CrewSeatFinishNotifier.ts:236-244) reads the handoff with one workspace read. On a failure whose reason is not not_found it logs a warning and then returns { status: "missing" } anyway. The notifier commits that fact under the finish's durable command id, so the Captain is told a written handoff was omitted, and because the notice is now recorded, the retry path on a later finish or on boot never corrects it.
What should change:
A not_found failure is the only thing that produces "missing".
Any other read failure either fails the notice so it is retried on the next pass (the notifier already retries failed notices on a later finish and at startup), or produces an explicit "handoff unavailable" fact that is worded as such. I prefer the retry: do not record a fact the platform did not measure.
A handoff that becomes readable on the retry is delivered once, with its digest, as the first notice for that finish.
Tests to ship (CrewSeatFinishNotifier.test.ts):
typed not_found produces "missing"
a transient read error sends no notice and leaves no receipt for that finish
the next finish or the boot reconcile after recovery delivers the written handoff exactly once
an unchanged written handoff still deduplicates
Done when "missing" in a Captain's seat notice always means the file was checked and was not there.
Related criteria: crews.md AC13.
Blocks (soft) #229. The seat-finish paragraph in agent-tools.md is rewritten there, and it should describe the handoff fact vocabulary this issue settles on (retry versus an explicit unavailable fact).
Activity