Repository navigation
feat(training-agent): comply_test_controller seeds on the inventory tenants, sharded storyboard CI - #9150
Conversation
There was a problem hiding this comment.
Ladon verdict: Approve
Approve — inventory-sim product/pricing seeding feature in server/** training-agent code.
Scope check: No changes under static/schemas/source/**, task definitions, normative docs/reference/**, release scripts, or dist/** artifacts. The docs change is docs/building/** (non-normative). So no spec-drift, changeset, oneOf-discriminator, immutable-artifact, or 3.1.x patch-eligibility gates apply. No governance-precedent or breaking-class protocol question raised.
Engine mechanics verified sound: withProducts builds a prototype-view shadowing only the products map while slots/cells stay placement-derived; seeds validated fail-closed as INVALID_PARAMS; concurrency serialized through withCallerMarkets; reset_state discards seeds via the per-principal market. Well-tested (seeded buy/price/isolation/reset coverage).
Medium findings (1):
- server/src/training-agent/inventory-sim/platform.ts:532 — Public card (cache_scope: 'public') now carries caller-private seeded products; caller-independence comment is now stale.
A single medium finding with no escalation trigger — not data-loss/schema/infra category, high_risk is false, gated_paths is false, no no-auto-approve team match, no prior escalation. Decision table rows 1–8 do not fire; falls through to row 9 → approve. Worth a follow-up on the cache-scope labeling, but it is non-blocking.
Medium findings
- server/src/training-agent/inventory-sim/platform.ts:532 — Public card (cache_scope: 'public') now carries caller-private seeded products
…enants The inventory tenants served only reset_state and sandbox_clock, so every storyboard that seeds fixtures skipped as fixture_seed_unsupported. They now serve seed_account, seed_product and seed_pricing_option. - seed_account provisions through the shared account store, as on /sales. - seed_product sells the fixture in the caller's market on the tenant called, on the season's own placements (video, audio or display; the nearest installment placement where the season has no such channel), so the engine forecasts, books and delivers it. Its wire shape is the fixture's own. - seed_pricing_option prices a seeded product: floor_price is the auction bid floor, fixed_price the guaranteed rate. Seeds live in the caller's market document, so reset_state discards them and a caller that never seeds sees exactly the season's catalogue. The engine sells extra products through a SeasonTraffic view that shares every cell and day table. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…still gets placements An audio fixture on the ad server found neither an audio channel nor an installment channel, so it got no placements and seed_product failed (media_buy_seller/metric_container_subsumption). Fall back to display, then pre-roll, then any placement the season has. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…estrators One inventory row ran 34-54 minutes against its 60-minute limit. Run each tenant as two orchestrator jobs, the way /sales runs its eight: each runs alternate shards of eight (--shard-group/--shard-groups on the isolated shard coordinator), four at a time, and an aggregate job per tenant sums the halves and enforces the floors under the existing "Storyboards (current /<tenant>)" check. Each aggregate reads its own orchestrators' status, so one tenant's failure never fails the other's check. The rows leave the storyboards matrix, which returns to main's form (30-minute limit, creative-builder the only isolated row), and the release check expects the four orchestrator jobs. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
aca8f1c to
291e7f6
Compare
There was a problem hiding this comment.
Ladon verdict: Escalate to human review
Escalate — gated path requires human/CODEOWNERS approval.
This PR modifies .github/workflows/training-agent-storyboards.yml, which matches the deterministic gated-path glob .github/workflows/**. gated_paths: true and review_decision is unknown/none (not APPROVED), so decision-table row 2 fires: the hard approval gate is not satisfied and the outcome must be escalate.
No blocking (critical/high) findings exist. The reviewer confirmed the CI reshaping is sound (timeouts present, fail-fast disabled, per-tenant isolation, fail-closed aggregate), the seeded-products engine validates at seed time and keeps seeds credential-private, and no schema/dist/oneOf changes occurred with an in-scope changeset present.
Medium findings
- server/src/training-agent/inventory-sim/platform.ts:553 — Public card (cache_scope: 'public') carries caller-private seeded products (re-surfaced prior Medium; non-blocking)
Escalation reasons
.github/workflows/training-agent-storyboards.ymlis under the hard approval gate (.github/workflows/**); human/CODEOWNERS review is required becausereview_decisionis notAPPROVED.
Medium findings
- server/src/training-agent/inventory-sim/platform.ts:553 — Public card (cache_scope: 'public') carries caller-private seeded products
Why human review
- .github/workflows/training-agent-storyboards.yml is under a hard approval gate (.github/workflows/**); requires human/CODEOWNERS review because review_decision is not APPROVED
- This PR touches a path under a hard, non-overridable approval gate (.github/workflows/training-agent-storyboards.yml (modified) matches
.github/workflows/**) and the current GitHub review decision is 'unknown', not APPROVED. This is a hard gate enforced in code — Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.
…'s principal The inventory controller had no input schema, so the SDK stripped the router-stamped __training_principal and seed_account provisioned the fixture account for "anonymous". Since #9149 get_products requires a provisioned natural key, every seeded storyboard's get_products then failed ACCOUNT_NOT_FOUND (about 30 storyboards in #9150's first CI run). Use the sales controller's input schema, which keeps that field. Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
Ladon verdict: Escalate to human review
Escalate — gated path requires human/CODEOWNERS review.
This PR modifies .github/workflows/training-agent-storyboards.yml, which matches the hard approval gate glob .github/workflows/** (gated_paths: true). The current review_decision is unknown/none, not APPROVED, so decision-table row 2 fires and Ladon cannot auto-approve regardless of how clean the diff is.
Findings: None in the current delta. The reviewer confirms a clean subsequent pass — the 61-line delta across 3 files exports and reuses the established SALES_COMPLY_INPUT_SCHEMA on the inventory tenant (consistent with the module convention and existing tests) and adds a test asserting ACCOUNT_NOT_FOUND → seed_account → cache_scope 'account'. No new Medium+ findings.
Prior Medium resolved from scope: The earlier platform.ts:553 Medium (public card carrying caller-private seeded products) is out of recheck scope — that file is absent from this delta.
Escalation reason:
.github/workflows/training-agent-storyboards.yml(modified) is under a hard, non-overridable approval gate (.github/workflows/**). A human/CODEOWNERS approval must be recorded (review_decision = APPROVED) before this can merge. The diff is otherwise clean.
Why human review
- Modifies .github/workflows/training-agent-storyboards.yml — under a hard approval gate (.github/workflows/**); requires human/CODEOWNERS review because review_decision is not APPROVED
- This PR touches a path under a hard, non-overridable approval gate (.github/workflows/training-agent-storyboards.yml (modified) matches
.github/workflows/**) and the current GitHub review decision is 'unknown', not APPROVED. This is a hard gate enforced in code — Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.
Run 44917374199 on a3d2006: /inventory-adserver 163/179 clean, 235 passed steps; /inventory-content 163/178 clean, 217 passed steps. Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
Ladon verdict: Escalate to human review
Escalate — gated path requires human/CODEOWNERS approval.
This PR modifies .github/workflows/training-agent-storyboards.yml, which falls under a hard, non-overridable approval gate (.github/workflows/**). gated_paths is true and review_decision is not APPROVED (currently unknown/none), so Row 2 of the decision table forces escalation. Ladon cannot auto-approve a workflow-file change until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.
No blocking findings: the single-file delta (L952-972) is a documented, deliberate CI floor reset — min_clean_storyboards drops ~15 while min_passing_steps rises ~8× because seed_* scenarios now run storyboards previously skipped as fixture_seed_unsupported, with remaining failures enumerated as tracked tenant gaps (#9151/#9152/schema_validation). The accompanying comment documents the rationale. No correctness defect; prior pass had no blockers. This escalation is purely the governance gate, not a code concern.
Escalation reasons
- Modifies
.github/workflows/training-agent-storyboards.yml— under a hard approval gate (.github/workflows/**); requires human/CODEOWNERS review because review_decision is not APPROVED.
Why human review
- Modifies .github/workflows/training-agent-storyboards.yml — under a hard, non-overridable approval gate (.github/workflows/** ) and review_decision is not APPROVED; requires human/CODEOWNERS review before merge.
- This PR touches a path under a hard, non-overridable approval gate (.github/workflows/training-agent-storyboards.yml (modified) matches
.github/workflows/**) and the current GitHub review decision is 'unknown', not APPROVED. This is a hard gate enforced in code — Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.
…'s seeded products get_products without an account built its forecast simulation with the caller's seeded products, so the public card (cache_scope "public") listed products only that caller had seeded. The public card is now the season's products against an empty market, the same for every caller; seeded products appear on account-scoped reads only. Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
Ladon verdict: Escalate to human review
Escalate — gated workflow file touched and review is not APPROVED.
This PR modifies .github/workflows/training-agent-storyboards.yml, which matches the hard, non-overridable approval gate (.github/workflows/**). gated_paths is true and review_decision is REVIEW_REQUIRED (not APPROVED), so decision-table row 2 fires: Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.
The code itself is clean. The reviewer found no blocking or medium findings: the load-bearing change (platform.ts:731 dropping seeded products from the unscoped InventorySimulation.create so the public get_products card no longer leaks seeder seeds) is correct, the scoped path preserves its seeded catalogue, and the behavior is pinned by the test at training-agent-inventory-tenants.test.ts:831-833. No critical/high/medium findings in this run or the prior pass.
Escalation reasons:
.github/workflows/training-agent-storyboards.yml(modified) matches gated path.github/workflows/**andreview_decisionis notAPPROVED— human/CODEOWNERS review required before merge.
Why human review
- Modifies .github/workflows/training-agent-storyboards.yml — matches the hard approval gate
.github/workflows/**and review_decision is REVIEW_REQUIRED (not APPROVED). Requires human/CODEOWNERS approval before merge. - This PR touches a path under a hard, non-overridable approval gate (.github/workflows/training-agent-storyboards.yml (modified) matches
.github/workflows/**) and the current GitHub review decision is 'REVIEW_REQUIRED', not APPROVED. This is a hard gate enforced in code — Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.
… snapshots Brings in adcontextprotocol#9150 (comply_test_controller seeds on the inventory tenants, two isolated orchestrators per inventory tenant in CI), adcontextprotocol#9049 (reporting subscriptions name geography systems and carry geo codes), and the v3.1.34 and v3.2.12 doc snapshots (adcontextprotocol#9131, adcontextprotocol#9139). Resolution ledger: - mechanical: none. - semantic: none. git merged the five files both sides changed with no conflicts: - server/src/addie/mcp/schema-tools.ts: main bumps the 3.1 and 3.2 docs releases; this branch's changes are elsewhere in the file. - server/tests/unit/training-agent-inventory-tenants.test.ts: main adds seed tests beside this branch's changes. - tests/release-publication-freshness.test.cjs, tests/release-workflow-immutability.test.cjs and tests/run-storyboards-sharding.test.cjs: main adds the inventory orchestrator jobs and the --shard-group option. - The local pre-push matrix keeps its tenants: the inventory jobs and --shard-group are CI only, and the local queue runs isolated tenants through run-storyboards-isolated.mjs, not the shard script. Checks on the merge result: - npm run typecheck: pass. - node --test on the three release and sharding test files: 69 pass, 0 fail. - node scripts/precommit-server-unit.cjs --full: 867 files, 14,714 passed, 31 skipped. Before the merge: 14,708; adcontextprotocol#9150 adds six tests.
Summary
The inventory tenants (
/inventory-adserver,/inventory-content) served onlyreset_stateandsandbox_clock, so every storyboard that seeds fixtures skipped asfixture_seed_unsupported. They now serve threecomply_test_controllerseeds. Their storyboard CI is also split so it fits comfortably in its time limit.Seeds
seed_accountprovisions through the shared account store, using the same adapter and controller input schema as/sales. The account belongs to the bearer's principal, so it counts as provisioned under fix(training-agent): inventory get_products rejects an account it never provisioned #9149'sget_productscheck.seed_productsells the fixture in the caller's market on the tenant called.name,description,channels,format_optionsandpublisher_propertiesare the fixture's own.seed_pricing_optionprices a seeded product.floor_priceis the auction bid floor andfixed_pricethe guaranteed rate. A seeded product with no seeded option keeps the default<id>_cpmpricing.reset_statediscards them. They're per credential, like buys.SeasonTraffic.withProductsis a view sharing every cell and day table, so nothing is regenerated per caller.Unseeded callers see no change. A caller that never seeds gets the season's catalogue exactly. A test reads an unseeded caller's
get_productsbefore and after another caller seeds; the two are deep-equal, ignoring only the movinggenerated_atandvalid_until. That caller also can't buy the seeded product (PRODUCT_NOT_FOUND).Fixes found on the way
__training_principal, andseed_accountprovisioned the fixture account foranonymous. Once fix(training-agent): inventory get_products rejects an account it never provisioned #9149 required provisioned keys onget_products, about 30 seeded storyboards failedACCOUNT_NOT_FOUND. The controller now uses the sales input schema. Test: a seeded account prices onget_productswithout a sync; it fails without the fix.metric_container_subsumption). It now falls back to display, pre-roll, then any placement. Test included; it fails without the fix.Storyboard CI: two orchestrators per tenant
One inventory row ran 34–54 minutes against its 60-minute limit (#9146).
/sales's eight. Each job takes alternate shards of eight, four at a time, using new--shard-group/--shard-groupsoptions on the isolated shard coordinator.Storyboards (current /<tenant>)check.storyboardsmatrix, which returns to main's form: a 30-minute limit, with creative-builder the only isolated row.check-release-state.cjs) expects the four orchestrator jobs, and its tests expand them.Run 44917374199 on
a3d200668d:/inventory-adservergroup 0/2/inventory-adservergroup 1/2/inventory-contentgroup 0/2/inventory-contentgroup 1/2Floors
The floors are run 44917374199's result:
/inventory-adserver/inventory-contentClean counts drop because seeding runs storyboards that used to skip, and some fail on existing tenant gaps. Passing steps rise about eightfold.
media_buy_selleris 10P / 6S, clean, on both tenants.Still failing, all inspected. Each is a tenant gap, not a seeding fault:
simulate_delivery/simulate_budget_spendnot serveddeterministic_testing,billing_finality_delivery,delivery_reportingcreative_reception,declared_carousel_cta_values,declared_format_option_acceptancestart_timeacceptedschema_validationdependency_impairment_cardinalitydependency_impairmentreporting_capabilitiesnot projectedmetric_container_subsumptionINVALID_STATE, notNOT_CANCELLABLEinvalid_transitionsTERMS_REJECTEDnot supportedmeasurement_terms_rejectedformat_idsprobe (the storyboard calls it non-gating)inline_creatives_without_syncpricing_currency_filtertargeting_aware_discoverytotal_budget_redistributionSince the fork's local estimate,
error_compliance,get_products_pagination_integrityandproduct_coverage_filtershave become clean, through #9153 and #9155.Test plan
run-storyboards-sharding17/17 (with new--shard-groupand inventory-job tests),release-workflow-immutability,release-publication-freshness47/47,ci-runner-demand-workflowsnpm run typecheck, compliance symbol links current, changeset scope check🤖 Generated with Claude Code