Skip to content

Release abandoned Gun streams without breaking interop reads - #667

Open
sleipnir wants to merge 4 commits into
masterfrom
copilot/fix-interops-tests-failure
Open

sleipnir wants to merge 4 commits into
masterfrom
copilot/fix-interops-tests-failure

Conversation

@sleipnir

@sleipnir sleipnir commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

The Interop job failed in ping_pong!: each Enum.at/2 stopped enumeration, triggering Gun cleanup and closing the still-active bidi RPC. The metadata helper also read one response stream through repeated partial enumerations.

  • Gun cleanup: Use Stream.resource/3 to cancel the RPC when response enumeration ends early.
  • Interop consumers: Read each bidi response stream in one pass, sending subsequent requests as replies arrive.
  • Regression coverage: Verify that stopping after one server-streamed reply releases the response process.
res_enum
|> Enum.with_index()
|> Enum.reduce(0, fn {reply, index}, count ->
  # Validate reply and send the next request while consuming the stream.
  count + 1
end)

sleipnir and others added 2 commits November 23, 2026 12:46
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
@sleipnir sleipnir changed the title [WIP] Fix failing GitHub Actions job 'Interop tests' Release abandoned Gun streams without breaking interop reads Nov 23, 2026
@sleipnir
sleipnir marked this pull request as ready for review November 23, 2026 12:53
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
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.

2 participants