Repository navigation
ci(bench): gate the PR bench on exact work counters, pair its timing, and diff against the first parent - #1640
Conversation
… and diff against the first parent
The PR bench's timing verdict could not detect anything inside its own noise
(±20-66% per operation, 8 samples, rounds merged with `max`), yet it still
flagged pull requests that never touched the runtime. Its base was the pull
request's recorded base SHA, so a delta could include other merges.
- benchmarks/js-framework/pair.mjs, from the merge commit, builds and serves
both trees' fixtures and drives them itself.
- It counts each operation's production-bundle calls (Chromium precise
coverage in a --jitless browser) and DOM mutations (a MutationObserver).
These are exact for a fixed build, and an A/A run matches across pages and
across runs.
- It times base and head in one browser, alternating per sample across 30
pairs. Repeatable operations loop to about 20ms per sample, clear of the
0.1ms timer floor. The head result carries the median head/base ratio and
its 95% bootstrap interval (stats.mjs pairedRatio).
- pr-report.mjs exits 1 for a byte value over its committed same-run budget, any
increase in a js-framework work counter, or a suite that failed on the merge
commit. Wall time is reported only: slower or faster only when the whole
interval lies beyond ±3%. The report states how far main has moved past the
pull request's recorded base.
- pr-bench.yml compares against the merge commit's first parent (HEAD^1), runs
the paired harness once instead of four rounds, and fails after uploading
the report when the report says so.
- js-framework/operations.mjs holds the shared operations and gates; run.mjs
drives exactly the same work.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
Autofix Details
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Even swap repeats skip the commit check
- Added a parity check in calibrate() to force swap repeat counts to odd, ensuring the timeClick commit check always verifies the row moved to index 998 rather than accepting the vacuous original-order comparison.
Or push these changes by commenting:
@cursor push 015c0d1683
Preview (015c0d1683)
diff --git a/benchmarks/js-framework/pair.mjs b/benchmarks/js-framework/pair.mjs
--- a/benchmarks/js-framework/pair.mjs
+++ b/benchmarks/js-framework/pair.mjs
@@ -175,6 +175,9 @@
// A selection sample ends on the alternate row, so the next one starts by
// selecting a different row instead of re-selecting the current one.
if (op.alternateClick && repeat % 2 === 1) repeat++;
+ // Swap must use an odd repeat so the commit check in timeClick can verify
+ // the row actually moved (an even count restores the original order).
+ if (op.name === 'swap' && repeat % 2 === 0) repeat++;
return Math.max(repeat, 2);
}You can send follow-ups to the cloud agent here.
Benchmark report
Compares js-framework: 1k/10k row operationsAll 20 timed operations (20 without a verdict)
All 64 work counters are unchanged. Application bundle size (bytes)❌ 17 value(s) exceed their committed budget. Reduce the growth, or raise the budget in a separate pull request that names the bytes and the reason (CONTRIBUTING.md, "Size budgets").
No changes across 45 measured values. Public-import reachability bundles (bytes)❌ 38 value(s) exceed their committed budget. Reduce the growth, or raise the budget in a separate pull request that names the bytes and the reason (CONTRIBUTING.md, "Size budgets").
No changes across 105 measured values. |
…k counters An even number of swaps restores the original row order, which a swap that did nothing would also leave, so the timed-click check could not tell them apart. Calibration now keeps swap repetitions odd, so every sample ends swapped and is verified. The report also says when every js-framework work counter is unchanged, so a green gate is visible beside the timing table. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ing shifts The PR bench called tsrx `remove` 5.3% slower on a change that does not touch the runtime. Calibration had sized the loop from one cold remove (~0.3ms), but a warm looped remove takes ~0.03ms, so each sample lasted ~2ms. On Chromium's 0.1ms timer, every pair then differed by whole ticks (20/19 = +5.3%). - Calibration now grows the repeat count on looped samples until one actually takes about 20ms. The caps are raised (select needs ~2,900 clicks; remove may take 800 of the 1,000 rows), and each stat records its median sample duration. - The report gives a timing verdict only when the median shift also spans two 0.1ms ticks of the sample, so a ~3ms create that cannot loop is not called slower on quantization. Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
Autofix Details
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Head calibration dirties update labels
- Added
await ensureState(page, 'empty')at the end ofcalibrateto clear the head table after calibration loops, so the sampling loop rebuilds fresh rows symmetrically for both sides.
- Added
Or push these changes by commenting:
@cursor push fdd471126a
Preview (fdd471126a)
diff --git a/benchmarks/js-framework/pair.mjs b/benchmarks/js-framework/pair.mjs
--- a/benchmarks/js-framework/pair.mjs
+++ b/benchmarks/js-framework/pair.mjs
@@ -181,6 +181,7 @@
if (elapsed >= SAMPLE_MS * 0.8 || repeat >= cap) break;
repeat = parityFor(op, Math.min(cap, Math.ceil((repeat * SAMPLE_MS) / Math.max(elapsed, 0.1))));
}
+ await ensureState(page, 'empty');
return Math.min(repeat, parityFor(op, cap));
}You can send follow-ups to the cloud agent here.
`update` appends to every tenth label on each click, and ensureState keeps a 1,000-row table, so labels grew across looped samples. Head also started longer, because calibration clicked only there. That asymmetry could read as an update slowdown on identical builds. - Every update sample, timed or calibrating, starts from freshly built rows. - Calibration's trial loops are replayed on the base page, so both pages run the identical operation sequence and their seeded label streams stay in step. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
# Conflicts: # package.json
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
Bugbot Autofix prepared fixes for both issues found in the latest run.
- ✅ Fixed: Update prepare misses rebuild commit
- Changed prepare() to clear the table to 0 rows first so the subsequent ensureState rebuild waits for a real 0→1000 transition instead of a no-op check on an already-1000-row table.
- ✅ Fixed: Over-budget rows marked within budget
- Filtered budget-breached (target, op) pairs out of the larger list before emitting the 'within budget' headline note, so a metric cannot be reported as both exceeding its budget and growing within it.
Or push these changes by commenting:
@cursor push fa9f94eb1b
Preview (fa9f94eb1b)
diff --git a/.agents/skills/performance-audit/SKILL.md b/.agents/skills/performance-audit/SKILL.md
--- a/.agents/skills/performance-audit/SKILL.md
+++ b/.agents/skills/performance-audit/SKILL.md
@@ -39,6 +39,10 @@
a quick smoke result with a full result.
- Treat a delta inside observed variance as inconclusive. Prefer ratio guards
and deterministic counters when wall-clock noise is larger than the claim.
+ - The pull request benchmark gates js-framework production calls and DOM
+ mutations per operation against the merge commit's first parent: any
+ increase fails it. Wall time there is a paired report, called slower or
+ faster only when its 95% interval lies beyond ±3%.
4. **Diagnose**
- Runtime hot paths: scheduler queues, effect flushing, keyed reconciliation, event delegation, context propagation, refs.
diff --git a/.claude/skills/performance-audit/SKILL.md b/.claude/skills/performance-audit/SKILL.md
--- a/.claude/skills/performance-audit/SKILL.md
+++ b/.claude/skills/performance-audit/SKILL.md
@@ -39,6 +39,10 @@
a quick smoke result with a full result.
- Treat a delta inside observed variance as inconclusive. Prefer ratio guards
and deterministic counters when wall-clock noise is larger than the claim.
+ - The pull request benchmark gates js-framework production calls and DOM
+ mutations per operation against the merge commit's first parent: any
+ increase fails it. Wall time there is a paired report, called slower or
+ faster only when its 95% interval lies beyond ±3%.
4. **Diagnose**
- Runtime hot paths: scheduler queues, effect flushing, keyed reconciliation, event delegation, context propagation, refs.
diff --git a/.cursor/skills/performance-audit/SKILL.md b/.cursor/skills/performance-audit/SKILL.md
--- a/.cursor/skills/performance-audit/SKILL.md
+++ b/.cursor/skills/performance-audit/SKILL.md
@@ -36,6 +36,10 @@
a quick smoke result with a full result.
- Treat a delta inside observed variance as inconclusive. Prefer ratio guards
and deterministic counters when wall-clock noise is larger than the claim.
+ - The pull request benchmark gates js-framework production calls and DOM
+ mutations per operation against the merge commit's first parent: any
+ increase fails it. Wall time there is a paired report, called slower or
+ faster only when its 95% interval lies beyond ±3%.
4. **Diagnose**
- Runtime hot paths: scheduler queues, effect flushing, keyed reconciliation, event delegation, context propagation, refs.
diff --git a/.gemini/skills/performance-audit/SKILL.md b/.gemini/skills/performance-audit/SKILL.md
--- a/.gemini/skills/performance-audit/SKILL.md
+++ b/.gemini/skills/performance-audit/SKILL.md
@@ -39,6 +39,10 @@
a quick smoke result with a full result.
- Treat a delta inside observed variance as inconclusive. Prefer ratio guards
and deterministic counters when wall-clock noise is larger than the claim.
+ - The pull request benchmark gates js-framework production calls and DOM
+ mutations per operation against the merge commit's first parent: any
+ increase fails it. Wall time there is a paired report, called slower or
+ faster only when its 95% interval lies beyond ±3%.
4. **Diagnose**
- Runtime hot paths: scheduler queues, effect flushing, keyed reconciliation, event delegation, context propagation, refs.
diff --git a/.github/skills/performance-audit/SKILL.md b/.github/skills/performance-audit/SKILL.md
--- a/.github/skills/performance-audit/SKILL.md
+++ b/.github/skills/performance-audit/SKILL.md
@@ -39,6 +39,10 @@
a quick smoke result with a full result.
- Treat a delta inside observed variance as inconclusive. Prefer ratio guards
and deterministic counters when wall-clock noise is larger than the claim.
+ - The pull request benchmark gates js-framework production calls and DOM
+ mutations per operation against the merge commit's first parent: any
+ increase fails it. Wall time there is a paired report, called slower or
+ faster only when its 95% interval lies beyond ±3%.
4. **Diagnose**
- Runtime hot paths: scheduler queues, effect flushing, keyed reconciliation, event delegation, context propagation, refs.
diff --git a/.github/workflows/pr-bench.yml b/.github/workflows/pr-bench.yml
--- a/.github/workflows/pr-bench.yml
+++ b/.github/workflows/pr-bench.yml
@@ -1,10 +1,17 @@
name: PR bench
-# Measures every ready pull request against its base commit on the SAME runner
-# and renders benchmarks/pr-report.mjs's Markdown report. Fork pull requests get
-# a read-only token here, so this job only uploads the report; the trusted
+# Measures every ready pull request against the main commit it would land on,
+# on the SAME runner, and renders benchmarks/pr-report.mjs's Markdown report.
+# That base is the merge commit's first parent, so every delta is this pull
+# request's own; the pull request's recorded base can trail main by several
+# merges, which the report states separately. Fork pull requests get a
+# read-only token here, so this job only uploads the report; the trusted
# "PR bench comment" workflow posts it. Absolute numbers stay runner-specific:
# the report compares base and merge commit from this one run only.
+#
+# The job fails when a byte value exceeds its committed budget, when a
+# js-framework work counter (production calls, DOM mutations) increases, or
+# when a benchmark fails on the merge commit. Wall time is reported only.
on:
pull_request:
@@ -29,23 +36,28 @@
runs-on: blacksmith-4vcpu-ubuntu-2404
timeout-minutes: 60
env:
- BASE_SHA: ${{ github.event.pull_request.base.sha }}
+ EVENT_BASE_SHA: ${{ github.event.pull_request.base.sha }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
- # Only Octane rows are reported; timing other frameworks would only add runtime.
- JS_FRAMEWORK_TARGETS: '[{"name":"octane-tsrx","url":"http://localhost:5176/","ready":"#run"},{"name":"octane-jsx","url":"http://localhost:5177/","ready":"#run"}]'
steps:
- name: Checkout merge commit
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
with:
persist-credentials: false
+ # The merge commit and its parents: the first parent is the base.
+ fetch-depth: 2
- name: Check out base commit
+ env:
+ GH_TOKEN: ${{ github.token }}
run: |
+ base=$(git rev-parse HEAD^1)
+ echo "BASE_SHA=$base" >> "$GITHUB_ENV"
echo "BASE_TREE=$RUNNER_TEMP/base" >> "$GITHUB_ENV"
echo "RESULTS=$RUNNER_TEMP/pr-bench" >> "$GITHUB_ENV"
- git fetch --no-tags --depth=1 origin "$BASE_SHA"
- git worktree add --detach "$RUNNER_TEMP/base" "$BASE_SHA"
+ drift=$(gh api "repos/$GITHUB_REPOSITORY/compare/$EVENT_BASE_SHA...$base" --jq .ahead_by || true)
+ echo "BASE_DRIFT=$drift" >> "$GITHUB_ENV"
+ git worktree add --detach "$RUNNER_TEMP/base" "$base"
- name: Install pnpm
uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6
@@ -61,16 +73,13 @@
pnpm install --prod false --frozen-lockfile
pnpm --dir "$BASE_TREE" install --prod false --frozen-lockfile
+ # The merge commit's harness drives both trees, so only its browser is needed.
- name: Install Playwright Chromium
- run: |
- pnpm --filter octane-js-framework-benchmarks exec playwright install --with-deps chromium
- pnpm --dir "$BASE_TREE" --filter octane-js-framework-benchmarks exec playwright install chromium
+ run: pnpm --filter octane-js-framework-benchmarks exec playwright install --with-deps chromium
# A failing suite is recorded in its result JSON and rendered in the
# report, so both trees always run to completion before the verdict.
# Byte suites are deterministic and run once per tree, both trees at once.
- # js-framework runs base, head, head, base so runner drift over the job
- # cancels out.
- name: Benchmark bundle size
id: bytes
run: |
@@ -89,35 +98,35 @@
done
echo "status=$status" >> "$GITHUB_OUTPUT"
- - name: Benchmark js-framework
- id: timing
- env:
- TARGETS: ${{ env.JS_FRAMEWORK_TARGETS }}
+ # One harness, the merge commit's, builds and serves both trees' fixtures
+ # and drives them in one browser: exact work counters per operation, then
+ # base and head samples alternating pair by pair (js-framework/pair.mjs).
+ - name: Benchmark js-framework (paired)
run: |
- status=0
- for round in base:1 head:1 head:2 base:2; do
- side=${round%%:*}
- tree=$GITHUB_WORKSPACE
- if [ "$side" = base ]; then tree=$BASE_TREE; fi
- if (cd "$tree" && node benchmarks/bench.mjs --results-dir="$RESULTS/$side-js-${round##*:}" --servers=octane-tsrx-jsbench,octane-jsx-jsbench js-framework); then :
- elif [ "$side" = head ]; then status=1
- else echo "::warning::base js-framework round failed"; fi
- done
- echo "status=$status" >> "$GITHUB_OUTPUT"
+ node benchmarks/js-framework/pair.mjs --base-tree="$BASE_TREE" \
+ --base-json="$RESULTS/base/js-framework.json" \
+ --head-json="$RESULTS/head/js-framework.json" \
+ || echo "::warning::paired js-framework benchmark failed; the report names the side"
+ # The report exits non-zero for a budget breach, an increased work
+ # counter, or a benchmark that failed on the merge commit. Record that and
+ # fail only after the report is uploaded for the comment workflow.
- name: Render report
+ id: report
env:
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
MERGE_SHA: ${{ github.sha }}
PR_NUMBER: ${{ github.event.pull_request.number }}
run: |
mkdir -p "$RESULTS/report"
+ status=0
HEAD_SHA="$MERGE_SHA" node benchmarks/pr-report.mjs \
- --base="$RESULTS/base" --head="$RESULTS/head" --rounds=2 \
- --out="$RESULTS/report/report.md"
+ --base="$RESULTS/base" --head="$RESULTS/head" \
+ --out="$RESULTS/report/report.md" || status=$?
printf '%s\n' "$PR_NUMBER" > "$RESULTS/report/pr-number"
printf '%s\n' "$HEAD_SHA" > "$RESULTS/report/head-sha"
cat "$RESULTS/report/report.md" >> "$GITHUB_STEP_SUMMARY"
+ echo "status=$status" >> "$GITHUB_OUTPUT"
- name: Upload report
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
@@ -128,6 +137,6 @@
${{ env.RESULTS }}/*/*.json
retention-days: 14
- - name: Fail when the merge commit's benchmarks failed
- if: steps.bytes.outputs.status != '0' || steps.timing.outputs.status != '0'
+ - name: Fail on a budget breach, added work, or a failed benchmark
+ if: steps.bytes.outputs.status != '0' || steps.report.outputs.status != '0'
run: exit 1
diff --git a/.rulesync/skills/performance-audit/SKILL.md b/.rulesync/skills/performance-audit/SKILL.md
--- a/.rulesync/skills/performance-audit/SKILL.md
+++ b/.rulesync/skills/performance-audit/SKILL.md
@@ -38,6 +38,10 @@
a quick smoke result with a full result.
- Treat a delta inside observed variance as inconclusive. Prefer ratio guards
and deterministic counters when wall-clock noise is larger than the claim.
+ - The pull request benchmark gates js-framework production calls and DOM
+ mutations per operation against the merge commit's first parent: any
+ increase fails it. Wall time there is a paired report, called slower or
+ faster only when its 95% interval lies beyond ±3%.
4. **Diagnose**
- Runtime hot paths: scheduler queues, effect flushing, keyed reconciliation, event delegation, context propagation, refs.
diff --git a/benchmarks/README.md b/benchmarks/README.md
--- a/benchmarks/README.md
+++ b/benchmarks/README.md
@@ -150,7 +150,7 @@
portable only across the same fixture and toolchain. Neither is a CI gate. See
[`baselines/README.md`](baselines/README.md).
-**Pull request report:** `.github/workflows/pr-bench.yml` runs `js-framework` (Octane targets only), `bundle-size`, and `bundle-reachability` on every ready pull request, for both the base commit and the merge commit on the same runner. Byte suites run once per tree; `js-framework` runs base, head, head, base so runner drift during the job cancels out. [`pr-report.mjs`](pr-report.mjs) diffs the two result sets and `.github/workflows/pr-bench-comment.yml` posts the Markdown as one sticky comment. Byte and count changes are reported exactly; a timing change only becomes a verdict outside its combined margin of error (at least 5%), by more than one 0.1ms timer tick, with the fastest sample moving the same way. Timing verdicts are yellow because a single shared runner remains noisy; byte increases are red. The report is informational: it fails only when a suite fails on the merge commit. Reproduce it locally by running the same suites with `--results-dir` in two checkouts, then `node benchmarks/pr-report.mjs --base=<dir> --head=<dir>`. With `--rounds=<n>`, `js-framework` is read from `<dir>-js-1` … `<dir>-js-<n>` and a missing round fails the suite.
+**Pull request report:** `.github/workflows/pr-bench.yml` runs `bundle-size`, `bundle-reachability`, and a paired `js-framework` comparison (Octane targets only) on every ready pull request. The base is the merge commit's first parent, the main commit the pull request would land on, so every delta is the pull request's own; the report says separately how far main has moved past the pull request's recorded base. Byte suites run once per tree. [`js-framework/pair.mjs`](js-framework/pair.mjs), from the merge commit, builds and serves both trees' fixtures and drives them itself. It counts each operation's production-bundle calls (Chromium precise coverage in a `--jitless` browser) and DOM mutations (a `MutationObserver`), which are exact for a fixed build. It then times base and head in one browser, alternating per sample across 30 pairs and looping repeatable operations to about 20ms per sample, and reports the median head/base ratio with a 95% bootstrap interval. [`pr-report.mjs`](pr-report.mjs) diffs the two result sets and `.github/workflows/pr-bench-comment.yml` posts the Markdown as one sticky comment. The job fails when a byte value exceeds its committed budget, when any js-framework work counter increases, or when a suite fails on the merge commit. Wall time is a report only: an operation is called slower or faster when its whole interval lies beyond ±3%. Reproduce it locally from one checkout with another as the base: `node benchmarks/js-framework/pair.mjs --base-tree=<checkout> --base-json=<dir>/base/js-framework.json --head-json=<dir>/head/js-framework.json`, the byte suites with `--results-dir` in each checkout, then `node benchmarks/pr-report.mjs --base=<dir>/base --head=<dir>/head`.
The **compare rule** is noise-aware: an op is a regression only if
`score > 1.15× baseline` **and** `min > 1.10× baseline`; for sub-1ms ops it must
diff --git a/benchmarks/js-framework/operations.mjs b/benchmarks/js-framework/operations.mjs
new file mode 100644
--- /dev/null
+++ b/benchmarks/js-framework/operations.mjs
@@ -1,0 +1,303 @@
+// The js-framework-benchmark operations and their browser-side gates, shared by
+// the local runner (run.mjs) and the paired pull request harness (pair.mjs) so
+// both drive exactly the same work.
+
+export const ROW_COUNT = 1000;
+export const ROW_COUNT_LARGE = 10000; // matches the canonical suite's runlots / clear table size
+
+export const CANONICAL_OPS = [
+ { name: 'run', pre: 'empty', click: '#run' },
+ { name: 'replace', pre: 'rows', click: '#run' },
+ // Canonical krausest "append 1,000 rows to a table of 1,000 rows". The
+ // next op's ensureState sees 2000 rows ≠ 1000 and rebuilds via #run.
+ { name: 'add', pre: 'rows', click: '#add' },
+ { name: 'update', pre: 'rows', click: '#update' },
+ {
+ name: 'select',
+ pre: 'rows',
+ click: 'tbody tr:nth-child(5) td:nth-child(2) a',
+ alternateClick: 'tbody tr:nth-child(6) td:nth-child(2) a',
+ },
+ { name: 'swap', pre: 'rows', click: '#swaprows' },
+ { name: 'remove', pre: 'rows', click: 'tbody tr:nth-child(5) td:nth-child(3) a' },
+ { name: 'runlots', pre: 'empty', click: '#runlots' },
+ {
+ name: 'select_lots',
+ pre: 'rows-large',
+ click: 'tbody tr:nth-child(5000) td:nth-child(2) a',
+ alternateClick: 'tbody tr:nth-child(5001) td:nth-child(2) a',
+ },
+ // Canonical js-framework-benchmark `clear` measures clearing the
+ // 10K-row table that `runlots` populated — NOT the 1K-row table from
+ // `run`. The previous `pre: 'rows'` rebuilt 1K rows before the timed
+ // click, so reported numbers were ~10x too fast and not comparable to
+ // the upstream suite. Use `rows-large` to ensure the 10K state first.
+ { name: 'clear', pre: 'rows-large', click: '#clear' },
+];
+
+// Mount optimizations must retain ordinary live-parent insertion semantics.
+export const DIRECT_LIST_MOUNTS = [
+ { name: '1k', button: 'run', initialRows: 0, addedRows: ROW_COUNT },
+ { name: '10k', button: 'runlots', initialRows: 0, addedRows: ROW_COUNT_LARGE },
+ { name: 'append_1k', button: 'add', initialRows: ROW_COUNT, addedRows: ROW_COUNT },
+ {
+ name: 'prepend_100',
+ button: 'prepend100',
+ initialRows: ROW_COUNT,
+ addedRows: 100,
+ insertion: 'prepend',
+ },
+ { name: 'append_100', button: 'append100', initialRows: ROW_COUNT, addedRows: 100 },
+ {
+ name: 'middle_100',
+ button: 'insertmid100',
+ initialRows: ROW_COUNT,
+ addedRows: 100,
+ insertion: 'middle',
+ },
+];
+
+export const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
+
+// Use the same data stream for every target. Label generation is inside the
+// measured create operations, so uncontrolled randomness would add dialect
+// noise through different string lengths and allocation patterns.
+export const seedRandom = (page) =>
+ page.evaluate(() => {
+ let state = 0x5eed5eed >>> 0;
+ Math.random = () => {
+ state = (state + 0x6d2b79f5) | 0;
+ let value = Math.imul(state ^ (state >>> 15), 1 | state);
+ value = (value + Math.imul(value ^ (value >>> 7), 61 | value)) ^ value;
+ return ((value ^ (value >>> 14)) >>> 0) / 4294967296;
+ };
+ });
+
+export async function ensureState(page, pre) {
+ if (pre === 'empty') {
+ await page.evaluate(() => {
+ const btn = document.getElementById('clear');
+ if (btn) btn.click();
+ });
+ await page.waitForFunction(() => document.querySelectorAll('tbody tr').length === 0, {
+ timeout: 5000,
+ });
+ } else if (pre === 'rows') {
+ const cnt = await page.evaluate(() => document.querySelectorAll('tbody tr').length);
+ if (cnt !== ROW_COUNT) {
+ await page.evaluate(() => document.getElementById('run').click());
+ await page.waitForFunction(
+ (n) => document.querySelectorAll('tbody tr').length === n,
+ ROW_COUNT,
+ { timeout: 5000 },
+ );
+ }
+ } else if (pre === 'rows-large') {
+ const cnt = await page.evaluate(() => document.querySelectorAll('tbody tr').length);
+ if (cnt !== ROW_COUNT_LARGE) {
+ await page.evaluate(() => document.getElementById('runlots').click());
+ await page.waitForFunction(
+ (n) => document.querySelectorAll('tbody tr').length === n,
+ ROW_COUNT_LARGE,
+ { timeout: 5000 },
+ );
+ }
+ }
+ await sleep(20);
+}
+
+// Time `repeat` clicks and their DOM commits without adding a frame or paint
+// wait, and return the elapsed milliseconds for all of them. A gc() right
+// before each sample keeps a surprise collection from inflating it.
+//
+// Click i targets selectors[i % selectors.length], so a repeated selection
+// alternates rows and every click does real work. Targets are resolved before
+// the timed window, except `remove`, whose target is the new fifth row each time.
+//
+// Targets that schedule a later commit expose window.__benchFlush: Octane uses
+// public flushSync and Vue awaits nextTick. The call stays in the timed window.
+// Verify the resulting DOM after t1, before any further async work, so this
+// semantic gate cannot inflate the timing or accidentally observe a later commit.
+export async function timeClick(page, op, selectors, repeat = 1) {
+ return await page.evaluate(
+ async ({ op, selectors, repeat }) => {
+ const query = (selector) => {
+ const el = document.querySelector(selector);
+ if (!el) throw new Error('selector not found: ' + selector);
+ return el;
+ };
+ const targets = op === 'remove' ? null : selectors.map(query);
+ const first = targets ? targets[0] : query(selectors[0]);
+ const last = targets ? targets[(repeat - 1) % targets.length] : null;
+ const tbody = document.querySelector('tbody');
+ const firstRow = tbody?.querySelector('tr');
+ const secondRow = op === 'swap' ? tbody?.rows[1] : null;
+ const removedRow = op === 'remove' ? first.closest('tr') : null;
+ const oldLabel =
+ op === 'update' ? firstRow?.querySelector('td:nth-child(2) a')?.textContent : null;
+ const flush = window.__benchFlush;
+ (window.gc || (() => {}))();
+ void document.body?.offsetHeight;
+ const t0 = performance.now();
+ for (let i = 0; i < repeat; i++) {
+ (targets ? targets[i % targets.length] : query(selectors[0])).click();
+ if (flush) await flush();
+ }
+ const elapsed = performance.now() - t0;
+ const expectedRows = {
+ run: 1000,
+ replace: 1000,
+ add: 2000,
+ update: 1000,
+ select: 1000,
+ swap: 1000,
+ remove: 1000 - repeat,
+ runlots: 10000,
+ select_lots: 10000,
+ clear: 0,
+ clear_1k: 0,
+ }[op];
+ if (tbody?.rows.length !== expectedRows) {
+ throw new Error(
+ `${op}: commit was not inside timed click (expected ${expectedRows} rows, found ${tbody?.rows.length})`,
+ );
+ }
+ // An even number of swaps restores the original order, so callers that
+ // need the swap verified repeat it an odd number of times.
+ const swappedRow = repeat % 2 === 1 ? tbody.rows[998] : tbody.rows[1];
+ if (
+ (op === 'replace' && firstRow === tbody.rows[0]) ||
+ (op === 'update' &&
+ oldLabel === tbody.rows[0]?.querySelector('td:nth-child(2) a')?.textContent) ||
+ (op === 'swap' && secondRow !== swappedRow) ||
+ (op === 'remove' && removedRow?.isConnected) ||
+ ((op === 'select' || op === 'select_lots') &&
+ !last.closest('tr')?.classList.contains('danger'))
+ ) {
+ throw new Error(`${op}: the expected DOM change was not committed inside the timed click`);
+ }
+ return elapsed;
+ },
+ { op: op.name, selectors, repeat },
+ );
+}
+
+export async function verifySelection(page, selector) {
+ await page.evaluate((selector) => {
+ const expected = document.querySelector(selector)?.closest('tr');
+ const selected = document.querySelectorAll('tbody tr.danger');
+ if (expected && selected.length === 1 && selected[0] === expected) return;
+
+ const rowId = (row) => row.querySelector('td')?.textContent || '(missing id)';
+ throw new Error(
+ 'selection gate failed: expected only ' +
+ (expected ? rowId(expected) : '(missing row)') +
+ ', found ' +
+ (Array.from(selected, rowId).join(', ') || '(none)'),
+ );
+ }, selector);
+}
+
+// Mount optimizations must retain ordinary live-parent insertion semantics.
+// Keep browser-visible instrumentation entirely outside every timed sample.
+export async function verifyDirectListMount(page, operation) {
+ await ensureState(page, operation.initialRows === 0 ? 'empty' : 'rows');
+ return await page.evaluate(async (operation) => {
+ const tbody = document.querySelector('tbody');
+ if (!tbody?.isConnected) throw new Error('mount gate: missing connected table body');
+ const before = Array.from(tbody.querySelectorAll('tr'));
+ if (before.length !== operation.initialRows) {
+ throw new Error(`mount gate: expected ${operation.initialRows} initial rows`);
+ }
+ const rowId = (row) => Number(row.firstElementChild?.textContent);
+ const survivors = new Map(before.map((row) => [rowId(row), row]));
+
+ const work = { liveParentInsertions: 0, fragmentCommits: 0, fragmentRows: 0 };
+ const originals = [];
+ const instrument = (prototype, name) => {
+ const original = prototype[name];
+ if (typeof original !== 'function') return;
+ originals.push([prototype, name, original]);
+ prototype[name] = function (...args) {
+ if (this === tbody) {
+ work.liveParentInsertions++;
+ for (const node of args) {
+ if (node?.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
+ work.fragmentCommits++;
+ work.fragmentRows += node.querySelectorAll('tr').length;
+ }
+ }
+ }
+ return Reflect.apply(original, this, args);
+ };
+ };
+ for (const name of ['insertBefore', 'appendChild', 'replaceChild']) {
+ instrument(Node.prototype, name);
+ }
+ for (const name of ['append', 'prepend', 'replaceChildren']) {
+ instrument(Element.prototype, name);
+ }
+
+ try {
+ const button = document.getElementById(operation.button);
+ if (!button) throw new Error(`mount gate: missing #${operation.button}`);
+ button.click();
+ if (window.__benchFlush) await window.__benchFlush();
+ } finally {
+ for (const [prototype, name, original] of originals.reverse()) {
+ prototype[name] = original;
+ }
+ }
+
+ const rows = Array.from(tbody.querySelectorAll('tr'));
+ const expectedRows = operation.initialRows + operation.addedRows;
+ if (rows.length !== expectedRows) {
+ throw new Error(`mount gate: expected ${expectedRows} rows, found ${rows.length}`);
+ }
+ const insertionIndex =
+ operation.insertion === 'prepend'
+ ? 0
+ : operation.insertion === 'middle'
+ ? operation.initialRows >> 1
+ : operation.initialRows;
+ const inserted = rows.slice(insertionIndex, insertionIndex + operation.addedRows);
+ const firstInsertedId = rowId(inserted[0]);
+ if (!Number.isSafeInteger(firstInsertedId)) throw new Error('mount gate: invalid row id');
+ let survivorIndex = 0;
+ for (let index = 0; index < rows.length; index++) {
+ const row = rows[index];
+ const id = rowId(row);
+ const isInserted = index >= insertionIndex && index < insertionIndex + operation.addedRows;
+ if (!row.isConnected || !Number.isSafeInteger(id)) {
+ throw new Error(`mount gate: incorrect row identity or connectivity at ${index}`);
+ }
+ if (isInserted) {
+ if (survivors.has(id) || id !== firstInsertedId + index - insertionIndex) {
+ throw new Error(`mount gate: incorrect inserted-row order at ${index}`);
+ }
+ } else if (row !== before[survivorIndex++] || survivors.get(id) !== row) {
+ throw new Error(`mount gate: survivor order or DOM identity changed at ${index}`);
+ }
+ }
+ if (survivorIndex !== before.length) throw new Error('mount gate: missing surviving rows');
+
+ const selectedRow = inserted[Math.min(4, inserted.length - 1)];
+ const action = selectedRow.querySelector('td:nth-child(2) a');
+ if (!action) throw new Error('mount gate: missing row action');
+ action.click();
+ if (window.__benchFlush) await window.__benchFlush();
+ const selected = tbody.querySelectorAll('tr.danger');
+ if (selected.length !== 1 || selected[0] !== selectedRow) {
+ throw new Error('mount gate: inserted-row identity, delegated event, or selection failed');
+ }
+
+ if (work.liveParentInsertions !== operation.addedRows || work.fragmentCommits !== 0) {
+ throw new Error(
+ `mount gate: ${operation.name} required ${operation.addedRows} direct row insertions; ` +
+ `got ${work.liveParentInsertions} live-parent insertions, ` +
+ `${work.fragmentCommits} fragment commits, ${work.fragmentRows} fragment rows`,
+ );
+ }
+ return work;
+ }, operation);
+}
diff --git a/benchmarks/js-framework/pair.mjs b/benchmarks/js-framework/pair.mjs
new file mode 100644
--- /dev/null
+++ b/benchmarks/js-framework/pair.mjs
@@ -1,0 +1,417 @@
+// Paired base/head js-framework comparison: the pull request benchmark's timing
+// and work harness.
+//
+// Both builds are driven by THIS harness, so a pull request that changes the
+// harness cannot make its base look different. It produces two kinds of result
+// for each Octane dialect and each canonical operation:
+//
+// - Work counters (the gate). In a --jitless Chromium, Chromium's precise call
+// coverage counts every production-bundle function call the operation makes,
+// and a MutationObserver counts its DOM mutations (inserted and removed nodes,
+// attribute writes, text writes). Both are exact for a fixed build, so any
+// increase over the base is real extra work: `calls_<op>` and `dom_<op>`.
+// - Wall time (a report). Base and head pages live in one browser and alternate
+// per sample, base-first on even pairs and head-first on odd ones, so runner
+// drift moves both sides of a pair together. An operation that can repeat
+// (update, select, swap, remove, select_lots) loops until a sample takes about
+// 20ms, which lifts it far off Chromium's 0.1ms timer floor. The head result
+// carries the median head/base ratio and its 95% bootstrap interval.
+//
+// Run from the repository root:
+// node benchmarks/js-framework/pair.mjs --base-tree=<checkout> \
+// --base-json=<file> --head-json=<file> [--pairs=30] [--no-build] [--work-only]
+//
+// `--work-only` collects the exact counters without timing. With the same
+// checkout as both trees it is the determinism control: every counter must match.
+//
+// The head tree is this checkout. Each tree's fixtures are built with its own
+// dependencies and served from its own dist: head on 5176/5177, base on 6176/6177.
+
+import { spawn, spawnSync } from 'node:child_process';
+import fs from 'node:fs';
+import net from 'node:net';
+import path from 'node:path';
+import { fileURLToPath } from 'node:url';
+import { chromium } from 'playwright';
+import { pairedRatio, summarizeSamples, timingStatForJson } from '../lib/stats.mjs';
+import {
+ CANONICAL_OPS,
+ DIRECT_LIST_MOUNTS,
+ ensureState,
+ seedRandom,
+ sleep,
+ timeClick,
+ verifyDirectListMount,
+ verifySelection,
+} from './operations.mjs';
+
+const HEAD_TREE = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '../..');
+const options = Object.fromEntries(
+ process.argv
+ .slice(2)
+ .filter((arg) => arg.startsWith('--'))
+ .map((arg) => {
+ const eq = arg.indexOf('=');
+ return eq === -1 ? [arg.slice(2), true] : [arg.slice(2, eq), arg.slice(eq + 1)];
+ }),
+);
+if (!options['base-tree'] || !options['base-json'] || !options['head-json']) {
+ console.error(
+ 'usage: node benchmarks/js-framework/pair.mjs --base-tree=<checkout> --base-json=<file> --head-json=<file> [--pairs=30] [--no-build] [--work-only]',
+ );
+ process.exit(2);
+}
+const BASE_TREE = path.resolve(options['base-tree']);
+const PAIRS = Number(options.pairs ?? 30);
+if (!Number.isSafeInteger(PAIRS) || PAIRS < 2) throw new Error('--pairs must be an integer >= 2');
+const SAMPLE_MS = 20;
+const WARMUP = 3;
+// Upper bounds on the repetitions in one sample. Each `remove` deletes a row,
+// so it stays inside the 1,000-row table. A warm selection takes a few
+// microseconds, so it needs thousands of clicks to fill a sample.
+const MAX_REPEAT = { remove: 800, default: 5000 };
+const REPEATABLE = new Set(['update', 'select', 'swap', 'remove', 'select_lots']);
+const FIXTURES = [
+ { name: 'octane-tsrx', directory: 'octane-tsrx', head: 5176, base: 6176 },
+ { name: 'octane-jsx', directory: 'octane-jsx', head: 5177, base: 6177 },
+];
+const SIDES = ['base', 'head'];
+const exact = (value) => ({ median: value, min: value, samples: 1 });
+const treeOf = { base: BASE_TREE, head: HEAD_TREE };
+const urlOf = (fixture, side) => `http://localhost:${fixture[side]}/`;
+
+class SideError extends Error {
+ constructor(side, error) {
+ super(`${side}: ${error?.message ?? error}`, { cause: error });
+ this.side = side;
+ }
+}
+const onSide = async (side, work) => {
+ try {
+ return await work();
+ } catch (error) {
+ throw error instanceof SideError ? error : new SideError(side, error);
+ }
+};
+
+function build(side) {
+ const filters = FIXTURES.flatMap(({ name }) => ['--filter', `${name}-jsbench`]);
+ const result = spawnSync('pnpm', ['--dir', treeOf[side], ...filters, 'build'], {
+ stdio: 'inherit',
+ });
+ if (result.status !== 0) throw new SideError(side, `fixture build exited ${result.status}`);
+}
+
+function waitForPort(port, timeoutMs = 30_000) {
+ const deadline = Date.now() + timeoutMs;
+ return new Promise((resolve, reject) => {
+ const attempt = () => {
+ const socket = net.connect(port, 'localhost');
+ socket.once('connect', () => {
+ socket.destroy();
+ resolve();
+ });
+ socket.once('error', () => {
+ socket.destroy();
+ if (Date.now() > deadline) reject(new Error(`nothing listened on :${port}`));
+ else setTimeout(attempt, 200);
+ });
+ };
+ attempt();
+ });
+}
+
+async function serve(side, fixture) {
+ const child = spawn(
+ 'pnpm',
+ ['exec', 'vite', 'preview', '--port', String(fixture[side]), '--strictPort'],
+ {
+ cwd: path.join(treeOf[side], 'benchmarks/js-framework', fixture.directory),
+ detached: true,
+ stdio: 'ignore',
+ },
+ );
+ child.unref();
+ await onSide(side, () => waitForPort(fixture[side]));
+ return child;
+}
+
+async function openPage(context, fixture, side) {
+ return await onSide(side, async () => {
+ const page = await context.newPage();
+ const errors = [];
+ page.on('pageerror', (error) => errors.push(error.message));
+ page.errors = errors;
+ await page.goto(urlOf(fixture, side), { waitUntil: 'load' });
+ await page.waitForSelector('#run', { timeout: 10_000 });
+ await seedRandom(page);
+ return page;
+ });
+}
+
+const selectorsFor = (op, index, repeat) =>
+ op.alternateClick
+ ? repeat > 1
+ ? [op.click, op.alternateClick]
+ : [index % 2 === 1 ? op.alternateClick : op.click]
+ : [op.click];
+
+// Repetitions per sample, sized on the head page and shared by both sides, so
+// each pair compares the same work. A looped operation runs far faster than a
+// cold single one, so the count is refined on loops until a sample really takes
+// about SAMPLE_MS; a shorter sample quantizes on the 0.1ms timer.
+const parityFor = (op, repeat) => {
+ // A selection sample ends on the alternate row, so the next one starts by
+ // selecting a different row instead of re-selecting the current one.
+ if (op.alternateClick && repeat % 2 === 1) repeat++;
+ // An even number of swaps restores the original order, which a swap that
+ // did nothing would also leave. An odd count keeps every sample verifiable.
+ if (op.name === 'swap' && repeat % 2 === 0) repeat++;
+ return repeat;
+};
+
+// `update` appends to every tenth label on each click, so a looped sample
+// would leave longer labels for the next one. Each update sample starts from
+// freshly built rows instead.
+async function prepare(page, op) {
+ if (op.name === 'update') {
+ await page.evaluate(() => {
+ const btn = document.getElementById('clear');
+ if (btn) btn.click();
+ });
+ await page.waitForFunction(() => document.querySelectorAll('tbody tr').length === 0, {
+ timeout: 5000,
+ });
+ }
+ await ensureState(page, op.pre);
+}
+
+// Returns the repeat count and every trial count it ran. The trials are replayed
+// on the base page, so both pages run the identical operation sequence and their
+// seeded data streams stay in step.
+async function calibrate(page, op) {
+ if (!REPEATABLE.has(op.name)) return { repeat: 1, trials: [] };
+ const cap = MAX_REPEAT[op.name] ?? MAX_REPEAT.default;
+ const trials = [];
+ let repeat = parityFor(op, 2);
+ for (let round = 0; round < 5; round++) {
+ await prepare(page, op);
+ const elapsed = await timeClick(page, op, selectorsFor(op, 1, repeat), repeat);
+ trials.push(repeat);
+ await sleep(30);
+ if (elapsed >= SAMPLE_MS * 0.8 || repeat >= cap) break;
+ repeat = parityFor(op, Math.min(cap, Math.ceil((repeat * SAMPLE_MS) / Math.max(elapsed, 0.1))));
+ }
+ return { repeat: Math.min(repeat, parityFor(op, cap)), trials };
+}
+
+async function replayCalibration(page, op, trials) {
+ for (const repeat of trials) {
+ await prepare(page, op);
+ await timeClick(page, op, selectorsFor(op, 1, repeat), repeat);
+ await sleep(30);
+ }
+}
+
+async function timeFixture(fixture) {
+ const browser = await chromium.launch({
+ headless: true,
+ args: ['--disable-extensions', '--js-flags=--expose-gc'],
+ });
+ try {
+ const context = await browser.newContext();
+ const pages = {};
+ for (const side of SIDES) pages[side] = await openPage(context, fixture, side);
+ for (const side of SIDES) {
+ await onSide(side, async () => {
+ await pages[side].bringToFront();
+ for (let i = 0; i < WARMUP; i++) {
+ await pages[side].evaluate(() => document.getElementById('run').click());
+ await sleep(120);
+ await pages[side].evaluate(() => document.getElementById('clear').click());
+ await sleep(80);
+ }
+ });
+ }
+
+ const results = { base: {}, head: {} };
+ for (const op of CANONICAL_OPS) {
+ const { repeat, trials } = await onSide('head', async () => {
+ await pages.head.bringToFront();
+ return await calibrate(pages.head, op);
+ });
+ await onSide('base', async () => {
+ await pages.base.bringToFront();
... diff truncated: showing 800 of 2207 linesYou can send follow-ups to the cloud agent here.
Reviewed by Cursor Bugbot for commit 1e5e09d. Configure here.
…out of within-budget notes - The update rebuild clicked #run and then waited for 1,000 rows, which was already true, so the rebuild could still be in flight when the timed sample began. It now flushes and asserts the rows were replaced. - A value over its committed budget was also counted as growth within budget in the headline. Breached values are now excluded from that note. Co-Authored-By: Claude Opus 5.5 <[email protected]>


Summary
Reworks the PR bench (review findings H5 and H12) so it judges changes by exact numbers and compares against the right base:
pull_request.base.sha.pr-report.mjsfails on any byte value over its committed same-run budget.Why
select±66%,update±55%), with 8 samples and rounds merged withmax. A 25–30% regression could not register, yet 9 of 64 reports still flagged, including PRs that touch no runtime (fix(website): keep playground editor scroll through its hash write #1581, fix(bench): point stale weekly gates at current compiler and runtime output #1586, fix(website): theme browser text-fragment highlights #1588).Changes
benchmarks/js-framework/pair.mjs(new). The merge commit's harness builds both trees'octane-tsrx/octane-jsxfixtures, serves them (head 5176/5177, base 6176/6177) and drives both. A PR that changes the harness therefore cannot make its base look different.--jitlessChromium runs the operations in a fixed order from a fresh seeded page.calls_<op>is the sum of precise-coverage call counts over/assets/scripts.dom_<op>is the MutationObserver count of nodes added and removed, attribute writes and text writes, including every task the operation schedules.live_inserts_*andfragment_commits_*mount gates run on both sides.paired: { ratio, low, high, pairs }, frompairedRatioinbenchmarks/lib/stats.mjs: the median of per-pair log ratios with a seeded 2,000-resample bootstrap.--work-onlyskips timing. With the same checkout as both trees, it is the determinism control.benchmarks/js-framework/operations.mjs(new) holds the canonical operations, state setup, timed clicks, which now take a selector list and repeat count, and the mount gates.run.mjsimports them, so local and PR runs drive identical work.benchmarks/pr-report.mjs.-budgetpeer), any increase in a js-framework deterministic counter, or a suite that failed on the merge commit. A base-side failure stays a warning.--roundsmerging are gone.BASE_DRIFTfrom the compare API)..github/workflows/pr-bench.yml.fetch-depth: 2andbase=$(git rev-parse HEAD^1); the drift comes fromgh api compare.bench.mjs js-frameworkrounds.benchmarks/README.mddescribes the new report; the performance-audit skill notes the gate.Validation
node --test benchmarks/pr-report.test.mjs benchmarks/lib/stats.test.mjs scripts/ci-workflow.test.mjs: 90/90 pass. The new tests cover budget breaches, work-counter increases and decreases, the ±3% CI rule, timing that never fails, the base-drift header, and the bootstrap's seeding and sensitivity.pair.mjs --base-tree=. --work-onlyon main. All 40 counters match between base and head pages, and again across a second run. Sample: tsrxrun34,091 calls, 1,000 nodes;select91 calls, 1 attribute.pnpm sync,pnpm rules:check,pnpm format:files:checkon changed files.pnpm format:check,pnpm typecheck,pnpm test: left to CI.Risk / follow-ups
Provenance
agent-authored)🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Note
Medium Risk
Changes CI gating and benchmark methodology for every PR; mis-tuned thresholds or harness bugs could cause false reds or miss regressions until validated in production runs.
Overview
Reworks PR bench so comparisons target the merge commit’s first parent (not
pull_request.base.sha), with optional header text for how farmainhas drifted past the PR’s recorded base.js-framework no longer runs four separate
bench.mjsrounds. A newpair.mjsharness on the merge commit builds and serves both trees, counts exact production calls and DOM mutations per operation (job fails on any increase), and pairs wall-clock samples in one browser with bootstrap head/base ratios (±3% CI for slower/faster labels only—timing does not fail the job). Sharedoperations.mjskeeps localrun.mjsand PR runs aligned.pr-report.mjsnow exits non-zero on byte budget breaches, increased js-framework work counters, or merge-commit suite failures; drops--roundsmerging. Docs/skills andci-workflow.test.mjsreflect the new gates and workflow order (report uploaded before fail step).Reviewed by Cursor Bugbot for commit 7d6a7ff. Bugbot is set up for automated code reviews on this repo. Configure here.