Skip to content

Fix streaming_client README, CLI flags, message_id handling, and JSON-RPC fixture validation - #152

Merged
MisterVVP merged 1 commit into
dev-add-coverage-and-production-streaming-examplesfrom
dev-address-pr-#149-review-comments
Jul 16, 2026
Merged

MisterVVP merged 1 commit into
dev-add-coverage-and-production-streaming-examplesfrom
dev-address-pr-#149-review-comments

Conversation

@MisterVVP

@MisterVVP MisterVVP commented Jul 16, 2026 •

Copy link
Copy Markdown
Owner

Motivation

  • Align streaming_client example docs and commands with the repository example runner and actual binary layout so users can build and run the example exactly as written.
  • Ensure SendMessage requests created by the example always include a unique non-empty message_id and only include a task_id when explicitly provided by the user.
  • Centralize CLI flag names to avoid magic strings and reduce maintenance surface.
  • Harden the JSON-RPC SSE fixture used by interop tests to reject unexpected methods and malformed parameters and add deterministic negative checks.

Description

  • Update examples/apps/streaming_client/README.md to use the example runner build command and the generated binary path as ./scripts/run_examples.sh build-example streaming_client and ./build-example-streaming_client/a2a_example --help, and update all usage examples to call the actual binary path.
  • Replace literal CLI flag strings with namespace-scope constexpr constants (for --help, --transport, --endpoint, --operation, --task-id, --timeout-ms, --cancel-after-first-event) and reuse them in PrintUsage() and ParseOptions() in examples/apps/streaming_client/main.cpp.
  • Remove the example's default task_id for sends and add deterministic, in-process message_id generation using a prefix + timestamp + atomic sequence in MakeMessageId(), and set task_id in the SendMessageRequest only when the user supplied --task-id.
  • Update scripts/interop/python_http_sse_fixture.py to accept only a2a.sendStreamingMessage and a2a.subscribeToTask, validate params.message.messageId (non-empty string) for send and params.id (non-empty string) for subscribe, and return HTTP 400 on unexpected method or invalid parameters.
  • Add deterministic negative interop checks to scripts/run_http_sse_interop.sh that POST malformed/incorrect JSON-RPC payloads and assert HTTP 400 responses.
  • Mark scripts/run_http_sse_interop.sh and scripts/run_cpp_sut_streaming_functional.sh executable so they can be invoked directly.

@MisterVVP MisterVVP added the codex Automatic label added by codex agent. Should not be used label Jul 16, 2026 — with ChatGPT Codex Connector
@MisterVVP MisterVVP added AI agent AI agent contribution and removed codex Automatic label added by codex agent. Should not be used labels Jul 16, 2026
@MisterVVP MisterVVP self-assigned this Jul 16, 2026
@MisterVVP
MisterVVP merged commit ba562a5 into dev-add-coverage-and-production-streaming-examples Jul 16, 2026
15 checks passed
@MisterVVP
MisterVVP deleted the dev-address-pr-#149-review-comments branch July 16, 2026 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI agent AI agent contribution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant