Repository navigation
fix(compliance): preserve deterministic account ownership across lifecycle controls - #8730
Conversation
…cycle controls 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]>
There was a problem hiding this comment.
Ladon verdict: Approve
Approve — compliance fixture scoping fix, no blocking findings.
Checked:
- No critical/high findings (row 1 clear).
- gated_paths: false (row 2 N/A despite review_decision REVIEW_REQUIRED).
- high_risk: false, no deletions (rows 3, 5 N/A).
- No medium findings in any category (rows 4, 8 N/A).
- No no-auto-approve team match (row 7 N/A).
- No prior decision (row 6 N/A).
The diff touches a published compliance source asset (static/compliance/source/universal/deterministic-testing.yaml) and correctly ships a patch changeset — compliance source is published protocol surface and the scoping fix is non-breaking (no schema/docs/oneOf/dist change). Write controls carry explicit brand+operator to stay Acme-scoped after sync_accounts rebind; reads already Acme-scoped and consistent. Test harness (tests/cli-scenario-fixtures.test.cjs) is self-consistent with sound cross-account NOT_FOUND coverage. Fictional names comply with character-bible; no governance precedent contradicted.
Falls through to row 9 — approve.
…#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]>
The
deterministic_testingstoryboard's product and pricing-option fixtures belong to the Acme Outdoor / Pinnacle sandbox account. Itssync_accountsstep legitimately provisions a separatetest.exampleaccount for the account-state checks, and the runner then rebindscontext.accountto that provisioned account for the rest of the run. Before this change:NOT_FOUND;list_accountscould return an unrelated visible account first, and that account's ID then became the target of the Test account-state controls.This change:
list_accountsto the effective run account (account: '$context.account', the existing full-object substitution). Aftersync_accountsthat's the provisioned Test account. For sellers that don't support buyer account provisioning (sync isnot_applicable), it's the caller-selected account ID. Either way, the account-state target ID stays coherent with the controller account.Released 3.1.0 already defines this exact account-list filter. There is no normative, schema or new storyboard-DSL change; SI, gates, fixtures, formats and validations are unchanged. This replaces the closed #8726, whose seed-owner-only repair this expands.
Tests (
tests/cli-scenario-fixtures.test.cjs, 35/35 pass, 0 skipped):NOT_FOUNDon exactlyforce_media_buy_activeandsimulate_delivery.force_account_status, which failsNOT_FOUND, and reactivation is skipped.sync_accountsisnot_applicablewith no dispatch, and the list and both account controls use the caller-selected account ID.Local gates on this head: the fixture test file above; compliance-source-authority, storyboard-fixture-resolution, storyboard-context-entity, storyboard-sample-request-schema, storyboard-test-kits, storyboard-auth-shape and compliance-packaged-refs; the changeset protocol-scope check and
changeset status(patch: adcontextprotocol); and the normal pre-commit hook (unit, server-unit 3/3 shards, typecheck). The local advisory storyboard matrix was skipped with the repo-supportedADCP_SKIP_STORYBOARD_MATRIX=1; CI's training-agent storyboards are authoritative.Source preview, not a release claim: with the public
@adcp/sdkbeta.16 against the selected released 3.1.31 schemas, two schema-valid positive paths were replayed, the buyer path and the account-ID / no-sync namespace path. Independent causal negatives (unfiltered list, unscoped resources) produced the expected strictNOT_FOUND. This does not qualify the still-unpublished 3.1.32 corpus, the native CLI or Activate; full CI on this head is required.🤖 Generated with Claude Code