Skip to content

fix(effect): support stable Effect 4 - #5842

Merged
NathanFlurry merged 1 commit into
mainfrom
fix/effect-4-stable
Oct 6, 2026
Merged

NathanFlurry merged 1 commit into
mainfrom
fix/effect-4-stable

Conversation

@NathanFlurry

Copy link
Copy Markdown
Member
  • Upgrade @rivetkit/effect and its examples to stable Effect 4 and compatible Vitest 5.
  • Make Effect example tests reliable across repeated local Engine runs.

@railway-app

railway-app Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

🚅 Deployed to the rivet-pr-5842 environment in rivet-frontend

Service Status Web Updated
frontend-inspector ✅ Success (View Logs) Web Oct 6, 2026 at 12:37 am UTC
mcp-hub ✅ Success (View Logs) Web Oct 6, 2026 at 12:36 am UTC
website ❌ Build Failed (View Logs) Web Oct 6, 2026 at 12:35 am UTC
ladle 🕒 Building (View Logs) Web Oct 6, 2026 at 12:35 am UTC
kitchen-sink 🕒 Building (View Logs) Web Oct 6, 2026 at 12:35 am UTC
frontend-cloud 🕒 Building (View Logs) Web Oct 6, 2026 at 12:35 am UTC

@railway-app
railway-app Bot temporarily deployed to rivet-frontend / rivet-pr-5842 October 6, 2026 00:35 Destroyed
@NathanFlurry
NathanFlurry marked this pull request as ready for review October 6, 2026 00:37
@NathanFlurry
NathanFlurry merged commit 589de38 into main Oct 6, 2026
8 of 17 checks passed
@NathanFlurry
NathanFlurry deleted the fix/effect-4-stable branch October 6, 2026 00:37
@claude

claude Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Review: fix(effect): support stable Effect 4

I read the full diff except pnpm-lock.yaml. I did not run CI, the type checks, or the tests, so everything below comes from reading the code.

Things to double check

  • API renames. The PR changes Schema.TaggedErrorClass to Schema.TaggedError, Config.string to Config.String, Config.redacted to Config.Redacted, transformOrFail to transformEffect, and effect/unstable/* to effect/*. It also swaps the argument order of SchemaIssue.InvalidValue. The same rename is applied across ~20 error classes, so one mismatch would show up everywhere. Please confirm check-types and the package tests pass against the published effect@4.0.0 in CI.
  • Resolved versions. effect: ^4.0.0 as a peer dependency is right for stable. Check that @effect/ai-openai, @effect/platform-node and @effect/vitest all resolve to compatible 4.0.0 versions in the lockfile.
  • vitest ^5.0.3 is a major bump across the package, @vitest/coverage-v8, and two examples. It deserves its own attention in CI.

Code quality

  • chat-room-effect/tests/chat-room.test.ts builds the endpoint from process.env.RIVET_RUN_ENGINE_PORT ?? "6420" and provides a second Client.layer. This couples the test to the port Registry.test picks internally. If that default changes, the moderator client will silently point at the wrong engine. Prefer reading the endpoint from the test runtime, or add a comment saying where the port comes from.
  • Random.nextUUIDv4 was replaced by crypto.randomUUID() in tests and examples. This works, but it moves the examples away from idiomatic Effect. If Random.nextUUIDv4 no longer exists in stable, ignore this. Otherwise a short comment would explain the choice.
  • hello-world-effect tests now use random keys. This fixes state bleeding across repeated runs against a persistent local engine, which matches the PR goal.
  • The import reordering and type import changes (telemetry.ts, logging.ts, Registry.ts) look like Biome output. They are harmless but unrelated churn.

Docs and tests

  • The examples/ai-agent-effect/README.md import path is updated. Check whether anything under website/ or docs/ still references effect/unstable/* or TaggedErrorClass.
  • No new tests, which is reasonable for a dependency upgrade. Make sure the *.test-d.ts type tests actually run in CI, since they catch schema and type changes most directly.

No security concerns. This is a mechanical upgrade that looks consistent. The main risk is the API renames, so a green CI run is the thing to wait for.

@the-company-company the-company-company Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 1 medium-severity finding

Reviewed commit ab3f087.

Comment on lines +41 to 44
"@vitest/coverage-v8": "^5.0.3",
"publint": "^0.3.21",
"rivetkit": "workspace:*",
"typescript": "^5.9.2",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 Medium · Vitest 5 raises the Node floor beyond the declared runtime support

vitest@5.0.3 declares node: ^22.12.0 || ^24.0.0 || >=26.0.0, while this workspace still declares Node >=20 and the rivetkit package declares >=22.0.0. As a result, supported Node 20 and Node 22.0–22.11 environments now install an unsupported test runner for this package and the three updated examples. Since stable @effect/vitest requires Vitest 5, update the relevant engines.node declarations/toolchain floor to >=22.12.0 (and add matching engines to the examples) in the same migration.

This branch was successfully deployed

No deployments
rivet-frontend / rivet-pr-5842 — ab3f087a Deployed Oct 6, 2026 by railway-app[bot]
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