Skip to content

fix: hold queued follow-ups until a failed task is resolved - #2108

Merged
Douglasymlai merged 6 commits into
mainfrom
fix/queued-follow-up-after-failure
Oct 27, 2026
Merged

Douglasymlai merged 6 commits into
mainfrom
fix/queued-follow-up-after-failure

Conversation

@Douglasymlai

@Douglasymlai Douglasymlai commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Pull Request

Related Issue

N/A — maintainer-directed repair; no linked issue required for this PR.

Description

Problem

A queued follow-up could be dispatched while a failed task was still closing. Refusals produced repeated chat bubbles and selected an unstarted task, hiding later approval cards.

Change

Wait for run-status reconciliation and a settled previous task before draining the queue. Treat typed Session-busy responses as a quiet wait: retries back off from 1s, doubling up to 30s, and after the fourth refusal the queued message shows the existing "Message queued" notice once instead of an error on every retry. A failed run-status check keeps the last reconciled state and is retried a few times with backoff, so a brief backend hiccup no longer holds the queue. Queued cold starts publish their message and active selection only after acceptance; messages use the durable request ID and deduplicate by ID. Keep composer files until admission and map both cold-consumer and warm-lease conflicts to typed 409 responses.

Testing Evidence (REQUIRED)

  • 405 frontend tests passed (ChatBox 127, interrupted-run status 23, chatStore 255); the wider ChatBox, service and background-task suites also passed.
  • 115 backend controller tests passed, 1 skipped.
  • Regressions cover deferred reconciliation, unresolved interruption, a failed status check that keeps the last settled state and retries with backoff, quiet busy retry followed by one admission, growing retry delays with a single notice, no bubble/selection change after refusal, one bubble after success/reconnect, and cold/warm typed 409s. Removing the reconciliation gate or reverting to a fixed retry interval makes the new ChatBox tests fail.
  • Type checking, focused ESLint/Prettier, repository Ruff, design-token checks, locale checks and git diff --check passed.
  • Existing primitives and styles retained; no new tokens or exceptions. A full packaged-app provider-outage/Resume/approval scenario was not run.

#2088 and #2092 are merged; this branch is up to date with main.

Automated checks only; manual app testing is pending.

  • I have included human-verified testing evidence in this PR.
  • This PR includes frontend/UI changes, and I attached screenshot(s) or screen recording(s).
  • No frontend/UI changes in this PR.

What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Contribution Guidelines Acknowledgement

@Douglasymlai
Douglasymlai marked this pull request as ready for review October 25, 2026 17:26
@Douglasymlai Douglasymlai self-assigned this Oct 25, 2026
@Douglasymlai
Douglasymlai force-pushed the fix/queued-follow-up-after-failure branch from 1b6e109 to 76506d3 Compare October 26, 2026 22:55
@Douglasymlai
Douglasymlai merged commit 57dab5d into main Oct 27, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant