Repository navigation
fix(sessions): show storage failure copy in run-failure notices - #170048
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 maintainer review before merge. What this changesThis PR applies existing storage-failure guidance to transcript notices and bounded session-row errors. Example: A failed run records “database is locked”.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this PR fixes a current-main presentation gap, and no actionable introduced defect was found. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherGateway lifecycle and subagent completion owners supply terminal errors to the session formatter, which produces transcript notices and session-row summaries for clients. flowchart TD
A[Gateway lifecycle] --> C[Session failure formatter]
B[Subagent completion] --> C
C --> D[Storage classifier and copy owner]
D --> E[Transcript notice]
D --> F[Session row summary]
E --> G[Control UI]
F --> G
Technical reviewBest possible solution: Use the existing classifier and copy owner consistently, retaining complete plain guidance for bounded session rows. Do we have a high-confidence way to reproduce the issue? Current-main source deterministically presents “database is locked” as raw session text and a generic transcript notice; the reported failing baselines support that path, and no target code was executed during review. Is this the best way to solve the issue? Reusing the existing classifier and fixed copy is a focused repair that preserves ordinary errors, state-contention precedence, diagnostics, and write authority. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against f52050642ad6. Provenance checked
TestingProof path: unit tests only. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +16, Tests +89. Total +105 across 3 files. Added test files: 1. View PR surface stats
LabelsLabel changes: No label changes. Label justifications:
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 HistoryReviewed October 12, 2026, 2:30 PM ET / 18:30 UTC (Revision 3). |
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
…claw#170048) * fix(sessions): show storage failure copy in run-failure notices * fix(sessions): keep session-row storage errors within the row limit * test(sessions): explain run-failure notice store isolation
…claw#170048) * fix(sessions): show storage failure copy in run-failure notices * fix(sessions): keep session-row storage errors within the row limit * test(sessions): explain run-failure notice store isolation (cherry picked from commit 80347a9) Co-authored-by: RomneyDa <[email protected]>
What Problem This Solves
Runs that fail before replying can expose raw Gateway storage diagnostics. Using the full transcript-notice copy in the 160-character session-row field also cuts off useful recovery guidance.
User Impact
Recognized storage failures show the existing friendly guidance. Transcript notices retain their warning prefix and log hint; session-list errors show the complete plain summary without those additions. Ordinary errors retain their existing presentation.
Why This Change Was Made
recordGatewaySessionRunFailureclassifies the supplied error before text flattening and reusesrenderAssistantRequestFailureCopy.resolveSessionRunErrorusesrenderStorageFailureSummaryfrom the same copy owner so the full recovery guidance fits its existing 160-character limit. The summary adds no warning prefix or log hint.details.errorkeeps its existing diagnostic; the public transcript projection strips that field.The current callers pass terminal error strings, handled by the existing classifier's exact known-message fallback. No worker contract, classifier, or production copy strings were added. The separate subagent writer-claim matcher controls retry policy, not presentation.
Evidence
pnpm test src/sessions/session-run-error.test.ts --maxWorkers=1: 8 passed, 157.08 seconds wall time. Row cases assert exact equality with the complete plain copy; transcript-notice cases retain the full copy.pnpm test src/agents/failover/assistant-request-failure-copy.test.ts --maxWorkers=1: 20 passed, 109.93 seconds wall time.git diff --checkpassed.