Skip to content

Conversation

@0xh3x
Copy link
Contributor

@0xh3x 0xh3x commented Feb 12, 2026

Type

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Description

  • HttpRunner.layerHttpOptions and layerWebsocketOptions registered routes on HttpRouter.Default, but HttpLayerRouter.serve (used by layerHttp/layerWebsocket) serves from HttpLayerRouter.HttpRouter — a different router tag. This caused POST/GET requests to return 404.
  • Switched to RpcServer.layerProtocolHttpRouter and RpcServer.layerProtocolWebsocketRouter so routes are registered on the correct router.
  • Added a regression test verifying layerHttpOptions routes are reachable through HttpLayerRouter.

Related

  • Related Issue #
  • Closes #

@0xh3x 0xh3x requested a review from tim-smart as a code owner February 12, 2026 20:34
@github-project-automation github-project-automation bot moved this to Discussion Ongoing in PR Backlog Feb 12, 2026
@changeset-bot
Copy link

changeset-bot bot commented Feb 12, 2026

🦋 Changeset detected

Latest commit: 2b6de74

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@effect/cluster Patch
@effect/platform-bun Patch
@effect/platform-node-shared Patch
@effect/platform-node Patch
@effect/sql-clickhouse Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@tim-smart
Copy link
Contributor

cluster doesn't support HttpLayerRouter at the moment intentionally (as HttpLayerRouter is still experimental in effect v3). In effect v4 this will change :)

@0xh3x
Copy link
Contributor Author

0xh3x commented Feb 12, 2026

cluster doesn't support HttpLayerRouter at the moment intentionally (as HttpLayerRouter is still experimental in effect v3). In effect v4 this will change :)

I see.
Does this mean that http transport is broken for BunCluster?

  const RunnerLive = PingLive.pipe(
    Layer.provideMerge(BunClusterHttp.layer({ transport: "http", storage: "local"}))
  )
  Layer.launch(RunnerLive).pipe(BunRuntime.runMain)

POST request on http://localhost:34431/ results in 404
and as I understand the issue is with HttpLayerRouter

@tim-smart
Copy link
Contributor

Ah yep looks like when I backported some effect v4 changes it got switched to HttpLayerRouter.

@tim-smart tim-smart force-pushed the fix/cluster-http-runner-router-mismatch branch from 26a4755 to 2b6de74 Compare February 12, 2026 23:45
@tim-smart tim-smart enabled auto-merge (squash) February 12, 2026 23:46
@tim-smart tim-smart merged commit 52cd531 into Effect-TS:main Feb 12, 2026
11 checks passed
@github-project-automation github-project-automation bot moved this from Discussion Ongoing to Done in PR Backlog Feb 12, 2026
@github-actions github-actions bot mentioned this pull request Feb 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants