Repository navigation
fix(gateway): log failed Dashboard updates with their reason - #160091
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. Reviewed September 28, 2026, 10:50 AM ET / 14:50 UTC (Revision 6). ClawSweeper reviewWhat this changesThe 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 Review scores
Verification
How this fits togetherThe 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]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +39, Tests +38, Docs +5. Total +82 across 5 files. 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. Technical reviewBest 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. 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 (5 earlier review cycles)
|
|
@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. |
|
@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 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. |
|
🦞👀 Re-review progress:
|
|
@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. |
|
🦞👀 Re-review progress:
|
|
Maintainer landing override for exact head 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
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. |
|
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. |
…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]>
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 observedstatus=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
update.runRPC path: an explicit mismatched upstream target is refused without changing an installation. Base logged INFOstatus=errorwithout a reason; candidate logs WARNstatus=error reason=update-target-upstream-mismatch error="Update request refused".resultbytes 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.update-unexpected-error.test.tspass: 32.58s command wall time including artifact preparation; the added case took 576ms. Hosted CI timing pending.