Repository navigation
fix(chat): let Send now recover a queue after a failed send - #5065
Conversation
Explicitly promoting a queued message could silently do nothing once an earlier send in the same conversation had definitely failed. The drain slot stayed halted on the failed message id, and Send now could only reclaim it for that exact id, so pushing any other queued message, or promoting after the failed row was removed or after a failed composer send, was rejected without feedback. Explicit promotion now claims the slot atomically after a definite failure, without exposing a ready state that the idle drainer could take first. Automatic draining, needs-input halts, uncertain admissions, and in-flight sends keep their duplicate-send protection.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
3 Skipped Deployments
|
Warden review summary — ClearNative findings: 0. Blocking policy matches before consolidation: 0. Full finding text remains in Warden's native checks and review threads. This comment retains only native IDs, severity, skill attribution, and safe locations. Analysis run Reported trigger coverage (not proof of complete repository or context coverage): diff-security-review (25273 ms), confidentiality-review (12776 ms), desktop-den-sync-review (28634 ms), design-spec-review (18019 ms). Blockers
Advisories
Needs recheck
Observed review-thread metrics
Thread states are read-only collection snapshots. These metrics are neither lifetime totals nor exact resolution times, and this summary is not clearance authority. |
There was a problem hiding this comment.
Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (ed7bcd727ecec9ff33612f6c8a831ed0b1d73774). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run
|
Passed · 12/12 tests · 18/18 assertions · 8 images Commit |
…ilure The admission-aware drain machine halted the whole send slot once any item had a definite failure (terminal_failure / blocked), so pressing the up-arrow "Send now" on any OTHER queued item silently no-oped. This mirrors the upstream different-ai#5065 fix: an explicit steer may claim the slot after a terminal_failure halt (any item), while a needs_input halt and unknown admissions still guard against duplicate sends. Update the wedge test to the new contract.
Problem
While the agent is working, you can push a queued message with Send now to steer the conversation. Once an earlier send in that conversation had definitely failed, pressing Send now on any other queued message silently did nothing: the arrow looked enabled, but nothing was sent.
The queue's shared send slot stayed halted on the failed message's id, and explicit promotion could only reclaim that exact id. Removing the failed row did not release the slot, and a failed composer send left a halt that no queued row could ever match. The result felt like steering was randomly blocked.
Change
Explicit promotion (Send now) can now claim the send slot after a definite failure regardless of which message failed. The claim is atomic: the state machine moves straight from the halted state to sending, without exposing a ready slot that the background idle drainer could take first (which would have sent the wrong item).
What stays the same:
admission_unknown) and in-flight sends still refuse every other send, so a message can never be sent twice.Testing
Ran on the exact rebased head from
apps/appwith the pinned workspace tooling:bun test --isolate tests/queued-drain-admission-wedge.test.ts tests/queued-draft-persistence.test.ts— 20 passed, 0 failed.pnpm --filter @openwork/app typecheck— passed.git diff --check— passed.New assertions cover: failed queued message removed, then another queued message promoted; failed composer send, then a queued message promoted; promotion claims atomically with no intermediate ready state visible to subscribers; a different promotion still cannot bypass a needs-input halt; uncertain and in-flight holds remain refused.
Not covered: no end-to-end run of the desktop app was performed for this change. The behavior lives entirely in the drain state machine reducer, which the unit tests exercise directly; runtime validation of the surrounding Send now flow is left to the existing queued-message journeys in CI.