Skip to content

Close unupgraded upgrade connections in NodeHttpServer - #10360

Merged
tim-smart merged 4 commits into
mainfrom
fix/node-chunked-upgrade-close
Nov 3, 2026
Merged

tim-smart merged 4 commits into
mainfrom
fix/node-chunked-upgrade-close

Conversation

@effect-bot

@effect-bot effect-bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

When NodeHttpServer doesn't upgrade a connection that arrived as an upgrade event, it ends only its own side of the socket. Node stops reading a socket after an upgrade event, so request bytes that arrive after the server's reply stay unread. The client's close is then never seen, the socket is never destroyed, and server.close() waits on it forever, so graceful shutdown hangs.

This happens on two paths in makeUpgradeHandler:

  • Refused chunked upgrade (Node 25 and older): a chunked non-WebSocket upgrade request gets 411 Length Required followed by socket.end(). This caused intermittent Test (Node 24 (platform-node)) failures in reads a chunked body before switching protocols: a 5s test timeout followed by a 10s hook timeout. It happened whenever the client's second chunk, sent 50 ms after the first, reached the server before the client's FIN.
  • Upgrade answered with a regular response (every Node version): when the app returns a normal HTTP response instead of upgrading, such as a 403 or a 404 for an unknown route, the response's finish handler also only calls socket.end().

On both paths the socket is now destroyed once the reply has been flushed. Node's own HTTP server does the same for Connection: close responses.

Changes

  • packages/platform/node/src/NodeHttpServer.ts: socket.end(…, () => socket.destroy()) after the 411, and socket.end(() => socket.destroy()) in the response's finish handler.
  • packages/platform/node/test/NodeHttpServer.test.ts: one regression test per path. In each, the client keeps its side open and sends more bytes only after it receives the reply, so the failing order happens every time.
    • closes a refused chunked upgrade when the body arrives after the 411, skipped on Node 26 and newer, which parse chunked upgrade bodies themselves.
    • closes an upgrade answered with a response when more bytes arrive after it, which runs on every version.
  • A @effect/platform-node patch changeset.

Validation

Node 411 test without / with fix Response test without / with fix vitest run --project @effect/platform-node
22.23.4 fails 3/3 / passes fails 3/3 / passes 625 passed
24.21.0 fails 3/3 / passes fails 3/3 / passes 625 passed
26.13.0 skipped fails 3/3 / passes 624 passed, 1 skipped
  • Forcing the original CI race: with the existing test's 50 ms pause changed to 0 ms locally (not committed), the chunked tests failed 4 of 5 runs on Node 24 before the fix and passed 10 of 10 on Node 22 and 24 after it.
  • Checks: pnpm lint-fix, pnpm check and git diff --check are clean.

Closes EFF-3352

@changeset-bot

changeset-bot Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: cbc7ba2

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

This PR includes changesets to release 33 packages
Name Type
@effect/platform-node Patch
effect Patch
@effect/opentelemetry Patch
@effect/vitest Patch
@effect/ai-anthropic Patch
@effect/ai-cloudflare Patch
@effect/ai-openai-compat Patch
@effect/ai-openai Patch
@effect/ai-openrouter Patch
@effect/ai-typesafe Patch
@effect/atom-react Patch
@effect/atom-solid Patch
@effect/atom-vue Patch
@effect/platform-browser Patch
@effect/platform-bun Patch
@effect/platform-deno Patch
@effect/platform-node-shared Patch
@effect/sql-clickhouse Patch
@effect/sql-d1 Patch
@effect/sql-libsql Patch
@effect/sql-mssql Patch
@effect/sql-mysql2 Patch
@effect/sql-pg Patch
@effect/sql-pglite Patch
@effect/sql-sqlite-bun Patch
@effect/sql-sqlite-do Patch
@effect/sql-sqlite-node Patch
@effect/sql-sqlite-react-native Patch
@effect/sql-sqlite-wasm Patch
@effect/docgen Patch
@effect/doctest Patch
@effect/graphql-generator Patch
@effect/openapi-generator 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

@effect-janitor effect-janitor Bot added the 4.0 label Nov 3, 2026
@effect-bot effect-bot changed the title Close refused chunked upgrade connections in NodeHttpServer Close unupgraded upgrade connections in NodeHttpServer Nov 3, 2026
@tim-smart
tim-smart enabled auto-merge (squash) November 3, 2026 23:29
@tim-smart
tim-smart merged commit 8968d09 into main Nov 3, 2026
17 checks passed
@tim-smart
tim-smart deleted the fix/node-chunked-upgrade-close branch November 3, 2026 23:39
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Bundle Size Analysis

Generated from PR build output; treat the content below as untrusted.

File Name Current Size Previous Size Difference
arbitrary-combinators.ts 39.41 KB 39.41 KB 0.00 KB (0.00%)
basic.ts 7.23 KB 7.23 KB 0.00 KB (0.00%)
batching.ts 11.08 KB 11.08 KB 0.00 KB (0.00%)
brand.ts 6.87 KB 6.87 KB 0.00 KB (0.00%)
cache.ts 11.54 KB 11.54 KB 0.00 KB (0.00%)
config.ts 22.84 KB 22.84 KB 0.00 KB (0.00%)
differ.ts 22.00 KB 22.00 KB 0.00 KB (0.00%)
http-client.ts 27.08 KB 27.08 KB 0.00 KB (0.00%)
http-router.ts 37.00 KB 37.00 KB 0.00 KB (0.00%)
logger.ts 12.01 KB 12.01 KB 0.00 KB (0.00%)
metric.ts 9.47 KB 9.47 KB 0.00 KB (0.00%)
optic.ts 7.10 KB 7.10 KB 0.00 KB (0.00%)
pubsub.ts 16.02 KB 16.02 KB 0.00 KB (0.00%)
queue.ts 12.89 KB 12.89 KB 0.00 KB (0.00%)
schedule.ts 11.80 KB 11.80 KB 0.00 KB (0.00%)
schema-bigdecimal.ts 14.14 KB 14.14 KB 0.00 KB (0.00%)
schema-binary.ts 41.99 KB 41.99 KB 0.00 KB (0.00%)
schema-class.ts 21.73 KB 21.73 KB 0.00 KB (0.00%)
schema-fromJsonSchemaDocument.ts 29.60 KB 29.60 KB 0.00 KB (0.00%)
schema-representation-roundtrip.ts 27.99 KB 27.99 KB 0.00 KB (0.00%)
schema-string-transformation.ts 15.35 KB 15.35 KB 0.00 KB (0.00%)
schema-string.ts 12.34 KB 12.34 KB 0.00 KB (0.00%)
schema-template-literal.ts 16.27 KB 16.27 KB 0.00 KB (0.00%)
schema-toArbitrary.ts 38.95 KB 38.95 KB 0.00 KB (0.00%)
schema-toCodeDocument.ts 26.15 KB 26.15 KB 0.00 KB (0.00%)
schema-toCodecJson.ts 20.90 KB 20.90 KB 0.00 KB (0.00%)
schema-toEquivalence.ts 21.05 KB 21.05 KB 0.00 KB (0.00%)
schema-toFormatter.ts 21.14 KB 21.14 KB 0.00 KB (0.00%)
schema-toJsonSchemaDocument.ts 26.17 KB 26.17 KB 0.00 KB (0.00%)
schema-toRepresentation.ts 21.23 KB 21.23 KB 0.00 KB (0.00%)
schema.ts 20.82 KB 20.82 KB 0.00 KB (0.00%)
stm.ts 14.20 KB 14.20 KB 0.00 KB (0.00%)
stream.ts 10.38 KB 10.38 KB 0.00 KB (0.00%)

brandhaug added a commit to brandhaug/b2b-saas-starter that referenced this pull request Nov 13, 2026
## pnpm-workspace.yaml (default)

## Dependency Updates

| Package | From | To | Type |
| --- | --- | --- | --- |
| `@better-auth/cimd` | 1.7.18 | 1.7.19 | patch |
| `@better-auth/mcp` | 1.7.18 | 1.7.19 | patch |
| `@better-auth/oauth-provider` | 1.7.18 | 1.7.19 | patch |
| `@better-auth/passkey` | 1.7.18 | 1.7.19 | patch |
| `@better-auth/sso` | 1.7.18 | 1.7.19 | patch |
| `@effect/platform-node` | 4.1.2 | 4.1.3 | patch |
| `@effect/sql-d1` | 4.1.2 | 4.1.3 | patch |
| `@effect/vitest` | 4.1.2 | 4.1.3 | patch |
| `@react-email/ui` | 6.11.8 | 6.11.10 | patch |
| `better-auth` | 1.7.18 | 1.7.19 | patch |
| `effect` | 4.1.2 | 4.1.3 | patch |
| `jose` | 6.2.16 | 6.2.17 | patch |
| `react-email` | 6.11.8 | 6.11.10 | patch |

## Release Notes

<details>
<summary><b>@<!---->better-auth/cimd</b> (1.7.18 → 1.7.19)</summary>

## `better-auth`

### Bug Fixes

- Fixed `/admin/create-user` leaving a user without a credential account
when creating that account failed, such as a database hook throwing,
which made retrying with the same email fail with
`USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL`
([#12338](better-auth/better-auth#12338))
- Fixed `/admin/create-user` leaving a user without a credential account
when the password was rejected, such as by the Have I Been Pwned plugin,
which made retrying with the same email fail with
`USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL`
([#12335](better-auth/better-auth#12335))
- Fixed client actions ignoring the HTTP method passed in
second-argument fetch options, and attaching a request body when the
method was a lowercase `get` or `HEAD`
([#12336](better-auth/better-auth#12336))
- Fixed plugin schema overrides (`modelName` and field names) leaking
into other instances of the same plugin in one process
([#12319](better-auth/better-auth#12319))
- Fixed `/device/token` returning `invalid_grant` instead of
`invalid_client` when `validateClient` rejects the `client_id`, matching
`/device/code` and RFC 6749 section 5.2
([#12246](better-auth/better-auth#12246))
- Fixed OAuth sign-in failing with `state_mismatch` during the daylight
saving time fall-back hour when OAuth state is stored in the database
and the server's time zone observes daylight saving time
([#12320](better-auth/better-auth#12320))
- Fixed the OpenAPI schema to document query parameters for endpoints
whose query schema is wrapped in `z.optional()`, such as `/get-session`
and Stripe's `/subscription/list`
([#12337](better-auth/better-auth#12337))
- Fixed `organization.getInvitation` to return the
`INVITATION_NOT_FOUND` code for a missing, expired, or non-pending
invitation
([#12332](better-auth/better-auth#12332))
- 

…[full
notes](https://github.com/better-auth/better-auth/releases/tag/v1.7.19)

</details>

<details>
<summary><b>@<!---->better-auth/mcp</b> (1.7.18 → 1.7.19)</summary>

## `better-auth`

### Bug Fixes

- Fixed `/admin/create-user` leaving a user without a credential account
when creating that account failed, such as a database hook throwing,
which made retrying with the same email fail with
`USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL`
([#12338](better-auth/better-auth#12338))
- Fixed `/admin/create-user` leaving a user without a credential account
when the password was rejected, such as by the Have I Been Pwned plugin,
which made retrying with the same email fail with
`USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL`
([#12335](better-auth/better-auth#12335))
- Fixed client actions ignoring the HTTP method passed in
second-argument fetch options, and attaching a request body when the
method was a lowercase `get` or `HEAD`
([#12336](better-auth/better-auth#12336))
- Fixed plugin schema overrides (`modelName` and field names) leaking
into other instances of the same plugin in one process
([#12319](better-auth/better-auth#12319))
- Fixed `/device/token` returning `invalid_grant` instead of
`invalid_client` when `validateClient` rejects the `client_id`, matching
`/device/code` and RFC 6749 section 5.2
([#12246](better-auth/better-auth#12246))
- Fixed OAuth sign-in failing with `state_mismatch` during the daylight
saving time fall-back hour when OAuth state is stored in the database
and the server's time zone observes daylight saving time
([#12320](better-auth/better-auth#12320))
- Fixed the OpenAPI schema to document query parameters for endpoints
whose query schema is wrapped in `z.optional()`, such as `/get-session`
and Stripe's `/subscription/list`
([#12337](better-auth/better-auth#12337))
- Fixed `organization.getInvitation` to return the
`INVITATION_NOT_FOUND` code for a missing, expired, or non-pending
invitation
([#12332](better-auth/better-auth#12332))
- 

…[full
notes](https://github.com/better-auth/better-auth/releases/tag/v1.7.19)

</details>

<details>
<summary><b>@<!---->better-auth/oauth-provider</b> (1.7.18 →
1.7.19)</summary>

## `better-auth`

### Bug Fixes

- Fixed `/admin/create-user` leaving a user without a credential account
when creating that account failed, such as a database hook throwing,
which made retrying with the same email fail with
`USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL`
([#12338](better-auth/better-auth#12338))
- Fixed `/admin/create-user` leaving a user without a credential account
when the password was rejected, such as by the Have I Been Pwned plugin,
which made retrying with the same email fail with
`USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL`
([#12335](better-auth/better-auth#12335))
- Fixed client actions ignoring the HTTP method passed in
second-argument fetch options, and attaching a request body when the
method was a lowercase `get` or `HEAD`
([#12336](better-auth/better-auth#12336))
- Fixed plugin schema overrides (`modelName` and field names) leaking
into other instances of the same plugin in one process
([#12319](better-auth/better-auth#12319))
- Fixed `/device/token` returning `invalid_grant` instead of
`invalid_client` when `validateClient` rejects the `client_id`, matching
`/device/code` and RFC 6749 section 5.2
([#12246](better-auth/better-auth#12246))
- Fixed OAuth sign-in failing with `state_mismatch` during the daylight
saving time fall-back hour when OAuth state is stored in the database
and the server's time zone observes daylight saving time
([#12320](better-auth/better-auth#12320))
- Fixed the OpenAPI schema to document query parameters for endpoints
whose query schema is wrapped in `z.optional()`, such as `/get-session`
and Stripe's `/subscription/list`
([#12337](better-auth/better-auth#12337))
- Fixed `organization.getInvitation` to return the
`INVITATION_NOT_FOUND` code for a missing, expired, or non-pending
invitation
([#12332](better-auth/better-auth#12332))
- 

…[full
notes](https://github.com/better-auth/better-auth/releases/tag/v1.7.19)

</details>

<details>
<summary><b>@<!---->better-auth/passkey</b> (1.7.18 → 1.7.19)</summary>

## `better-auth`

### Bug Fixes

- Fixed `/admin/create-user` leaving a user without a credential account
when creating that account failed, such as a database hook throwing,
which made retrying with the same email fail with
`USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL`
([#12338](better-auth/better-auth#12338))
- Fixed `/admin/create-user` leaving a user without a credential account
when the password was rejected, such as by the Have I Been Pwned plugin,
which made retrying with the same email fail with
`USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL`
([#12335](better-auth/better-auth#12335))
- Fixed client actions ignoring the HTTP method passed in
second-argument fetch options, and attaching a request body when the
method was a lowercase `get` or `HEAD`
([#12336](better-auth/better-auth#12336))
- Fixed plugin schema overrides (`modelName` and field names) leaking
into other instances of the same plugin in one process
([#12319](better-auth/better-auth#12319))
- Fixed `/device/token` returning `invalid_grant` instead of
`invalid_client` when `validateClient` rejects the `client_id`, matching
`/device/code` and RFC 6749 section 5.2
([#12246](better-auth/better-auth#12246))
- Fixed OAuth sign-in failing with `state_mismatch` during the daylight
saving time fall-back hour when OAuth state is stored in the database
and the server's time zone observes daylight saving time
([#12320](better-auth/better-auth#12320))
- Fixed the OpenAPI schema to document query parameters for endpoints
whose query schema is wrapped in `z.optional()`, such as `/get-session`
and Stripe's `/subscription/list`
([#12337](better-auth/better-auth#12337))
- Fixed `organization.getInvitation` to return the
`INVITATION_NOT_FOUND` code for a missing, expired, or non-pending
invitation
([#12332](better-auth/better-auth#12332))
- 

…[full
notes](https://github.com/better-auth/better-auth/releases/tag/v1.7.19)

</details>

<details>
<summary><b>@<!---->better-auth/sso</b> (1.7.18 → 1.7.19)</summary>

## `better-auth`

### Bug Fixes

- Fixed `/admin/create-user` leaving a user without a credential account
when creating that account failed, such as a database hook throwing,
which made retrying with the same email fail with
`USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL`
([#12338](better-auth/better-auth#12338))
- Fixed `/admin/create-user` leaving a user without a credential account
when the password was rejected, such as by the Have I Been Pwned plugin,
which made retrying with the same email fail with
`USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL`
([#12335](better-auth/better-auth#12335))
- Fixed client actions ignoring the HTTP method passed in
second-argument fetch options, and attaching a request body when the
method was a lowercase `get` or `HEAD`
([#12336](better-auth/better-auth#12336))
- Fixed plugin schema overrides (`modelName` and field names) leaking
into other instances of the same plugin in one process
([#12319](better-auth/better-auth#12319))
- Fixed `/device/token` returning `invalid_grant` instead of
`invalid_client` when `validateClient` rejects the `client_id`, matching
`/device/code` and RFC 6749 section 5.2
([#12246](better-auth/better-auth#12246))
- Fixed OAuth sign-in failing with `state_mismatch` during the daylight
saving time fall-back hour when OAuth state is stored in the database
and the server's time zone observes daylight saving time
([#12320](better-auth/better-auth#12320))
- Fixed the OpenAPI schema to document query parameters for endpoints
whose query schema is wrapped in `z.optional()`, such as `/get-session`
and Stripe's `/subscription/list`
([#12337](better-auth/better-auth#12337))
- Fixed `organization.getInvitation` to return the
`INVITATION_NOT_FOUND` code for a missing, expired, or non-pending
invitation
([#12332](better-auth/better-auth#12332))
- 

…[full
notes](https://github.com/better-auth/better-auth/releases/tag/v1.7.19)

</details>

<details>
<summary><b>@<!---->effect/platform-node</b> (4.1.2 → 4.1.3)</summary>

### Patch Changes

- [#10360](Effect-TS/effect#10360)
[`8968d09`](Effect-TS/effect@8968d09)
Thanks @<!---->effect-bot! - Fix `NodeHttpServer` shutdown hanging when
an upgrade request is refused or answered with a regular HTTP response
and the client sends more bytes afterwards.

- [#10405](Effect-TS/effect#10405)
[`0fe8890`](Effect-TS/effect@0fe8890)
Thanks @<!---->yousefelgoharyx! - Fix slow `NodeHttpServer` shutdown
with connected WebSocket clients. Shutdown now closes WebSockets with
code 1001 as soon as it starts, and destroys upgraded connections that
are still open after `gracefulShutdownTimeout` instead of also waiting
out the WebSocket closing handshake.

- [#10466](Effect-TS/effect#10466)
[`ba272c5`](Effect-TS/effect@ba272c5)
Thanks @<!---->tim-smart! - Update repository dependencies to their
latest compatible releases.
- Updated dependencies
[[`56bbd6f`](Effect-TS/effect@56bbd6f),
[`7150ea1`](Effect-TS/effect@7150ea1),
[`7f7b7c3`](Effect-TS/effect@7f7b7c3),
[`606ff10`](Effect-TS/effect@606ff10),
[`da85361`](Effect-TS/effect@da85361),
[`95b01bb`](Effect-TS/effect@95b01bb),
[`b09e7a8`](Effect-TS/effect@b09e7a8),
[`91386c0`](Effect-TS/effect@91386c0),
[`a2b1be0`](Effect-TS/effect@a2b1be0),
[`1a2c5a6`](https://githu

…[full
notes](https://github.com/Effect-TS/effect/releases/tag/%40effect/platform-node%404.1.3)

</details>

<details>
<summary><b>@<!---->effect/sql-d1</b> (4.1.2 → 4.1.3)</summary>

### Patch Changes

- [#10387](Effect-TS/effect#10387)
[`13c0e77`](Effect-TS/effect@13c0e77)
Thanks @<!---->effect-bot! - Fix providing a generic `SqlClient` layer
removing a driver service such as `PgClient` from an effect's
requirements. The program type-checked as runnable but failed at runtime
with `Service not found`.
  
A driver client is no longer a subtype of `SqlClient.SqlClient`. Code
that picks between driver layers, such as `cond ? PgClient.layer(...) :
MysqlClient.layer(...)`, may need an explicit
`Layer.Layer<SqlClient.SqlClient, E>` annotation.

- [#10466](Effect-TS/effect#10466)
[`ba272c5`](Effect-TS/effect@ba272c5)
Thanks @<!---->tim-smart! - Update repository dependencies to their
latest compatible releases.
- Updated dependencies
[[`56bbd6f`](Effect-TS/effect@56bbd6f),
[`7150ea1`](Effect-TS/effect@7150ea1),
[`da85361`](Effect-TS/effect@da85361),
[`95b01bb`](Effect-TS/effect@95b01bb),
[`b09e7a8`](Effect-TS/effect@b09e7a8),
[`91386c0`](Effect-TS/effect@91386c0),
[`a2b1be0`](Effect-TS/effect@a2b1be0),
[`1a2c5a6`](Effect-TS/effect@1a2c5a6),
[`2a9d989`](Effect-TS/effect@2a9d989),
[`66cbcca`](Effect-TS/effect@66cbcca),
[`da52437`](Effect-TS/effect@da52437),
[`7e8f3fb

…[full
notes](https://github.com/Effect-TS/effect/releases/tag/%40effect/sql-d1%404.1.3)

</details>

<details>
<summary><b>@<!---->effect/vitest</b> (4.1.2 → 4.1.3)</summary>

### Patch Changes

- Updated dependencies
[[`56bbd6f`](Effect-TS/effect@56bbd6f),
[`7150ea1`](Effect-TS/effect@7150ea1),
[`da85361`](Effect-TS/effect@da85361),
[`95b01bb`](Effect-TS/effect@95b01bb),
[`b09e7a8`](Effect-TS/effect@b09e7a8),
[`91386c0`](Effect-TS/effect@91386c0),
[`a2b1be0`](Effect-TS/effect@a2b1be0),
[`1a2c5a6`](Effect-TS/effect@1a2c5a6),
[`2a9d989`](Effect-TS/effect@2a9d989),
[`66cbcca`](Effect-TS/effect@66cbcca),
[`da52437`](Effect-TS/effect@da52437),
[`7e8f3fb`](Effect-TS/effect@7e8f3fb),
[`1de4308`](Effect-TS/effect@1de4308),
[`cb36ec7`](Effect-TS/effect@cb36ec7),
[`693259d`](Effect-TS/effect@693259d),
[`0daaa95`](Effect-TS/effect@0daaa95),
[`f548e59`](Effect-TS/effect@f548e59),
[`005d096`](Effect-TS/effect@005d096),
[`188c2b0`](Effect-TS/effect@188c2b0),
[`258fb50`](Effect-TS/effect@258fb50

…[full
notes](https://github.com/Effect-TS/effect/releases/tag/%40effect/vitest%404.1.3)

</details>

<details>
<summary><b>@<!---->react-email/ui</b> (6.11.8 → 6.11.10) — 2
releases</summary>

<details>
<summary><b>6.11.10</b></summary>

### Patch Changes

* 92484bd: Fix `email build` failing at random with `(void 0) is not a
function` when Next.js prerenders pages in several workers. Each worker
now writes the JSX runtime to a temporary file and renames it into
place, so no worker reads a half-written runtime.

</details>

<details>
<summary><b>6.11.9</b></summary>

### Patch Changes

* 44169a6: Scanning the emails directory no longer leaves a file handle
open when a file can't be read, which crashed `email dev` on Node.js 25
and later. An unreadable file is now skipped with a warning instead of
failing the whole scan.

</details>

</details>

<details>
<summary><b>better-auth</b> (1.7.18 → 1.7.19)</summary>

## `better-auth`

### Bug Fixes

- Fixed `/admin/create-user` leaving a user without a credential account
when creating that account failed, such as a database hook throwing,
which made retrying with the same email fail with
`USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL`
([#12338](better-auth/better-auth#12338))
- Fixed `/admin/create-user` leaving a user without a credential account
when the password was rejected, such as by the Have I Been Pwned plugin,
which made retrying with the same email fail with
`USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL`
([#12335](better-auth/better-auth#12335))
- Fixed client actions ignoring the HTTP method passed in
second-argument fetch options, and attaching a request body when the
method was a lowercase `get` or `HEAD`
([#12336](better-auth/better-auth#12336))
- Fixed plugin schema overrides (`modelName` and field names) leaking
into other instances of the same plugin in one process
([#12319](better-auth/better-auth#12319))
- Fixed `/device/token` returning `invalid_grant` instead of
`invalid_client` when `validateClient` rejects the `client_id`, matching
`/device/code` and RFC 6749 section 5.2
([#12246](better-auth/better-auth#12246))
- Fixed OAuth sign-in failing with `state_mismatch` during the daylight
saving time fall-back hour when OAuth state is stored in the database
and the server's time zone observes daylight saving time
([#12320](better-auth/better-auth#12320))
- Fixed the OpenAPI schema to document query parameters for endpoints
whose query schema is wrapped in `z.optional()`, such as `/get-session`
and Stripe's `/subscription/list`
([#12337](better-auth/better-auth#12337))
- Fixed `organization.getInvitation` to return the
`INVITATION_NOT_FOUND` code for a missing, expired, or non-pending
invitation
([#12332](better-auth/better-auth#12332))
- 

…[full
notes](https://github.com/better-auth/better-auth/releases/tag/v1.7.19)

</details>

<details>
<summary><b>effect</b> (4.1.2 → 4.1.3)</summary>

### Patch Changes

- [#9990](Effect-TS/effect#9990)
[`56bbd6f`](Effect-TS/effect@56bbd6f)
Thanks @<!---->effect-bot! - Add `Rational`, an exact fraction type
alongside `BigDecimal`, with `Schema.Rational` and
`Schema.RationalFromString`.
  
  ```ts
  import { BigDecimal, Rational } from "effect"
  
  const third = Rational.makeUnsafe(1n, 3n)
  
Rational.equals(Rational.multiply(third, Rational.fromBigInt(3n)),
Rational.fromBigInt(1n)) // true
  Rational.toBigDecimal(third, { scale: 3 }) // BigDecimal 0.333
  ```

- [#9842](Effect-TS/effect#9842)
[`7150ea1`](Effect-TS/effect@7150ea1)
Thanks @<!---->tim-smart! - Add experimental AG-UI protocol support to
`effect/ai` through the new `AgUiSchema`, `AgUi`, and `AgUiServer`
modules, and a `keepAlive` option to `HttpApiSchema.StreamSse`.

- [#10377](Effect-TS/effect#10377)
[`da85361`](Effect-TS/effect@da85361)
Thanks @<!---->effect-bot! - Add `CommandSpec`, a lossless projection of
an `effect/cli` command path for documentation tooling, plus
`Flag.annotate` / `Argument.annotate` / `Param.annotate` for attaching
custom metadata to parameters.
  
  ```ts
  import { Config, Context, Option } from "effect"
  import { Command, CommandSpec, Flag } from "effect/cli"
  
  const EnvVar = Context.Service<never, string>("app/EnvVar")
  
  const push = Command.make("push", {
    dbUrl: Flag.String("db-url").pipe(
      Flag.withFallbackConfig(Config.String("DB_URL")),
      Flag.annotate(EnvVar, "DB_URL")
    )
  })
  const cli = Command.make("app").pipe(Command.withSubcommands([push]))
  
const spec = Option.getOrThrow(CommandSpec.resolve(cli, ["app",
"push"]))
  for (const flag of spec.flags) {
// flag.scope, flag.required, flag.fallbacks,
Context.getOption(flag.annotations, EnvVar), ...
  }
  ```

- 

…[full
notes](https://github.com/Effect-TS/effect/releases/tag/effect%404.1.3)

</details>

<details>
<summary><b>jose</b> (6.2.16 → 6.2.17)</summary>

### Fixes

* **jwt:** reject negative maxTokenAge
([a5b422c](panva/jose@a5b422c))

</details>

<details>
<summary><b>react-email</b> (6.11.8 → 6.11.10) — 2 releases</summary>

<details>
<summary><b>6.11.10</b></summary>

### Patch Changes

* 64fa975: Render `<CodeInline>` as a single `<code>` element, so its
text no longer shows up twice in inbox previews and plain text
* f20a697: `<Markdown>` now escapes HTML inside code blocks and inline
code. Code samples like `<b>bold</b>` were rendered as real HTML instead
of showing the snippet.
* Updated dependencies \[fe6b066]
  * @<!---->react-email/[email protected]

</details>

<details>
<summary><b>6.11.9</b></summary>

### Patch Changes

* bc2becd: `<Button>` now converts `pt` padding values to `px` instead
of treating them as `0`, so `style={{ padding: '9pt 15pt' }}` or
`className="px-[15pt] py-[9pt]"` keeps its padding in every client and
in the Outlook spacers.
* 44169a6: The preview server no longer leaves a file handle open when a
file under `static/` can't be read (for example a file locked by another
program on Windows). On Node.js 25 and later, that leaked handle crashed
`email dev` with `ERR_INVALID_STATE` the next time the garbage collector
ran. Requesting a directory under `/static` now returns a 404 instead of
a 500.
* de32c06: `<Tailwind>` now resolves theme values that utilities pass
through their own variables, so gradients (`from-red-500`), shadow and
ring colors (`shadow-red-500`, `ring-blue-500`), `blur-*`,
`drop-shadow-*` and `translate-*` no longer inline an unresolvable
`var(--color-…)` or `var(--spacing)`.
* d38e9a2: render block tokens in tight list items

</details>

</details>

---
*This PR was auto-generated by
[catalog-update-action](https://github.com/brandhaug/catalog-update-action).*

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
laithalsaadoon added a commit to memhtml/memhtml that referenced this pull request Nov 22, 2026
## What moves

- The Effect catalog set goes from 4.1.2 to 4.1.4 as one version: `effect`, `@effect/platform-node`, `@effect/platform-node-shared`, `@effect/vitest`.
- The lockfile follows: the four Effect packages, plus `undici` 8.12.3 -> 8.12.4 under `@effect/platform-node`, which asks for `^8.12.4`. Nothing else in the lockfile changes; `ws` stays at 8.22.1, and the docs site's own `undici` 8.12.3 (under `unifont`) stays where it is.
- No source change was needed. The only source edits are comments and prose that name the pin.

## Behavior changes memhtml reaches

Effect 4.1.3 changed behavior that memhtml reaches, and 4.1.4 keeps all but one of those changes. A user or operator moving from 4.1.2 to 4.1.4 can observe five things:

1. **`memhtml-mcp` exits with code 0 instead of 130 when its client closes stdin.** Anything that spawns the server and reads its exit code sees the new value. ([#10475](Effect-TS/effect#10475))
2. **A list request with a cursor the server never issued is refused.** `tools/list`, `resources/list`, `resources/templates/list` and `prompts/list` now answer `-32602 "Unknown cursor"`; before, they ignored the cursor and returned the full list. memhtml never issues a `nextCursor`, so a conforming client never sends one. ([#10447](Effect-TS/effect#10447))
3. **MCP request spans are renamed, only when `OTEL_EXPORTER_OTLP_ENDPOINT` is set.** A span such as `McpServer.@effect/mcp/2025-06-18/tools/call` becomes `tools/call memory_search`, and its attributes move from `rpc.*`, `tool` and `parameters` to `mcp.*`, `gen_ai.*`, `jsonrpc.request.id` and `network.transport`. Tool arguments are no longer exported on the span. Dashboards or queries keyed on the old names need updating. ([#10304](Effect-TS/effect#10304))
4. **Successful spans carry status Unset instead of Ok, under the same condition.** This applies to every span the MCP server and the CLI export. ([#10440](Effect-TS/effect#10440))
5. **`memhtml head serve` stops at once after SIGTERM when a local client had sent an HTTP `Upgrade` request.** Before, it waited the full two-second shutdown grace. memhtml's own client never sends `Upgrade`, so this needs a foreign client on the socket. Replies are unchanged. ([#10360](Effect-TS/effect#10360))

One 4.1.3 change does not carry over: 4.1.3 answered three malformed Skills requests with `-32601` instead of `-32602`, and 4.1.4 restores `-32602` ([#10540](Effect-TS/effect#10540)). Those replies are identical on 4.1.2 and 4.1.4.

None of the other 4.1.4 entries is reached: they cover `HttpApi`, `effect/cli`, the AI provider clients, `SchemaRepresentation` and `TestClock` internals.

## Proofs

- **Typecheck:** `turbo run typecheck` passes, 35 of 35 tasks, 0 errors (tsc 7.0.2).
- **Emit comparison:** every project was rebuilt with `tsc -b --force` and compared with a build of `main`: 418 `.js` and `.d.ts` files, 414 byte-identical. Three of the other four (`apps/mcp/dist/server.js`, `tools.js`, `server.d.ts`) differ only in the restated comment lines. The fourth, `apps/mcp/dist/tools.d.ts`, gains a third type argument (`Tool.Execution`) on the 15 tool types; that file is not part of the published bundle. No executable line differs.
- **Tests:** the `apps/mcp` suite passes 163 of 163. `apps/cli` `head-server.test.ts` passes 26 of 27 in a run with a long temp directory; the one failure is the socket-path-limit case, whose own precondition failed by one byte before any server code ran, and the file passes in the full gate. `catalog.test.ts` passes 4 of 4, `packages/eval` `corpus.test.ts` 26 of 26, `packages/llm` `structured.test.ts` 45 of 45. The full local gate (`mise run check`) passes 76 of 76 tasks on this head.
- **MCP stdio harness**, the `main` build against this branch's build, same fixture store:
  - 50 requests: 46 replies identical, 4 differ (the four cursor requests in item 2).
  - `tools/list` is identical: 41,197 bytes, same sha256.
  - Requests sent before `initialize` (9) and requests with bad header fields (8) are all identical.
  - All seven Skills requests are identical.
  - Exit code at stdin close: 130 before, 0 after.
- **Telemetry probe** against a local collector: 49 MCP spans and 22 CLI spans on both builds, with the name, attribute and status differences in items 3 and 4. Batch timing is unchanged.
- **Head server probe:** 17 replies equal on both builds apart from a duration, a pid and the store path. Stop time after an `Upgrade` request: 2,027 ms before, 27 ms after.
- **Advisories:** none affects Effect 4.1.2, 4.1.3 or 4.1.4, or undici 8.12.3 or 8.12.4. 4.1.4 is the newest release of all four packages.

## Restated sentences

- `apps/mcp/src/server.ts`: two comments now name effect 4.1.4 (the `instructions` option, the five protocol adapters).
- `apps/mcp/src/tools.ts`: one comment now names effect 4.1.4.
- `docs/backlog.md`: the `instructions` entry names the 4.1.4 pin and adds the 2026-11-16 probe.
- `CLAUDE.md`: the adapters sentence names 4.1.4. The "differs from recall" paragraph is reworded, not just renumbered: `Schema.d.ts` changed in 4.1.3 (it adds `Rational` and `RationalFromString` and changes the `isAnyOf` and `Iso` types), so the paragraph now says the claims it names were checked again against the installed 4.1.4, where `Effect.d.ts` is byte-identical to 4.1.2's.

## Merge

This PR is left open for the maintainer. It compiles and the emitted code is unchanged, but it changes an exit code, one MCP error path and the exported telemetry, and those are a maintainer's call.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants