fix: propagate IngestEvent errors and document HTTP/2 requirement#15
Merged
fix: propagate IngestEvent errors and document HTTP/2 requirement#15
Conversation
IngestEvent uses bidi streaming which requires HTTP/2. Previously the Receive() error and response were silently discarded. Now all errors are properly propagated so the sidecar can surface ingestion failures. The dev server needs HTTPS (via mkcert) for HTTP/2 ALPN negotiation. Production already has HTTP/2 via edge TLS at api.kontext.security. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
CloseResponse() was only called on the happy path. Early returns from Send(), CloseRequest(), or Receive() errors skipped it, leaking the underlying HTTP/2 stream. Use defer to ensure cleanup on all paths. Addresses Devin review finding on PR #15. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
tumberger
added a commit
that referenced
this pull request
Apr 8, 2026
* fix: propagate IngestEvent errors and document HTTP/2 requirement IngestEvent uses bidi streaming which requires HTTP/2. Previously the Receive() error and response were silently discarded. Now all errors are properly propagated so the sidecar can surface ingestion failures. The dev server needs HTTPS (via mkcert) for HTTP/2 ALPN negotiation. Production already has HTTP/2 via edge TLS at api.kontext.security. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: defer stream.CloseResponse() to prevent HTTP/2 stream leak CloseResponse() was only called on the happy path. Early returns from Send(), CloseRequest(), or Receive() errors skipped it, leaking the underlying HTTP/2 stream. Use defer to ensure cleanup on all paths. Addresses Devin review finding on PR #15. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: use /tmp for sidecar socket to avoid macOS sun_path limit macOS $TMPDIR is a long path (/var/folders/.../T/) which pushes the Unix socket path over the 104-byte sun_path limit. Use /tmp with a truncated session ID instead. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * refactor: change ProcessHookEvent from bidi streaming to unary RPC Bidi streaming required HTTP/2 end-to-end, which Cloud Run doesn't support without --use-http2 (which breaks HTTP/1.1 REST endpoints). The RPC was already effectively unary — one event in, one ack out. - Regenerate proto stubs from kontext-dev/proto (unary definition) - Simplify IngestEvent to match CreateSession/Heartbeat/EndSession - Update README to reflect unary RPC Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

IngestEvent uses bidi streaming which requires HTTP/2. Previously the
Receive() error and response were silently discarded. Now all errors
are properly propagated so the sidecar can surface ingestion failures.
The dev server needs HTTPS (via mkcert) for HTTP/2 ALPN negotiation.
Production already has HTTP/2 via edge TLS at api.kontext.security.
Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com