fix(acpmux): refuse undelivered question answers [ask-6ef2624788]

Merged
TE
4d ago
+102-6

A question or permission answer previously returned success after its asking task had disappeared. Return an explicit agent_gone refusal when the answer channel is closed, retaining the existing answer-fence cleanup. A live receiver still gets its answer once.

Leo-ask: ask-6ef2624788

oh stuff yeah actually we should be able to surface permissions/multiple choice related things inside chief... idk if y'all have researched dot/grokbot but those are def thng to look into

This supports the existing question-answer path. It preserves #22747's no-new-approval-gate behavior and #22941's requirement to refuse unanswerable work promptly. No permission policy, person proof, or Chief implementation changes.

Validation: two focused behavioral tests exercise a dropped receiver with and without an answer fence, successful delivery, and duplicate refusal. Both tests passed at 098f2cb25cf8faef0a21633aca096acf99e42a53 in fleet run 41614232965; compilation and test execution took 143 seconds. Formatting and static prepush checks pass. Exact-head subagent review: SHIP.

Risk: callers now receive a truthful error where they previously received success. Home's question bridge must wrap this as conversation_rejected; the direct phone Feed must not confuse it with its no pending permission already-answered case, so this error has distinct text. The macOS Feed bridge's existing log-only failure handling and the pre-existing settled receipt issue are tracked in #33565, linked to the review receipt; the existing Feed owner retains its implementation.

Prior art: #33020 edits different portions of the same file; this change is limited to reply delivery. No new surface, setting, or action; the existing RPC carries the refusal to every caller.

šŸ¤– Generated with Codex

Agent session: agent session