Skip to content

Move to stable Effect 4.0.x (0.6.0) - #130

Merged
tamashi095 merged 3 commits into
mainfrom
effect-4.0.4
Oct 13, 2026
Merged

tamashi095 merged 3 commits into
mainfrom
effect-4.0.4

Conversation

@tamashi095

@tamashi095 tamashi095 commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Refs #131 (issue + numbered spec .github/ISSUE_SPECS/131-move-the-web-adapter-to-stable-effect-4-0-x.md).

Moves @misofm/engine-web-adapter from effect@4.0.0-rc.112 to stable Effect 4.0.x (0.5.13 -> 0.6.0). Not tagged, not published. Depends on the published @misofm/codec@0.2.0 (misofm/codec#9, release https://github.com/misofm/codec/releases/tag/v0.2.0).

  • effect moves from a hard dependency (4.0.0-rc.112) to a peer dependency >=4.0.3 <4.1; dev dependency pinned exactly to 4.0.4 (the adapter uses no @effect/* package; Effect 4.0.4 has no runtime dependencies). This is the actual fix for the crash: with a hard dependency the adapter's rc.112 runtime ran Layer.build(makeFlacDecoderLayer(bytes)) built by the application's 4.0.x codec copy and threw Cannot read properties of undefined (reading 'scheduler').
  • effect/unstable/http -> effect/http (3 files). tsc needed no other source change; the built .d.ts differ from 0.5.13 only in that one import line in stems/sparse-response.d.ts.
  • @misofm/codec is the exact published 0.2.0; package-lock.json resolves the registry tarball with its integrity (sha512-nbhiEKPB…ksUmqGA==) and no git URL remains. scripts/check-package.mjs asserts it, and the release workflow asserts dependencies['@misofm/codec'] == 0.2.0, the peer range, and the same on the registry artifact.
  • Behaviour changes (see CHANGELOG.md): the sparse full GET now disables HttpClient.TracerPropagationEnabled like the FLAC range lane (no b3/traceparent headers, which forced a CORS preflight; the new test fails without it); non-enumerable/symbol extra keys on sparse expectations and spans are rejected again via Reflect.ownKeys preflight, as in rc.112 (Effect #8423 strips them under 4.0.x; two new tests fail without the fix); a cancelled FLAC range read's nested cause may carry one extra AbortError (cause shape Fail, Interrupt vs Fail; public error unchanged).
  • Browser gate scripts no longer copy fast-check/pure-rand/msgpackr (Effect 4.0.x does not install them; the scripts failed on missing directories).
  • Adds CHANGELOG.md (shipped in the package) with behaviour notes and the migration note; npm-publish.yml version 0.6.0; check-package.mjs asserts the new dependency shape.

Verification (local, Linux, Node 22.23.2)

  • npm ci --ignore-scripts from the committed lockfile and npm run check (re-run on the final head against the registry codec) (format, SHA-256 and BLAKE3 Wasm reproducibility with pinned Emscripten 6.0.9 / Rust 1.97.1, typecheck, source policy, decoder asset policy, build, 383 tests, 0 fail, package policy: 248 files): passed. Same suite also pass with effect@4.0.3 installed (peer floor).
  • Packed Chromium 151 consumer, real OPFS, FLAC decoded in a Worker: npm run test:browser and node scripts/browser-packed.mjs --indexed-sparse passed; npm run test:browser:opfs Chromium part passed.
  • Not run locally: WebKit (Linux WebKit 26.5 has no FileSystemFileHandle; identical failure on unchanged origin/main, so the WebKit lanes rely on the macOS workflow below); test:browser:live (needs fixed port 5173, in use on this machine, and the live stems host); Firefox (no lane in this repo).
  • Crash repro, consumer with effect@4.0.4: @misofm/codec@0.1.1 + @misofm/engine-web-adapter@0.5.13 (nested effect@4.0.0-rc.112) -> loadFlacDecoderModule fails with TypeError: Cannot read properties of undefined (reading 'scheduler'). With the registry codec 0.2.0 + this branch's packed adapter 0.6.0 -> succeeds (npm install --strict-peer-deps valid, npm ls exit 0, single effect@4.0.4). effect@4.0.3 also valid; effect@4.0.0-rc.115 is rejected with ERESOLVE.
  • CI: only opfs-qualification.yml runs on PRs (macOS, Chromium + WebKit OPFS, three warm workers); there is no PR workflow for npm run check, which was run locally as above.

Release

Merge, then run Publish @misofm/engine-web-adapter (workflow_dispatch on main: mode=publish, expected_sha=<40-char merge SHA>). OIDC trusted publishing, no token fallback; it runs npm run check, refuses an existing version, publishes, then verifies the registry artifact (including the codec and peer pins).

🤖 Generated with Claude Code

Effect becomes a peer dependency (>=4.0.3 <4.1) with the dev dependency
pinned to 4.0.4, so the adapter, the codec and the application share one
Effect copy; the previous hard dependency on 4.0.0-rc.112 made the
rc.112 runtime run codec Layers built by the application's 4.0.x copy
and fail with "Cannot read properties of undefined (reading 'scheduler')".
effect/unstable/http becomes effect/http; the packed browser gates no
longer copy the fast-check/msgpackr packages that Effect 4.0.x does not
have. Adds CHANGELOG.md and release-workflow guards for the codec pin
and the peer range.

@misofm/codec is temporarily a git ref to the 0.2.0 pre-release branch
(misofm/codec PR #9); the release workflow refuses to publish until it
is the published 0.2.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tamashi095 and others added 2 commits October 13, 2026 16:13
…notes

preflightExpected and preflightSpan check Reflect.ownKeys: Effect 4.0.x
strips non-enumerable extras under onExcessProperty "error" where rc.112
rejected them (tests added). The sparse full GET disables
TracerPropagationEnabled like the FLAC range lane so b3/traceparent
headers cannot force a CORS preflight (test added). Corrects the
CHANGELOG (actual crash condition, behaviour changes vs audited-no-change
notes), the publish job name, and the codec attribution in NOTICE, adds
the numbered spec for issue #131, and points the temporary codec git ref
at the rebuilt pre-release branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replaces the temporary git reference with the registry package; the
lockfile resolves the registry tarball with its integrity, and
check-package.mjs asserts the exact 0.2.0 dependency. Spec 131 now
records that codec 0.2.0 is published.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tamashi095
tamashi095 marked this pull request as ready for review October 13, 2026 16:35
@tamashi095
tamashi095 merged commit 5a2fa19 into main Oct 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant