Skip to content

fix(ui): preserve failures during cloud test cleanup - #149456

Merged
vincentkoc merged 5 commits into
mainfrom
fix/held-module-route-teardown-20260916
Sep 25, 2026
Merged

vincentkoc merged 5 commits into
mainfrom
fix/held-module-route-teardown-20260916

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Sep 15, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Cloud startup browser tests can leave a context open after partial setup and lose the original failure when cleanup also fails.

User Impact

Test infrastructure only; no production UI behavior changes. Setup and body failures retain their identity, and each caller waits for context cleanup before settling.

Why This Change Was Made

The two cloud-fixture groups now use the existing suite.withPage owner. All eight affected scenarios and their assertions remain, including the intentional mid-test held-module release.

Main already contains the primary page/context route-drain repair from #149240 and #156473. This reconstruction preserves that owner and its diagnostic ordering instead of restoring the old exact-handler alternative. The historical policy-specific synthetic tests are not carried forward; equivalent coverage for all eight is not claimed.

The original PR ancestry is preserved. Relative to the inspected main base, the change is confined to the cloud caller file.

Evidence

Remote Linux proof used Node 24.19.0 and pnpm 12.4.2:

  • Actual registered cloud callbacks: six intended baseline failures across page creation, Gateway setup and combined body/close failure. The repaired callbacks pass all seven assertions, including held-route drainage. The deliberate dual-failure children exit nonzero only for their injected teardown failures; both error identities remain in order.
  • Existing lifecycle helper suite: 17/17 passed, no skips.
  • Full Chromium cloud browser file: 11/11 passed, no skips, including three unchanged cases.
  • Eighteen scoped-check stages passed in the caller/browser run. Its last lint stage found an obsolete mutable declaration; the const-only correction passed targeted lint, format, UI-E2E typechecking and base-relative diff verification. Completed runtime proof was retained under its original pin, not replayed or relabeled as a new execution.
  • Fresh scoped source review passed. The initial baseline run stopped on a verifier-only Vitest cause-name serialization mismatch after the six expected failures; the later run reconciled its complete reports without rerunning them.

Final candidate: 95e7ecad12828df2eb1bc0bb995b8b75e5343c45, tree 2d38458ec3a1cbfb47338ace61e1e98eb430b256. All owned proof commands and leases completed. Testbox cleanup can cancel its backing Actions job; the delegated command receipts establish the results above.

Required current-head CI, fresh trusted review and native landing gates remain outstanding. No merge is claimed.

@vincentkoc vincentkoc self-assigned this Sep 15, 2026
@clawsweeper

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

@vincentkoc
vincentkoc marked this pull request as ready for review September 15, 2026 21:51
@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: S maintainer Maintainer-authored PR labels Sep 15, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 15, 2026
@clawsweeper

clawsweeper Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 25, 2026, 5:09 PM ET / 21:09 UTC (Revision 5).

ClawSweeper review

What this changes

Moves two cloud startup browser-test groups to the shared page fixture so setup failures and combined test and cleanup failures remain visible.

Merge readiness

✅ Ready for maintainer review

Keep open. The merged browser route-drain repairs do not cover the cloud callers’ remaining setup and error-reporting path. The reconstructed head retains main’s cleanup policy, and the prior mixed-route finding no longer applies.

Priority: P2
Reviewed head: 95e7ecad12828df2eb1bc0bb995b8b75e5343c45

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused fixture migration with credible browser-path evidence and no remaining actionable source finding.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: The contributor proof gate does not apply to this member-authored, test-only PR. Its body reports injected failures through registered cloud callbacks and a passing Chromium browser file, while current-head CI is green; no stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The contributor proof gate does not apply to this member-authored, test-only PR. Its body reports injected failures through registered cloud callbacks and a passing Chromium browser file, while current-head CI is green; no stored-data contract changes.
Evidence reviewed 6 items Introduced change: The pinned merge-base-to-head change modifies only the cloud startup E2E file; its two manually managed groups now call the shared page fixture.
Remaining behavior on main: Current main still creates the page before the manual try/finally in the affected group. Its suite does not enable per-test context tracking, so a page-creation failure can bypass that group's explicit close.
Shared cleanup contract: The existing fixture creates the page inside ordered error-preserving cleanup; its context owner releases held module gates and waits for page and context routes before closing.
Findings None None.
Security None None.

How this fits together

Control UI browser tests drive Chromium against a test server with a mocked Gateway. A shared fixture owns page creation, failure diagnostics, route drainage, and context closure before CI records each result.

flowchart LR
A[Cloud test cases] --> B[Chromium page]
B --> C[Mock Gateway responses]
B --> D[Shared page fixture]
C --> D
D --> E[Drain routes and close context]
E --> F[CI test result]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +2. Total +2 across 1 file.

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

Review metrics

Metric Value Why it matters
Cloud browser coverage 8 affected cases migrated; 3 other cases retained The fixture change keeps the existing browser scenarios rather than replacing them with helper-only assertions.

Technical review

Best possible solution:

Have the shared fixture own both cloud groups through page acquisition, diagnostics, held-route release, and completed context closure while preserving their existing assertions.

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

Yes. Current main places page creation before the affected group's manual finally block, giving a clear fault-injection path; this read-only review did not execute it.

Is this the best way to solve the issue?

Yes. Using the existing fixture is the narrowest owner-level repair, and its current implementation preserves body and cleanup errors while draining held routes.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against a8758fdaeabc.

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The contributor proof gate does not apply to this member-authored, test-only PR. Its body reports injected failures through registered cloud callbacks and a passing Chromium browser file, while current-head CI is green; no stored-data contract changes.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: This is a bounded browser-test reliability repair with no production UI behavior change.
  • merge-risk: 🚨 automation: Changing browser-test teardown can affect CI failure reporting and context cleanup, even though focused proof and current-head checks support this patch.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The contributor proof gate does not apply to this member-authored, test-only PR. Its body reports injected failures through registered cloud callbacks and a passing Chromium browser file, while current-head CI is green; no stored-data contract changes.

Evidence

What I checked:

Likely related people:

  • steipete: 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 (4 earlier review cycles)
  • reviewed 2026-09-15T22:40:20.400Z sha 5cdace8 :: blocked before merge. :: [P2] Include the teardown repair before landing this regression
  • reviewed 2026-09-15T23:23:42.319Z sha 4b16c14 :: needs changes before merge. :: none
  • reviewed 2026-09-16T00:49:01.780Z sha 4b16c14 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-24T06:11:55.742Z sha 4b16c14 :: blocked before merge. :: [P2] Replace the test that expects closing with a live route

@vincentkoc vincentkoc changed the title test(ui): reproduce held-module teardown ordering fix(ui): drain held module routes before context teardown Sep 15, 2026
roboclaw-bot added a commit that referenced this pull request Sep 15, 2026
Track held route installation at the browser context owner, release all gates,
then join installations and active Playwright handlers before physical close.
Keep fetch-before-gate behavior, request counts, and callback errors visible.
Migrate workspace, cloud startup, and native navigation fixture bypasses.

Reuse Vincent Koc's regression from #149456 (5cdace8), with its intended
outer drain-before-close failure verified before repair and green afterward.

Co-authored-by: RomneyDa <[email protected]>
Co-authored-by: Dallin Romney <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>
@clawsweeper clawsweeper Bot added 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: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 15, 2026
roboclaw-bot added a commit that referenced this pull request Sep 21, 2026
Track held route installation at the browser context owner, release all gates,
then join installations and active Playwright handlers before physical close.
Keep fetch-before-gate behavior, request counts, and callback errors visible.
Migrate workspace, cloud startup, and native navigation fixture bypasses.

Reuse Vincent Koc's regression from #149456 (5cdace8), with its intended
outer drain-before-close failure verified before repair and green afterward.

Co-authored-by: RomneyDa <[email protected]>
Co-authored-by: Dallin Romney <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>
RomneyDa added a commit that referenced this pull request Sep 21, 2026
)

* fix(ui): include final request time in completed work summaries

Use matching terminal lifecycle runtime rather than message creation timestamps. Keep unmatched historical summaries untimed.

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

* fix(ui): include final request time in completed work summaries

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

* test(ui): publish lifecycle timing in completed-turn E2E fixture

Preserve independent-run idle-time coverage and exercise a final message created before completion through live and restored lifecycle facts.

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

* test(ui): drain held module routes before browser teardown

Track held route installation at the browser context owner, release all gates,
then join installations and active Playwright handlers before physical close.
Keep fetch-before-gate behavior, request counts, and callback errors visible.
Migrate workspace, cloud startup, and native navigation fixture bypasses.

Reuse Vincent Koc's regression from #149456 (5cdace8), with its intended
outer drain-before-close failure verified before repair and green afterward.

Co-authored-by: RomneyDa <[email protected]>
Co-authored-by: Dallin Romney <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>

---------

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
Co-authored-by: Dallin Romney <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 22, 2026
…claw#149240)

* fix(ui): include final request time in completed work summaries

Use matching terminal lifecycle runtime rather than message creation timestamps. Keep unmatched historical summaries untimed.

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

* fix(ui): include final request time in completed work summaries

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

* test(ui): publish lifecycle timing in completed-turn E2E fixture

Preserve independent-run idle-time coverage and exercise a final message created before completion through live and restored lifecycle facts.

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

* test(ui): drain held module routes before browser teardown

Track held route installation at the browser context owner, release all gates,
then join installations and active Playwright handlers before physical close.
Keep fetch-before-gate behavior, request counts, and callback errors visible.
Migrate workspace, cloud startup, and native navigation fixture bypasses.

Reuse Vincent Koc's regression from openclaw#149456 (5cdace8), with its intended
outer drain-before-close failure verified before repair and green afterward.

Co-authored-by: RomneyDa <[email protected]>
Co-authored-by: Dallin Romney <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>

---------

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
Co-authored-by: Dallin Romney <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>
@clawsweeper clawsweeper Bot added merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed 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. labels Sep 24, 2026
Preserve the canonical page and context route-drain owner and retain only the cloud caller setup and error-composition repair. The resulting tree matches the independently reviewed and remotely tested candidate.
@vincentkoc
vincentkoc requested a review from a team as a code owner September 25, 2026 20:50
@vincentkoc vincentkoc changed the title fix(ui): drain held module routes before context teardown fix(ui): preserve failures during cloud test cleanup Sep 25, 2026
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation size: XL and removed app: web-ui App: web-ui size: S labels Sep 25, 2026
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

The original PR now preserves main's page/context drainage policy and carries only the cloud-fixture setup/error-composition residual. The body records causal callback proof, 17 helper passes, 11 Chromium passes and the completed targeted lint correction. Please review the reconstructed candidate and disposition the prior cleanup-policy findings; required CI/native landing gates remain separate.

@clawsweeper

clawsweeper Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Source admission inputs were corrected after the failed review; the head remains 95e7ecad12828df2eb1bc0bb995b8b75e5343c45. The PR base now resolves to 140b6026c7cb7d038266c468292ff32a6105c3e1. Live PR metadata and the complete files response agree on one cloud test file (+225/-223), and native review-init now succeeds. Please review these corrected inputs and disposition the prior findings. The earlier source-completeness failure produced no verdict; its precise cause is not established.

@clawsweeper

clawsweeper Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added 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: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 25, 2026
@vincentkoc
vincentkoc merged commit 276537b into main Sep 25, 2026
95 of 96 checks passed
@vincentkoc
vincentkoc deleted the fix/held-module-route-teardown-20260916 branch September 25, 2026 21:17
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 26, 2026
* fix(ui): preserve cloud fixture setup and cleanup failures

* test(ui): reproduce held-module teardown ordering

* fix(ui): drain held module routes before context teardown

* fix(ui): reconcile cloud fixture lifecycle with main

Preserve the canonical page and context route-drain owner and retain only the cloud caller setup and error-composition repair. The resulting tree matches the independently reviewed and remotely tested candidate.

* test(ui): bind held runtime at acquisition

Co-authored-by: Vincent Koc <[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 maintainer Maintainer-authored PR merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XL 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