Skip to content

test(ui): skip idle animation frames between cloud retries - #132579

Merged
steipete merged 1 commit into
mainfrom
codex/test-perf-cloud-retry-clock
Aug 29, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/test-perf-cloud-retry-clock

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Summary

Cloud-dispatch coverage replays every browser animation frame while advancing through five retry delays totaling 104 virtual seconds. Fast-forward each existing delay separately instead, retaining the request wait between retries, six-attempt assertion, selected cloud profile/machine, and create/dispatch/send/reclaim flow.

This removes idle timer replay from test execution. It does not change production timing, screenshots/video behavior, sharding, concurrency, test selection, or assertions. The device-dispatch sibling still checks the 999ms/1ms retry boundary.

Validation

  • Same Node 26.5.0 runtime, normal UI E2E wrapper: both cases passed; execution 38.032s before and 7.162s after. The affected case fell from 36.348s to 5.493s. This is focused execution time, not a whole-suite claim.
  • Final cloud plus device-dispatch run: all 15 cases passed; cloud file execution 6.744s.
  • Temporary production mutation clearing the retained catalog at retry exhaustion failed the original selected-machine label assertion. Restored original source before final proof.
  • Installed Playwright clock source confirms fastForward runs existing timers at the destination once. The next retry is scheduled only after the preceding request failure, so each interval remains separate.
  • Independent Codex autoreview clean; changed-file gate and exact-head hosted CI required before landing.

Production LOC delta: 0. Test delta: +1/-1. The canonical retry owner and all public behavior remain unchanged. No changelog needed.

@clawsweeper

clawsweeper Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: XS maintainer Maintainer-authored PR labels Aug 29, 2026
@steipete
steipete marked this pull request as ready for review August 29, 2026 12:18
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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 Aug 29, 2026
@clawsweeper

clawsweeper Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 29, 2026, 8:25 AM ET / 12:25 UTC.

ClawSweeper review

What this changes

The PR replaces frame-by-frame virtual-clock advancement with timer fast-forwarding between cloud-profile retry attempts in one Control UI end-to-end test.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

Keep open. This is a current maintainer-owned, focused Control UI E2E performance improvement with no blocking defect found; the retry owner schedules one retry at a time and the test continues to wait between each virtual-time advance.

Priority: P3
Reviewed head: ef27afa6e8316df418971a197f8d26aa963166d7

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused test-only optimization with retained end-to-end assertions and reported targeted execution evidence.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored test-only PR records focused after-change E2E results in its body; the external-contributor real-behavior-proof gate does not apply.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored test-only PR records focused after-change E2E results in its body; the external-contributor real-behavior-proof gate does not apply.
Evidence reviewed 5 items Introduced test-only change: The verified PR-introduced delta changes only the retry-loop clock call from runFor to fastForward.
Retry owner and request callee: A failed cloud-profile task schedules exactly one timeout; its callback starts the next task, whose callee immediately requests environments.list. The test fast-forwards each configured interval separately and waits for that request before proceeding.
Behavioral coverage retained: The test still asserts all retry requests, preservation of the selected cloud profile and machine, and later create/dispatch/send ordering.
Findings None None.
Security None None.

How this fits together

The Control UI refreshes cloud environment profiles and retries after a temporary gateway failure. Its E2E test drives a mocked Gateway with Playwright virtual time, then verifies retained cloud selection and session dispatch behavior.

flowchart LR
  A[Cloud session E2E test] --> B[Mock Gateway failure]
  B --> C[Retry timer]
  C --> D[Virtual browser clock]
  D --> E[Environment request]
  E --> F[Cloud selection and dispatch assertions]
Loading

Before merge

  • Resolve merge risk (P1) - The exact [email protected] clock implementation could not be independently inspected in this read-only environment; exact-head UI checks should complete before merge.
Agent review details

Security

None.

PR surface

Tests 0. Total 0 across 1 file.

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

Review metrics

Metric Value Why it matters
Production versus test LOC production +0/-0; tests +1/-1 The sole introduced hunk changes an existing E2E test clock call and leaves production behavior untouched.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep the separate per-attempt fast-forward and request wait, preserving the existing retry-count and retained-selection assertions while avoiding idle animation-frame replay.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Keep the separate per-attempt fast-forward and request wait, preserving the existing retry-count and retained-selection assertions while avoiding idle animation-frame replay.

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

Not applicable: this PR improves test execution time while retaining the existing end-to-end behavior assertions.

Is this the best way to solve the issue?

Yes. The production owner creates the next retry only after each failed request, and advancing each existing delay separately is the narrowest way to skip idle frames without collapsing retry attempts.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P3: This is a small test-execution improvement without a production behavior change.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool 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: This maintainer-authored test-only PR records focused after-change E2E results in its body; the external-contributor real-behavior-proof gate does not apply.

Label justifications:

  • P3: This is a small test-execution improvement without a production behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored test-only PR records focused after-change E2E results in its body; the external-contributor real-behavior-proof gate does not apply.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Recent history shows sustained ownership of the new-session cloud profile and retry surfaces, including the retry-retention repair. (role: recent area contributor; confidence: high; commits: 1e22f7b85b55, 78beccf05397; files: ui/src/pages/new-session/draft-gateway-state.ts, ui/src/e2e/new-session-page.cloud-dispatch.e2e.test.ts)
  • Tak Hoffman: The merged current-main change that added this cloud-retry scenario credits this contributor as a co-author. (role: feature contributor; confidence: medium; commits: bd9eeaebf083; files: ui/src/e2e/new-session-page.cloud-dispatch.e2e.test.ts)

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.

@steipete

Copy link
Copy Markdown
Contributor Author

Addressed the remaining verification risk: the acting maintainer directly inspected the installed Playwright 1.62.1 clock implementation in node_modules/playwright-core/lib/coreBundle.js (injected controller at line 11801 and public bridges at 12239–12243 / 12284–12288). runFor replays each intervening timer and yields after each callback; fastForward moves existing timers to the destination once. The test keeps separate advances and request synchronization for all five retries.

Exact head ef27afa6e8316df418971a197f8d26aa963166d7 now has green hosted CI, including the UI E2E checks: https://github.com/openclaw/openclaw/actions/runs/33252192707. Local cloud/device proof passed all 15 cases, and clearing the catalog at retry exhaustion failed the retained machine-label assertion. No review finding remains open.

@steipete
steipete merged commit da1f6dd into main Aug 29, 2026
152 checks passed
@steipete
steipete deleted the codex/test-perf-cloud-retry-clock branch August 29, 2026 12:29
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

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 maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. 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