Skip to content

fix(acp): cancel active requests on transport close - #31

Open
chicoxyzzy wants to merge 1 commit into
mainfrom
fix/acp-stdio-disconnect-cancellation
Open

fix(acp): cancel active requests on transport close#31
chicoxyzzy wants to merge 1 commit into
mainfrom
fix/acp-stdio-disconnect-cancellation

Conversation

@chicoxyzzy

Copy link
Copy Markdown
Member

Summary

  • Cancel live inbound request contexts when the ACP stdio transport closes or fails.
  • Shut down ordered and concurrent handlers before Serve returns on EOF and reader/write errors.
  • Keep ACP test transports open until their request response is observed, matching real client lifetime.

Why

A client disconnect previously left a running request context alive while the server waited for its handler. This could hang a stdio process and leave a caller-owned run unsupervised.

Validation

  • go test -count=1000 -run '^TestCommandBridgeServesSessionMethodsWithoutRuntimeFlags$' ./adaptercli
  • go vet ./...
  • go test ./...
  • go test -race ./...

Compatibility

The transport remains provider-neutral. Request ordering, protocol cancellation, JSON-RPC error behavior, outbound IDs, and the message-size cap are unchanged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant