Skip to content

Order inbound requests after prior notifications - #56

Open
abietic wants to merge 1 commit into
coder:mainfrom
abietic:codex/fix/inbound-request-notification-barrier
Open

Order inbound requests after prior notifications#56
abietic wants to merge 1 commit into
coder:mainfrom
abietic:codex/fix/inbound-request-notification-barrier

Conversation

@abietic

@abietic abietic commented Aug 29, 2026

Copy link
Copy Markdown

Summary

  • snapshot the accepted-notification watermark when each inbound request is received
  • wait only for notifications at or below that watermark before starting the request handler
  • let $/cancel_request interrupt a request waiting at the barrier
  • preserve the existing disconnect cleanup contract by starting accepted handlers with a canceled context after the peer is gone

This closes the remaining ordering gap after response-scoped notification barriers: a request could previously overtake notifications that appeared earlier on the same wire. Later notifications do not delay the request, and requests released from the same barrier can still run concurrently.

Verification

  • GOTOOLCHAIN=go1.21.13 go test ./...
  • GOTOOLCHAIN=go1.21.13 go test -race ./...
  • focused inbound/disconnect tests repeated 50 times on the current toolchain
  • git diff --check

@abietic
abietic force-pushed the codex/fix/inbound-request-notification-barrier branch from d934056 to ebac528 Compare August 29, 2026 03:40
@abietic

abietic commented Aug 30, 2026

Copy link
Copy Markdown
Author

@ThomasK33 When you have a chance, could you review this follow-up to the response-scoped notification barrier? The root suite and -race both pass with the repository minimum Go 1.21.13 toolchain.

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