Repository navigation
feat(server): simplify consumer setup with runtime helpers - #320
Conversation
|
@codex review this PR |
Codex Review SummaryThis 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: 1b263cca6c
ℹ️ 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".
|
@codex review this PR again |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Problem and resulting behavior
DevEx follow-up to #268 and #318. SDK consumers currently have to implement a bounded work queue, an awaitable bridge, eight forwarding methods, and runtime lifetime management to reuse a blocking executor with the coroutine engine. This adds 15 files to the TCK consumer.
The SDK now provides three composable conveniences:
engine::BlockingExecutorAdapter: an explicit compatibility adapter for an owned, thread-safeAgentExecutor. It bounds queued plus running work, checks cancellation/deadlines before backend execution, preserves typed results/errors, contains backend exceptions, and delivers completion on the awaiting executor.engine::AsyncRuntime: an optional owner for a fixed Asio pool andAsyncDispatcher, with separate nonblocking shutdown and draining join. Existing caller-supplied Asio executors remain supported. Explicit joins from an owner's worker are rejected instead of deadlocking.ServerBindings: owns SDK transport registrations and their route references. Sync construction registers all three transports; async construction registers native gRPC unary operations and HTTP agent-card discovery. Hosts retain ownership of listeners, credentials, and signals. Shared extension requirements and configured HTTP paths apply consistently.An existing blocking application can use:
Native coroutine applications pass their executor directly to
AsyncRuntime. The installed-SDK examples cover both paths and native gRPC hosting. The new guide documents ownership, admission, shutdown, and supported bindings.SUT simplification
Measured against #318's release base (
1ac17b5):tests/sutThis removes 90.1% of net added SUT code and 14 extra fixture files. Test-specific behavior, cards, policies, environment parsing, and listener hosting remain in the original fixture files. The single async entrypoint selects the shared setup.
Configured REST and JSON-RPC paths now use the same shared normalizer in the transports, binding route matchers, and JSON-RPC root alias. Missing leading slashes, trailing slashes, empty paths, and root paths retain the underlying transports' configuration semantics.
Preservation of #268
The request-lifecycle implementation, coroutine dispatcher, and native gRPC execution implementation are unchanged. Existing typed operations, extended-card providers, shared validation/interceptors/security, deadlines, exactly-once completion, cancellation precedence, and active/physical-cleanup admission semantics remain covered. The native gRPC lifecycle tests now also exercise the convenience composition.
Synchronous execution and streaming remain available across all three transports, including feature-disabled builds without Boost or C++20 cancellation. The async setup retains gRPC unary execution plus HTTP discovery. Blocking adaptation uses a fixed bounded pool and remains explicit about blocking backend I/O.
Validation exposed an existing timing-dependent sync streaming test. It now waits for the backend's pending read before cancelling, and synchronizes its fixture cancellation notification with that wait. Production streaming code is unchanged. Both cancellation cases passed 50 repetitions after the fixture fix.
Platform build fixes
SendMessage→SendMessageA/Wmacro alias. A portable compile regression exercises affected header orders with Asio enabled and disabled; a late-include reproducer fails before the fix and compiles afterward.SendMessageafter dependency includes so the static library and SDK agree on the stub/service symbol names. The regression also instantiates both generated service types to check vtable linkage and avoids macro-redefinition warnings.macos-buildnever started: GitHub reported hosted-runner acquisition/internal errors and ARM capacity constraints. Move this non-Asio job to the supportedmacos-15-intelpool, retainingmacos-15ARM coverage for Asio and independent matrix execution.Validation
Latest review follow-up (
0a19974): focused builds and 85 tests passed, including 12 new REST/JSON-RPC path-configuration cases and existing async bindings tests. Targeted clang-tidy for all changed implementations and the test file, plus exact CI formatting, passed. Long verification/TCK/performance checks were not repeated; validation remains scoped as requested.Windows linker follow-up (
1b263cc): focused build and all 44 gRPC/macro tests passed, as did targeted clang-tidy and exact CI formatting. Injecting the Win32-style macro into generated-code dependencies reproduces the old missing-symbol linker failure; the normalized object links and runs successfully. Long verification/TCK/performance checks were skipped for this follow-up at the maintainer's request. Full-suite results below are from preceding commits../scripts/verify_changes.sh: 943 registered tests, zero failures; two expected TLS-without-SUT skips../scripts/run_clang_tidy.sh buildand exact CI formatting check: passed. Lint reuses successful analyses by tool/configuration and source content; reuse for unchanged translation units is checked against compiler-recorded dependencies.mdbook build book: passed. Python toolingpip-audit: no known vulnerabilities. Dependency manifests are unchanged; this is not a complete automated C++ dependency advisory audit.The previously approved TCK registry-coverage baseline is preserved: synchronous MUST 80.9% / overall 80.0%; async gRPC MUST 59.8% / overall 61.5%. Passing executable tests does not claim complete registered-requirement coverage.
Platform CI will run on this PR; earlier heads' results do not replace those checks.
Authorship and AI usage