Skip to content

fix(bench): assert ScopeDisposedError in owner-reads retirement checks - #1532

Merged
trueadm merged 1 commit into
mainfrom
fix/owner-reads-minified-error
Oct 2, 2026
Merged

trueadm merged 1 commit into
mainfrom
fix/owner-reads-minified-error

Conversation

@trueadm

@trueadm trueadm commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

benchmarks/scoped-signals/run-owner-reads.mjs failed on main before any timing ran. Its retirement checks matched the error message against /disposed/, but production bundles now format Octane errors as minified codes (Minified Octane error #151; visit …). The regex is also case-sensitive, so it doesn't match the ScopeDisposedError name either.

The bundled entry now imports ScopeDisposedError from octane/signals and uses assert.throws(fn, ScopeDisposedError), checking against each bundle's own class. This works in development and production builds. The class has been a public octane/signals export since #877, before this runner was added in #1069, so every baseline the runner can measure provides it.

The README procedure ("Baseline versus candidate owner reads") is unchanged.

Validation

  • pnpm format:check (not run repo-wide; pnpm format:files:check on the changed file passes)
  • pnpm typecheck (not run repo-wide; pnpm typecheck:files on the changed file passes)
  • pnpm test (not run; the runner isn't part of any Vitest or node --test suite)
  • targeted tests:
    • Before the fix (baseline archived from 3e3749d3f), --prepare failed with AssertionError: The input did not match the regular expression /disposed/.
    • After the fix, rebased on f647ceff6 with a fresh git archive baseline: --prepare reports prepared with all semantic checks true for both bundles, and --samples=3 --reads=20000 reports measured with 12 observations. Baseline and candidate came from identical source in a non-quiet process, so those timings are not performance evidence.
    • Mutations of the candidate's signals/facade.ts, each reverted after its run:
      • Retired instance identity stops throwing: fails with Missing expected exception.
      • Document-owner retirement becomes a no-op: the second check fails the same way.
      • Retirement throws a plain Error("Signal scope disposed"): fails with expected to be an instance of …. The old regex would have accepted this one.

Risk / follow-ups

  • Benchmark-only change; no package source or published behavior changes, so no changeset.
  • Failure messages show the minified class name (for example Missing expected exception (M)). Enabling esbuild keepNames would change the build options and the bytes being measured, so this PR leaves it off.
  • I searched the other production-built benchmark entries: their message assertions match text written by the harness or the fixture, not Octane error messages.

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 harness only; no library or published API behavior changes.

Overview
The owner-reads benchmark’s --prepare step was failing before timing because cleanup asserted retired scopes throw errors matching /disposed/. Minified production bundles (what the runner builds with) surface Octane failures as coded messages, not that substring.

The embedded esbuild entry now imports ScopeDisposedError from octane/signals and uses assert.throws(fn, ScopeDisposedError) for both instance- and document-owner retirement checks, so semantics are validated against each bundle’s exported class in dev and production. A short comment documents why message matching is unreliable here.

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

Production bundles format Octane errors as minified codes, so the
`/disposed/` message regex no longer matched the #151 retirement error and
run-owner-reads.mjs failed in prepare mode before any timing ran. The
bundled entry now imports `ScopeDisposedError` from `octane/signals` and
asserts each bundle's own class, which holds in development and production
builds and still fails when retirement stops throwing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@vercel

vercel Bot commented Oct 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated
octane-website Skipped Skipped Oct 1, 2026 11:39pm UTC
octane-website-mcp Skipped Skipped Oct 1, 2026 11:39pm UTC

Request Review

@github-actions github-actions Bot added agent-authored Diff or issue body substantially produced by an AI agent fix PR: bug fix labels Oct 1, 2026
@trueadm
trueadm marked this pull request as ready for review October 1, 2026 23:39
@github-actions

github-actions Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Benchmark report

🟢 No size increases and no timing regressions outside noise.

Compares f647ceff6 with 6847bce14 on the same runner. Timing verdicts require a change beyond the combined margin of error (at least 5%) and one 0.1ms timer tick, with the fastest sample moving the same way. Workflow run

js-framework: 1k/10k row operations (ms, lower is better)

All 20 timed operations (20 within noise)
target operation base head Δ noise
octane-tsrx run 3.24 3.39 +4.6% ±13% ⚪ within noise
octane-tsrx replace 7.44 8.36 +12.4% ±49% ⚪ within noise
octane-tsrx add 3.28 3.51 +7.0% ±22% ⚪ within noise
octane-tsrx update 0.35 0.56 +60.0% ±66% ⚪ within noise
octane-tsrx select 0.15 0.24 +60.0% ±82% ⚪ within noise
octane-tsrx swap 0.36 0.48 +33.3% ±60% ⚪ within noise
octane-tsrx remove 0.45 0.39 −13.3% ±67% ⚪ within noise
octane-tsrx runlots 29.18 30.47 +4.4% ±21% ⚪ within noise
octane-tsrx select_lots 0.30 0.33 +10.0% ±59% ⚪ within noise
octane-tsrx clear 48.91 49.80 +1.8% ±32% ⚪ within noise
octane-jsx run 3.59 3.93 +9.5% ±15% ⚪ within noise
octane-jsx replace 8.05 9.23 +14.7% ±48% ⚪ within noise
octane-jsx add 3.23 3.55 +9.9% ±23% ⚪ within noise
octane-jsx update 0.76 0.88 +15.8% ±85% ⚪ within noise
octane-jsx select 0.53 0.46 −13.2% ±69% ⚪ within noise
octane-jsx swap 1.01 0.98 −3.0% ±95% ⚪ within noise
octane-jsx remove 0.92 1.12 +21.7% ±92% ⚪ within noise
octane-jsx runlots 29.38 31.40 +6.9% ±27% ⚪ within noise
octane-jsx select_lots 2.76 2.96 +7.2% ±29% ⚪ within noise
octane-jsx clear 52.70 49.34 −6.4% ±26% ⚪ within noise

Application bundle size (bytes)

No changes across 45 measured values.

Public-import reachability bundles (bytes)

No changes across 105 measured values.

CI job durations

  • 🟡 3 job(s) slower than every recent main run: validate publishable packages, Lynx compatibility, typecheck checks

Compares the CI run for ca2f99a33 (run) with the last 5 successful main push runs. A job is only slower or faster outside the whole main range, by at least 10% and 15s.

job main median main range this PR Δ
wall clock (first job start to last job end) 17m 36s 13m 51s–23m 15s 14m 51s −2m 45s (−16%) ⚪ within noise
total job time 178m 49s 157m 01s–242m 49s 179m 51s +1m 02s (+1%) ⚪ within noise
validate publishable packages 5m 03s 4m 32s–5m 22s 6m 30s +1m 27s (+29%) 🟡 slower
Lynx compatibility 2m 10s 1m 35s–2m 55s 3m 25s +1m 15s (+58%) 🟡 slower
typecheck checks 10m 02s 8m 33s–11m 07s 11m 10s +1m 08s (+11%) 🟡 slower
All 26 timed jobs
job main median main range this PR Δ
website integration suite 6m 30s 5m 59s–11m 41s 9m 17s +2m 47s (+43%) ⚪ within noise
example apps (2/3) 4m 44s 3m 44s–9m 58s 6m 57s +2m 13s (+47%) ⚪ within noise
validate publishable packages 5m 03s 4m 32s–5m 22s 6m 30s +1m 27s (+29%) 🟡 slower
test shard (Node 24, 3/4) 11m 39s 10m 05s–13m 34s 13m 02s +1m 23s (+12%) ⚪ within noise
Lynx compatibility 2m 10s 1m 35s–2m 55s 3m 25s +1m 15s (+58%) 🟡 slower
typecheck checks 10m 02s 8m 33s–11m 07s 11m 10s +1m 08s (+11%) 🟡 slower
test shard (Node 24, 1/4) 13m 16s 10m 39s–17m 32s 14m 18s +1m 02s (+8%) ⚪ within noise
React parity shard (1/4) 12m 33s 10m 54s–18m 11s 12m 48s +15s (+2%) ⚪ within noise
typecheck 4s 3s–5s 5s +1s (+25%) ⚪ within noise
test (24) 4s 4s–5s 5s +1s (+25%) ⚪ within noise
examples 4s 4s–4s 4s ±0s (±0%) ⚪ within noise
CI provenance 4s 3s–4s 4s ±0s (±0%) ⚪ within noise
classify changeset release 16s 15s–17s 15s −1s (−6%) ⚪ within noise
lint 4s 4s–5s 3s −1s (−25%) ⚪ within noise
React parity checks 16s 15s–18s 15s −1s (−6%) ⚪ within noise
React parity shard (2/4) 11m 47s 10m 32s–19m 40s 11m 45s −2s (−0%) ⚪ within noise
lint checks 9m 40s 8m 35s–11m 33s 9m 35s −5s (−1%) ⚪ within noise
Three compatibility 3m 42s 2m 41s–3m 51s 3m 35s −7s (−3%) ⚪ within noise
React parity shard (4/4) 13m 19s 11m 22s–22m 17s 13m 05s −14s (−2%) ⚪ within noise
React parity shard (3/4) 12m 46s 10m 11s–18m 01s 12m 16s −30s (−4%) ⚪ within noise
example apps (1/3) 4m 03s 3m 12s–9m 27s 3m 32s −31s (−13%) ⚪ within noise
example apps (3/3) 4m 19s 3m 41s–6m 06s 3m 41s −38s (−15%) ⚪ within noise
heavy integration (package builds, eval corpus, runtime loaders, Astro) 6m 35s 5m 30s–16m 52s 5m 46s −49s (−12%) ⚪ within noise
test shard (Node 24, 4/4) 12m 54s 11m 03s–14m 15s 11m 26s −1m 28s (−11%) ⚪ within noise
test shard (Node 24, 2/4) 14m 32s 12m 25s–15m 53s 12m 52s −1m 40s (−11%) ⚪ within noise
heavy integration (browser - chromium) 16m 56s 12m 15s–19m 08s 14m 00s −2m 56s (−17%) ⚪ within noise

@trueadm
trueadm merged commit 7e517b5 into main Oct 2, 2026
55 checks passed
@trueadm
trueadm deleted the fix/owner-reads-minified-error branch October 2, 2026 00:02

This branch was previously deployed

2 inactive deployments
Preview – octane-website-mcp — ca2f99a3 Deployed Oct 1, 2026 by vercel[bot]
Preview – octane-website — ca2f99a3 Deployed Oct 1, 2026 by vercel[bot]
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 fix PR: bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant