Skip to content

ci: drop the ViewTransition effect-cleanup work ceiling and restore the trace-retention guard - #1916

Merged
trueadm merged 3 commits into
mainfrom
fix/bench-budget-leftovers
Oct 8, 2026
Merged

trueadm merged 3 commits into
mainfrom
fix/bench-budget-leftovers

Conversation

@trueadm

@trueadm trueadm commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Why

  • Standing rule: no budgets or ceilings in CI. Size and work growth are reviewed after merge (ci: review bundle growth after it lands on main #1908).
  • .github/workflows/ci.yml step "Check ordinary effect cleanup work after ViewTransition" (browser lane, chromium) runs benchmarks/view-transitions/effect-cleanup.mjs on every PR. That run failed when any operation's total_calls, or any idle case's idle_extra_calls, exceeded effect-cleanup-budget.json, which holds measured counts plus 32 calls. That is a fixed committed ceiling. Dominic confirmed it should go. The js-framework work step and the pr-report base-vs-head comparison are unchanged.
  • The scoped-signals-trace guard (wrapped-max-budget / unfilled-max-budget, op trace_event, maxRatio 1.5) is not a budget. "budget" in those names is the scope's 10,000-event trace retention limit (debug.traceLimit). The guard times two configurations in the same run, the same kind of same-run ratio as the 835 guards ci: remove every byte and work-count budget gate #1907 kept. Restoring it is the right choice, so the README prose that describes it stays and now says what "budget" means.

Changes

Effect-cleanup ceiling removed

  • Deletes benchmarks/view-transitions/effect-cleanup-budget.json, its harnessFiles entry, caseBudget(), the Total function calls exceed budget assert, and the idle extra calls exceed budget failure.
  • Semantic gates kept unchanged:
    • zero stageTeardown entries in every case, plus exactly one installed stageTeardown coverage range in idle mode;
    • the shared effectful-list lifecycle snapshots (effectGateErrors);
    • completed native primers;
    • executed-bytes hashes and the source, harness, lockfile, and fixture provenance checks.
  • total_calls and idle_extra_calls are still emitted as targets. The limitations metadata and view-transitions/README.md now say they are reported, not gated.
  • The CI step and its scripts/ci-workflow.test.mjs expectations are unchanged. The step still runs the semantic gates and uploads its JSON.
  • The 12 vt-effect-cleanup-model ratio guards (op stage_teardown_calls, maxRatio 0) still resolve. Every target they name, vt-effect-cleanup-{tsrx,jsx}-{cold,idle}-{clear,remount,remove_100_scattered}, and the vt-effect-cleanup-model reference are still emitted with that op.

Trace guard restored

  • benchmarks/baselines/ratios.json gets the guard back verbatim from cbc1e8e651 (pre-ci: remove every byte and work-count budget gate #1907), at its original position after lynx-handle-retirement.
  • benchmarks/scoped-signals/run-trace.mjs built scopes with new ScopeImpl(key, options). perf(signals): install the public Scope surface only from createScope #1851 changed that constructor to (key, seedable, seedEntries, traceLimit) and moved trace recording and inspect() behind createScope. The harness then threw TypeError: … is not a function in ScopeImpl.trace, and the suite reported "no targets produced numbers". It now builds scopes through createScope, which applies the same traceLimit validation the old constructor did. The timed loop is still scope.trace('write').

No new budget or ceiling is added.

Validation

  • pnpm ci:workflow:test: 377 pass, 0 fail
  • node benchmarks/bench.mjs --quick --ratios scoped-signals-trace:
    • before the harness fix, on main: hard error, "no targets produced numbers", 0/835 guards checked;
    • after: all three scenarios pass their exact-sequence checks, and 1/836 guards were checked and passed. wrapped-max ran at 8.77 ns/event against the unfilled control's 22.32, a ratio of 0.39×.
  • pnpm sync: no generated drift
  • pnpm format:files:check on the changed files: clean
  • node --check benchmarks/view-transitions/effect-cleanup.mjs
  • effect-cleanup.mjs was not run locally (browser bench; parallel-session load rule). This PR's chromium browser lane runs it.
  • pnpm format:check / pnpm typecheck / pnpm test: not run locally. No package source or typed files changed.
  • perf-review: not applicable (benchmark harness, CI-gate data, and docs only)

Risk / follow-ups

  • Effect-cleanup work growth after a ViewTransition no longer fails a PR. The counts are still in the uploaded view-transitions-effect-cleanup.json artifact and in the weekly bench.
  • Not changed here: benchmarks/js-framework/run.mjs still has a fixed mount-call ceiling (35,000 for octane-tsrx, 50,000 for others), run by the kept ci.yml js-framework step. ci: remove every byte and work-count budget gate #1907 left that gate in place on purpose.
  • Not changed here: the benchmarks/scoped-signals/event-owners.mjs enableSignalBindings(1, true) failure was fixed separately by test(bench): opt the event-owners fixture into opaqueSignalHandles #1912, which is now merged into this branch.

Provenance

  • An agent produced this diff (agent-authored)

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.


Note

Low Risk
Benchmark and CI-gating harness changes only; no production package source. Effect-cleanup work growth will no longer block PRs but remains visible in artifacts.

Overview
Removes the committed work ceiling on ViewTransition effect-cleanup benchmarks: effect-cleanup-budget.json is deleted and effect-cleanup.mjs no longer fails when total_calls or idle_extra_calls exceed calibrated limits. Those metrics are still collected and uploaded; semantic gates (zero stageTeardown during ordinary cleanup, lifecycle snapshots, primers, provenance) are unchanged.

Restores the scoped-signals-trace same-run timing ratio guard (wrapped-max-budget vs unfilled-max-budget, 1.5× ceiling) in ratios.json, and fixes run-trace.mjs to build scopes via createScope instead of the obsolete ScopeImpl constructor so the suite produces numbers again. Scoped-signals README text now clarifies that “budget” means debug.traceLimit, not a CI cap.

Reviewed by Cursor Bugbot for commit 626d68b. Bugbot is set up for automated code reviews on this repo. Configure here.

…he trace-retention guard

#1907 removed every committed budget gate but missed one. The chromium
browser lane runs view-transitions/effect-cleanup.mjs on every PR, and it
failed when total or idle-extra function calls exceeded
effect-cleanup-budget.json (measured + 32 calls). Delete that file and both
ceiling checks. The run still requires zero stageTeardown entries, the
shared lifecycle snapshots, completed native primers and unchanged
provenance hashes, and it still reports total_calls and idle_extra_calls.

#1907 also deleted the scoped-signals-trace guard (wrapped-max-budget over
unfilled-max-budget, trace_event, 1.5x) only because its reference name
ends in -budget. That name refers to the 10,000-event trace retention
limit; the guard compares two configurations timed in the same run.
Restore it verbatim.

run-trace.mjs has not produced numbers since #1851, because it built
ScopeImpl with the old (key, options) constructor and #1851 installs trace
recording and inspect() only through createScope. Build scopes through
createScope so the suite runs and the restored guard is evaluated again.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot added agent-authored Diff or issue body substantially produced by an AI agent ci PR: CI or build pipeline labels Oct 8, 2026
@trueadm
trueadm marked this pull request as ready for review October 8, 2026 18:54
@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Benchmark report

🟢 No byte growth, no added work, and no timing changes beyond ±3%.

Compares 9c440f4bd, the merge commit's first parent with de14534e1 on the same runner. Any increase in a js-framework work counter fails this check; byte changes are a report. Wall time is a report: base and head samples alternate in one browser, and an operation is called slower or faster only when the 95% confidence interval of its ratio excludes ±3%. Workflow run

js-framework: 1k/10k row operations

All 20 timed operations (20 without a verdict)
target operation base ms head ms head/base 95% CI
octane-tsrx run 3.892 4.192 +3.6% −8.7% … +6.2% ⚪ within noise
octane-tsrx replace 11.008 10.100 −7.6% −12.5% … +5.7% ⚪ within noise
octane-tsrx add 3.258 2.933 −6.9% −9.1% … ±0.0% ⚪ within noise
octane-tsrx update 0.139 0.151 −0.0% −6.4% … +5.0% ⚪ within noise
octane-tsrx select 0.006 0.006 +0.9% −4.0% … +4.8% ⚪ within noise
octane-tsrx swap 0.037 0.035 −1.0% −6.5% … +3.7% ⚪ within noise
octane-tsrx remove 0.019 0.018 −4.7% −11.8% … +4.5% ⚪ within noise
octane-tsrx runlots 29.883 28.167 −2.6% −7.3% … +3.1% ⚪ within noise
octane-tsrx select_lots 0.007 0.007 +0.8% −5.3% … +4.4% ⚪ within noise
octane-tsrx clear 53.692 57.308 +9.7% −3.1% … +15.7% ⚪ within noise
octane-jsx run 5.217 4.833 −3.3% −7.7% … +10.0% ⚪ within noise
octane-jsx replace 10.383 10.658 −4.2% −12.4% … +2.0% ⚪ within noise
octane-jsx add 6.125 5.575 −3.1% −10.2% … +4.9% ⚪ within noise
octane-jsx update 0.492 0.498 −12.1% −18.2% … +4.6% ⚪ within noise
octane-jsx select 0.150 0.152 +3.2% −4.1% … +5.8% ⚪ within noise
octane-jsx swap 0.248 0.262 +1.9% −3.2% … +6.9% ⚪ within noise
octane-jsx remove 0.171 0.178 −0.8% −2.3% … +0.4% ⚪ within noise
octane-jsx runlots 32.492 31.967 +0.2% −2.5% … +2.2% ⚪ within noise
octane-jsx select_lots 1.640 1.552 −1.5% −4.7% … +1.3% ⚪ within noise
octane-jsx clear 48.817 49.483 +1.2% −1.4% … +4.4% ⚪ within noise

All 64 work counters are unchanged.

Application bundle size (bytes)

No changes across 60 measured values.

Public-import reachability bundles (bytes)

No changes across 111 measured values.

@trueadm
trueadm merged commit e162cab into main Oct 8, 2026
32 checks passed
@trueadm
trueadm deleted the fix/bench-budget-leftovers branch October 8, 2026 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-authored Diff or issue body substantially produced by an AI agent ci PR: CI or build pipeline

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant