Repository navigation
fix(chat): retain replies when transcript publication fails - #174087
Conversation
Co-authored-by: steipete <[email protected]>
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThe PR keeps saved assistant replies visible when transcript publication fails and recalculates terminal display after pending publications settle. Example: The saved row for “Keep this reply visible.” encounters a transcript-reader overload.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR repairs a publication-failure path still present on current main, and the previous finding is addressed; no actionable introduced defect was found. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe Gateway combines agent text and committed transcript updates into streaming chat frames and saved-history notifications for connected clients. flowchart TD
A[Agent text] --> B[Chat run buffer]
C[Committed transcript row] --> D[History publication]
D --> E[Occurrence publication outcome]
E --> B
B --> F[Streaming and terminal projection]
F --> G[Chat clients]
D --> G
Technical reviewBest possible solution: Keep publication success in the existing occurrence owner so failed handoffs retain visible text without duplicating saved rows. Do we have a high-confidence way to reproduce the issue? Current-main source shows failed publication retiring visible text; the supplied regressions exercise that path, but this read-only review ran no target code. Is this the best way to solve the issue? The repair fits the existing publication barrier and occurrence map, preserves successful-row deduplication, and avoids a parallel buffering owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 5e5ad805485b. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +60, Tests +292. Total +352 across 15 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed October 16, 2026, 6:08 PM ET / 22:08 UTC (Revision 2). |
Carry temporary reader failures through the existing publication owner, and flush a recovered repeated receipt without duplicating its live fallback. Preserve intentional non-publication and bounded cleanup. Co-authored-by: steipete <[email protected]>
Integrate main to resolve the extracted marker-queue test conflict and include the independently proven deferred-recovery fixture isolation repair. Preserve the publication-failure fix and one owning copy of reconciliation coverage; derive pending-publication collector types from their handler. Co-authored-by: steipete <[email protected]>
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
…#174087) * fix(chat): retain replies when transcript publication fails Co-authored-by: steipete <[email protected]> * fix(chat): retain handled publication failures and retries Carry temporary reader failures through the existing publication owner, and flush a recovered repeated receipt without duplicating its live fallback. Preserve intentional non-publication and bounded cleanup. Co-authored-by: steipete <[email protected]> --------- Co-authored-by: steipete <[email protected]>
Replay real chat and session.message frames through the existing Control UI consumers. Require a cleared live run, stream and segments, and require the displayed assistant messages to match persisted history exactly. Preserve the saved partial, publication, terminal failure receipt, fallback, request-count and settled-write assertions. The transcript publication barrier can release a terminal in place of a held clearing delta. The previous delta-only fold missed that canonical handoff; in-process local claim release in #178098 exposes this ordering more readily. The publication contract itself predates the window in #174087. Both affected real-Gateway files pass on Node and pinned Bun. Targeted test-graph typecheck, lint and formatting pass, and independent P0-P2 review is clean.
Replay real chat and session.message frames through the existing Control UI consumers. Require a cleared live run, stream and segments, and require the displayed assistant messages to match persisted history exactly. Preserve the saved partial, publication, terminal failure receipt, fallback, request-count and settled-write assertions. The transcript publication barrier can release a terminal in place of a held clearing delta. The previous delta-only fold missed that canonical handoff; in-process local claim release in openclaw#178098 exposes this ordering more readily. The publication contract itself predates the window in openclaw#174087. Both affected real-Gateway files pass on Node and pinned Bun. Targeted test-graph typecheck, lint and formatting pass, and independent P0-P2 review is clean.
What Problem This Solves
Fixes: a collaborator’s visible reply disappears when its saved transcript row cannot be read or published to chat.
User Impact
The reply stays visible through streaming and completion, including later updates to the same saved occurrence. Rows already published successfully do not reappear as duplicates. No configuration, schema, permission, or migration changes.
Why This Change Was Made
Current main already fixes the primary delayed-publication scrollback problem in
1f9022d2af0336ede45b249f259e820e25f0d91b. This repairs the distinct failure path in that owner rather than applying the older parallel buffering implementation.The existing occurrence map now records whether history publication succeeded. Failed handoffs remain displayable without undoing durable commitment. A finishing reply is projected after accepted publications settle, using the same occurrence state; normal cleanup still runs immediately and cannot clear a replacement run. Terminal message formatting moves to the existing wire-projection helper. Handled rebuilding/overload failures carry the same failure outcome, and a repeated receipt that later succeeds retracts the live fallback without waiting for another model event.
Evidence
check:max-lines-ratchetreports three pre-existing, unchanged UI suppressions missing from its baseline (chat-message.test.tsx,config-page-state.ts,sessions-page-state.ts); no suppressions or baseline exceptions were added. Both earlier CI attempts (38884768050 and 38888095087) hit session-reset teardown with competing work. Main subsequently fixed the deferred recovery fixture leak in0fa38d641df; that concrete fix is now integrated, and the complete 74-test chat file passes. The second attempt also exposed a missed native Talk publication collector type; it now derives the handler result, as does the newly extracted marker-queue test collector. The affected Gateway type graphs and the native Talk consumer test pass. No CI rerun, weakened assertion, or baseline change was used. Final-head CI 38973325173 passed on032b9079f2b4856d4ebc560471668938f9775a6c.Before
After
Original report and intended behavior: @steipete in #167402. Reimplemented on current main, not the original patch.
Work sessions