Repository navigation
feat(acts): adopt the corrected corpus, drop compat, add the auth precondition and pass - #67
Merged
Merged
Conversation
mykytanetipa
approved these changes
Sep 16, 2026
JakubWorek
added a commit
that referenced
this pull request
Sep 17, 2026
…#68) `CARD-CACHE-001`, `JSONRPC-CT-001` and `REST-CT-001` are tagged `runner_requirements:[header_inspection]` and have skipped on every run since they were written — reported as "runner does not provide header_inspection", which reads as an honest limitation. It was not one. `expect.headers` has been wired into the runner since #67 and the dispatchers have been reporting headers all along; no front end ever passed `capabilities`, so the gate never opened. Fixed where `RUNNER_VARIABLES` already solves the identical problem — merged inside `acts_runner.run()`, so `POST /run-acts`, `run_acts.py` and CI all get it and no caller has to remember. Patching the CI payload alone would have left local runs still skipping. ## What it finds `JSONRPC-CT-001`, the only MUST, passes on all five SDKs, so no conformance verdict changes and `--require-conformant` stays green. Everything newly graded is SHOULD. | | CARD-CACHE-001 | JSONRPC-CT-001 (must) | REST-CT-001 | |---|---|---|---| | a2a-js | pass | pass | pass | | a2a-java | pass | pass | fail — 415, its known REST breakage | | a2a-python | **fail** | pass | **fail** — `application/json` | | a2a-go | **fail** | pass | **fail** — `application/json` | | a2a-rs | **fail** | pass | **fail** — `application/json` | Three SDKs publish no `Cache-Control` or `ETag` on the agent card, and the same three answer `application/json` where §11 wants `application/a2a+json`. Real deviations, invisible until now; a2a-js passing both shows they are satisfiable. Per run this turns 5 skips into 5 graded results. ## Also here The first failures reported `actual` as `<test_suite.acts.assertions._FoldedHeaders object at 0x…>` — a raw repr going straight into the §13 report, swallowing the one thing a missing-header failure should say. `_FoldedHeaders` gains a `__repr__`, so it now reads `{'date': …, 'server': 'uvicorn', 'content-type': 'application/json'}`. Two tests, both verified to fail without their fix: - `test_the_harness_declares_every_capability_the_corpus_asks_for` — every `runner_requirement` in the corpus must be in `RUNNER_CAPABILITIES` or listed as one we genuinely cannot arrange. This is the check whose absence let the bug sit silently. - `test_a_failure_reports_the_headers_that_were_actually_present`.
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
Takes the corpus from A2A#2227, where the defects this runner used to patch at load time have been fixed at source. With them fixed,
test_suite/acts/compat.pyhas nothing left to do and is deleted — the corpus now loads 111 tests, 0 errors, strictly, with no rewriting.That removal is the point of the PR, and everything else follows from it: the schema catches up to what the corrected corpus needs, the runner gains the one precondition A2A actually supports for authentication, and two runner bugs that the cleaner corpus made visible are fixed.
compat.pyhad stopped being a safety netThree of its four rules already fired zero times. The fourth,
expect-field-outside-body, had started matching the corrected corpus's newexpect.headersblocks and relocating them intoexpect.body— so the three header tests would have passed without checking a header, and blamed the SDK for nothing. A rewrite layer that silently reinterprets a fixed corpus is worse than no layer at all.Gone with it: the
compat=parameter,LoadedSuite.rewrites, five package exports,test_acts_compat.py, andwire_map'saliasesmechanism — which existed only to acceptStreamingNotSupportedErrorandExtendedCardNotSupportedError, two error names A2A does not define and #2227 removes.Authentication: a precondition that can be met
Five tests —
SEC-AUTH-001/002/003/004/006, four MUST and one SHOULD — gated onpreconditions.capabilities.authentication.AgentCapabilitieshas exactly four members and none of them isauthentication, so those tests were unrunnable against any agent on any binding, and no SUT configuration couldchange that. They had been reporting as unsatisfiable since #64 added the diagnostic that caught them.
A2A#2227 moves them to a top-level
preconditions.authentication, read off the card'ssecuritySchemesandsecurityRequirements, presence only. This adds the matching branch to_unmet_precondition, and the branch was proved to fail in both directions before the corpus was pointed at it — the lesson fromexpect.headers, which sat in the schema unread for a release.The precondition is not a way of letting an agent off: A2A conditions the server's obligation on "its declared authentication requirements", so a rejection test genuinely does not apply to an agent that declares none. The one exception is
Get Extended Agent Card, whose authentication A2A mandates unconditionally — which is whySEC-EXTCARD-001/002/004deliberately do not carry the gate.A corpus guard now fails if any test ever again gates on a capability
AgentCapabilitiesdoes not define. That assertion would have caught this the day it was written.Reaching the auth tests: a second deviation
_rerun_capability_skipsbecomes aDeviationtable —env_var,skip_pattern,log_name,took_effect— with two rows. The reduced-capability pass from #64 is the first; anITK_ACTS_AUTHpass is the second, and it is a table row rather than a second copy of fifty lines.The reasoning is the same shape as before. One agent cannot both require and not require a credential: an absent
Authorizationheader means "reject me" inSEC-AUTH-001and "serve me" inJSONRPC-ENV-001, and no server can tell those two requests apart. Enforcing during the main pass costs fourteen raw steps that must be served, measured. So the pass runs only the tests whose skip it can clear, and those fourteen never meet the enforcing SUT.Every
SEC-AUTH-*now carries a real verdict on every binding it applies to; the only remaining skips there are transport filters.Two properties worth reviewing specifically:
_run_passwas called unguarded, so an agent that would not start in a deviated mode took the whole binding's report with it, surfacing aserror (jsonrpc): …and exit 2. AnActsRunErrornow warns and keeps the original skips; anything else still propagates. Pinned by a test asserting aZeroDivisionErroris not swallowed.TestResultgained an optionalconfiguration, recording which deviation produced a spliced verdict. It is omitted when unset, so a run with no deviations is byte-identical to before. Flagging for review: ACTS §13.3 does not define that key, and the deviation mechanism is deliberately ours rather than the spec's — happy to drop it if that drift is unwelcome.Two runner bugs the corrected corpus exposed
A refused stream is a conformant answer.
CORE-CAP-002andSTREAM-SUB-003failed on every SDK because the runner treated any non-SSE reply to a streaming call as "wrong content type" and discarded the body. A2A requires an agent that does not advertise streaming to answerUnsupportedOperationError, and says the same of subscribing to an already-terminal task — so the conformant reply is an ordinary error document and no stream at all.StreamNotOpenednow carries the parsed reply, soexpect_errorcan be evaluated against it.http_baseopens the stream by hand rather than throughaconnect_sse, which checks the content type inside its ownclient.streamblock and closes the response before the body can be read;grpc.streamparses theAioRpcErrorwhen nothing was streamed.RUNNER_VARIABLESnever reached the service.run_acts.pypassed them andPOST /run-actsdid not, so{{insufficientAuthToken}}was unresolved on the service path andSEC-EXTCARD-002errored — a harness fault reported against the SDK. They are now merged insideacts_runner.run(), where every front end gets them, and a caller can still override.Schema catch-up
expect.headers(wired intoevaluate_headers, not merely declared),preconditions.authentication,ErrorTypecarrying exactly A2A's names,detailsas an assertion over the error array rather than a map,dataremoved._observed_errornow exposesdetailsas the array it is.