Repository navigation
Conversation
|
🦞👀 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 real behavior proof before merge. What this changesThis PR catches failed transcript-update publication after a saved append and logs recovery guidance. Example: An assistant message containing “Completed” commits, then transcript publication rejects.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 1 item remains This PR addresses a concrete current-main defect with a focused correction; no introduced correctness or security defect was found. Priority: P2 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherThe session append guard sits between agent message persistence and transcript subscribers; it receives messages, commits them through SessionManager, and publishes derived update notifications. flowchart TD
A[Agent runtime] --> B[Session append guard]
B --> C[SQLite transcript commit]
C --> D[Transcript publisher]
D --> E[Transcript subscribers]
D --> F[Publication failure warning]
Technical reviewBest possible solution: Keep rejection handling at the shared post-commit publication boundary while preserving saved messages, append receipts, and existing authority checks. Do we have a high-confidence way to reproduce the issue? Current-main source establishes the discarded fallible promise and fatal rejection path; the contributor reports failing baseline cases, but this read-only review executed no target code. Is this the best way to solve the issue? The small local catch fits a derived post-commit notification: it avoids reporting a committed append as failed and leaves global error classification and publication authority intact. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 648a3f075861. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +6, Tests +57. Total +63 across 2 files. Added test files: 0. View PR surface stats
LabelsLabel changes: No label 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 Reviewed October 15, 2026, 2:48 PM ET / 18:48 UTC. |
Keep committed append receipts successful when live transcript publication rejects. Record a content-free warning with the session and message IDs and recovery guidance for both append adapters. Fixes #173350. Supersedes #173387. Co-authored-by: D41910 <[email protected]>
…ad of dropping it (#174947) The session tool-result guard's shared append path discarded the post-commit transcript publication promise, so a publication failure became a process-level unhandled rejection and the update was silently dropped. The guard now catches the rejection and records a content-free warning that identifies the saved session and message, while preserving the successful append receipt. Production net -2 LOC. Also repairs the mock-exports ratchet red on main (native update maintenance fixture now spreads the real database-context module; baseline shrunk by one). Supersedes #173387, thanks @D41910. Fixes #173350 Co-authored-by: D41910 <[email protected]>
…ad of dropping it (openclaw#174947) The session tool-result guard's shared append path discarded the post-commit transcript publication promise, so a publication failure became a process-level unhandled rejection and the update was silently dropped. The guard now catches the rejection and records a content-free warning that identifies the saved session and message, while preserving the successful append receipt. Production net -2 LOC. Also repairs the mock-exports ratchet red on main (native update maintenance fixture now spreads the real database-context module; baseline shrunk by one). Supersedes openclaw#173387, thanks @D41910. Fixes openclaw#173350 Co-authored-by: D41910 <[email protected]>
Closes #173350
What Problem This Solves
Fixes a saved session message being followed by an unhandled rejection when its transcript update cannot be published.
User Impact
A failed post-commit notification no longer escapes as an unhandled rejection that can reach process-fatal handling. The append keeps its existing successful receipt, and a content-free warning tells operators to reload the session to refresh the saved transcript. The failed notification is not replayed automatically.
Why This Change Was Made
Both append adapters share the guarded append generator, which discarded the fallible publication promise after persistence. Observe rejection at that boundary without turning a committed append into a failed write, changing the selected session owner, or broadening the global transient-error policy. The warning omits message content and error text.
Evidence
3f1011275f54b104ccf33aa6979cd746ac75a5e0, both new sync/async cases fail because a post-commit publication rejection reachesunhandledRejection. The committed SQLite message is present in both cases.pnpm test src/agents/session-tool-result-guard.transcript-events.test.ts --maxWorkers=1: 20 passed, including the two new failure cases and existing committed-owner, sequence, replay, and callback-rebinding coverage.autoreview, P0–P2: scoped-clean, no accepted/actionable findings.Repository wrappers were launched with Node 26.1.0, pnpm 12.10.1, and Vitest 5.0.3, using an independently installed workspace dependency tree (
pnpm install --frozen-lockfile) and the repository's selected worker runtime. No live model/provider call, full Gateway daemon run, incognito-deletion race, or full workspace suite was executed. The tests prove local rejection containment after committed append; production incident frequency and process termination were not exercised.Additional local validation passed:
pnpm tsgo:core;node scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.core.test.agents-sessions.json --incremental; targeted oxlint for both changed files;pnpm format:check --both changed files; andgit diff --check. Remote CI remains separate from these local checks.AI assistance was used to investigate, implement, test, and review this change.