Skip to content

fix(conformance): treat absent proposal support as unsupported#2247

Merged
bokelley merged 1 commit into
mainfrom
adcp-client-2245
Jun 17, 2026
Merged

fix(conformance): treat absent proposal support as unsupported#2247
bokelley merged 1 commit into
mainfrom
adcp-client-2245

Conversation

@bokelley

Copy link
Copy Markdown
Contributor

Summary

  • Treat omitted media_buy.supports_proposals as unsupported for proposal-lifecycle requires_capability gates.
  • Apply the same optional-capability exception when a profile has no raw capabilities because get_adcp_capabilities is unavailable.
  • Add regression coverage for absent, true, and false proposal support gate behavior.

Fixes #2245.

Validation

  • npm run build:lib
  • NODE_ENV=test node --test-timeout=60000 --test-force-exit --test test/lib/storyboard-capability-gate.test.js
  • npx prettier --check src/lib/testing/storyboard/runner.ts src/lib/testing/storyboard/types.ts test/lib/storyboard-capability-gate.test.js
  • git diff --check
  • pre-push validation: npm run typecheck + build hook

@bokelley bokelley marked this pull request as ready for review June 17, 2026 14:37

@aao-ipr-bot aao-ipr-bot 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.

Right fix, and it's spec-mandated rather than a judgment call. Treating absent supports_proposals as unsupported puts it on the same opt-in trust-boundary footing as inline_creative_management — the seller advertises the feature, or the conformance runner skips its storyboard.

Things I checked

  • Spec authority. media_buy.supports_proposals's own schema description (core.generated.ts:22594-22597) reads "When false or absent, conformance runners skip proposal-lifecycle storyboards." Absence semantics are pre-declared by the field author — this is not the ambiguous "agent may pre-date the field" case the general run-anyway rule exists for. ad-tech-protocol-expert: sound, spec-cited.
  • Type-predicate widening. isAbsenceMeansUnsupportedGate narrows to { path: string; equals: true } instead of the inline literal. Both call sites (runner.ts:345, runner.ts:377) feed predicate straight into evaluateCapabilityPredicate, which takes the full union and never reads path as a literal — no caller depended on the narrowed type. Safe.
  • Symmetric coverage. Both the raw_capabilities-present path and the no-get_adcp_capabilities profile path route through the same Set, so the two exception paths can't drift.
  • Absence vs. explicit-false. The actual !== undefined && actual !== equals branch is preserved, so explicit supports_proposals: false still skips. New test at storyboard-capability-gate.test.js exercises undefined→skip, true→run, false→skip, plus the raw-caps-unavailable profile.
  • Changeset. Present, patch, correct shape — conformance-runner gating behavior only, no public API or signature change. code-reviewer: patch matches impact.

Follow-ups (non-blocking — file as issues)

  • sales-proposal-mode is a stable specialism. A seller that genuinely sells via proposals but forgets the flag now silently gets proposal storyboards skipped rather than failed. That's the deliberate opt-in-is-the-trust-boundary design, and the schema's "buyers should still honor any proposals the seller actually returns" clause is the runtime safety net — but worth a one-line note in the adopter-facing validate guide so the skip doesn't read as a false pass.
  • Per the spec→mock→SDK triage order, the SDK doc-comment is generated downstream. Worth confirming the canonical adcontextprotocol/adcp media-buy capability prose carries the identical "false or absent → skip" language. The generated schema is strong evidence; the spec repo is the source of truth.

LGTM. Follow-ups noted below.

@bokelley bokelley merged commit eeaa641 into main Jun 17, 2026
32 checks passed
@bokelley bokelley deleted the adcp-client-2245 branch June 17, 2026 14:41
bokelley added a commit that referenced this pull request Jun 17, 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.

Runner should treat absent supports_proposals as unsupported for proposal gates

1 participant