fix(server): default supported_billing: [] in createAdcpServerFromPlatform (match v5 behavior)#1196
fix(server): default supported_billing: [] in createAdcpServerFromPlatform (match v5 behavior)#1196bokelley wants to merge 2 commits into
Conversation
…tform (adcp-client#1186) When requireOperatorAuth is true (or derived from accounts.resolution: 'explicit') but supportedBillings is not set, the v6 from-platform path omitted supported_billing from the wire account block. The AdCP schema requires the field whenever account is present, so schema validation failed and the storyboard runner cascade-failed every subsequent step. Fix: replace the conditional spread with supported_billing: [] default, matching the v5 createAdcpServer behaviour. Also corrects the DecisioningCapabilities.supportedBillings JSDoc which claimed the default was ['agent'] (it is []). Adds a regression test with responses:'strict' validation to lock in schema compliance. https://claude.ai/code/session_01CbCVxFuiFnDHrBFwNFbWMs
…6.3.0) npm install during ci pre-check corrected a pre-existing version drift in the lockfile. No dependency changes; version fields only. https://claude.ai/code/session_01CbCVxFuiFnDHrBFwNFbWMs
Triage: superseded by #1198Issue #1186 was closed by #1198 (commit The schema requires Closing this as superseded — the working fix is already on main. |
|
Acknowledged — thanks for the context, @bokelley. Noted that #1198 is the authoritative fix on main with Generated by Claude Code |
Closes #1186
Summary
When
requireOperatorAuthistrue(or derived fromaccounts.resolution: 'explicit') butsupportedBillingsis not set, the v6createAdcpServerFromPlatformpath projected the account block to the wire response but omittedsupported_billing. The AdCP schema requires the field wheneveraccountis present, so schema validation failed withmissing required property 'supported_billing'— and the storyboard runner cascade-failed every subsequent step.Root cause:
src/lib/server/decisioning/runtime/from-platform.ts:767used a conditional spread...(supportedBillings?.length && { supported_billing: [...] })that produced nothing whensupportedBillingswas undefined or empty. The v5createAdcpServerpath atcreate-adcp-server.ts:3431correctly defaulted tosupported_billing: capConfig.account.supportedBilling ?? [].Fix: Replace the conditional spread with
supported_billing: supportedBillings?.length ? [...supportedBillings] : []— same one-line change the v5 path uses. Also corrects theDecisioningCapabilities.supportedBillingsJSDoc which claimed the default was['agent'](it was always[]).What was tested
npm run format:check— passednpx tsc --project tsconfig.lib.json— passed (pre-existingTS2688/TS5107env errors unrelated to this change)node --test test/server-decisioning-capability-projections.test.js— 13/13 pass (new regression test is test Fix A2A agent card validation endpoint #12)validation: { responses: 'strict' }to exercise the actual schema-validation path that the bug brokeNits noted (not fixed in this PR):
accounts.resolution: 'explicit'path in the pre-existing test (line 210) usesresponses: 'off'— a follow-up could upgrade it toresponses: 'strict'+ assertsupported_billing: []. The fix is correct for both paths since the logic is shared; this is a coverage gap, not a correctness gap.docs/llms.txtandskills/build-retail-media-agent/SKILL.mdhave zero mentions ofsupportedBillings— doc improvement tracked in issue.Pre-PR review
responses: 'strict'patch) is appropriateSession: https://claude.ai/code/session_01CbCVxFuiFnDHrBFwNFbWMs
Generated by Claude Code