Repository navigation
fix: keep warnings out of terminal failure notices - #187883
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 changesThe PR preserves bounded terminal error diagnostics while showing classified guidance or a concise neutral failure notice. Example: A terminal error contains 50 repetitions of "warning: " before "fatal: startup owner unavailable".
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR fixes a current diagnostic-loss bug through the existing owners, and no actionable findings remain. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherGateway lifecycle and dispatch failures enter the shared session recorder, which writes a private diagnostic and a display-only transcript notice consumed by history readers. flowchart TD
A[Terminal run failure] --> B[Shared session recorder]
B --> C[Sanitize and redact diagnostic]
C --> D[Bounded private diagnostic]
C --> E[Existing failure copy owner]
D --> F[Transcript storage]
E --> F
F --> G[History display projection]
Technical reviewBest possible solution: Land the shared recorder repair with diagnostic bounds, specialized guidance, and existing privacy and lifecycle contracts preserved. Do we have a high-confidence way to reproduce the issue? Current main deterministically drops the supplied terminal cause through prefix-only diagnostic truncation; the linked report and PR supply production-path red/green results, while this read-only review verified the source path. Is this the best way to solve the issue? The change repairs the information loss at its producer, reuses the existing truncation and copy owners, preserves session-row presentation, and avoids adding state, configuration, or a competing formatter. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against cffc912d42dd. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +36, Tests +102, Other +2. Total +140 across 12 files. Added test files: 1. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel 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 HistoryReview history (2 earlier review cycles)
Reviewed October 29, 2026, 8:35 PM ET / October 30, 2026, 00:35 UTC (Revision 3). |
|
Preserved the runtime's existing missing-answer notice and side-effect warning, and updated the subagent checks for bounded opening-and-terminal diagnostics. Unknown failures keep neutral copy because their input does not establish a safe next action. The before/after presentation and reload evidence is now in the PR body. @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Added the real Gateway failure-to-reload proof requested by the review. An actual guest request hit an owned sandbox setup failure, produced one canonical failure receipt, and still showed one neutral notice after native reload. The private diagnostic remained retained and excluded from guest history. The PR body now includes inspected before/after captures and the cued recording, with the combined runtime identity and byte-for-byte qualification of all 12 PR paths. This short-input live case complements the existing long-prefix production-path regressions. @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Fixed: terminal failure notices now stay concise while retaining redacted diagnostic causes. |
Keep redacted terminal causes in bounded run diagnostics while showing concise failure notices and preserving known recovery guidance. Refs openclaw#187862.
) #187883 removed the raw-error fallback from terminal failure notices, which also dropped canonical provider refusal and precaution guidance: users saw a bare "Your request couldn't be completed." instead of the refusal category and next step. The session run-failure owner now recognizes the canonical refusal/precaution copy and keeps it, while warning diagnostics stay out of terminal notices. CI: only Control UI e2e shards failed; the changed modules are not imported by the UI and the UI e2e suites run against a mocked Gateway.
…claw#188462) openclaw#187883 removed the raw-error fallback from terminal failure notices, which also dropped canonical provider refusal and precaution guidance: users saw a bare "Your request couldn't be completed." instead of the refusal category and next step. The session run-failure owner now recognizes the canonical refusal/precaution copy and keeps it, while warning diagnostics stay out of terminal notices. CI: only Control UI e2e shards failed; the changed modules are not imported by the UI and the UI e2e suites run against a mocked Gateway.
Closes #187862
What Problem This Solves
A terminal run error can reach the session recorder with its actionable cause intact, yet leave only warnings in the stored diagnostic. The recorder kept the first 512 characters, and its diagnostic preparation also used a display formatter that can replace errors with friendly copy or retain only a 600-character prefix. Those losses prevent technical consumers from seeing the original cause. Normal notices had the opposite problem: generic failures could expose raw warning or provider diagnostic text.
User Impact
Normal chat history now uses existing classified guidance or a concise neutral notice. The private diagnostic retains redacted opening and terminal context within its existing 512-character budget. Storage, uncertain-completion and established missing-answer guidance are preserved, and unknown failures make no claim about recovery or retry safety.
This changes presentation and diagnostic selection, not execution or retries. It preserves the session row's existing 160-character presentation policy, hides private diagnostics from normal history, and excludes terminal notices from model context. Errors already missing a cause cannot recover it through this change.
Why This Change Was Made
Technical diagnostics now use canonical error coercion, internal-text stripping and secret redaction before the existing UTF-16-safe head-and-tail truncation. This preserves actual
Error.messagevalues and avoids the display formatter's earlier information loss. The normal notice separately uses the existing failure-copy owner. A narrow internal rendering argument lets this caller omit generic raw provider-format excerpts while preserving specialized guidance and existing callers' detailed defaults.Regression coverage exercises lifecycle persistence, real database workers, WebSocket history and display projection. The existing lifecycle setup moves into a test-support file to keep the test file within the enforced line limit; all cases retain their original registered database-worker runtime. The allocation accounts for the resulting 102 net test lines, including support code; no coverage is removed. No schema, configuration or migration is required.
Evidence
On unchanged production, the lifecycle reproduction had four failing regression assertions and 32 passing controls. Its stderr is 482 characters and its wrapped message is 535, so the incoming cause survives the upstream preview and is lost at this recorder. A separate real WebSocket dispatch path reproduced two failures when an
Errorcarried a longer warning prefix. A generic HTTP 400 lifecycle case also reproduced raw provider detail in the projected notice while its private cause survived.Changed-file formatting and lint, refreshed type discovery, and the affected compiler checks passed. The candidate has 277 qualified passing cases across 20 files: the latest recorder correction passed 79 cases in seven files, and 198 cases across 13 unchanged copy-renderer consumers retain their earlier passes. The earlier full set of seven selected type groups is supplemented by recompilation of the production and test graphs affected by the final import and fixture extraction.
The missing-answer regression also failed through terminal resolution and SQLite persistence before the correction. The existing owner’s exact matcher now preserves both established notices, including the side-effect warning; the same real lifecycle case and both recorder variants pass. Automated source review found no actionable P0–P2 issues.
Independent engineering review is complete with no actionable findings. An additional 29 history-visibility cases passed, and the requested four-file classifier/context check passed 51 cases on the published head. Hosted checks pass. Both synthetic-history browser cases pass, including one notice after reload.
The live isolated Gateway scenario also passed: an actual guest request encountered an intentionally failing sandbox setup command, reached the production recorder, and remained visible after a native browser reload. Before the fix, the notice included the harmless setup marker (61 characters); afterward it contained only the 35-character neutral copy. The canonical receipt retained the 25-character private diagnostic, display and model-context-exclusion flags remained set, and guest history contained exactly one notice without private error details. The private-field exclusion already worked before this change and is preserved.
The live consumer was c2de59dce82bc79bac10771a968446e7e152e657, containing the complete patch plus separately qualified runtime changes; all 12 changed PR paths matched eeea442 byte-for-byte. This short-input case proves the real request-to-recorder-to-reload lifecycle. Long-prefix preservation is covered separately by the production-path red/green regressions above. Neither establishes the historical cause of a live provider startup failure.
Visual evidence
Real guest request, terminal failure and cued reload
after-proof.mp4
Visual verification
c2de59dce82bc79bac10771a968446e7e152e657Complementary synthetic-history comparison
This comparison uses actual baseline and fixed recorder payloads with the same UI bundle, including the warning-prefixed input. It supplements the live setup-failure proof above.
Fixed notice persists after the cued conversation reload
after.webm
Visual verification
eeea442f50fc6024e4ba5ddac29ca450f16c8bb2