Skip to content

feat(acts): streaming and raw wire steps - #63

Merged
JakubWorek merged 2 commits into
jakubworek/acts-runnerfrom
jakubworek/acts-streaming-and-raw
Sep 9, 2026
Merged

JakubWorek merged 2 commits into
jakubworek/acts-runnerfrom
jakubworek/acts-streaming-and-raw

Conversation

@JakubWorek

@JakubWorek JakubWorek commented Sep 4, 2026 •

Copy link
Copy Markdown
Member

Stacked on #62. Base is jakubworek/acts-runner, so this diff shows only the streaming and raw work. Retargeting as the branches below land.

Summary

Adds streaming.py and teaches the runner the two remaining step kinds, so raw and streaming tests execute instead of skipping.

Every event is normalized to kind + payload. The wire sends a StreamResponse oneof ({"statusUpdate": {...}}, camelCase ProtoJSON), but the corpus asserts on it both ways - flat (final_event: {status: {state}}, nine of twelve blocks) and discriminated (one_of: [{task: ...}, {status_update: ...}]). So the assertion view is the payload's own fields plus the one discriminator naming its kind: {message: ...} therefore fails on a status update, which is what STREAM-MSG-001 is checking. An unrecognized event passes through whole, which is how a raw streaming step works - JSONRPC-SSE-001 asserts each_event: {jsonrpc: "2.0"}, and unwrapping would delete the thing under test.

monotonic_state enforces only §7.1's explicit MUST list - nothing may transition to SUBMITTED, nothing may follow a terminal state, a state may repeat. §7.1 also gives a whitelist of valid transitions that disagrees with that list (SUBMITTED → COMPLETED is in neither), and honoring the whitelist would fail a SUT for a rule nobody wrote down.

A raw request goes exactly as written. The runner adds no A2A-Version: VER-NEG-002 omits it deliberately and §12.4 excepts exactly that case, so a helpful runner would repair the test away. {{...}} in the raw block's path, headers and body is substituted, and expect.body on a raw step is the whole envelope - JSONRPC-ERR-001 asserts body.error.code.

Notes

  • A wrong Content-Type on a stream is a FAIL, not an ERROR. httpx-sse raises SSEError, which subclasses httpx.TransportError and would otherwise read as "the run broke" - but the SUT answered. A new MalformedResponse carries that distinction.
  • one_of accepts a mapping member as an assertion, not just a value. §5.1 defines it as value membership, but STREAM-SSE-004 and the spec's own §7 example both use it as an alternation of assertion objects; read strictly, neither could ever pass.
  • A timeout is itself a failure, reported before the count assertions so the SUT is not blamed for a shortfall the runner caused by hanging up. Collection also stops one event past max_count, enough to prove the violation without reading a runaway stream.
  • tests/test_acts_end_to_end.py runs the real dispatcher and runner over real corpus tests against an in-process conforming agent, with a broken-agent control class beside it. Everything before this could only show that nothing crashes; a suite that never sees a pass cannot distinguish a working runner from one that fails everything.

@JakubWorek
JakubWorek force-pushed the jakubworek/acts-streaming-and-raw branch from 92a7899 to 1788580 Compare September 8, 2026 10:38
Comment thread test_suite/acts/runner.py Resolved
Comment thread test_suite/acts/runner.py Resolved
@JakubWorek
JakubWorek merged commit 89f4560 into main Sep 9, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants