Skip to content

fix(ui): surface usage publication failures - #174970

Merged
steipete merged 1 commit into
mainfrom
deslop/z01-9-usage-outcomes-20261015
Oct 17, 2026
Merged

steipete merged 1 commit into
mainfrom
deslop/z01-9-usage-outcomes-20261015

Conversation

@steipete

@steipete steipete commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

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

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 187e119f4635023597e8343c66c6fbce467e2922 completed 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.

Failed job Attribution
checks-fast-baseline-ratchets,117280467411 mock-exports reports src/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 at 8919729f0484e743af1a956f20f880bdba79a185, 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,117281850918 Downstream of that single ratchet failure; every other selected job passed.

The actual CI checkout is merge 9c52f902f64e1ecc66248025d71998fc7dad03b6, with ordered parents 1c72fb73b5e3de412c53d11dd082961bf887162f and 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.

@clawsweeper

clawsweeper Bot commented Oct 17, 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.

@steipete
steipete marked this pull request as ready for review October 17, 2026 02:01
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-17T02:03:46.074470Z 187e119 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. 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. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 17, 2026
@clawsweeper

clawsweeper Bot commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

The 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").

  • Before: run() resolves despite the publication failure.
  • After: run() rejects with that same exception after releasing pending ownership and notifying the display.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The focused patch is correct and useful; behavior evidence reaches the exported owner rather than the shipped UI.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored PR is outside the ordinary contributor proof gate; its supplied evidence exercises the exported request owner, while the inspected historical screenshots establish only earlier UI parity.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: An internal Usage publication failure can disappear while the awaiting caller receives apparent success.
Reason: The maintainer-authored change explicitly accepts replacing inherited error isolation with observable rejection, using a minimal repair in the shared owner.

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
Reviewed head: 187e119f4635023597e8343c66c6fbce467e2922

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: No supplied shipped-entry-point scenario exercises publisher failure; the reported pre-fix exported-owner probe establishes the rejection regression outside Vitest.
Agent review details

How this fits together

The 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]
Loading

Technical review

Best 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

  • Usage publisher exception isolation changes intended behavior with a stated reason (77f6290: The original comment explicitly preserved the former Lit Task's completion-notification error isolation during the request-retention repair.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

PR surface

Source -2, Tests +51. Total +49 across 2 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 1 0 2 -2
Tests 1 51 0 +51
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 51 2 +49

Labels

Label changes:

  • add P2: This repairs limited-scope Usage error observability without evidence of an urgent user-facing outage.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: This repairs limited-scope Usage error observability without evidence of an urgent user-facing outage.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

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 execution lanes are retired.

Reviewed October 16, 2026, 10:29 PM ET / October 17, 2026, 02:29 UTC.

@steipete

Copy link
Copy Markdown
Contributor Author

Landing evidence for exact head 187e119f4635023597e8343c66c6fbce467e2922 under the maintainer-authorized inherited-failure exception.

Failed check Attribution and proof
checks-fast-baseline-ratchets, job117280467411, run38993286920 mock-exports reports src/cli/update-cli/update-command-service-maintenance-native.test-support.ts:52, ./update-command-database-context.js. Scheduled main run38991549274 at8919729, job117275051710, reports the same path/line/module/diagnostic. The two Usage files are the complete PR delta; the failed CLI source, dependency, checker and baseline are byte-identical between the actual CI main parent1c72fb73b5e3de412c53d11dd082961bf887162f and tested merge9c52f902f64e1ecc66248025d71998fc7dad03b6.
openclaw/ci-gate, job117281850918 Downstream of that ratchet only. All other selected CI jobs passed or were normally skipped.

Fresh complete head-check enumeration:160 completed checks,47success/111skipped/2failures; no pending or cancelled checks. Current exact-head security-fast117280467500 passed. Current dependency-review and security-sensitive-review statuses passed; trusted Security Review run38993852515 succeeded, with successful Enforce security review in job117281918760 explicitly named for PR174970/head187e119. The combined CI-gate failure projection remains downstream of the attributed ratchet. This is not a green-CI claim. No CI rerun, dispatch, or new push was used to obtain green.

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 github_pending gates and no new push. Two infrastructure failures prevent native landing: first a shared origin/main.lock EEXIST during artifact initialization; then the interrupted preparation supervisor left exact operationlocke220f461e32ef71abfea598edb6c622531130389 orphaned, so merge-run refused before submission. Both recorded owner processes and their process group were absent before exact-token native recovery. No merge intent/outcome or active auto-merge was present. The stale-tooling policy rejection is not counted as infrastructure.

Campaign Ending10 authorizes the direct squash fallback after those two infrastructure failures, pinned to the reviewed head with the REST sha guard. This bypasses a broken submission path, not review, security, failure attribution, or exact-head CI requirements. No rendering, protocol, configuration, schema, dependency, retention or Phase E change.

@steipete
steipete merged commit 98f3808 into main Oct 17, 2026
160 of 163 checks passed
@steipete
steipete deleted the deslop/z01-9-usage-outcomes-20261015 branch October 17, 2026 03:12
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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.

1 participant