Skip to content

feat(server): add asynchronous HTTP push delivery - #326

Merged
MisterVVP merged 2 commits into
release/v0.6.0from
feat/267-async-push-delivery
Nov 8, 2026
Merged

MisterVVP merged 2 commits into
release/v0.6.0from
feat/267-async-push-delivery

Conversation

@MisterVVP

@MisterVVP MisterVVP commented Nov 8, 2026 •

Copy link
Copy Markdown
Owner

Summary

Implements #267 with opt-in asynchronous HTTP push delivery and coroutine server integration. Existing synchronous delivery keeps its public API, payload, authentication, version fallback, and result/error mapping.

  • Reuses the shared HTTP async/libcurl multi infrastructure and bounded completion runtime, with owned requests, cancellation, one timeout/deadline across fallback attempts, and deterministic shutdown.
  • Adds an awaitable service helper that propagates request-context and Asio cancellation, including cancellation between starting delivery and registering the result wait. Accepted outbound requests are cancelled when the coroutine exits early.
  • Adds fake-requester and localhost tests, a reproducible thread/resource comparison, and API/lifecycle documentation.
  • Keeps API/lifecycle explanations in the SDK guide and removes explanatory inline comments from the implementation and tests. Attempt state and completion results avoid redundant heap allocations.

Authorship and AI usage

  • Contains substantive content written by a human
  • Contains substantive content generated by an AI agent

Testing

  • CTest: 1,068 entries, zero failures; conditional skips retained.
  • Regression coverage reproduces the pre-wait cancellation leak against the original code and verifies cancellation cleanup after the fix.
  • The idle-stream shutdown fixture waits for server-side write acknowledgement before shutdown. Its strict UNAVAILABLE assertion passed 100 consecutive runs.
  • No-libcurl build: 26 push delivery/contract checks passed.
  • Performance smoke: 54 result rows across gRPC/HTTP+JSON and in-memory storage, zero errors.
  • Optimized localhost comparison at 64 held-open deliveries: synchronous delivery used 74 process threads and async delivery used 10, with zero errors. Both modes use the same webhook, payload, and response-release barrier.
  • mdBook build and CI-compatible formatting passed.
  • Extracted repeated assertions in an existing Asio gRPC route test to satisfy the enforced complexity limit; the checked routes and expected statuses are unchanged.
  • ./scripts/verify_changes.sh and ./scripts/run_clang_tidy.sh build passed locally. The original profiles and real clang-tidy checks run concurrently, with a local cache keyed by preprocessed inputs, compiler flags, and dumped configuration.

Upstream mandatory TCK (--level must, all three transports, in-memory store) at 104a7b4ae0d83f65c075e3793e322953a830eaba: 212 passed, 13 skipped, 4 failed, with unchanged upstream assertions and no repository-added skips. These match the two assertion defects documented in book/src/compatibility/conformance.md: CORE-SEND-003 omits its expected error (three transport failures), and HTTP_JSON-ERR-001 requires legacy application/json despite the binding's application/a2a+json media type. This is not 100% TCK compliance; creating this PR with these known failures was explicitly authorized.

Dependency manifests are unchanged. An OSV Scanner scan of a CycloneDX inventory covering four installed direct C++ dependencies was attempted; lookup was blocked by the environment's denied access to api.osv.dev. No successful vulnerability-scan result is claimed.

Checklist

  • ./scripts/verify_changes.sh passed locally
  • Docs updated if behavior changed

Implements #267 with shared non-blocking HTTP delivery, cancellation, deadlines, shutdown, coroutine integration, tests, and documentation.
@MisterVVP MisterVVP added the AI agent AI agent contribution label Nov 8, 2026 — with ChatGPT Codex Connector
@MisterVVP MisterVVP self-assigned this Nov 8, 2026
@MisterVVP MisterVVP added the enhancement New feature or request label Nov 8, 2026
Cancel accepted outbound requests when the coroutine exits before waiting, and add regression coverage for pre-wait Asio cancellation. Remove explanatory inline comments and redundant delivery allocations. Synchronize the idle-stream shutdown test with server write acknowledgement.
@MisterVVP

Copy link
Copy Markdown
Owner Author

@codex review this PR

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-08T17:28:40.344836Z 82315fb Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: 82315fbda2

ℹ️ 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".

@MisterVVP
MisterVVP merged commit 40e70a2 into release/v0.6.0 Nov 8, 2026
36 of 38 checks passed
@MisterVVP
MisterVVP deleted the feat/267-async-push-delivery branch November 8, 2026 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI agent AI agent contribution enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant