Repository navigation
fix(agents): preserve actionable public failure guidance - #163538
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. |
|
Source review of
The failed head and its CI main parent This patch supplies the missing update-required identity at all three inventory throw sites, preserves the existing typed offline error through coordination classification, and selects fixed public messages. The selected copy does not interpolate node IDs, provider bodies, transport details, or raw error messages; a provider error carrying only the same code does not qualify. The existing public E2E recovery assertions remain intact. I found no actionable source issue for these three flows. This is source attribution and review, not candidate execution proof. I did not run this head's tests or native QA; the pending exact-head QA remains pending. |
|
Codex review: needs maintainer review before merge. Reviewed October 2, 2026, 11:51 AM ET / 15:51 UTC (Revision 7). ClawSweeper reviewWhat this changesThe branch preserves typed local-worker failures, renders fixed recovery guidance, and strengthens coverage that keeps private diagnostics out of public replies. Merge readiness✅ Ready for maintainer review This remains a useful fix: current main lacks the update-required and offline recovery guidance, and current-head boundary QA resolves the earlier proof gap. No actionable patch defect remains. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw’s failure formatter converts agent and worker errors into replies for chat and Gateway clients. Local error producers supply diagnostic facts; the formatter selects public guidance while retaining private details for logs. flowchart TD
A[Worker or node failure] --> B[Typed local error]
C[Provider failure] --> D[Failure classification]
B --> D
D --> E[Public guidance formatter]
E --> F[Chat and Gateway replies]
A --> G[Private diagnostic logs]
C --> G
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +58, Tests +77. Total +135 across 15 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep runtime recovery guidance in the shared public-copy owner, selected from producer facts while private diagnostics remain available in logs. Do we have a high-confidence way to reproduce the issue? Yes, source inspection identifies the missing typed update/offline guidance, and existing Gateway boundary scenarios exercise those failures. This reviewer did not run a current-main reproduction. Is this the best way to solve the issue? Yes. Typed producer facts reuse the existing coordination classifier and public-copy owner, with coverage that rejects provider-code spoofing and preserves diagnostic privacy. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 14fd53f8f69b. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (6 earlier review cycles)
|
6b225e3 to
9b272e3
Compare
|
Current-head boundary QA is complete for The unchanged four-file command ran with Result: 4 files passed, 5 tests passed in 526.40s:
The Telegram assertion proves the exact private provider diagnostic remains in Gateway logs while neither the full detail nor its independent canary appears in public replies. The PR body now records the exact command receipt, timings, LOC, and Repair Doctrine justification. @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
9b272e3 to
e8efa9a
Compare
|
@clawsweeper re-review Current-head boundary QA is complete for
|
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
The actionable guidance added in #163538 imported failover classification from the presentation copy module. That brought provider/plugin runtime ownership into history readers and lifecycle projections, and broke cron suite collection through the same import chain. Classify runtime coordination in the existing failure-reply owner and pass only its code to the leaf renderer. Preserve the no-code short-circuit, classification precedence, public guidance, and provider-code collision checks. Boundary expectations and lifecycle mocks remain unchanged. Validation: history/lifecycle import guards, 934 failover tests, 28 failure copy tests, 28 reply tests, 94 projection tests, and 10 sibling import assertions passed. Core typecheck, focused lint, and autoreview passed. Cron now collects, but its cold standalone diagnostic run still exceeded the existing 120-second case deadline; retain that harness follow-up. Full build and broad changed-check scans were interrupted on the loaded host. Runtime worker builds completed; no source or timeout workarounds. Test cost: OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=1800000 node scripts/run-vitest.mjs src/agents/failover/assistant-request-failure-copy.test.ts --maxWorkers=1 --fsModuleCache=false: 267.75s wall, 28 passed, on the loaded macOS host.
The actionable guidance added in openclaw#163538 imported failover classification from the presentation copy module. That brought provider/plugin runtime ownership into history readers and lifecycle projections, and broke cron suite collection through the same import chain. Classify runtime coordination in the existing failure-reply owner and pass only its code to the leaf renderer. Preserve the no-code short-circuit, classification precedence, public guidance, and provider-code collision checks. Boundary expectations and lifecycle mocks remain unchanged. Validation: history/lifecycle import guards, 934 failover tests, 28 failure copy tests, 28 reply tests, 94 projection tests, and 10 sibling import assertions passed. Core typecheck, focused lint, and autoreview passed. Cron now collects, but its cold standalone diagnostic run still exceeded the existing 120-second case deadline; retain that harness follow-up. Full build and broad changed-check scans were interrupted on the loaded host. Runtime worker builds completed; no source or timeout workarounds. Test cost: OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=1800000 node scripts/run-vitest.mjs src/agents/failover/assistant-request-failure-copy.test.ts --maxWorkers=1 --fsModuleCache=false: 267.75s wall, 28 passed, on the loaded macOS host.
What Problem This Solves
Fixes: disconnected or outdated local runtime workers lose their actionable recovery guidance when private diagnostics are converted to public failure copy.
Related: #162917
User Impact
Users get bounded next steps for a disconnected Codex node, an outdated device worker, or an offline runner, while raw node, provider, and transport diagnostics remain private.
Why This Change Was Made
The public-copy owner only received untyped error facts, so local coordination failures collapsed to generic wording. Stable producer codes now survive through the existing non-provider coordination classifier and select fixed public messages.
Provider provenance is structurally gated: a provider error carrying
runner-offline,node_runner_update_required, orcodex_node_disconnectedstill receives generic provider copy.Current
mainalready owns concise withdrawn-model and Telegram provider-failure copy. This PR aligns the remaining withdrawn-model assertion and adds exact private-log/public-redaction proof for Telegram. It inspects but does not adopt #146659's older verbose semantics.Ownership and scope
src/agents/failover/assistant-request-failure-copy.tsplus the existing runtime-coordination classifier./allow-dependencies-changeis not needed.Exact-Head Evidence
e8efa9a285f92a3d3e8ec0f70e2076fd01f69ab9b7a28c6c75439c9f2dcfbd91fa7b2567a511079d0845ecda906f2465f7cb6422e7cec8c7223f2ce9Focused native tests
node scripts/run-vitest.mjs src/agents/failover/assistant-request-failure-copy.test.ts src/agents/failover/user-copy.test.ts src/agents/failover/failover-classification.corpus.test.ts src/agents/failover-error.test.ts src/auto-reply/reply/agent-runner-failure-reply.test.ts src/infra/node-runner-inventory.test.ts extensions/codex/src/app-server/sandbox-exec-server-node-relay.test.ts src/gateway/server-methods/models-dispatch.catalog.integration.test.tsFour-scenario boundary QA
Executed unchanged with
--maxWorkers=1in a task-owned local container:local-containercbx_dcf6fe939e56(stopped cleanly)run_43a356cf435747ef83d404ed4ae0fcb5sha256:be23f54a88d34e8824c741b19b91064094f92c1c97b194144bfc8b50d67258e2Scenario results:
Telegram privacy proof asserts that the exact provider diagnostic is retained in private Gateway logs while the public reply contains neither the full raw detail nor its independent canary.
Static gates
git diff --check: passed.477 > 476); this diff adds noOPENCLAW_*variable.openclaw/ci-gate.Landing
scripts/prreview validated at the exact head. Squash landed as3c5010ebfacd96e6b4836c9080e58ab42c1ac7ab; retained receipt OIDa7d155685d7665b486664f57e23daf101823fd28.