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
The provider-failure Inbox notice reuses only its own alert exchange #225
When a seat's run dies on a sign-in or permission failure, the platform raises a notice in my Inbox with replies routed to the Captain. The notice attaches itself to the wrong conversation.
Where it breaks: apps/server/src/j5/a2a/crewFailureAlert.ts:53-56 selects any open exchange from the Captain to the local person in the Squadron and appends the platform text to it as a follow-up. If the Captain has its own unrelated ask open to me, that ask silently gains a "Platform notice" paragraph, and when I answer the original question the alert closes with it. The module has no direct test; it is covered only indirectly through HumanInboxService.test.ts.
What should change:
Scope the reuse lookup to exchanges the alert itself opened (the id already carries the j5-crew-human-alert prefix), or key one alert exchange per Crew. My preference is one alert exchange per Crew, so several dead seats in one Crew fold into one Inbox item the same way seat notices fold into one Captain turn. If that turns out to read badly in the Inbox, say so on this issue.
Never append to an exchange the alert did not open.
Ship crewFailureAlert.test.ts as the module's first direct test.
Tests to ship:
an unrelated open Captain-to-person ask is untouched by a seat failure
two failures in one Crew fold into one alert exchange
a replayed run id appends nothing
the reply on the alert routes to the Captain
Done when a Crew failure notice only ever lives in an exchange the alert created, and a Captain's own asks never change text because a seat died.
Related text: crews.md Definition, "Sign-in and permission failures also raise a platform notice in the person's Inbox".
Activity
fix(crews): Crew notices report only what the platform measured (#292)