docs(agents): enumerate authoritative delivery-failure statuses in stale comments

agentSessionTypes.ts deliveryFailed doc and LifecycleActivity.tsx
PermissionDecisionButtons doc block still claimed every non-sent
control_result increments the failure token / re-enables buttons.
Update both to name the three authoritative statuses (no_active_turn,
channel_closed, no_channel) and note that channel_full is transient and
does not increment the token, matching the reducer and component comments
fixed in 965980093.

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
This commit is contained in:
Duncan
2026-09-02 15:21:26 -04:00
parent 51486b2638
commit 2e2f4df893
2 changed files with 14 additions and 8 deletions

View File

@@ -71,9 +71,12 @@ function defaultOptionLabel(kind: string): string {
* Renders the agent's exact options as labeled buttons; a click sends the
* `permission_decision` control event (fire-and-forget).
*
* On send failure (relay reject or non-`sent` delivery status), buttons are
* re-enabled so the user can retry. The harness's 300 s fail-closed timeout
* is the backstop for permanently lost frames.
* On authoritative delivery failure (`no_active_turn`, `channel_closed`,
* `no_channel`), buttons are re-enabled so the user can retry. The transient
* `channel_full` status does NOT re-enable buttons — the retransmit
* orchestrator handles that status automatically and keeps resending. The
* harness's 300 s fail-closed timeout is the backstop for permanently lost
* frames.
*/
function PermissionDecisionButtons({
agentPubkey,

View File

@@ -162,11 +162,14 @@ export type TranscriptItem =
*/
options?: Array<{ optionId: string; kind: string; label?: string }>;
/**
* Monotonically increasing token incremented on every `control_result`
* with a non-`sent` delivery status. The `PermissionDecisionButtons`
* component keys its re-enable effect on this value, so a second failure
* after a retry (same boolean value would not re-trigger the effect)
* still re-enables the buttons. `undefined` when no failure has occurred.
* Monotonically increasing token incremented on every authoritative
* `control_result` delivery failure (`no_active_turn`, `channel_closed`,
* `no_channel`). The transient `channel_full` status does NOT increment
* this token — the retransmit orchestrator handles that status
* automatically. The `PermissionDecisionButtons` component keys its
* re-enable effect on this value, so a second failure after a retry
* (same boolean value would not re-trigger the effect) still re-enables
* the buttons. `undefined` when no failure has occurred.
*/
deliveryFailed?: number;
} & TranscriptItemIdentity)