Skip to content

test(macos): await dashboard cancellation loading state - #170248

Merged
steipete merged 1 commit into
mainfrom
dbasync/redmain-dashboard-publication
Oct 12, 2026
Merged

steipete merged 1 commit into
mainfrom
dbasync/redmain-dashboard-publication

Conversation

@steipete

@steipete steipete commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

The Dashboard cancellation test introduced in ec7fec0636d38748b2205a0a117233441e8b1f2c (#169568) assumes that returning from native cancellation means WebKit has already published isLoading = false. Native teardown calls stopLoading(), but the test does not await that asynchronous state change. The assertion failed in scheduled CI 38305224828 and again in validation run 38306200884.

User Impact

The regression test waits for WebKit's actual stopped-loading state while preserving cancellation, window cleanup, and pending-navigation checks. This changes one test file, +27/−10 lines, with no production change, sleep, polling, or increased deadline.

Why This Change Was Made

Observe the existing loading-state notification with AsyncTestSignal while the fixture's HTTP response remains blocked. Keep the response gated until loading stops so ordinary completion cannot satisfy the cancellation check, and reject failure-page completion. Invalidate the observation on exit; on errors, cancel and join the opening task and release the response gate.

Evidence

  • Native CI 38311910220, job 115019805962, head 0c4b38b77adfcd32fc25a18f5d0ed7fb97c2faae: the exact cancellation target passed in 7.770 seconds; DashboardExperienceTests passed all six tests (nine cases) in 132.289 seconds. The default native invocation passed all 2,505 tests in 282 suites in 551.058 seconds. These are actual Dashboard target and suite results.
  • Candidate 1efe4806e7ae5beb46ede6a3c40b48e7356d86da contains the exact reviewed and tested Dashboard source. Native owners, relevant fixture/wait helpers, Swift package dependencies, test runner, Swift configurations, and CI workflow match the passing composition and audited main 012fa012eb6ef3708a6d09a9104b48e784f8327a. Main still has the unchanged test preimage. The composition also contained a separate MLX test repair; its full native pass is not claimed as an exact-candidate full-suite run.
  • Pinned SwiftFormat and focused SwiftLint passed with zero violations on the same test source and configuration. Whitespace checks, normal commit hooks, and one isolated Codex review passed with no actionable findings.
  • Exact-candidate CI 38309523531 completed successfully, but native and static jobs were skipped. Native compilation/runtime and focused Swift static proof are qualified separately above; skipped checks are not claimed as passing. No new local native runtime was run for this qualification.

Wait for the existing WebKit loading notification while the fixture response remains blocked. Preserve cancellation, window and pending-navigation checks, reject failure-page completion, and release the response gate and join the opening task on errors.

SwiftFormat, focused SwiftLint, diff checks, and isolated Codex review passed. Native compilation and runtime proof remain pending on an isolated macOS runner.
@clawsweeper

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

@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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. labels Oct 12, 2026
@clawsweeper

clawsweeper Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR waits for WebKit’s stopped-loading notification before asserting dashboard cancellation and improves test cleanup.

Example: Cancel a dashboard handoff while the fixture HTTP response remains blocked.

  • Before: The test can check isLoading before WebKit publishes false and report a false failure.
  • After: The test awaits false, then verifies CancellationError, zero open windows, cleared navigation, and no failure page.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The patch is focused and source review found no defect, but native execution of the changed test remains unverified.
Proof confidence 🦪 silver shellfish (2/6) This maintainer-authored, test-only change is outside the contributor runtime-proof gate; inspected screenshots belong to the earlier onboarding feature and do not exercise this repair.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: Native CI can falsely report broken dashboard cancellation because WebKit publishes loading state after native teardown returns.
Reason: The focused repair preserves the existing feature owner's cancellation contract and adds no product behavior or configuration.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it makes a focused, justified test repair, and source review found no actionable defect.

Priority: P3
Reviewed head: 1efe4806e7ae5beb46ede6a3c40b48e7356d86da

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The changed cancellation test has not been shown passing on this head in disposable macOS CI; its scheduled lane was skipped.
Agent review details

How this fits together

The macOS integration test drives DashboardManager through a real WebKit document load against a loopback HTTP fixture and checks cancellation teardown.

flowchart TD
  A[Cancellation test] --> B[DashboardManager]
  B --> C[DashboardWindowController]
  C --> D[WebKit document load]
  E[Blocked HTTP fixture] --> D
  D --> F[Loading notification]
  F --> G[AsyncTestSignal assertions]
Loading

Technical review

Best possible solution:

Retain the notification-based wait and existing cancellation contract, then validate the changed test in disposable macOS CI.

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

Source confirms the immediate assertion follows asynchronous WebKit teardown; the body records repeated native failures, but their downloadable job logs were blocked by the network allowlist.

Is this the best way to solve the issue?

Using the existing signal helper and WebKit notification addresses the missing synchronization without weakening assertions, polling, or increasing deadlines.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Dashboard cancellation test keeps the original intent (ec7fec0: Ensure cancelling guided dashboard setup retires pending navigation and closes its window; prior native-test synchronization work also appears in the local history, whose oldest traversal encountered an unavailable blob.)

Testing

Proof path: none.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit ec7fec0 adds apps/macos/Tests/OpenClawIPCTests/DashboardExperienceTests.swift:11 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: ec7fec0636d3; files: apps/macos/Tests/OpenClawIPCTests/DashboardExperienceTests.swift)

PR surface

Tests +17. Total +17 across 1 file. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 27 10 +17
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 27 10 +17

Labels

Label changes:

  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🦪 silver shellfish, so this older rating label is no longer current.

Label justifications:

  • P3: This is a test synchronization repair with no production behavior change.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish 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.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-12T21:20:10.395Z sha 1efe480 :: needs maintainer review before merge. :: none

Reviewed October 12, 2026, 5:33 PM ET / 21:33 UTC (Revision 2).

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Oct 12, 2026
@steipete
steipete merged commit ec71e92 into main Oct 12, 2026
86 of 88 checks passed
@steipete
steipete deleted the dbasync/redmain-dashboard-publication branch October 12, 2026 22:17
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 13, 2026
)

## What Problem This Solves

The Dashboard cancellation test introduced in `30559a4d18d31b87d49e84697df358dbf082752e` (openclaw#169568) assumes that returning from native cancellation means WebKit has already published `isLoading = false`. Native teardown calls `stopLoading()`, but the test does not await that asynchronous state change. The assertion failed in [scheduled CI 38305224828](https://github.com/openclaw/openclaw/actions/runs/38305224828/job/114997825068) and again in validation run 38306200884.

## User Impact

The regression test waits for WebKit's actual stopped-loading state while preserving cancellation, window cleanup, and pending-navigation checks. This changes one test file, +27/−10 lines, with no production change, sleep, polling, or increased deadline.

## Why This Change Was Made

Observe the existing loading-state notification with `AsyncTestSignal` while the fixture's HTTP response remains blocked. Keep the response gated until loading stops so ordinary completion cannot satisfy the cancellation check, and reject failure-page completion. Invalidate the observation on exit; on errors, cancel and join the opening task and release the response gate.

## Evidence

- Native CI [38311910220, job 115019805962](https://github.com/openclaw/openclaw/actions/runs/38311910220/job/115019805962), head `0c4b38b77adfcd32fc25a18f5d0ed7fb97c2faae`: the exact cancellation target passed in 7.770 seconds; `DashboardExperienceTests` passed all six tests (nine cases) in 132.289 seconds. The default native invocation passed all 2,505 tests in 282 suites in 551.058 seconds. These are actual Dashboard target and suite results.
- Candidate `1efe4806e7ae5beb46ede6a3c40b48e7356d86da` contains the exact reviewed and tested Dashboard source. Native owners, relevant fixture/wait helpers, Swift package dependencies, test runner, Swift configurations, and CI workflow match the passing composition and audited main `57a1e1ef0cd47249a4fb3e610b2a19b723ae92c9`. Main still has the unchanged test preimage. The composition also contained a separate MLX test repair; its full native pass is not claimed as an exact-candidate full-suite run.
- Pinned SwiftFormat and focused SwiftLint passed with zero violations on the same test source and configuration. Whitespace checks, normal commit hooks, and one isolated Codex review passed with no actionable findings.
- Exact-candidate [CI 38309523531](https://github.com/openclaw/openclaw/actions/runs/38309523531) completed successfully, but native and static jobs were skipped. Native compilation/runtime and focused Swift static proof are qualified separately above; skipped checks are not claimed as passing. No new local native runtime was run for this qualification.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: macos App: macos P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: XS 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