Skip to content

fix: rank cross-engine actions by native input to commit - #189030

Merged
steipete merged 2 commits into
mainfrom
solid2/w-webkit-260-cluster-r2
Oct 31, 2026
Merged

steipete merged 2 commits into
mainfrom
solid2/w-webkit-260-cluster-r2

Conversation

@steipete

@steipete steipete commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Short Control UI actions were ranked by automation wall time, mixing WebKit input delivery and assertion waits with application work.

User Impact

There is no user-visible UI change. Cross-engine reports now rank native-input-to-DOM-commit elapsed time while keeping driver and wall ratios visible.

Why This Change Was Made

Related: #189013. The earlier ~260 ms cluster did not establish a shared timer. The harness now records the first trusted native action event, last observed DOM mutation/native value edit, and scenario/settle boundaries on one browser clock. Missing boundaries remain unranked. The report and JSON headline use application elapsed time.

This is a DOM-commit proxy, not CPU or paint latency. Focus work can precede the first action event; compound typing/navigation retains driver gaps between inputs. The probe adds a scenario-end RPC, so instrumented wall times must not be called speedups over old uninstrumented runs. Navigation/reload and memory measurements retain their existing probes.

Evidence

Check Result
Both-engine native boundary contracts 8/8 passed: mutations, native value-only edits, no input, untrusted input
All 22 cluster rows, pilot 44/44 observations passed
Full paired census 880/880 observations passed: 22 rows × 20 Chromium/WebKit pairs; two identical baseline slots provide ten interleaved A/A pairs per engine/row; all event boundaries and phase sums validated
Source-mapped Timeline attribution 32 traces across both engines, both viewports, picker opening/search, typing and navigation
Bare-control delivery calibration 80 observations; 26-character native span C/W 12.85/28.0 ms; 15-character span 8.1/16.5 ms
Rejected containment experiment 60/60 assertions passed, but WebKit chat picker application +7.9% and provider picker +1.5%; removed both CSS lines
Typechecks pnpm tsgo:ui and pnpm tsgo:scripts passed
Scoped lint/format and whitespace Passed
PR CI Current-head CI 41171458832, PR tooling Darwin 41171459016, security review and CI gate passed
Main integration Script typecheck and scoped lint passed; smoke passed 10 supported observations with 2 expected mobile split-view skips, including native-event evidence and unsupported-viewport labels
Independent review Fresh local autoreview against merged main ebb10c7f6855, snapshot committed as 49d4769abde1; no actionable P0–P2 findings
Production build + strict startup Passed; base 88,766 B gzip startup JS, one CSS request; final patch has no UI/runtime changes

Picker Timeline traces retain real style/layout work: approximately 69–75 ms for the provider picker and 73–78 ms for the chat picker, versus 15–23 ms in Chromium. Source maps lead to the existing virtual-window measurements. The traces do not establish a flush for every row, so no speculative batching was added. No product speedup is claimed.

The new browser-local recorder is 100 lines; the harness is 939 → 974 lines against merged main. Across four changed files after integrating main: +204/−56 lines. It replaces the old trace-only event registration and report ranking; the helper remains separate so Playwright can serialize it intact. No reports, traces, or evidence bundles are committed. No browser visuals changed, and no remote leases or Docker containers were created.

Corrected ranking

The same instrumented observations put 14/22 rows above 1.3× on application elapsed time, versus 12/22 on wall time. This is a measurement correction, not a product speedup. Driver overhead is not a blanket explanation: the pickers retain roughly 60–70 ms of paired application excess, with only a few milliseconds of initial delivery excess. Cron search has a much larger initial delivery prefix; refresh/settings rows generally fall below the application target.

The initial prefix includes locator/actionability/focus delivery and can contain application focus work. The tail below includes assertions, the final frame wait and collection; it is distinct from the retained final-only settleWaitMs. Compound inputs still contain intermediate driver gaps in the application span.

Host one-minute load ranged 14.7–39.0 on 32 logical CPUs. A/A is visible below: desktop Cron menu/search and navigation have large Chromium variation. Desktop navigation is only 1.306× and its A/A slots straddle the target; do not treat that row as a confirmed regression. The picker-search gaps persist in both slots and are backed by separate Timeline traces.

All 22 rows — milliseconds; C = Chromium, W = WebKit
Action View n C/W Application C med/p95 Application W med/p95 App W/C Driver C/W med Driver W/C Tail C/W med Wall C/W med Wall W/C App A/A C/W
cron-menu-open desktop 20/20 38.0/110.7 118.0/132.0 3.105 68.2/132.0 1.937 80.9/76.0 203.2/321.8 1.584 +88.4%/+0.4%
cron-search mobile 20/20 29.8/35.6 80.0/87.0 2.689 21.8/121.5 5.586 43.9/42.0 94.5/244.4 2.587 -2.7%/-2.5%
cron-search desktop 20/20 26.1/41.3 68.0/89.0 2.605 29.2/225.5 7.709 42.5/42.5 103.3/338.1 3.274 -22.3%/+1.5%
cron-menu-open mobile 20/20 31.3/36.3 77.0/85.0 2.460 44.3/99.0 2.235 87.6/68.0 162.8/245.0 1.506 -0.2%/-3.8%
cron-open mobile 20/20 45.3/64.0 108.0/116.0 2.384 46.0/49.5 1.077 47.9/37.5 143.4/195.1 1.361 +76.6%/+0.0%
cron-open desktop 20/20 48.6/54.6 110.0/121.0 2.263 45.0/58.5 1.301 50.4/43.5 142.2/213.3 1.500 -0.7%/-1.4%
provider-model-picker-open-search desktop 20/20 59.0/68.0 129.5/147.0 2.195 30.8/32.0 1.037 31.6/34.0 127.7/196.1 1.535 -8.6%/+2.4%
provider-model-picker-open-search mobile 20/20 63.8/110.3 125.5/134.0 1.969 30.5/34.0 1.115 34.1/31.0 128.5/196.1 1.526 +2.7%/-3.5%
model-picker-open-search mobile 20/20 64.1/76.3 126.0/130.0 1.966 29.4/31.0 1.054 34.8/36.0 127.7/194.7 1.524 +2.2%/+2.8%
model-picker-open-search desktop 20/20 72.2/80.8 135.5/151.0 1.878 29.2/32.0 1.098 33.0/36.0 129.2/204.2 1.581 -7.6%/+3.3%
chat-typing mobile 20/20 58.2/72.2 94.0/111.0 1.615 15.2/23.5 1.541 59.7/63.0 128.5/178.7 1.390 -1.5%/-5.7%
chat-typing desktop 20/20 52.1/137.3 83.5/112.0 1.604 8.5/19.0 2.222 60.3/60.5 126.1/162.8 1.292 -5.3%/-3.6%
model-picker-navigate mobile 20/20 83.5/203.0 133.0/166.0 1.594 6.8/8.0 1.176 29.0/27.5 119.0/163.0 1.370 -0.3%/+4.3%
model-picker-navigate desktop 20/20 119.8/229.1 156.5/227.0 1.306 6.2/7.0 1.129 33.9/30.5 160.2/194.8 1.216 -25.5%/-4.7%
settings-open mobile 20/20 56.4/63.8 62.0/70.0 1.099 1.6/2.0 1.290 71.5/90.5 128.5/157.8 1.228 +1.3%/+2.4%
cron-refresh desktop 20/20 14.5/16.0 15.0/16.0 1.038 31.5/43.5 1.381 79.9/71.0 125.0/129.6 1.037 -7.5%/-6.2%
settings-open desktop 20/20 69.6/81.3 68.5/81.0 0.985 1.6/2.0 1.250 68.2/100.5 142.5/169.3 1.188 +0.1%/+8.3%
provider-usage-refresh desktop 20/20 25.4/25.9 23.0/26.0 0.907 31.1/44.0 1.413 72.4/57.0 128.6/121.3 0.943 -0.6%/-4.2%
provider-usage-refresh mobile 20/20 25.2/26.5 22.5/26.0 0.895 30.5/35.0 1.149 73.3/56.5 129.1/114.0 0.883 -0.0%/+0.0%
cron-refresh mobile 20/20 14.0/15.0 11.0/12.0 0.783 32.7/38.0 1.164 80.7/64.0 126.4/112.9 0.893 +0.7%/-4.3%
storage-refresh desktop 20/20 15.1/15.6 6.0/6.0 0.397 30.9/34.0 1.099 49.7/72.0 95.3/113.0 1.185 -0.0%/+0.0%
storage-refresh mobile 20/20 15.0/16.4 5.0/7.0 0.332 30.9/33.0 1.070 49.7/60.0 95.8/96.9 1.012 -0.7%/+0.0%
Source-mapped picker and typing attribution
Viewport Action C app 1 / 2 W app 1 / 2 C style/layout union 1 / 2 W style/layout union 1 / 2
desktop provider-model-picker-open-search 66.30 / 65.30 151.00 / 166.00 15.05 / 15.30 68.62 / 72.08
desktop model-picker-open-search 79.40 / 82.20 168.00 / 165.00 20.84 / 23.28 78.10 / 77.37
desktop chat-typing 52.60 / 51.80 110.00 / 91.00 7.65 / 7.49 19.85 / 19.85
mobile provider-model-picker-open-search 67.20 / 80.80 160.00 / 158.00 15.36 / 17.73 75.19 / 72.55
mobile model-picker-open-search 78.20 / 80.20 164.00 / 153.00 20.96 / 21.87 77.29 / 72.97
mobile chat-typing 58.80 / 59.40 104.00 / 104.00 11.68 / 11.63 28.04 / 28.30

These are paired traced observations, with overlapping style/layout intervals counted as a union and clipped to the application span. The provider picker reaches select-picker-window.tsx:64 and virtual-core's offsetHeight fallback, with a separate viewport read from _willUpdate. The chat picker reaches chat-model-picker-window.tsx:84. The measured flushes are per changed window, not a demonstrated flush per mounted row. The containment pilot was rejected; no owner change is included.

Changed-file LOC against merged main: 1,817 → 1,965 (+204/−56); runtime UI delta: zero. The PR UI tree matches merged main. The retained census bundle was built at 60ba2bc1c107 and measured 88,766 B gzip JS, 33,568 B gzip CSS and one startup CSS request; these are baseline bundle measurements, not a new measurement of later unrelated main changes. Reports and raw evidence remain outside the commit.

Main moved during the first landing attempt. The native guard reported a real harness conflict and confirmed no request was dispatched. This head merges main and keeps its chat-action observation hooks outside the application window, plus its skipped-viewport reporting. The original 880-sample census uses the retained bundle and pre-integration harness snapshot; the new 12-cell smoke verifies the merged paths.

Landing: the normal native workflow merged 49d4769abde1 as 8d83344835ca6f1a1828126ea0a6b3b458836154 after all current checks passed. Prior-success attempts did not dispatch a merge: one lacked the old-run PR association, and another awaited complete check-suite evidence. No admin exception, CI rerun or failing-test waiver was used. The native workflow removed its managed PR worktree.

@clawsweeper

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 31, 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-31T05:11:27.606552Z 49d4769 New commits
ℹ️ 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.

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: M labels Oct 31, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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 clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 31, 2026
@clawsweeper

clawsweeper Bot commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR ranks cross-engine benchmark actions by native-input-to-DOM-commit elapsed time while retaining driver and wall-time diagnostics.

Example: The Cron benchmark enters “Warm automation 0499”.

  • Before: The engine comparison ranks the action using automation wall time, including delivery and assertion waits.
  • After: The comparison ranks the observed input-to-commit span and displays driver and wall ratios separately.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The focused implementation is source-consistent and has no concrete finding, while reported execution results remain independently unverified.
Proof confidence 🦐 gold shrimp (3/6) The maintainer-authored PR is outside the ordinary contributor proof gate; its body reports both-engine boundary checks and production-bundle pilot runs, but supplies no inspectable run artifacts.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: Developers can mistake engine-specific automation delays for application work when comparing short Control UI actions.
Reason: Maintainer direction is established, the diagnostic distinction is useful, and the patch explicitly limits its claims to an elapsed DOM-commit proxy.

Merge readiness

⛔ Needs changes before merge - 1 item remains

Keep this PR open: it adds useful benchmark attribution, has approved maintainer direction, and introduces no concrete defect found in this review; GitHub reports a merge conflict.

Priority: P3
Reviewed head: 2f9b54a18575c377a819c86e11b0f2748ae5048f

Before merge

  • Complete next step - Resolve the merge conflict in the benchmark and retain main’s chat-action observation and report behavior.

Findings

None.

Tests

  • Missing end-to-end proof: Reported browser runs are not accompanied by inspectable observations or traces, and a committed base-red/head-green regression is not shown.
Agent review details

How this fits together

The developer benchmark drives production Control UI bundles with Playwright and a synthetic Gateway, then converts browser observations into JSON and Markdown comparisons.

flowchart LR
  A[Playwright scenarios] --> B[Production Control UI]
  C[Synthetic Gateway] --> B
  B --> D[Browser timing recorder]
  D --> E[Observation records]
  E --> F[Engine distributions]
  F --> G[JSON and Markdown reports]
Loading

Technical review

Best possible solution:

Keep timing attribution in the existing benchmark owner, preserve its documented limits, and integrate it with main’s newer chat-action observations.

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

Current-main source confirms that headline comparisons use wall-time medians, which include automation and assertion waits; no target code was executed during this read-only review.

Is this the best way to solve the issue?

The smallest complete change is one browser-local recorder feeding the existing observations and ranking, and this patch follows that design without introducing a competing timing owner.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Headline comparison metric changes intended behavior with a stated reason (a54402e: The cross-engine companion compared automation wall time while warning that engine CPU measurements were not equivalent.)
  • Native input and run marks keeps the original intent (a78dc17: Trace-only marks and scenario/settle fields distinguished delivery, scenario work, and final frame waits during the WebKit timing investigation.)
  • Performance measurement guidance keeps the original intent (824514c: Measured WebKit lessons require workload-specific interpretation and trace attribution before changing application behavior.)

Testing

Proof path: none.

Security

None.

Evidence

What I checked:

  • Introduced change verified: The pinned merge-base-to-head diff adds one browser-local recorder, replaces trace-only event registration, and changes report ranking without changing application runtime code. (scripts/bench-control-ui-engines.ts:544, 2f9b54a18575)
  • Timing boundary implementation: The recorder rejects untrusted input, includes native value edits without mutation records, disconnects at scenario end, and leaves application timing null when either boundary is absent. (scripts/lib/control-ui-engine-action-timing.ts:18, 2f9b54a18575)
  • Current main still uses wall ranking: Fetched main retains the wall-time comparison; its newer chat-action census changes overlapping benchmark sections but does not implement this recorder. (scripts/bench-control-ui-engines.ts, 9a35cb97bcd1)
  • Prior diagnostic intent: test(ui): separate engine action and settle timings #189013 separated scenario and settle timings to investigate misleading WebKit clusters; this PR extends that diagnostic work and preserves those fields. (scripts/bench-control-ui-engines.ts, a78dc179ff41)
  • Reported validation and merge state: The body reports both-engine boundary checks, a passing pilot, and trace attribution, with the full census still running; no raw output or linked artifacts are supplied, and GitHub reports mergeable=false and mergeable_state=dirty. (2f9b54a18575)
  • Policy and history inspection: Root and scripts policies were applied; no additional ancestor AGENTS.md files or maintainer-notes directory were present. Scoped history identifies repeated benchmark work by Peter Steinberger; following history eventually hit an unavailable old object. (scripts/AGENTS.md, 9a35cb97bcd1)

PR surface

Docs +13, Other +132. Total +145 across 4 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 2 22 9 +13
Config 0 0 0 0
Generated 0 0 0 0
Other 2 175 43 +132
Total 4 197 52 +145

Labels

Label changes:

  • add P3: This improves developer benchmark diagnostics without changing user-facing application behavior.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P3: This improves developer benchmark diagnostics without changing user-facing application behavior.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Link the completed benchmark observations and representative native-input/commit traces to make the reported results inspectable.

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 31, 2026, 12:40 AM ET / 04:40 UTC.

@steipete
steipete merged commit 8d83344 into main Oct 31, 2026
123 of 125 checks passed
@steipete
steipete deleted the solid2/w-webkit-260-cluster-r2 branch October 31, 2026 05:39
@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

P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts size: M status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant