Skip to content

Move to stable Effect 4.0.x (0.2.0) - #9

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

tamashi095 merged 2 commits into
mainfrom
effect-4.0.4

Conversation

@tamashi095

@tamashi095 tamashi095 commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Refs #10 (issue + numbered spec .github/ISSUE_SPECS/010-move-the-codec-to-stable-effect-4-0-x.md).

Moves @misofm/codec from Effect release candidates (peer 4.0.0-rc.112 || 4.0.0-rc.115) to stable Effect 4.0.x so misofm/app can move to the 4.0.4 train. Version 0.1.1 -> 0.2.0. Not tagged, not published.

  • Peer effect is >=4.0.3 <4.1; dev dependency pinned exactly to 4.0.4 (the codec imports only effect, there is no @effect/* package); packed-consumer matrix is Effect 4.0.3 and 4.0.4 (was rc.112/rc.115).
  • No source change. The dist/ compiled against 4.0.4 is byte-identical to the 0.1.1 build (all .js, .d.ts and maps), so the public API is identical.
  • Adds CHANGELOG.md (shipped in the package) with the behaviour audit and the consumer migration note.

Why: with the app on 4.0.4, engine-web-adapter@0.5.13 (hard dependency effect@4.0.0-rc.112) ran a 4.0.4 codec Layer through its rc.112 runtime and failed with Cannot read properties of undefined (reading 'scheduler'). The adapter port is a separate PR (misofm/engine-web-adapter, branch effect-4.0.4) and depends on this one.

Behaviour audit (Effect rc.112/rc.115 -> 4.0.4)

The codec uses Stream.transformPullBracket, Stream.rechunk, Pull.matchEffect, Cause.done, Scope.addFinalizer, Effect.acquireRelease/scoped, Effect.try/tryPromise, Schema.TaggedError/Defect, Layer.effect, Context.Service. No partition, retry, Schedule, timeout or Worker. A differential script was run against {0.1.1 + rc.115, 0.1.1 + 4.0.4, 0.2.0 + 4.0.4, 0.2.0 + rc.115}; all four produced identical output for (one measured exception below): error message/name/JSON/Cause.pretty/Schema encoding (decode, encode and PCM errors, with and without cause/bigint fields); encoded FLAC SHA-256 + STREAMINFO MD5; decoded PCM SHA-256 + Complete; exit reasons for truncation, source failure (error returned by identity), bad options, bad PCM block; decoder interruption while waiting for input (1 Interrupt, source finalizer once); early take (source finalizer once); Effect.timeout on a stalled source; encode interruption with a pending source (1 Interrupt, no late writes).

Known difference: JSON.stringify of a FlacDecodeError whose cause is a SchemaError is now compact (Effect #8895); Schema encoding and Cause.pretty are unchanged, and the only producer is an ABI-violation path the pinned asset does not take.

Noted Effect changes and why they are unobservable here: Scope.close finalizers uninterruptible (rc.118; the decoder/encoder releases are synchronous), pending interruption kept when an uninterruptible effect fails (4.0.1; no uninterruptible region).

Verification (local, Linux, Node 22.23.2, Bun 1.4.2)

  • bun install --frozen-lockfile, bun run check (prettier, tsc incl. benchmark project, 40 pass / 5 native-only skipped / 0 fail): passed
  • CODEC_NATIVE_FLAC=<pinned libFLAC 1.5.0 built by scripts/build-native-flac.sh> bun run test:integration: 5 pass
  • bun run build:wasm:verify with the pinned Emscripten 6.0.9 at /data/codec-tooling/emsdk: encoder 90da75c7... and decoder 70caf381... reproduced exactly
  • bun run pack:check (npm pack, isolated packed consumers on Effect 4.0.3 and 4.0.4: compiled TypeScript consumer, Bun, Node, Chromium/Firefox/WebKit workers, browser bundle has no server imports): passed; tarball SHA-256 9a8cfcd254506617458b41fea315879393e5712c230ba8ecd2f971763ae22071
  • npm install --strict-peer-deps effect@{4.0.4,4.0.3} <tarball> + npm ls: valid, one deduped effect; effect@4.0.0-rc.115 is rejected with ERESOLVE
  • Old-version crash repro (consumer: effect 4.0.4 + codec 0.1.1 + adapter 0.5.13) reproduces the scheduler TypeError; with codec 0.2.0 + adapter 0.6.0 it succeeds (see adapter PR)

Release (after review/merge; maintainers)

Per .github/RELEASING.md and npm-publish.yml: workflow_dispatch on main with mode=publish, expected_sha=<merge commit>, expected_version=0.2.0; then tag/release v0.2.0 at that commit and record the run URL + registry integrity (as in .github/RELEASE_EVIDENCE/006/registry-release.json). The branch effect-4.0.4-ci-dist exists only so the adapter PR can install this codec from git before publication; delete it after release.

🤖 Generated with Claude Code

Peer effect becomes ">=4.0.3 <4.1" (was rc.112 || rc.115), the dev
dependency is pinned to 4.0.4, and the packed-consumer matrix runs
Effect 4.0.3 and 4.0.4. No source file changed: the built dist is
byte-identical to 0.1.1. Adds CHANGELOG.md with the behaviour audit and
the consumer migration note, and ships it in the package.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bun.lock recorded the workspace peer as the old rc range; regenerated.
CHANGELOG: the identical-output claim excluded a SchemaError cause
(JSON is now compact; the path is an ABI violation the pinned asset does
not produce), and the rechunk note is dropped because the decoder's
rechunk(1) never took that path. Adds the numbered spec for issue #10
as AGENTS.md requires.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tamashi095
tamashi095 merged commit 56383ab into main Oct 13, 2026
2 checks 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