π¦ New version release - #506
Merged
Merged
Conversation
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.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@smooai/smooth-operator@1.55.3
Patch Changes
ec1b9c4: go-server: fix the P1 connection deadlock (and permanent goroutine/socket leak) when a client disconnects mid-turn.
The per-connection outbound sink is a bounded channel (64), and the writer goroutine
returned on its first failedconn.Write. With no reader left, a streaming turn's 65thsendblocked forever β andsendholdssendMuacross that send, whose only escape (ioCtx) is cancelled byteardown, which is itself waiting onWaitForTurns(). Circular wait: the turn never reached itsctx.Err()check even thoughCancelTurn()had already fired, so the connection goroutine and itss.connsWaitGroup entry leaked for the life of the process andShutdown()never returned. The read loop and backplane wedged with it onsendMu.The writer now keeps draining (discarding) the sink once the socket is dead instead of returning β matching the Rust reference, whose unbounded
sink_txcan never block a turn on a dead socket.Also from the same review:
recover()anywhere ingo/, and a turn runs on a bare goroutine β so one panicking host store/config/hook killed the whole process and dropped every other live connection. A panicking turn now settles as a cleanINTERNAL_ERRORwith the connection still usable. (A panic inside a tool is still fatal: the engine runs the tool loop on its own recover-less goroutine insmooth-operator-core, so that guard belongs there.) The optional preamble goroutine is guarded too.TurnRunner.Runcalledstream.Events()with no nil check, so anAgentExecutorreturning(nil, nil)panicked the turn; it now fails the turn cleanly.Regression tests:
TestClientDisconnectMidStreamDoesNotWedgeTurn(assertsShutdown()actually returns after an RST mid-burst β it hangs without the fix; note-racecannot catch a wedged goroutine) andTestPanickingTurnDoesNotKillTheProcess.@smooai/smooth-operator-web-chat-example@0.0.101
Patch Changes