Skip to content

Close constructed sessions when server negotiation fails - #13

Open
OskarEichler wants to merge 1 commit into
faye:mainfrom
OskarEichler:codex/cleanup-failed-server-negotiation
Open

Close constructed sessions when server negotiation fails#13
OskarEichler wants to merge 1 commit into
faye:mainfrom
OskarEichler:codex/cleanup-failed-server-negotiation

Conversation

@OskarEichler

Copy link
Copy Markdown

Summary

Close constructed server sessions if a later factory, response generation or serialization step fails before ownership is installed on the container.

Reproduction and verification

# First extension constructs a session; a later extension raises
# from create_server_session or generate_response.
exts.generate_response('first, second')
# The original error propagates; already-created sessions are closed.

Three focused checks cover failure in a later response/factory and successful sessions remaining open until normal close. Existing server negotiation examples pass.

  • Ruby 4.0.6 through rbenv; existing current-upstream suite: 64 examples, zero failures on this isolated change.
  • The cumulative release-based candidate passes 283 focused checks (272 baseline failures → zero), 2,784 model checks, the current upstream's 64-example suite, and gem build/extraction.
  • The historical 0.1.5 suite has three Ruby keyword-versus-options-hash mock failures on both baseline and candidate. Current upstream already corrected those expectations; they were run against the candidate through an external preload without changing repository tests.
  • No new or modified tests/specs, following the consumer repository's explicit policy. Reproductions/models were run from external scratch scripts.

Breaking changes and limitations

No intended breaking change for successful negotiation. Failed handshakes now release constructed sessions; original error behavior is preserved for normal StandardError cleanup callbacks.

Only local Ruby 4.0.6/macOS execution is claimed; the repository's older Ruby/JRuby matrix needs upstream CI. No production access or unrelated release upgrades.

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