Skip to content

fix(triage): require working Gateway RPC before claiming recovery - #167080

Merged
RomneyDa merged 2 commits into
mainfrom
openclaw/repair-22-status-verification
Oct 10, 2026
Merged

RomneyDa merged 2 commits into
mainfrom
openclaw/repair-22-status-verification

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Fixes: repair agents can treat a completed diagnostic status command as proof of recovery even when Gateway connectivity or RPC failed.

User Impact

Repair guidance now requires openclaw health --json and openclaw gateway status --deep --require-rpc, followed by checking relevant failures, the expected running version, and the original symptom. Existing status defaults, JSON behavior, and intentionally stopped Gateways are unchanged.

Why This Change Was Made

The existing --require-rpc flag already supplies the necessary read-scope RPC acceptance check. This updates the remaining triage recommendation and its documentation rather than adding a flag or changing status semantics. Default exit 0 means diagnostics completed; even a successful required RPC check does not certify plugin or channel readiness.

Evidence

  • pnpm check:changed --base 39f956c4778cca437c3cccc301efbce56e768500 passed in 560.0 seconds, including core production types, all 27 core-test type graphs, all three dead-export scans, selected guards, formatting, and lint.
  • 105 existing tests passed across triage prompt, daemon status, command registration, RPC probe, and status recovery hints in 35.0 seconds. Coverage includes bounded prompt preservation, deliberate stops, required RPC errors, contradictory --no-probe, JSON failures, and diagnostic errors.
  • The existing bounded-prompt assertion now requires the full acceptance command; no additional test cases or runtime branches were added. Its 14-test file completed in 0.983 seconds within the local focused run. Incremental CI time was not measured; the existing test still runs in CI.
  • Both changed docs passed MDX checks; the link audit checked 14,877 internal links with zero broken links. git diff --check passed.
  • Independent P0–P2 review found no actionable findings. Existing real-process status proofs were inspected, not rerun; status runtime logic is untouched, so no full build or production Gateway test was needed.

Hosted review and compatibility

  • Exact-head CI run passed on 04b941b06421a4ff4c2f9b49b42b5f722fe6e105 (attempt 1).
  • ClawSweeper review found no actionable code findings and rated patch quality diamond. Overall/proof is gold because there is no fresh end-to-end triage-agent run; that limitation is retained, not claimed as tested.
  • The review's data-model compatibility checkbox is not applicable: the entire production diff replaces two prompt strings. There are no schema, migration, backfill, persisted-data format, database writer, lifecycle, or status implementation changes. The other changes are two documentation paragraphs and one existing prompt assertion. No migration or upgrade compatibility behavior was introduced; the existing status exit defaults, RPC scope, and intentional-stop rules remain unchanged.

Worked on by

Work sessions


View the OpenClaw team session

roboclaw-bot and others added 2 commits October 8, 2026 08:40
Use the existing --require-rpc acceptance check in repair guidance while preserving diagnostic status defaults and plugin/channel readiness semantics.

Co-authored-by: RomneyDa <[email protected]>
Worked on by:
- @RomneyDa

Co-authored-by: RomneyDa <[email protected]>
OpenClaw-Publication: 8834c186-08ac-43c1-8ccc-c09e9caeed4a
@clawsweeper

clawsweeper Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@roboclaw-bot
roboclaw-bot marked this pull request as ready for review October 8, 2026 09:10
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation commands Command implementations size: XS labels Oct 8, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 8, 2026
@clawsweeper

clawsweeper Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

The PR updates repair guidance and documentation to require the existing Gateway read-scope RPC check before claiming recovery.

Example: A Gateway status diagnostic completes with exit 0 while its RPC check fails.

  • Before: The repair prompt recommends diagnostic status commands without explicitly requiring successful RPC.
  • After: The prompt requires openclaw gateway status --deep --require-rpc, inspection of relevant failures, and verification of the original symptom.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A useful, correct prompt correction with focused validation and limited direct runtime evidence.
Proof confidence 🦐 gold shrimp (3/6) The collaborator bot PR is outside the external-contributor proof gate; the body supplies focused validation and explicitly acknowledges that no fresh end-to-end repair-agent run exercised the changed prompt.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: A repair agent can mistake completed diagnostics for evidence that Gateway RPC recovered.
Reason: The collaborator-authored change strengthens established recovery verification using an existing capability without adding product surface.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it makes a useful, narrow correction that current main still lacks, and its collaborator author also prevents automatic closure. No actionable code findings remain; the previous migration-proof request does not apply.

Priority: P2
Reviewed head: 04b941b06421a4ff4c2f9b49b42b5f722fe6e105

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: No fresh shipped triage-agent run demonstrates the changed guidance rejecting failed RPC and requiring symptom verification.
Agent review details

How this fits together

The triage prompt renderer combines failure context and sanitized diagnostics into instructions consumed by local repair agents; Gateway status owns the existing RPC acceptance check.

flowchart TD
Failure[Update or startup failure] --> Triage[Triage coordinator]
Triage --> Prompt[Bounded repair prompt]
Prompt --> Agent[Local repair agent]
Agent --> Health[Health diagnostics]
Agent --> Status[Gateway status with required RPC]
Health --> Report[Recovery evidence report]
Status --> Report
Loading

Technical review

Best possible solution:

Use the existing required-RPC acceptance check in repair guidance while retaining symptom verification and intentional-stop handling.

Do we have a high-confidence way to reproduce the issue?

Source confirms that current main recommends status diagnostics whose successful completion does not require working RPC; no repair-agent failure was reproduced during this read-only review.

Is this the best way to solve the issue?

This is a focused correction at the prompt owner that reuses an existing flag and preserves the broader recovery evidence requirements.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against b19bfee65b2a.

Provenance checked

  • Recovery completion goal and triage documentation keeps the original intent (e07af71: Installation-owned recovery must verify the intended installation, expected running version, and original symptom while preserving intentional stops.)
  • Gateway status documentation keeps the original intent (03582f5: The documentation split preserved existing status semantics; this patch clarifies those semantics without changing them.)

Testing

Proof path: unit tests only.

Security

None.

Evidence

What I checked:

  • Verified introduced change: The introduced patch changes two production prompt strings, matching documentation, and one existing bounded-prompt assertion; it changes no status implementation, persisted format, schema, or migration. (src/commands/triage-prompt.ts:146, 04b941b06421)
  • Current main still needs the correction: Fetched main still recommends status --all or gateway status --deep without requiring RPC in the completion goal. (src/commands/triage-prompt.ts:146, b19bfee65b2a)
  • Existing acceptance owner: Gateway status exits nonzero when required RPC fails; its probe performs the existing status RPC using read-only shared-state access. (src/cli/daemon-cli/status.ts:46, 04b941b06421)
  • Preserved recovery intent: History and the merged recovery implementation at feat(triage): start installation-owned recovery after update and startup failures #135868 establish installation-specific verification, preservation of intentional stops, and evidence-based recovery reporting; this patch strengthens that intent. (src/commands/triage-prompt.ts:143, e07af7166c16)
  • Discussion resolves compatibility concern: The collaborator's discussion explicitly acknowledges the absent fresh repair-agent run and correctly explains why migration proof is inapplicable; inspection independently confirms that assessment. (04b941b06421)
  • Exact-head checks: Paginated checks contain successful validation, skipped jobs, one neutral result, and canceled automation executions; no failed code check was returned. (04b941b06421)

Likely related people:

  • Jason (Json): Raw commit 136ce55 adds src/commands/triage-prompt.ts:143 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 136ce55f2904; files: src/commands/triage-prompt.ts)

PR surface

Source 0, Tests 0, Docs +1. Total +1 across 4 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 2 2 0
Tests 1 1 1 0
Docs 2 3 2 +1
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 6 5 +1

Labels

Label changes:

No label changes.

Label justifications:

  • P2: Improves recovery-report reliability through a focused prompt correction without changing runtime defaults or service behavior.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • For stronger confidence, provide redacted output from a real triage-agent run showing failed required RPC prevents a recovery claim.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only; repair and merge need explicit maintainer commands such as @clawsweeper autofix or @clawsweeper automerge.

History

Review history (2 earlier review cycles)
  • reviewed 2026-10-08T09:16:37.324Z sha 04b941b :: blocked before merge. :: none
  • reviewed 2026-10-08T09:28:42.919Z sha 04b941b :: blocked before merge. :: none

Reviewed October 10, 2026, 2:58 AM ET / 06:58 UTC (Revision 3).

@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

The PR body now records the completed exact-head CI run and the review disposition. The data-model compatibility checkbox is not applicable: the complete production diff changes two prompt strings, with no schema, migration/backfill, persisted-data format, database writer, lifecycle, or status implementation changes. The review itself identifies no actionable findings and confirms the existing acceptance owner is reused. No migration proof can demonstrate a migration this patch does not introduce.

The missing fresh end-to-end triage-agent run remains an explicit proof limitation; the supplied focused tests and source-bound checks are not being relabeled as end-to-end proof. No source change or additional test case was needed, and the passing CI at 04b941b06421a4ff4c2f9b49b42b5f722fe6e105 is unchanged. This is ready for maintainer review, not a merge request.

@RomneyDa
RomneyDa merged commit 5816754 into main Oct 10, 2026
227 of 232 checks passed
@RomneyDa
RomneyDa deleted the openclaw/repair-22-status-verification branch October 10, 2026 21:16
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 11, 2026
…enclaw#167080)

* fix(triage): require working RPC for repair verification

Use the existing --require-rpc acceptance check in repair guidance while preserving diagnostic status defaults and plugin/channel readiness semantics.

Co-authored-by: RomneyDa <[email protected]>

* fix(triage): require working Gateway RPC before claiming recovery

Worked on by:
- @RomneyDa

Co-authored-by: RomneyDa <[email protected]>
OpenClaw-Publication: 8834c186-08ac-43c1-8ccc-c09e9caeed4a

---------

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands Command implementations docs Improvements or additions to documentation P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants