Skip to content

fix(gateway): log failed Dashboard updates with their reason - #160091

Merged
obviyus merged 4 commits into
openclaw:mainfrom
chopin-op60:codex/fix-dashboard-update-outcome
Sep 28, 2026
Merged

obviyus merged 4 commits into
openclaw:mainfrom
chopin-op60:codex/fix-dashboard-update-outcome

Conversation

@chopin-op60

@chopin-op60 chopin-op60 commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Related: #160054

What Problem This Solves

Failed Dashboard update requests are logged at INFO without their reason. The current-base reproduction returns status=error; the original report observed status=skipped.

User Impact

Failed requests now log a warning with the public reason and a safe error summary. Successful, pending-handoff, and intentional no-op logs remain unchanged.

Why This Change Was Made

Use the existing outcome classifier at the Gateway logging boundary. Error summaries contain only recognized public error identifiers and exit codes, never command output or arbitrary exception text. Unknown reasons remain unavailable rather than exposing private data.

Update behavior: Gateway-side logging only; no effect on the installed updater or rollback. No new report writer, ledger changes, RPC response fields, settings, or permissions.

No overlap with Pash/Sarah changes.

Thanks to @chopin-op60 for the original fix and @BoatAngle for the report.

Evidence

  • Isolated Gateway plus the Dashboard's real update.run RPC path: an explicit mismatched upstream target is refused without changing an installation. Base logged INFO status=error without a reason; candidate logs WARN status=error reason=update-target-upstream-mismatch error="Update request refused".
  • Real externally supervised no-op on both versions: INFO completion message unchanged, apart from the per-connection ID.
  • Success, already-current, external-supervisor no-op, and pending-handoff log messages are byte-identical to the baseline logger for identical inputs. Success was checked at the logging boundary, not by updating an installation.
  • Failure and no-op RPC result bytes are identical. Complete responses are identical after accounting for per-run UUIDs, timestamps, and the deliberately different isolated profile names in the doctor hint; raw complete responses are not literally identical across independent runs.
  • Focused regression fails with the baseline handler and passes with the candidate. After integrating the main-branch request-lifetime test repair, all eight tests in update-unexpected-error.test.ts pass: 32.58s command wall time including artifact preparation; the added case took 576ms. Hosted CI timing pending.
  • A separate logging-boundary smoke confirmed unknown private reasons, command tails, paths, and exception text do not appear in the new warning summary.

@clawsweeper

clawsweeper Bot commented Sep 28, 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.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime labels Sep 28, 2026
@chopin-op60
chopin-op60 marked this pull request as ready for review September 28, 2026 04:08
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 28, 2026
@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 28, 2026, 10:50 AM ET / 14:50 UTC (Revision 6).

ClawSweeper review

What this changes

The branch makes the Gateway log failed Dashboard update requests as warnings with public failure identifiers and a bounded error summary, and adds a regression test and CLI documentation.

Merge readiness

✅ Ready for maintainer review

Current main still logs failed Dashboard update requests at INFO without a reason. This PR addresses that logging defect; the broader linked issue also requests a persistent failure report, which remains separate work.

Priority: P2
Reviewed head: aef4362eab057b88f494ca6e294a9b14feeb2fef

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The narrow logging patch has direct Gateway RPC proof and a focused regression, with no actionable correctness or security finding.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): The PR records after-fix output from an isolated Gateway using the real update.run RPC path: a refused upstream target becomes a WARN log with a public reason, while an external-supervisor no-op retains its INFO log. The changed owner writes logs only; no stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): The PR records after-fix output from an isolated Gateway using the real update.run RPC path: a refused upstream target becomes a WARN log with a public reason, while an external-supervisor no-op retains its INFO log. The changed owner writes logs only; no stored-data contract changes.
Evidence reviewed 7 items Current main: The current main handler still emits the completion message through the INFO logger without the failure reason.
Introduced behavior: The pinned PR delta replaces the completion log call with an outcome-aware logger; failed results use WARN and approved public identifiers.
Existing classification: The shared classifier already distinguishes failed results from successful, pending, and intentional skipped outcomes.
Findings None None.
Security None None.

How this fits together

The Dashboard sends update requests to the Gateway, which runs or hands off the update and returns an RPC result. The changed logging boundary records the outcome for operators after the Dashboard response is gone.

flowchart LR
  A[Dashboard update request] --> B[Gateway update handler]
  B --> C[Update result]
  C --> D[Classify outcome]
  D --> E[Public failure summary]
  E --> F[Gateway log]
  C --> G[Dashboard RPC response]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +39, Tests +38, Docs +5. Total +82 across 5 files.

View PR surface stats
Area Files Added Removed Net
Source 3 42 3 +39
Tests 1 39 1 +38
Docs 1 5 0 +5
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 5 86 4 +82

Review metrics

Metric Value Why it matters
Public diagnostic identifiers 9 added The expanded allowlist determines which failure reasons may appear in Gateway warnings and public update diagnostics.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #160054
Summary: This PR is a candidate fix for the linked issue's logging defect; the issue's persistent-report request remains.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Technical review

Best possible solution:

Keep the Gateway logging repair scoped to safe, operator-readable failure outcomes, and track the requested persistent failure report in the linked issue.

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

Yes. Current main still has the INFO-only logging path, and the PR records a base-versus-candidate Gateway RPC trace for a refused update; I did not execute it during this read-only review.

Is this the best way to solve the issue?

Yes. The PR changes the Gateway's existing outcome logging boundary, reuses the shared classifier, and leaves the updater and RPC response behavior intact.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is a bounded diagnosability fix for failed Dashboard updates, with no evidence that it changes update execution.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The PR records after-fix output from an isolated Gateway using the real update.run RPC path: a refused upstream target becomes a WARN log with a public reason, while an external-supervisor no-op retains its INFO log. The changed owner writes logs only; no stored-data contract changes.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR records after-fix output from an isolated Gateway using the real update.run RPC path: a refused upstream target becomes a WARN log with a public reason, while an external-supervisor no-op retains its INFO log. The changed owner writes logs only; no stored-data contract changes.

Evidence

What I checked:

  • Current main: The current main handler still emits the completion message through the INFO logger without the failure reason. (src/gateway/server-methods/update.ts:704, ec4e102c8720)
  • Introduced behavior: The pinned PR delta replaces the completion log call with an outcome-aware logger; failed results use WARN and approved public identifiers. (src/gateway/server-methods/update-outcome-observation.ts:13, aef4362eab05)
  • Existing classification: The shared classifier already distinguishes failed results from successful, pending, and intentional skipped outcomes. (src/shared/update-outcome.ts:119, aef4362eab05)
  • Regression coverage: The added handler test checks a failed update response, its WARN completion log, and the absence of an INFO completion log. The PR body reports that the focused regression failed on the baseline and passed on the candidate. (src/gateway/server-methods/update-unexpected-error.test.ts:22, aef4362eab05)
  • Real behavior proof: The captured PR body reports an isolated Gateway exercised through the Dashboard's real update.run RPC path: a mismatched upstream target produced an INFO log without a reason on the base and a WARN log with the public reason on the candidate. It also reports an unchanged external-supervisor no-op log. (aef4362eab05)
  • Scope and prior review: The discussion narrowed this PR to logging and left persistent reports and changed-path reporting to the linked issue. The previously raised report-I/O finding no longer applies to the pinned delta, which adds no report writer or ledger change. (aef4362eab05)

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Vincent Koc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (5 earlier review cycles)
  • reviewed 2026-09-28T04:16:45.748Z sha 22d7c5d :: needs real behavior proof before merge. :: [P2] Keep best-effort report I/O off the update response path
  • reviewed 2026-09-28T04:31:30.310Z sha c152e6b :: needs maintainer review before merge. :: none
  • reviewed 2026-09-28T06:33:24.697Z sha c152e6b :: blocked before merge. :: none
  • reviewed 2026-09-28T11:16:01.174Z sha d0af54e :: blocked before merge. :: none
  • reviewed 2026-09-28T11:51:46.896Z sha d0af54e :: needs maintainer review before merge. :: none

@obviyus

obviyus commented Sep 28, 2026

Copy link
Copy Markdown
Collaborator

@chopin-op60 Thank you for the fix and investigation. I am narrowing this PR to the reported logging bug: failed Gateway update requests should log a warning with a public reason and safe error summary, while success/no-op logs and RPC responses stay unchanged. The new failure-report writer and ledger-status changes are outside this bug-fix scope; you are welcome to propose those separately. The current-base RPC reproduction returns status=error rather than the older status=skipped, but still logs the failure at INFO without its reason. Thanks also to @BoatAngle for reporting it.

@obviyus obviyus changed the title fix(gateway): show failed Dashboard updates in host logs fix(gateway): log failed Dashboard updates with their reason Sep 28, 2026
@obviyus

obviyus commented Sep 28, 2026

Copy link
Copy Markdown
Collaborator

@clawsweeper re-review

The current head c152e6b removes report I/O entirely and restores the original ledger behavior. This is now logging-only, with no installed-updater or rollback change.

Observed through isolated Gateway processes and the real update.run RPC, with the same explicit mismatched Git target:

Base: INFO update.run completed actor=cli device=unknown-device ip=unknown-ip conn=[connection] changedPaths=<n/a> restartReason=update.run status=error
Candidate: WARN update.run completed actor=cli device=unknown-device ip=unknown-ip conn=[connection] changedPaths=<n/a> restartReason=update.run status=error reason=update-target-upstream-mismatch error="Update request refused"

An actual external-supervisor no-op still logged the same INFO status=skipped message on both. RPC results were byte-identical; complete responses differed only in run UUID, timestamp, and isolated profile in the doctor hint. Success/handoff messages were checked against the original logger with identical inputs. The PR body describes these proof boundaries and the passing focused regression.

@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 28, 2026
@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Sep 28, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. labels Sep 28, 2026
@obviyus

obviyus commented Sep 28, 2026

Copy link
Copy Markdown
Collaborator

@clawsweeper re-review: replaced the closing reference with Related so the broader persistent-report and changed-path requests remain open. This PR remains Gateway logging only.

@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot removed the merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. label Sep 28, 2026
@obviyus

obviyus commented Sep 28, 2026

Copy link
Copy Markdown
Collaborator

Maintainer landing override for exact head aef4362eab057b88f494ca6e294a9b14feeb2fef.

Review. The ClawSweeper review is ready on this SHA, and the security-sensitive review found no sensitive product changes. The diff is logging only.

CI. Fresh run 36438074545, attempt 2, finished with no cancelled selected jobs. The Telegram, catalog-startup and compact-large lanes that failed in attempt 1 pass. The only failures are mocked-Gateway Control UI browser tests. This PR changes Gateway update.run logging only and touches no UI:

Real Gateway proof is in the PR body: failed updates now warn with the public reason and a safe summary, no-op logs are unchanged, and RPC results are byte-identical.

@obviyus
obviyus merged commit ad76695 into openclaw:main Sep 28, 2026
319 of 331 checks passed
@obviyus

obviyus commented Sep 28, 2026

Copy link
Copy Markdown
Collaborator

Merged as ad76695. Failed Gateway update requests now warn with a public reason and safe error summary; successful/no-op logs and the RPC contract remain unchanged. The isolated real update.run comparison confirmed INFO without a reason on base and WARN with the refusal reason on the fix; the focused regression passes. Thanks @chopin-op60 for the original work and @BoatAngle for reporting the problem.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 29, 2026
…w#160091)

* fix(gateway): distinguish pending and failed Dashboard updates

* fix(gateway): scope update outcome reporting to safe logs

---------

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

Labels

docs Improvements or additions to documentation gateway Gateway runtime P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S 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