Commit Graph
12 Commits
Author SHA1 Message Date
Edgar ArakelyanandClaude Fable 5.1 24301be4fb fix(mcp): guard request conversion and close after any unread declared body
Addresses the ninth automated review round: a method Fetch refuses, such as
TRACE, is answered with 405 instead of escaping the request guard; the
unread-body decision now comes from the incoming message's own body
declaration, so a GET or HEAD carrying a body closes too; and the regression
uses a keep-alive client and checks that the socket actually closes.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-18 11:22:42 -07:00
Edgar ArakelyanandClaude Fable 5.1 a23f5f1352 fix(mcp): close the connection after a reply sent before the body was read
Addresses the eighth automated review finding: a refused Host or Origin, an
unknown route or the startup 503 answered a POST while its body stayed unread
on the paused bridged stream; such replies now carry Connection: close so an
unread upload cannot keep a socket open.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-18 11:04:29 -07:00
Edgar ArakelyanandClaude Fable 5.1 136d073fa0 fix(mcp): keep a startup signal's exit status through the entry's normal return
Addresses the follow-on finding on the signal latch: the HTTP entry now owns
its exit status, so a 0 returned by startup after a recorded signal keeps the
signal's 130 or 143 while a real failure still wins; a process test sends the
signal as the listening line appears.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-18 10:36:27 -07:00
Edgar ArakelyanandClaude Fable 5.1 354b4d8c08 fix(mcp): latch startup signals so the HTTP entry never ends without cleanup
Addresses the sixth automated review finding: SIGINT and SIGTERM are recorded
from the moment the HTTP entry starts, the lifecycle owner acts on a recorded
signal as soon as it registers, and a second signal during startup exits at
once.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-18 10:19:01 -07:00
Edgar ArakelyanandClaude Fable 5.1 174188279b fix(mcp): fire the shutdown hook once, stop awaiting the probe's tee and keep every Set-Cookie
Addresses the fifth automated review round: the instance's shutdown hook runs
exactly once even when the listener closes without a live session; the
initialize probe no longer awaits cancelling its cloned body, which would wait
for the original request to drain; and the node:http bridge passes repeated
Set-Cookie values through as an array.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-18 09:53:56 -07:00
Edgar ArakelyanandClaude Fable 5.1 fb22df370b fix(mcp): match Accept ranges exactly and keep a session whose shutdown failed
Addresses the fourth automated review round: a sessionless POST replaces a
session only when its Accept header lists application/json and
text/event-stream as exact media ranges, and a session whose transport
shutdown rejected stays owned so the next close retries it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-18 09:36:21 -07:00
Edgar ArakelyanandClaude Fable 5.1 b76f354d76 fix(mcp): classify loopback from the bound address and keep startup failures out of onerror
Addresses the third automated review round: loopback is classified from the
address the listener bound with the configured name added to the Host and
Origin allowlist; scoped IPv6 literals are refused before binding and a URL
that cannot be formed closes the listener; listener errors reach onerror only
after a successful bind; the MCP runtime keeps its factory owner as the single
owner of instance cleanup through `closeInstance: false`.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-18 09:18:08 -07:00
Edgar ArakelyanandClaude Fable 5.1 9ed8f06f75 fix(mcp): compare the media type proper and bind before creating the server
Addresses the second automated review round: a sessionless POST replaces a
session only when its media type proper is application/json, and the server
instance is created after the listener binds so a bind failure leaves nothing
to clean up and a factory failure releases the listener.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-18 08:38:34 -07:00
Edgar ArakelyanandClaude Fable 5.1 b0ec63cc03 fix(mcp): harden the streamable HTTP listener's session replacement and shutdown
Addresses the automated review findings on the PR: refuse requests once the
session slot is closed and join an arming initialize during shutdown; retry
failed close stages instead of replaying the rejection; classify loopback
binds by address class and add the bind's own hostname to the Host and Origin
allowlist; let only a POST with the streamable headers replace an open
session; announce the bound URL at every log level; route `mcp -h --http` to
the HTTP entry.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-18 08:14:01 -07:00
Edgar ArakelyanandClaude Fable 5.1 46dd8f0e2b feat(mcp): serve the MCP server over streamable HTTP
Add rea mcp --http [--host] [--port]: the same server rea speaks over stdio,
served over MCP Streamable HTTP on a loopback listener by default, using the
SDK's web-standard transport already in the pinned @modelcontextprotocol/server
behind a small node:http bridge. One client and one session at a time; DELETE
ends the session without running provider teardown, a new client's initialize
replaces a session left open, foreign Host headers are refused on loopback
binds, and shutdown is signals-only. Stdio stays the default and registered
transport; server.json and client registrations are unchanged.

Refs morluto/rea#4933

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-17 21:05:10 -07:00
Thang LuuandThang Luu 911894d758 feat(wasm): compare retained core-module interfaces (#2464)
Squash merge of https://github.com/morluto/rea/pull/2464.

Co-authored-by: Thang Luu <76550342+thangldw@users.noreply.github.com>
2026-10-13 23:49:04 +08:00
48a683ac8c feat(evm): inspect lossless Solidity terminal CBOR metadata (#2790)
feat(evm): retain lossless terminal CBOR metadata

Refs morluto/rea#2388

Co-authored-by: Matheus Breguêz <matbrgz@gmail.com>
Co-authored-by: Codex <noreply@openai.com>
2026-10-13 21:55:30 +08:00