Repository navigation
fix: keep accepted chat messages queued through retryable failures - #137267
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: blocked before merge. Reviewed September 3, 2026, 5:05 PM ET / 21:05 UTC. ClawSweeper reviewWhat this changesThe PR keeps an accepted Gateway chat turn and its pending input alive while a transcript-projection rebuild briefly prevents dispatch before agent execution starts. Merge readiness⛔ Blocked before merge - 4 items remain Keep open. Current main still converts this typed pre-execution projection condition into a terminal dispatch error; the proposed owner-boundary repair is coherent, but its bounded same-id retry contract needs explicit Gateway-owner acceptance before merge. Priority: P1 Review scores
Verification
How this fits togetherGateway chat.send admits a Control UI message, acknowledges it, then dispatches it to the agent while retaining pending-input custody. This change adds a typed retry decision between transcript projection availability and that dispatch, preserving reconnect/idempotency behavior. flowchart LR
A[Control UI chat send] --> B[Gateway admission and ACK]
B --> C[Pending-input custody]
C --> D[Inbound dispatch]
D --> E{Projection available before execution?}
E -- Rebuilding --> F[Wait for transcript reconciliation]
F --> D
E -- Started or side effects --> G[Reconcile or terminal result]
Decision needed
Why: This deliberately changes observable post-ACK error timing and idempotency recovery for existing Gateway clients; source and tests establish the mechanism, but maintainer product compatibility intent is required. Before merge
Agent review detailsSecurityNone. PR surfaceSource +117, Tests +282. Total +399 across 7 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Accept one canonical Gateway contract: retry only the typed projection-unavailable failure before execution under the original admitted identity, and terminalize or reconcile every ambiguous post-start path. Do we have a high-confidence way to reproduce the issue? Yes. The typed projection owner schedules reconciliation then throws, while current main performs a single dispatch and terminal error projection; the focused Gateway tests encode that deterministic boundary, though this read-only review did not execute them. Is this the best way to solve the issue? Yes technically: the Gateway owns the acknowledged turn, pending-input custody, and terminal projection, while the existing transcript owner remains responsible for reconciliation. Explicit acceptance is still needed for the changed client compatibility contract. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 8b5b1cba1f9d. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (6 earlier review cycles)
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
🦞👀 Re-review progress:
|
…d-retry-custody-v2
…d-retry-custody-v2
|
@clawsweeper re-review Please review exact head |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
🦞👀 Re-review progress:
|
…d-retry-custody-v2
|
@clawsweeper re-review Please review exact head |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
…penclaw#137267) * pebbles: sync * pebbles: sync * chore: initialize pebbles tracking * test: capture accepted-send retry custody regressions * pebbles: sync * test: cover setup retry and reconnect custody * fix: retain accepted chat sends across projection retries * pebbles: sync * fix: reconcile ambiguous accepted-send failures * pebbles: sync * fix: preserve local authority across chat retries
What Problem This Solves
Fixes an issue where an accepted chat message could turn into a terminal red error and later be marked interrupted when a retryable transcript projection rebuild temporarily blocked dispatch before the model started.
Originating session: https://openclaw-fsn1.tailf72dd7.ts.net/chat/main/dashboard/660ed975-cf31-4aee-bb0f-4e7cf9c8edc5
Failure session: https://openclaw-fsn1.tailf72dd7.ts.net/chat/main/review-and-fix-pr-136773-studio-631cb697
Why This Change Was Made
The Gateway now classifies accepted-send failures through a typed custody boundary. Retryable pre-model projection failures remain Gateway-owned and redispatch with the same run/idempotency identity for a bounded three attempts; failures after model start or observable side effects are reconciliation-only and are never blindly redispatched. Pre-ACK projection failures remain client-retryable without projecting a terminal transcript error.
User Impact
Optimistic and queued chat messages stay visible through transient projection rebuilds, reconnects cannot claim the same pending input twice, and accepted input is consumed exactly once. A terminal error appears only after retry exhaustion or a non-retryable failure.
Evidence
libnspr4.so.pnpm check:changed: passed after rebasing onto currentorigin/main.pnpm lint:core: passed with zero warnings/errors.View the OpenClaw team session
Crabbox E2E assessment
Crabbox
0.48.1is now installed at~/.local/bin/crabboxfrom the official Linux amd64 release, with the release asset verified against both GitHub's published digest andchecksums.txt. The repository wrapper now passes its binary/provider metadata probes forrunandactions hydrate.A cloud workload was not started. Read-only provider checks show that
blacksmith-testboxis blocked because the Blacksmith CLI is not installed, while the AWS provider is not ready on this host. Installing Crabbox therefore removes the binary blocker but does not create provider authorization or capacity.A deterministic black-box reproduction would also need to hold one exact session transcript projection in the rebuilding state after admission and before model execution. The public Gateway surface does not expose that state transition. Racing a naturally triggered long-transcript rewrite would be timing-dependent, while direct SQLite mutation would no longer be a real black-box E2E. The focused Gateway coverage therefore injects the typed projection-unavailable boundary deterministically and proves same-run retry, pending-input custody, exact-once model start, bounded exhaustion, and reconciliation-only handling.
Post-sync validation on September 3, 2026:
oxfmt --check: passed.oxlint: passed.git diff --check: passed.