Repository navigation
fix(ui): avoid false delivery warnings after stale history - #125426
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 17, 2026, 8:11 PM ET / August 18, 2026, 00:11 UTC. ClawSweeper reviewWhat this changesThe PR keeps an acknowledged WebChat send pending during briefly stale Gateway history, avoiding a false delivery-uncertain warning while preserving the existing eventual warning. Regression provenancePossible regression — probable (reproduction; reviewed change). No predecessor PR is attributed. Merge readinessNo blocking findings on the current head. The prior grace-state cleanup concern is addressed; this maintainer-owned PR remains open for the bounded delivery-warning tradeoff and exact-head CI/merge decision. Priority: P1 Review scores
Verification
How this fits togetherWebChat stores outgoing messages in a durable outbox while showing a live sending projection in each pane. The outbox drain reconciles those views with Gateway history to either retire the message or surface an uncertainty warning. flowchart LR
A[WebChat send] --> B[Durable outbox row]
A --> C[Live pane projection]
B --> D[Outbox reconciliation]
C --> D
E[Gateway history] --> D
D --> F[Retire confirmed message]
D --> G[Bounded uncertain warning]
Decision needed
Why: This is a user-visible delivery-state tradeoff on a protected maintainer PR; source and tests establish the mechanics, but the warning-timing policy belongs to maintainers. Before merge
Agent review detailsSecurityNone. PR surfaceSource +71, Tests +117. Total +188 across 3 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the bounded grace state in the shared outbox owner, clear it whenever the live row retires, and merge after exact-head CI if maintainers accept the five-second warning delay. Do we have a high-confidence way to reproduce the issue? Yes—current main's attempted-send path reaches unconfirmed after two idle history reads without checking the same-version live sending projection; the supplied regression exercises that ordering. Is this the best way to solve the issue? Yes—the shared outbox owner is the narrowest correct place for a cross-pane deadline, rather than adding a pane-local exception or weakening the durable recovery state. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 3cc55589e379. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (2 earlier review cycles) |
Live OCM verificationVerified PR head
Final head |
013f60f to
45d1541
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
45d1541 to
7f75fe5
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |

Closes #125425
What Problem This Solves
Fixes an issue where WebChat users could see a
Delivery uncertainwarning after a message was acknowledged and delivered when terminal reconciliation read temporarily stale history on a stable Gateway connection.Why This Change Was Made
Reconciliation now checks every pane sharing the outbox for the same delivery attempt's live
sendingprojection before classifying the durablewaiting-reconnectcopy as uncertain. It keeps that attempt pending and uses the existing bounded history retry; restored or disconnected attempts still follow the existing manual-review path.User Impact
Acknowledged messages no longer show a false reconnect warning while transcript history catches up. WebChat retains the durable row until exact idempotency history proves delivery, so crash recovery and duplicate-send protection remain intact.
Evidence
status: "started"in 60 ms, the WebChat connection identity remained unchanged, and laterchat.historycontained the exact idempotency key, while the UI still showed the warning.origin/mainbecause the live row changed fromsendingtounconfirmedafter two stale idle history reads.pnpm --dir ui exec vitest run --config vitest.config.ts src/pages/chat/chat-send.test.ts(299 passed)pnpm check:changed(passed).agents/skills/autoreview/scripts/autoreview --mode uncommitted --base origin/main --stream-engine-output(TruffleHog clean; no accepted/actionable findings; correctness 0.98)Before screenshot:
An after screenshot is not deterministic in an isolated Gateway because the defect requires the transient transcript-persistence timing window from the affected live session. The regression test drives that ordering directly and verifies that the warning remains absent through later exact history proof.
AI-assisted: yes. The author reviewed the code path and validation results. Session transcripts are omitted because they contain private environment and conversation metadata.