Repository navigation
fix(ui): surface usage publication failures - #174970
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 SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs maintainer review before merge. What this changesThe PR lets Usage completion and error publisher exceptions reject the request promise while preserving pending cleanup and notifications. Example: A Usage publisher throws Error("Usage publication failed").
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it makes a focused, maintainer-approved change that current main still needs, with no introduced correctness or security finding. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe Control UI Usage request owner runs overview, detail, and export tasks, fences superseded results, and publishes settled results into their display owners. flowchart LR
A[Usage page actions] --> B[Usage request owner]
B --> C[Gateway request tasks]
C --> D[Current request settlement]
D --> E[Display or export publisher]
E --> F[Request promise outcome]
D --> G[Display notification]
Technical reviewBest possible solution: Preserve the small request owner and propagate unexpected publisher exceptions through its existing promise contract. Do we have a high-confidence way to reproduce the issue? The current-main catch demonstrably discards exceptions thrown by either publisher; the PR reports a failing pre-fix exported-owner probe, but no target code was executed during this review. Is this the best way to solve the issue? Removing the swallowing catch directly addresses the stated promise-contract failure while retaining existing ownership, cancellation, and finally behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against e376603aa42d. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource -2, Tests +51. Total +49 across 2 files. Added test files: 1. View PR surface stats
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 Reviewed October 16, 2026, 10:29 PM ET / October 17, 2026, 02:29 UTC. |
|
Landing evidence for exact head
Fresh complete head-check enumeration:160 completed checks,47success/111skipped/2failures; no pending or cancelled checks. Current exact-head Proof:14 owning/sibling tests and targeted UI production types passed; independent review found no actionable P0-P2 defects. The original exported-owner probe failed with Missing expected rejection and passed after the two-line fix. The required local suppression run had2passing cases and one production-file-listing deadline failure (154533ms against the unchanged120000ms deadline). That local result remains an investigated unresolved tooling timeout, not called passing or proven main-red; no timeout/assertion/baseline was changed. Native workflow: current trusted review validation completed with truthful failed-test qualification, and preparation completed on unchanged187head with Campaign Ending10 authorizes the direct squash fallback after those two infrastructure failures, pinned to the reviewed head with the REST |
What Problem This Solves
Usage request settlement silently catches exceptions from its completion and error publishers. A publisher can fail without
run()rejecting, leaving the caller unable to observe the actual failure.What Changed
Remove only that swallowing catch. The existing finally notification and pending-request cleanup stay intact. Ordinary request failures still reach the error publisher; cancellation and current-request ownership are unchanged. Unexpected publisher failures now reject with the original exception rather than being silently discarded. No rendering, text, configuration, protocol, dependency, or persisted-data change.
This is a reproduced silent-failure repair, permitted at small size by the campaign: two net production lines removed, plus 51 regression-test lines in one new owner suite.
Best-effort tradeoffs accepted
run()after pending ownership is released and the existing notification runs; no retry or replacement error is invented.Evidence
The pre-fix probe called the actual exported request owner and failed because the expected rejection was missing. The fixed probe passes. This was an exported-owner probe, not a pre-fix Vitest run.
Focused post-fix proof passed 14 tests in three files, serially with maxWorkers=1 and isolated HOME/OpenClaw/XDG state: the new request-owner cases and existing Usage export/detail siblings (165.38s Vitest, 310.54s wrapper). The new suite covers both completion/error publisher exceptions, original exception identity, pending cleanup and notification, plus unchanged ordinary request-error presentation. The new file's three case bodies took about 151ms on the loaded host; CI seconds are pending.
Targeted UI-package production types completed with exit0 and no diagnostics. Formatting and diff checks pass. Independent P0–P2 review completed scoped-clean, including final source verification. Normal hooks and signing produced
187e119f4635023597e8343c66c6fbce467e2922; verified human author/committer are Peter Steinberger.The required suppression gate ran: 2 passed, 1 failed (263.32s Vitest, 322.72s wrapper). Its unchanged production-file-listing case exceeded the existing120-second deadline (154533ms observed); the companion-rule and explicit suppression-allowlist cases passed. The test blob is identical to this branch's parent (
2648df5d1a35351d29c8ed85b64510d0451d5ebc), neither tooling path is changed, and no suppression is added. This is a retained local timeout, not a passing gate or evidence that a product regression or inherited CI failure exists. It was not rerun to chase green.Exact-head hosted CI owns broad type/lint/cycle, build and browser/E2E proof under the campaign's local-proof budget. No test timeout, retry, skip, assertion, baseline, or suppression is weakened.
Exact-head CI and inherited-failure landing
Run38993286920 on
187e119f4635023597e8343c66c6fbce467e2922completed failed, not green. Its55 jobs comprise26success,27normal skips and2failures; all133head checks are complete (44success,87skip,2fail; no cancellations). Production/test types, all three UI-unit shards, selected UI E2E, lint and security-fast passed. No job was rerun or branch pushed to seek green.checks-fast-baseline-ratchets,117280467411mock-exportsreportssrc/cli/update-cli/update-command-service-maintenance-native.test-support.ts:52, mock of./update-command-database-context.js. The identical path/signature fails scheduled main38991549274 at8919729f0484e743af1a956f20f880bdba79a185, job117275051710. This PR changes only the Usage request owner and its new regression suite; neither is reachable from the CLI mock-export check's reported source. The failed script and CLI subjects are unchanged by the PR.openclaw/ci-gate,117281850918The actual CI checkout is merge
9c52f902f64e1ecc66248025d71998fc7dad03b6, with ordered parents1c72fb73b5e3de412c53d11dd082961bf887162fand the exact PR head above. The campaign's inherited-failure exception is requested for this fully attributed failure only; it does not waive security, review or other gates. The two failed attempts to download the main log through the run-view stream were transport failures; the supported job-log API then supplied the retained matching main diagnostic. No product replay, credential change or CI retry was hidden by that tooling recovery.