Repository navigation
fix(testing): respect selected webhook schema on SDK 16 - #3617
Conversation
(cherry picked from commit 95a61bf)
There was a problem hiding this comment.
Ladon verdict: Approve
Approve.
Threads the run's selected AdCP version through storyboard webhook payload schema grading, replacing the hard-coded global ADCP_VERSION with options.adcpVersion ?? ADCP_VERSION in webhook-assertions.ts. Identity resolves via version-aware getSchemaDocumentByRef and the validator via getSchemaValidatorByRef(schemaRef, adcpVersion), both through the same bundle, keeping validator and reported schema_id consistent. Webhook body version claims are correctly treated as untrusted (witness-not-translator preserved). Seven regression tests cover pinning, downgrade resistance, legacy ref spelling, external-root isolation, cache non-sharing, and the unpinned default. Changeset present and correctly scoped as patch (internal params only, no exported-signature change).
No blocking findings. No medium findings. high_risk false, gated_paths false, no author-team gate, no prior decision. Falls through to row 9.
Storyboard webhook assertions ignored the run's selected protocol version and validated against the SDK default. Backport #3615 so an explicitly selected 3.0 run uses its own webhook schema and reports the exact resolved release. Incoming webhook version claims cannot override the trusted selection.
The production fix is identical to main commit
95a61bf707ef05255410eb40ff31c379354004e9. Stable-specific tests preserve 3.2.8's acceptance of legacy business statuses and use an independent synthetic schema constraint to verify downgrade refusal. Schema bundles, compatibility pins, and the 3.2.8 default are unchanged.Validation: all 68 webhook tests passed with zero skips; full library/declaration build, typecheck, formatting and focused lint passed. Normal commit and pre-push hooks passed. Four Claude experts and three Codex reviewers approved the final diff. A patch changeset is included.