Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
🤖 AI Review
Both independent reviews were available. Claude's finding is confirmed as a minor reliability trade-off: pooled writes can fail on a stale connection without retry. Studio's fresh-connection exception is correctly propagated. No additional findings were identified. Tests were inspected but not run.
Findings
| Severity | Location | Category | Sources | Claim |
|---|---|---|---|---|
| 🟡 MINOR | packages/stack/src/HttpProxy.ts:433 |
reliability |
claude | Writes on routes without freshWrites now reuse pooled upstream connections. If an upstream closes a connection as it is reused, the write fails with 502 without retry. Previously, writes used fresh connections and avoided this particular failure mode. The four-second agent timeout mitigates idle-timeout races but cannot eliminate connection-reset races. |
Stats
Claude findings: 1 · Codex findings: 0 · Confirmed: 1 · Refuted: 0 · Uncertain: 0
Models: claude-opus-5-5 + gpt-6.1-sol · Trigger: auto · Workflow run
This review runs once per PR. A maintainer can request another with a /ai-review comment.
jgoux
approved these changes
Oct 9, 2026
7ttp
enabled auto-merge
October 9, 2026 14:19
7ttp
deleted the
7ttp/cli-2623-stack-gateway-still-opens-a-new-upstream-connection-per
branch
October 9, 2026 14:35
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TL;DR
stops the local stack gateway from opening a new upstream connection for every write.
whats broken?
every
.rpc(),auth.admin.createUser, delete or upload went upstream on its own connection and left it inTIME_WAIT, so a busy test run used up the macOS port range.now fixed by:
writes reuse the gateway's keep alive pool like reads do. a write is still never resent.
Studio and its
/mcproute keep a fresh connection per write, as beforechunked GET and DELETE bodies are forwarded as chunked, so they reach the upstream and stay off the next request
PS: Auth's own Postgres churn is tracked in #6981
ref: