agent-orchestrator/packages/cli
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
..
__tests__ fix: fail ao send when killed session delivery is not confirmed (#1236) 2026-04-20 13:56:31 +05:30
src fix: fail ao send when killed session delivery is not confirmed (#1236) 2026-04-20 13:56:31 +05:30
templates/rules feat: seamless onboarding with enhanced documentation (#66) 2026-02-16 22:22:13 +05:30
CHANGELOG.md chore: version packages 2026-03-29 09:21:26 +00:00
package.json chore: bump all package versions to 0.2.5 (#1190) 2026-04-13 05:47:08 +05:30
tsconfig.json fix: scope node types to node packages 2026-04-13 18:25:21 +05:30
vitest.config.ts test(cli): load markdown prompt templates 2026-04-13 21:28:27 +05:30