Skip to content

fix(testing): respect selected webhook schema version - #3615

Merged
bokelley merged 1 commit into
mainfrom
fix/webhook-served-schema-version
Nov 3, 2026
Merged

bokelley merged 1 commit into
mainfrom
fix/webhook-served-schema-version

Conversation

@bokelley

@bokelley bokelley commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Webhook assertions in a 3.0 storyboard currently use the SDK's primary schema. A valid callback containing result.status: pending_creatives fails the 3.3 schema and reports the wrong release in its diagnostic.

Use the run's selected adcpVersion for payload validation and derive schema_id/schema_url from the same selected document's exact release. Incoming webhook metadata cannot select the validator. Existing caller APIs and the default for unpinned runs are preserved.

Validation:

  • Actual published 17.0.0-beta.15 fails 6 of the 7 new regression cases; fixed source passes 7/7.
  • Complete webhook suite: 64/64 passing, including version-specific acceptance/rejection, downgrade claims, both reference spellings, exact external identity, root-specific marker validation, cache isolation and captured-body preservation.
  • Full library build/declaration checking, lint and formatting pass. Broad lint retains existing warnings and reports zero errors.
  • Independent protocol, code, security and DX reviews cleared the final source and strengthened synthetic-root tests; a separate Codex review stack approved the production logic.

The patch changeset applies to the SDK. Published schema bundles and package-version metadata are unchanged.

@bokelley
bokelley marked this pull request as ready for review November 3, 2026 16:36

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ladon verdict: Approve

Approve — clean, targeted fix with no blocking or medium findings.

Checked:

  • Threads the run's selected adcpVersion (options.adcpVersion ?? ADCP_VERSION) through runExpectWebhook → validateWebhookPayloadSchema → resolveWebhookSchemaIdentity/getSchemaValidatorByRef, so a 3.0 run grades its webhook against the 3.0 contract.
  • Webhook body version claims are deliberately ignored (fail-closed trust boundary) — correct posture, exercised directly by tests.
  • Witness-not-translator preserved: tests assert the captured payload is unmutated (deepEqual(captured, body)).
  • All three internal call sites updated; patch changeset is appropriate (no exported-API/wire-shape change).
  • Six-case test file covers selected-version grading, incoming-claim refusal, legacy ref spelling, scoped/same-version external fixtures, and the no-pin default.

Decision table: no critical/high (row 1 n/a), gated_paths false (row 2 n/a), not high_risk (rows 3/5 n/a), no medium findings (rows 4/8 n/a), no prior escalate (row 6 n/a), no author team gate (row 7 n/a). Falls through to row 9 → approve.

@bokelley
bokelley merged commit 95a61bf into main Nov 3, 2026
69 of 71 checks passed
@bokelley
bokelley deleted the fix/webhook-served-schema-version branch November 3, 2026 16:52
bokelley added a commit that referenced this pull request Nov 3, 2026
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.

1 participant