Skip to content

fix(training-agent): a seeded inventory product reports its fixture's reporting_capabilities - #9164

Merged
bokelley merged 1 commit into
mainfrom
fix/inventory-seeded-reporting-capabilities
Nov 21, 2026
Merged

bokelley merged 1 commit into
mainfrom
fix/inventory-seeded-reporting-capabilities

Conversation

@bokelley

Copy link
Copy Markdown
Contributor

Summary

On the inventory tenants, a product seeded with seed_product always carried the tenant's default reporting_capabilities. A fixture declaring its own metrics, such as the viewability container, didn't show them.

The fixture's reporting_capabilities now merge over the defaults. The fixture's keys win (available_metrics, for example), and the defaults fill the fields the schema requires (available_reporting_frequencies, expected_delay_minutes, timezone, …). Season products and unseeded callers are unchanged.

This is one of the gaps #9150's seeded storyboard run exposed.

Partial storyboard effect. media_buy_seller/metric_container_subsumption gets past the step that failed in CI: it was 4 passed / 1 failed, and locally it's now 5 passed / 1 failed. A later step still fails. It needs get_products to apply filters.required_metrics, using superset evaluation where a declared container satisfies its leaf metrics, and the inventory tenants don't apply that filter yet. That filter, and get_media_buy_delivery honouring requested_metrics, are left for later, like the other filter gaps in #9150's list.

Test plan

  • New test: a seeded product declaring available_metrics: [impressions, spend, clicks, viewability] reports exactly those, and still carries available_reporting_frequencies: ['daily']. The response stays canonical. It fails without the fix.
  • Inventory suite: 34/34.
  • metric_container_subsumption locally on /inventory-adserver: 5P / 1F, up from 4P / 1F. The remaining failure is the required_metrics filter.

🤖 Generated with Claude Code

… reporting_capabilities

A seeded product's wire shape always carried the tenant's default
reporting_capabilities, so a fixture declaring, say, the viewability
container still showed the tenant's metric list. Merge the fixture's
reporting_capabilities over the defaults, which keep the fields the schema
requires.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown
Contributor

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 app-scope fix in training-agent inventory-sim with no blocking or medium findings.

What I checked:

  • platform.ts:411 merges a seeded fixture's reporting_capabilities over tenant defaults: defaults first, fixture keys win, schema-required fields filled. Spread-last ordering + structuredClone match the existing wireOverrides pattern; the falsy short-circuit spreads {} so season/unseeded callers are unchanged.
  • Change is out of changeset scope — no static/schemas/source/**, docs, dist, or package.json touched. No governance gate, no oneOf/discriminator surface, no worker/IO path. Changeset-scope and schema↔docs coherence rules do not apply.
  • Test asserts the override, the default-fill, and canonical output, and fails without the fix.
  • The declared-vs-delivered metric gap is explicitly deferred to a follow-up in the PR body.

Gate check: gated_paths: false (row 2 inert). high_risk: false. No no-auto-approve team match. No critical/high/medium findings → rows 1–8 do not fire; falls through to row 9. review_decision: REVIEW_REQUIRED does not block approval absent a gate.

@bokelley
bokelley enabled auto-merge (squash) November 21, 2026 17:43
@bokelley
bokelley merged commit 576ebca into main Nov 21, 2026
74 of 76 checks passed
@bokelley
bokelley deleted the fix/inventory-seeded-reporting-capabilities branch November 21, 2026 17:57
KonstantinMirin added a commit to KonstantinMirin/adcp that referenced this pull request Nov 21, 2026
…tocol#9163, adcontextprotocol#9164)

Brings in adcontextprotocol#9163 (a second cancel through inventory update_media_buy
answers NOT_CANCELLABLE) and adcontextprotocol#9164 (a seeded inventory product reports
its fixture's reporting_capabilities).

Resolution ledger:
- mechanical: none.
- semantic: none. git merged
  server/tests/unit/training-agent-inventory-tenants.test.ts, which both
  sides changed, with no conflicts: main adds two tests beside this
  branch's changes. server/src/training-agent/inventory-sim/platform.ts
  changed only on main.

Checks on the merge result:
- npm run typecheck: pass.
- server/tests/unit/training-agent-inventory-tenants.test.ts: 35 passed.
- node scripts/precommit-server-unit.cjs --full: 867 files, 14,716
  passed, 31 skipped. Before the merge: 14,714; main adds two tests.
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