Repository navigation
chore(deps): upgrade Effect to 4.2 and replace TypeScript with tsrs - #7923
Conversation
- Upgrade effect and @effect/* to 4.2.0, rebase the patches, and migrate API contract generation to Codegen.Module. - Refresh the mise toolchain, including Node 26.14.0 and Bun. - Replace typescript and oxlint-tsgolint with tsrs for type checking, declaration emit, and type-aware linting. - Upgrade @effect/tsgo to 0.73.4 and adopt its new recommended rules.
There was a problem hiding this comment.
🤖 AI Review
CLI reference prose guidance: snapshot supabase/supabase@4da4e91 supplied to reviewers (advisory, not a style pass).
Both independent reviews were available. Seven findings merged into five. The review confirms a new ARM64 musl build prerequisite, a benchmark test that can hang on early launch failure, two native test wrappers that lose signal status, and stale config build instructions. The reported functions download directory replacement is refuted by the order of operations. The diff contains no changed CLI reference prose. Verification was by source inspection because the checkout lacked installed dependencies.
Findings
| Severity | Location | Category | Sources | Claim |
|---|---|---|---|---|
| 🟡 MINOR | mise.lock:134 |
toolchain |
claude+codex | The new Node pin requires a local build toolchain on ARM64 musl. A minimal Alpine environment that could install the previous binary can now fail during setup. |
| 🟡 MINOR | apps/cli/scripts/bench-cli.integration.test.ts:469 |
test-reliability |
claude+codex | The benchmark timeout test can hang if the launch fails before writing its PID. |
| 🟡 MINOR | packages/stack/src/host/CommandRunner.native-cleanup.integration.test.ts:95 |
test-fidelity |
codex | Two native cleanup fixtures lose signal termination status when wrapping real child processes. |
| ⚪ NIT | packages/config/AGENTS.md:136 |
docs |
claude | The @<!---->supabase/config build documentation still names tsc after the build switched to tsrs. |
Findings outside the diff
- ⚪ NIT
packages/config/AGENTS.md:136— The@<!---->supabase/configbuild documentation still namestscafter the build switched totsrs.
Refuted findings (kept for transparency, not posted as review comments)
apps/cli/src/commands/functions/download/download.integration.test.ts:593(filesystem): The Bun upgrade letsfunctions downloadremove an empty directory at the temporary bundle path and replace it with a file in the same invocation.
Refuted: apps/cli/src/shared/functions/download.ts:978–995 writes the bundle before extraction and skips cleanup if the write fails at the fixed legacy path. The test at apps/cli/src/commands/functions/download/download.integration.test.ts:518–534 covers a pre-existing empty directory and expects a write failure. A directory introduced during extraction can reach the cleanup at apps/cli/src/shared/functions/download.ts:1084, after the sole bundle write.
Stats
Claude findings: 3 · Codex findings: 4 · Confirmed: 4 · Refuted: 1 · Uncertain: 0
Models: claude-opus-5-5 + gpt-6.2-sol · Trigger: auto · Workflow run
This review runs once per PR. A maintainer can request another with a /ai-review comment.
Forward real exit status in native wrapper fixtures and name tsrs in the config build docs.
CLI benchmark (Lightweight Commands): no changes foundCommit
API calls: unchanged for all 9 commands. Binary size: 135.3 MB, up 132.0 KB from 135.2 MB. Details: timing ranges, API calls per command, slowest phasesTiming ranges
API calls per command
Slowest phasesNo command moved beyond noise, so there are no phase deltas. Comment |
Bump knip to 6.48.0, whose tsrs plugin enables itself from the tsrs dependency, and drop the forced TypeScript plugin.
…chore/effect-4.2-tsrs
Effect 4.2 maps ENOTEMPTY to the new DirectoryNotEmpty reason. The telemetry allowlist is now exhaustive over SystemErrorTag, so a new reason is a type error. The bench launch fixture writes its PID to a relative path, so the temp directory name is never shell-expanded.
Upgrades Effect to 4.2, refreshes the mise toolchain, and moves type checking and type-aware linting from TypeScript and tsgolint to tsrs.
Effect 4.2
effectand@effect/*are on 4.2.0, and the local patches are rebased onto it.Codegen.Module.TestClock.withRateLimiter'sfailsWith, cappingRetry-Afterwaits, reason-based error recovery, shared test layers and empty-string config values.Toolchain
tsrsreplacestypescriptandoxlint-tsgolint:types:checkrunstsrs --noEmit;tsrs, byte-identical to the TypeScript 7.0.2 output;tsrs-lint.effect-tsgo patchnow patches oxlint and the tsrs binary (--oxlint --tsrs).packageExtensionskeep those patched copies private in the pnpm store.tsrsdependency.New Effect lint rules
@effect/tsgo0.73.4 adds recommended rules, and this PR adopts them across the repo:Schema.TaggedErrorclasses carry a brand type.catchIfandfilterOrFail.onError.succeedNone,succeedSomeandasSome.unstable-api-usageis off, because most Effect v4 platform modules are marked unstable.experimental-api-usageis off only for the API codegen scripts, which depend oneffect/Codegen.This PR touches
.github/actions/setup, a release-infrastructure path. The change only bumps the mise-action version, whichv2.xdoes not need in order to keep releasing, so no backport is planned.