feat(storyboard): add adversarial builder for request-signing vector 028#1644
Merged
Merged
Conversation
Vector 028 was added in adcp#4326 / adcp#4327 (the `request_signing.protocol_methods_*` namespace). It grades whether a verifier that declares `protocol_methods_required_for: ["tasks/cancel"]` actually rejects unsigned `tasks/cancel` JSON-RPC POSTs with `request_signature_required`. Without an SDK adversarial builder, the storyboard runner errored on 028 and test-agent.adcontextprotocol.org skipped via `skipVectors` as a workaround. This PR removes that workaround: - New `protocolMethodPassthrough` mutator: the vector body is a JSON-RPC envelope with `method: "tasks/cancel"`, NOT a `tools/call` envelope, so the standard MCP-mode `applyTransport` (which would wrap in tools/call) is wrong. Pass through verbatim, target `baseUrl` directly. - `VerifierCapabilityFixture` extended with `protocol_methods_supported_for` / `protocol_methods_required_for`. `capabilityMismatch` gates on the new bucket — agents that don't declare it auto-skip with `capability_profile_mismatch`, same shape as the `required_for` gate. - `vector-loader.ts` parses the new fields so the grader sees them when the cache ships vector 028. - Inline-fixture unit tests (cache doesn't ship 028 yet) cover the passthrough behavior, no-tools-call-wrapping, signature header stripping, and MCP-mode URL targeting. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
e2a25d9 to
729886b
Compare
2 tasks
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
Wires the SDK-side adversarial builder for AdCP conformance vector 028 (
negative/028-unsigned-protocol-method-required.json). Vector 028 was added upstream in:request_signing.protocol_methods_*namespace (schema + spec text + test-agent enforcement)Without this builder, the storyboard runner errored with
No adversarial builder registered for negative vector "028-unsigned-protocol-method-required". test-agent.adcontextprotocol.org carried askipVectors: ['028-unsigned-protocol-method-required']workaround; this PR removes that pressure.Changes
protocolMethodPassthroughmutator insrc/lib/testing/storyboard/request-signing/builder.ts. The vector body is already a JSON-RPC envelope withmethod: "tasks/cancel"— NOT atools/callenvelope — so the standard MCP-modeapplyTransport(which wraps the body intools/call) is wrong. Pass through verbatim; targetbaseUrldirectly when set.VerifierCapabilityFixtureextended withprotocol_methods_supported_for/protocol_methods_required_for, mirroring the schema landed in adcp#4326.capabilityMismatchextended ingrader.tsto gate onprotocol_methods_required_for. Agents that don't declare the bucket auto-skip withcapability_profile_mismatch— same shape as the existingrequired_forgate.vector-loader.tsparses the newprotocol_methods_*fields off vector fixtures.Test plan
npm run build:libnpx tsc --project tsconfig.lib.json --noEmit(clean)node --test test/request-signing-vector-028-protocol-methods.test.js(5/5)node --test test/request-signing-grader-vectors.test.js test/request-signing-vectors.test.js(88/88 — no regression on existing vector tests)compliance/cache, thevector-loadercount test inrequest-signing-grader-vectors.test.jswill pick upnegative.length === 28automatically. Tracked under spec adcp#2331 (runner umbrella).skipVectors: ['028-unsigned-protocol-method-required']line fromtest-agent'sserver/tests/manual/run-storyboards.tsonce a release of@adcp/sdkcarrying this PR is consumed there.Cross-namespace note
Cross-namespace match prevention (a signed
tools/callwithparams.name: "tasks/cancel"MUST NOT satisfyprotocol_methods_required_for) is a server-side rule enforced at the verifier — the SDK's adversarial builder doesn't construct such a probe. Test-agent'smcpOperationResolvercovers the resolver-side defense and is unit-tested in adcp#4326.🤖 Generated with Claude Code