Repository navigation
fix(bench): assert ScopeDisposedError in owner-reads retirement checks - #1532
Merged
Merged
Conversation
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]>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
trueadm
marked this pull request as ready for review
October 1, 2026 23:39
Contributor
Benchmark report🟢 No size increases and no timing regressions outside noise. Compares js-framework: 1k/10k row operations (ms, lower is better)All 20 timed operations (20 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
Compares the CI run for
All 26 timed jobs
|
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
benchmarks/scoped-signals/run-owner-reads.mjsfailed 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 theScopeDisposedErrorname either.The bundled entry now imports
ScopeDisposedErrorfromoctane/signalsand usesassert.throws(fn, ScopeDisposedError), checking against each bundle's own class. This works in development and production builds. The class has been a publicoctane/signalsexport 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:checkon the changed file passes)pnpm typecheck(not run repo-wide;pnpm typecheck:fileson the changed file passes)pnpm test(not run; the runner isn't part of any Vitest ornode --testsuite)3e3749d3f),--preparefailed withAssertionError: The input did not match the regular expression /disposed/.f647ceff6with a freshgit archivebaseline:--preparereportspreparedwith all semantic checks true for both bundles, and--samples=3 --reads=20000reportsmeasuredwith 12 observations. Baseline and candidate came from identical source in a non-quiet process, so those timings are not performance evidence.signals/facade.ts, each reverted after its run:Missing expected exception.Error("Signal scope disposed"): fails withexpected to be an instance of …. The old regex would have accepted this one.Risk / follow-ups
Missing expected exception (M)). Enabling esbuildkeepNameswould change the build options and the bytes being measured, so this PR leaves it off.Provenance
agent-authored)🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith 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
--preparestep was failing before timing becausecleanupasserted 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
ScopeDisposedErrorfromoctane/signalsand usesassert.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.