Skip to content

fix(compliance): bind deterministic_testing fixtures to their consuming account - #8726

Closed
bokelley wants to merge 1 commit into
mainfrom
fix/deterministic-testing-fixture-owner
Closed

bokelley wants to merge 1 commit into
mainfrom
fix/deterministic-testing-fixture-owner

Conversation

@bokelley

@bokelley bokelley commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Problem

deterministic_testing (static/compliance/source/universal/deterministic-testing.yaml) has controller_seeding: true with product and pricing fixtures, but declares no top-level context.account. It also provisions an unrelated sandbox account through sync_accounts (brand.domain: test.example, operator: test.example), while the fixture-consuming media-buy steps act as Acme Outdoor buying through Pinnacle.

Accountless controller seed, force and simulate calls therefore have no single owner:

  • runners that fail closed refuse to seed (2 ambiguity failures, 0 writes);
  • others seed under their run-scoped default.

The SDK is right to fail closed; the fix belongs in the source corpus.

Fix

Declare the fixture-consuming account as the storyboard's context owner, matching the vendor_metric_catalog_precondition pattern from #8721 on 3.1.x:

context:
  account:
    brand:
      domain: "acmeoutdoor.example"
    operator: "pinnacle-agency.example"
    sandbox: true

The sync_accounts provisioning identity (test.example) is unchanged, because that phase tests provisioning and must stay a different identity. There are no per-step, schema, frozen/versioned (dist/) or SDK changes.

Regression test

tests/cli-scenario-fixtures.test.cjs gains three cases:

  • the storyboard names the fixture-consuming account as its fixture owner;
  • controller calls resolve to that owner while sync_accounts keeps test.example;
  • force/simulate calls without an authored identity resolve to the owner.

With the fix: 32/32 pass. With the context block removed: those 3 cases fail.

Verification

build:compliance -- --check, test:schemas, typecheck, tests/storyboard-fixture-discriminators.test.cjs and the changeset scope check pass. A patch changeset is included.

3.1.x

3.1.x has the same ambiguity (source SHA256 b759a8c1…). The coordinating client-release session does the maintained backport after this merges, ahead of the regenerated 3.1.32 candidate.

🤖 Generated with Claude Code

@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 fix to the deterministic_testing compliance source. The PR binds accountless controller seeds and force/simulate calls to context.account (acmeoutdoor.example / pinnacle-agency.example, sandbox) — the identity the create_media_buy steps already used — so no new sandbox-account collision is introduced, while deliberately preserving the test.example sync_accounts provisioning identity. Shape validates against account-ref.json and matches the shipped vendor_metric_accountability.yaml pattern.

Checked:

  • Edits compliance source, not frozen dist/ artifacts — immutability intact.
  • No schema/oneOf/docs surface touched — no spec-drift or discriminator concerns.
  • Carries a correctly-scoped patch changeset (3.1.x backport tracked separately).
  • Based on main.
  • Regression tests are real guards: test 1 fails without the context block; SDK-driven cases document installed-vs-newer runner behavior.

No Critical/High/Medium findings. high_risk is false, gated_paths is false, no author-team gate. Rows 1–8 do not fire; 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.)

…ng account

deterministic_testing seeds test-product/test-pricing and consumes them as
Acme Outdoor buying through Pinnacle, but it also provisions an unrelated
test.example account through sync_accounts and declared no top-level
context.account. Runners that fail closed refused to seed (two ambiguity
failures, zero writes); others seeded under their run-scoped default.

Declare the fixture-consuming account as the storyboard context owner, matching
the 3.1.x vendor_metric_catalog_precondition pattern from #8721. The
sync_accounts provisioning identity is unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@bokelley
bokelley force-pushed the fix/deterministic-testing-fixture-owner branch from f4d55f5 to 348e578 Compare November 3, 2026 21:09

@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 compliance-fixture change with no blocking or medium findings.

What I checked:

  • Delta is a patch changeset, a top-level context.account added to the deterministic_testing storyboard fixture (static/compliance/source/universal/deterministic-testing.yaml), and new runner/static tests (tests/cli-scenario-fixtures.test.cjs).
  • context.account (acmeoutdoor.example via pinnacle-agency.example, sandbox) conforms to the natural-key branch of account-ref.json and correctly disambiguates the fixture owner from the unchanged test.example provisioning identity. Uses fictional companies — naming conventions respected.
  • Changeset is present, in-scope, patch, and honest about the behavior change.
  • Tests carry real assertions (owner binding, enrichment of accountless controller calls, provisioning isolation) — not vacuous.
  • No schema-source change, so no schema↔docs coherence or oneOf discriminator concern. No dist/ artifact mutation. Not a 3.1.x patch. No breaking-class change.

Gates: gated_paths false; review_decision APPROVED; high_risk false; no no-auto-approve team match. Prior decision was also approve on the preceding head.

No critical/high/medium findings — falls through to row 9.

bokelley added a commit that referenced this pull request Nov 4, 2026
…cycle controls (#8730)

The deterministic_testing storyboard's product and pricing-option fixtures
belong to the Acme Outdoor / Pinnacle sandbox account, while its
sync_accounts step legitimately provisions a separate test.example account
for the account-state checks. The runner then rebinds context.account to
that provisioned account, so later media-buy, creative, delivery and budget
controller calls followed it and targeted the wrong sandbox account, and an
unfiltered list_accounts could hand an unrelated visible account's ID to the
account-state controls.

- Declare the Acme / Pinnacle sandbox account as the fixture owner.
- Scope the ten media-buy, creative, delivery and budget controller calls
  explicitly to that owner.
- Filter list_accounts to the effective run account ($context.account): the
  provisioned Test account after sync, or the caller-selected account ID when
  buyer provisioning is not applicable.
- Regression tests, with causal negatives, for resource ownership after
  provisioning, exact account listing, and the no-sync namespace path.

Replaces the closed #8726 with this expanded repair. No schema, normative
or new storyboard-DSL change.

Co-authored-by: Claude Opus 5.5 <[email protected]>
bokelley added a commit that referenced this pull request Nov 4, 2026
…#8731)

* fix(compliance): preserve deterministic account ownership across lifecycle controls (#8730)

The deterministic_testing storyboard's product and pricing-option fixtures
belong to the Acme Outdoor / Pinnacle sandbox account, while its
sync_accounts step legitimately provisions a separate test.example account
for the account-state checks. The runner then rebinds context.account to
that provisioned account, so later media-buy, creative, delivery and budget
controller calls followed it and targeted the wrong sandbox account, and an
unfiltered list_accounts could hand an unrelated visible account's ID to the
account-state controls.

- Declare the Acme / Pinnacle sandbox account as the fixture owner.
- Scope the ten media-buy, creative, delivery and budget controller calls
  explicitly to that owner.
- Filter list_accounts to the effective run account ($context.account): the
  provisioned Test account after sync, or the caller-selected account ID when
  buyer provisioning is not applicable.
- Regression tests, with causal negatives, for resource ownership after
  provisioning, exact account listing, and the no-sync namespace path.

Replaces the closed #8726 with this expanded repair. No schema, normative
or new storyboard-DSL change.

Maintenance adaptation: preserve the 3.1 legacy fixtures, all 817 existing
fixture-test lines and the selected-schema test wrapper. After recorded
aggregate cutoffs, align only local precommit unit/server budgets with main
(180s to 300s; 240s to 1500s). Commands, per-test settings, dependencies,
versions, workflow limits and both matrix gates remain unchanged.

Co-authored-by: Claude Opus 5.5 <[email protected]>
(cherry picked from commit ded86cd)

* fix(training-agent): restore 3.1 task envelopes and update the runner

Partially backport ce91b14 (#8522): retain its four status-free tools, thread the tool name through serialization, and default only absent successful task status to completed. Preserve the maintenance serializer's JSON text, errors, advisories, explicit statuses, replay behavior and payload ownership. Registered MCP regression cases cover filtered account listing and serialization behavior.

Adopt the actually published @adcp/[email protected] only in the private fixture-test runner and root lockfile. Its account-subject identity repair and native controller schemas are bound to release merge 2d1ea7059f116a178841e43b95165735dc722c2e. Production @adcp/sdk stays 9.6.2. Keep the original deterministic lifecycle source repair unchanged.

This is a deliberately partial backport and test-runtime adoption, not a schema or DSL change. It does not claim AdCP 3.1.32, stable SDK 16.7, or Activate qualification.

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
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