Repository navigation
fix(testing): honor discovery currency and metric filters for specialized sellers - #3514
Conversation
There was a problem hiding this comment.
Ladon verdict: Approve
Approve — clean additive testing-surface change with no blocking or medium findings.
What I checked:
- Two new default-on
get_productsinvariants (pricing-currency-filter,required-metric-filters) grounded in generated-schema MUSTs (pricing_currencies per-option contract; required_metrics container-subsumption). Both fail in the safe direction — no false failures against conformant sellers. seeding.tschange defers creative-wire mode toresolveCreativeFormatWireModeinstead of forcing canonical; no fabrication/re-shaping of wire data (witness-not-translator respected).- Changeset present (
fix-pricing-currency-discovery-invariants.md, patch) and defensible for additive validation surface — no removed/renamed exports or response-shape changes, so patch is correct. - Coverage complete including the >200-line
pricing-currency-filter.ts(331+237 line test suites).
Non-blocking follow-up (noted, not a finding): required-metric-filters DERIVED_FROM leniency (ctr/cpm/roas from inputs) is slightly more permissive than the schema's superset+container-subsumption text — safe direction, worth confirming its normative home in a later pass.
No critical/high/medium findings. Not a gated path; no author team gate; high_risk false. review_decision is REVIEW_REQUIRED but gated_paths is false, so row 2 does not apply. Falls through to row 9.
There was a problem hiding this comment.
Ladon verdict: Approve
Approve — clean fail-closed fix to two discovery invariants.
The delta changes response-unwrap to prefer root-level products over an unrelated data extension (pricing-currency-filter.ts:155, required-metric-filters.ts:346), closing a false-negative where a sibling data: {} masked currency/metric violations. This is a correctness tightening consistent with the witness-not-translator posture — no fabrication, no re-shaping, no crash path. New precedence unit tests plus updated integration mocks genuinely exercise the fix. Package-size count and changeset are consistent.
No Critical/High/Medium findings. Checked decision table top-down: no blocking findings (rows 1), gated_paths false (row 2), high_risk false (rows 3, 5), no medium findings (rows 4, 8), no no-auto-approve team match (row 7), prior decision was approve so sticky escalation (row 6) does not apply. Falls through to row 9 → approve. Note: review_decision is REVIEW_REQUIRED, but row 2 only forces escalate when gated_paths is true, which it is not here.
There was a problem hiding this comment.
Ladon verdict: Approve
Approve — no blocking or medium findings.
Checked:
describeDiscoverySchemaFailurenow resolves version asoptions._serverAdcpVersion ?? options.adcpVersion ?? ADCP_VERSION(seeding.ts:1481), aligning with the established discovery convention at runner.ts:9916/10005/10074. The fallback branch now passes the resolvedversiontovalidateResponseSchema(seeding.ts:1491), fixing a real inconsistency where the two branches used different versions.- Test coverage added for both configured and unconfigured version cases.
- Changeset present (patch) — correct for compliance-tooling behavior with no production wire change (witness-not-translator unaffected; no fabricated fields, no wire-shape change, no new transport code).
Prior pass was a clean approve; no prior blockers to re-surface. No new findings this run.
Decision path: no critical/high (row 1 n/a), gated_paths false (row 2 n/a), high_risk false (rows 3/5 n/a), no medium findings (rows 4/8 n/a), prior decision was approve (row 6 n/a), no author team gate (row 7 n/a) → row 9 approve. Note review_decision is REVIEW_REQUIRED but gated_paths is false, so row 2 does not apply.
Seller compliance currently assumes seeded rate-card identities, can miss non-matching products after the first result, and forces canonical discovery even for legacy-only AdCP 3.1 sellers. Currency conversion and optional product features are valid, but supplied discovery filters still bind the effective response.
This adds two default invariants using the exact request and effective response:
discovery.pricing_currency_filterchecks every media option, fixed default signal selections (including group overrides), and simple required-selection capacity. Compatible alternatives and zero/bundled charges pass; optional foreign add-ons stay exempt. Valid empty currency-filter results, custom pricing, omitted mandatory menus, and aggregate selection constraints that cannot be proved are explicitly reported as unproven; empty results never masquerade as positive-price coverage.discovery.required_metric_filterschecks every product against all requested standard/vendor metrics, respecting implicit metrics, documented derivations, and numeric container subsumption. Vendor and metric pins must match one declared row, including a requested vendor brand ID. Projected-away declarations remain unproven; actually returned contradictions still fail. Empty matches and omitted filters do not require optional features.A direct products payload takes precedence over an unrelated
dataextension, so schema-allowed extra fields cannot bypass either invariant.Fixture discovery chooses its canonical wire hint through the existing negotiated creative capability resolver, permitting legacy-only AdCP 3.1 sellers.
Validation:
git diff --checkpassed.Companion protocol fixture fixes are being prepared in adcontextprotocol/adcp. The SDK 15.9 maintenance backport is #3516. Hold release until companion #3515 and its complete maintenance backport are reviewed, green, and merged.