agent-orchestrator/packages
Dhruv Sharma f0d4faf2a4
fix: fail ao send when killed session delivery is not confirmed (#1236)
* fix: fail send when killed session delivery is not confirmed

* fix(core): drop requireConfirmation throw that re-introduced duplicate-message bug

The PR's sendWithConfirmation added a throw when confirmation heuristics
did not flip within SEND_CONFIRMATION_ATTEMPTS on a restored session.
But runtimePlugin.sendMessage had already fired, so the throw bubbled up
to the lifecycle manager's catch-all, leaving lastCIFailureDispatchHash
(and its merge-conflict twin) unset. Next poll re-dispatched the same
message — exactly the duplicate-message bug that commit 77685a5 removed.

Real fix for #1074 is preserved: restoreForDelivery still throws when
waitForRestoredSession returns false, which happens before sendMessage
fires. Killed sessions that cannot be revived are still reported as
failures, with no duplicate-send risk.

- sendWithConfirmation no longer takes requireConfirmation; unconfirmed
  delivery always returns (soft success).
- prepareSession returns Session (the tuple only existed to drive the
  removed throw).
- send's retry predicate reverts to prepared.restoredAt === undefined
  && isRestorable(prepared).
- Adds regression test: restored session + sendMessage fires +
  confirmation never flips → send() resolves.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-20 13:56:31 +05:30
..
ao chore: bump all package versions to 0.2.5 (#1190) 2026-04-13 05:47:08 +05:30
cli fix: fail ao send when killed session delivery is not confirmed (#1236) 2026-04-20 13:56:31 +05:30
core fix: fail ao send when killed session delivery is not confirmed (#1236) 2026-04-20 13:56:31 +05:30
integration-tests fix: model missing activity evidence explicitly (#122) 2026-04-17 19:28:56 +05:30
plugins test: align codex gh wrapper assertion with dynamic PR parsing 2026-04-18 18:02:31 +05:30
web feat(core): auto-terminate sessions on PR merge (#1309) (#1311) 2026-04-20 12:56:07 +05:30