Skip to content

fix(acp): backport the session-reliability fixes to release/0.8.0 - #15635

Merged
bolichen97 merged 2 commits into
release/0.8.0from
backport/0.8.0-session-reliability
Oct 1, 2026
Merged

bolichen97 merged 2 commits into
release/0.8.0from
backport/0.8.0-session-reliability

Conversation

@bolichen97

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: On a 0.8.0.x build, a session survives one unsupported historical image, a self-driving loop stops re-firing kiro-cli's oversized-request refusal, and a timed-out send stays pending instead of offering a Resume that drops the typed text. main already does all three.

Backport of 3 P1 session-reliability fixes, all merged on main:

#13998 was in this batch's plan but is not here: Joe Guo already backported it in #15614 (with #15177 via #15574), which is merged on release/0.8.0.

Why it matters

These are known 0.8.0.x pains (oversized-request loop, empty context after Resume), and insider.3 / 0.8.0.4 are built from this branch.

Not a goal

What changed (motivation → approach → change)

git cherry-pick -x in main's merge order (#14699 → #11717 → #15300) onto the current release/0.8.0, keeping authorship. These are two commits under PR Hygiene's cap: pstarkgit's #11717, then Stan's #14699 + #15300. #14699 is frontend-only, so the regrouped tree is byte-identical to the merge-order tree. Merge commits: e8959f4, dbaee46, eab6ee2.

#14699 and #11717 picked cleanly. #15300 is adapted: acp/transport_errors.py does not exist on release (main's #15153 split it out of acp/client.py). The same functions (_RE_IMAGE_FORMAT_UNSUPPORTED, _is_transient_raw_error, _raise_acp_error) still live in acp/client.py here, with identical context, so #15300's four hunks applied there verbatim (same lines, offset only). The new test in test_recovery_l1_chat_runner.py imports _raise_acp_error from kiro_crew.acp.client instead of kiro_crew.acp.transport_errors, and one doc path in learn-cron-dashboard.md names acp/client.py. The characterization row #15300 adds to test/test_acp_refactor_error_surface.py is dropped, because that table is main-only (also from #15153). The behaviour is covered by #15300's test_acp_error_surface.py and test_recovery_l1_chat_runner.py tests, carried as-is. The same approach as #15575 (#15278).

Backwards compatibility

Same as the source PRs.

Tests

Related Issues

Backport of #11717, #15300 and #14699 to release/0.8.0.

Pattern harvest

Not generalizable here: each source PR carries its own harvest.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

pstarkgit and others added 2 commits October 1, 2026 00:58
Backport of #11717 to release/0.8.0, cherry-picked in main's merge order.

* fix: recover from unsupported image history (#11717)
  (cherry picked from commit dbaee46)

Co-authored-by: Patrick Stark <starkpat@amazon.com>
#14699, #15300)

Backport of #14699, #15300 to release/0.8.0, cherry-picked in main's merge order.

* fix(chat): keep an unconfirmed send pending instead of offering Resume (#14699)
  (cherry picked from commit e8959f4)
* fix: stop the nudge loop on kiro-cli's oversized-request refusal (#15300)
  (cherry picked from commit eab6ee2)
  Backport adaptation for release/0.8.0: acp/transport_errors.py does not exist here
  (it was split out of acp/client.py by #15153, not backported), so its four hunks are
  applied verbatim to the same code in acp/client.py; the test import of
  _raise_acp_error and one doc path follow it there. The characterization row for
  test/test_acp_refactor_error_surface.py is dropped: that table is main-only.
@bolichen97
bolichen97 requested a review from a team as a code owner October 1, 2026 00:59
@bolichen97
bolichen97 requested review from kyleseaman and removed request for a team October 1, 2026 00:59
@bolichen97
bolichen97 merged commit e683fb3 into release/0.8.0 Oct 1, 2026
13 of 17 checks passed
@bolichen97
bolichen97 deleted the backport/0.8.0-session-reliability branch October 1, 2026 00:59
@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Design Review (Fable 5) — ✅ PASS

Design-level review of 9bf86b0caddb605e3944f41dcde59be77bee99f6 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

Spot-check the #15300 adaptation against main — same hunks in acp/client.py, dropped characterization row covered by the carried tests, as claimed.

[DESIGN-REVIEWED] 9bf86b0

@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

UX Review (Fable 5) — 🔴 BLOCK

UX-level review of 9bf86b0caddb605e3944f41dcde59be77bee99f6 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

UX-Verdict: BLOCK

Cannot evaluate: missing screenshots of the pending-send UI — blind read not performed because the PR attaches no image.

Evidence gaps

  • "Delivery pending…" row line (data-testid="send-pending", Clock + pulse in UserMessage.tsx): shown in no screenshot; attach a still of a bubble in this state to the PR description.
  • WARN notice "Delivery not confirmed — this message may still be pending. If no reply arrives, send it again." (delivery_unconfirmed_pending, appended in ChatPage.tsx): no screenshot shows it rendered under the bubble.
  • Footer state with "Thinking…" suppressed while sendUnconfirmed (ChatFooter.tsx): a screenshot of the full chat column in this state would show the bubble line + notice + absent indicator together — one capture can close all three gaps.
  • Blind-read report reads "BLIND READ NOT PERFORMED: the PR description carries no image attachment and this revision commits no image" — author-closable by attaching the stills (the source PR fix(chat): keep an unconfirmed send pending instead of offering Resume #14699's captures, if they show this exact UI, suffice).

[UX-REVIEWED] 9bf86b0

@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

First Principles Review (Fable 5) — ✅ PASS

Premise-level review of 9bf86b0caddb605e3944f41dcde59be77bee99f6 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

First-Principles-Verdict: PASS

Verify the #15300 adaptation: the four hunks relocated into acp/client.py plus the dropped characterization row leave release coverage equal to main's.

What this change ships

Inventory (10 items) — 10 justified

Intent: backport three merged session-reliability fixes (#11717, #15300, #14699) from main to release/0.8.0 — a FIX.

  1. A session with an unsupported image in native history recovers automatically instead of failing every later prompt — justified
  2. A rejection of a just-sent image (attachment or typed path) keeps the conversation and shows remove/re-encode guidance — justified
  3. A Stop landing during the image recovery cancels it with a notice instead of dispatching it — justified
  4. The auto-nudge loop stops on kiro-cli's oversized-request refusal instead of re-firing until max_cycles — justified
  5. The oversized refusal shows kiro-cli's own sentence verbatim, not the raw error dict — justified
  6. New terminal error text for unsupported-image rejections, with request id preserved — justified
  7. A timed-out send shows "Delivery pending…" on its bubble plus a WARN notice, in all locales — justified
  8. Resume is no longer offered for a bubble whose delivery was never confirmed — justified
  9. The footer "Thinking…" indicator hides while the newest send is unconfirmed — justified
  10. request_id extraction now matches "Request ID:" capitalization and spacing — justified

[FIRST-PRINCIPLES-REVIEWED] 9bf86b0

@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — 🔴 changes requested (blocking)

GPT 5.6 found at least one blocking issue that must be resolved before merging 9bf86b0caddb605e3944f41dcde59be77bee99f6. 1 of 1 blocking finding(s) are security-class and were withheld from adjudication, so the blocking verdict stands.

This comment is updated in place on each push.

BLOCKING -- website/src/pages/ChatPage.tsx:3045 -- A timed-out Queue send discards the only copy of the message (origin: validation)
if (!bubbleMinted || !slot) return true
Busy Queue send + response timeout before gateway receipt -> cleared composer + no bubble/draft -> typed text disappears.
Anchor: residual/crash-data-loss-corruption
Fix: Retain a sendId-keyed pending copy and reconcile it with any late queue receipt or echo.
[BLOCK-MERGE] 9bf86b0
[GPT-REVIEWED] 9bf86b0

Adjudication (Opus 5) — is blocking on each finding proportionate?

F1 — HIGH: the typed message is the only copy and its loss is visible-but-unrecoverable (no draft, no bubble, no stash).
Conditions, all ordinary: busy slot with no forceNew makes bubbleMinted false (website/src/pages/ChatPage.tsx:2906, :2910); the POST exceeding SEND_ABORT_MS yields response-late (website/src/chat-core/transport/sendTurn.ts:113, :138); no correlated echo (website/src/pages/ChatPage.tsx:3040); the new arm then returns without restoring (:3045), and the queued stash is never reached because there is no body (:3084).
Recovery path: none in-page — only a server-side queue_push card can bring the text back, and that exists only if the request actually arrived; the sibling surface already restores this exact combination (website/src/components/ChatPane.tsx:1096–:1107), so the real fix is a call to the existing restoreComposerAfterFailedSend, not a new mechanism.

[ADJUDICATION] 9bf86b0caddb605e3944f41dcde59be77bee99f6 total=0 uphold=0 downgrade=0
[GPT-ADJUDICATED] 9bf86b0caddb605e3944f41dcde59be77bee99f6

[ADJUDICATION-FENCED] 9bf86b0caddb605e3944f41dcde59be77bee99f6 fenced=1 flagged=0
UPHOLD-FENCED F1 website/src/pages/ChatPage.tsx:3045 -- The required combination (a follow-up typed while the slot is busy, plus a POST slower than the 10 s deadline) is routine rather than extreme, and the repo's own sibling surface restores the composer for exactly this no-bubble `response-late` case, so no rarity argument supports accepting the residual loss.
[GPT-ADJUDICATED-FENCED] 9bf86b0caddb605e3944f41dcde59be77bee99f6

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 9bf86b0caddb605e3944f41dcde59be77bee99f6: <one-sentence reason>

@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Opus 5 Review — ✅ no blocking findings

Reviewed 9bf86b0caddb605e3944f41dcde59be77bee99f6 — this comment is updated in place on each push.

Review details

No findings.

FINDING — src/kiro_crew/dashboard/chat_runner.py:10550 — the bare return in the if _image_recovery: consume-seam abort leaves _run_chat before the finally whose await _start_next_queued_turn(state, slot) is the only drainer, so the user follow-up that set _has_user_queued_followup(slot) and caused the abort stays in slot._queue as a card that never starts (the drain-gate twin instead falls through and dispatches it) → Fix: await _start_next_queued_turn(state, slot) before that return, as the drain-gate branch does.

[OPUS-REVIEWED] 9bf86b0

Verdict parsed from the review's SHA-scoped output markers for commit 9bf86b0caddb605e3944f41dcde59be77bee99f6.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 9bf86b0caddb605e3944f41dcde59be77bee99f6: <one-sentence reason>

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.

3 participants