Skip to content

improve(test): speed up config and device binding browser tests - #192404

Merged
roboclaw-bot merged 1 commit into
mainfrom
test-health/config-form-clock
Nov 4, 2026
Merged

roboclaw-bot merged 1 commit into
mainfrom
test-health/config-form-clock

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

Related: #192116

What Problem This Solves

Config form and device-binding browser tests spend real seconds waiting for Saved to offer Apply changes.

User Impact

No user-visible behavior changes. The same seven E2E cases run faster: summed file medians fall from 35.429s to 16.633s, saving 18.796s (53.1%).

Why This Change Was Made

Reuse the page-clock polling pattern from #192116. Advance one polling window at a time so config RPCs can settle between ticks; resume the defaults clock for later edits and reloads. Preserve every payload, reload, acknowledgement, request-count, Saved, cleared-notice, and inventory-recovery assertion. No negative absence window is shortened.

The two-second grace contract remains owned by ui/src/lib/config/config-apply-prompt.test.ts; Saved-to-Apply presentation remains covered by ui/src/components/settings-save-indicator.test.ts. These E2E files retain the composed browser flows.

Test code grows 15 lines (+26/-11). config/test-lines-allocations/config-form-clock.txt allocates exactly those lines for clock setup, RPC-settled polling, and defaults clock resumption; the shared scalar is unchanged. Whole change: +28/-11, net +17 lines, with no production changes.

Evidence

All browser executions and scoped checks ran on the same Blacksmith 16-vCPU Testbox tbx_01m6hwpwe0p9br50jr7at1y43n, with frozen-lockfile bootstrap: run 41741331852. Baseline was pinned to 65a13b12d9609d386dac41a53784d57b710f56aa; candidate file digests match this commit. The conditional device-binding target passed its fresh unchanged baseline before editing.

Three baseline and three candidate samples below use native Vitest file-summary durations, including file hooks and excluding shared build/startup. Every sample passed all seven cases. These are file timings, not CI critical-path measurements.

File under ui/src/e2e/ Baseline median Candidate median Saved
config-form-defaults.e2e.test.ts 23.996s 10.151s 13.845s
device-binding-state.e2e.test.ts 11.433s 6.482s 4.951s
Sum of file medians 35.429s 16.633s 18.796s
Individual samples and relevant case medians
File Baseline samples 1 / 2 / 3 Candidate samples 1 / 2 / 3
config-form-defaults.e2e.test.ts 23.996 / 24.025 / 23.976 10.132 / 10.189 / 10.151
device-binding-state.e2e.test.ts 11.426 / 11.433 / 11.457 6.442 / 6.482 / 6.511
Case Baseline median Candidate median
Automation trigger overrides (three saves) 11.820s 4.881s
Node automatic-update defaults (two saves) 7.761s 3.184s
Optional scalar clearing (one save) 4.389s 2.059s
Binding clear: removed 5.183s 2.713s
Binding clear: capability-lost 5.182s 2.708s
corepack pnpm test:ui:e2e ui/src/e2e/config-form-defaults.e2e.test.ts ui/src/e2e/device-binding-state.e2e.test.ts --maxWorkers=1 --reporter=default --reporter=json --outputFile=<per-run-report.json>

Each mutation was paired against unchanged baseline test bytes and the exact candidate bytes. Killed means an existing behavioral assertion failed, not merely a setup or runner failure.

File Mutation Baseline Candidate Existing failure
Defaults Keep Saved forever so Apply never appears Killed Killed Apply text remains Saved
Defaults Write the wrong automation default Killed Killed Exact config.set payload mismatch
Defaults Lose the second write acknowledgement Killed Killed Apply text remains Saving
Binding Keep Saved forever so Apply never appears Killed, both variants Killed, both variants Apply text remains Saved
Binding Lose the second write acknowledgement Killed, both variants Killed, both variants Apply text remains Saving
Binding Retain the cleared agent override Killed, both variants Killed, both variants Second config.set never arrives

Both binding variants are removed and capability-lost. Every baseline kill was retained. All eight production-mutation restorations matched SHA-256 digests, and final restored candidate inputs matched the committed files. No mutation or probe is committed.

  • Scoped two-file oxfmt, oxlint, and typecheck passed on Testbox; git diff --check passed.
  • Isolated Codex autoreview of the full patch and both complete test files: P0-P2 scoped-clean, no actionable findings. The final source bytes are unchanged from that review.
  • Pre-PR proof ran without browser/container runs, dependency installs, Bun staging, or broad lint/typecheck/test suites on the production Team host. PR CI supplies broad proof.
  • Testbox was stopped after proof. No CHANGELOG or STATE.md changes.

Exact-head landing CI

CI run 41744241640, attempt 1 tested head 8e8ed2a011674436df764c1e138214d851f14e66 in merge 3664ecd108b75710d9b9ceefe2bee1d98d4d759e over main c16858baa256a33134f35970df04519f48d3d7ed. checks-ui-e2e (1/2) ran and passed all three defaults cases and all four device-binding cases. Security and all other non-aggregate selected CI jobs passed or were intentionally skipped.

checks-fast-baseline-ratchets failed only test-lines: 6,446,293 lines against ceiling 6,446,247, over by 46; net delta +15. Direct comparison of its ordered merge parents shows this PR adds exactly 15 test LF bytes and 15 allocation lines. The tested main base therefore already had 6,446,278 test lines against ceiling 6,446,232: the same 46-line deficit. The shared scalar and checker are unchanged. The classifier marked the job new against an older scheduled main run whose selected scope was not compared; the inspected exact-base arithmetic establishes inherited debt. This landing uses the authorized pre-existing-failure route and retains failed CI; it does not raise the shared baseline or add allocation beyond this PR's own 15 lines.

Advance Saved-to-Apply polling with the page clock while preserving config payloads, reloads, acknowledgements, and binding recovery assertions.

Co-authored-by: steipete <[email protected]>
@clawsweeper

clawsweeper Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review in progress

ClawSweeper is reviewing this revision. This supersedes any previous blocked status.

View the workflow run.

@roboclaw-bot
roboclaw-bot merged commit de7e9c3 into main Nov 4, 2026
95 of 98 checks passed
@roboclaw-bot
roboclaw-bot deleted the test-health/config-form-clock branch November 4, 2026 00:20
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 4, 2026
…claw#192404)

Advance Saved-to-Apply polling with the page clock while preserving config payloads, reloads, acknowledgements, request counts, and binding recovery assertions. All seven browser cases remain covered.

Allocate exactly 15 test lines for clock setup, RPC-settled polling, and defaults clock resumption in config/test-lines-allocations/config-form-clock.txt; keep the shared scalar unchanged.

Exact-head CI run 41744241640 passed both e2e files. The documented pre-existing-failure route admits the unchanged 46-line test-lines deficit already present on its tested main base; CI remains recorded as failed.

Co-authored-by: steipete <[email protected]>
vincentkoc added a commit that referenced this pull request Nov 4, 2026
* commit 'b4ebd3673fea4932296b92bbc07b7abc4bdc792d':
  fix(ci): allow serial SDK API reports to finish (#192196)
  fix(ci): run PostgreSQL checks when its shard planner changes (#191963)
  fix(ci): model native Linux updater asset entry
  improve(test): speed up config and device binding browser tests (#192404)
  improve(ui): show arrivals top right with a contextual session status (#192016)
  improve(ui): mark error toasts and split two-sentence copy (#192015)
  fix(sandbox): give dependency builders a writable home (#192390)
  fix(worktrees): keep archive manifest checks off the main thread (#192358)
  fix(cron): preserve admitted runs and pacing across unrelated MCP reloads (#192399)
  improve(ui): stack toasts in a center lane and an arrivals lane (#192014)
  fix: reclaim abandoned read-only database snapshots (#192368)
  improve(ui): rebuild the toast on one component with variants and a hover dismiss (#192013)
  docs: consolidate team server and team setup into one Multiplayer page
  fix(ci): reconcile remaining unallocated test lines
  feat: run admitted MCP tools on the worker node that hosts them (#191387)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant