Repository navigation
feat(http): add bounded event-driven server runtime - #327
Merged
Merged
Conversation
Owner
Author
|
@codex review this PR |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a5df2ced8e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
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.
Summary
Adds the opt-in
EventHttpServerlistener ina2a::asiofor HTTP+JSON, JSON-RPC, discovery, and finite/live SSE. The shared incremental byte codec preserves the blocking adapter API, while existing transports provide routing, validation, authentication metadata, protocol errors, and event serialization.One network thread and a fixed application pool bound connections, pending work, input/output buffers, and admission. Persistent and pipelined requests retain response order. Receive EOF drains active responses, including finite SSE, and buffered requests before closing. TCP resets still cancel live production. Awaited event writes provide backpressure; native dispatcher cancellation wakes a pending socket write and closes its connection, with exactly-once completion on the awaiting executor. Delayed cancellation cannot affect a completed write or another stream generation. Disconnects, rejected responses, producer failures, idle expiry, and shutdown cancel pending production. Retained stream handles reject writes after completion or listener destruction. Synchronous extended-card requests preserve structured HTTP 500 errors and activated-extension headers when no dispatcher is configured; native preparation remains independent of a synchronous dispatcher. Socket shutdown precedes close.
The async TCK fixture uses the SDK listener. Includes native socket tests, an installed consumer example, lifecycle documentation, and a reproducible benchmark runner.
The listener currently accepts HTTP/1.1. HTTP/2 clients can connect through a reverse proxy with an HTTP/1.1 upstream; native HTTP/2 framing and multiplexing remain outside this implementation.
Authorship and AI usage
Testing
./scripts/verify_changes.sh: exit 0; 1,103 registered tests, zero failures, three existing skips, including installed-consumer tests../scripts/run_clang_tidy.sh build: exit 0. Unchanged translation units reuse input-validated clang-tidy 19 results from this session.mdbook build book: passed.a92a9b2: the focused ThreadSanitizer job passed all 334 cases, including all 23EventHttpServerlifecycle tests and the three native cancellation/race regressions. The profile explicitly builds the HTTP test executable when Asio is enabled; no suppressions were added.60c9e7fpassed all 15 main CI jobs, including Windows, macOS/Asio, ASan/UBSan, interoperability, and performance, plus CodeQL and documentation checks. Remaining workflows for the current revision are tracked in CI.Comparable optimized c1/c16/c64 and idle measurements reported zero workload errors. Total fixture threads stayed at 21 versus 73 for the synchronous baseline at 64 clients. Short c1 finite SSE is materially slower: 2,986 versus 7,963 requests/s, completion p99 0.581 versus 0.236 ms. Bounded backend dispatch, executor hand-offs, and awaited socket-write acknowledgements add scheduling cost relative to inline connection-thread execution. The runtime remains opt-in; these shared-host measurements do not claim throughput parity.
Existing TCK failures
The unmodified upstream TCK
104a7b4ae0d83f65c075e3793e322953a830eabareports 242 passed, 17 skipped, four failed on gRPC, JSON-RPC, and HTTP+JSON, identically to a cleanrelease/v0.6.0at40e70a239d18208e07738abb64415d9d97e1a601. Per-requirement statuses match the baseline.application/json; the existing serializer returnsapplication/a2a+json.CORE-SEND-003fails on all three transports because upstream omits its expected-error declaration and treats the unsupported-content error as unexpected.No TCK expectations were changed. Mandatory conformance is not 100%. The baseline failures and blocked online vulnerability scan remain unresolved.
Checklist
./scripts/verify_changes.shpassed locally