Skip to content

feat(accounts): add stable_account_id capability and clarify operator auth vs. principals - #8123

Merged
bokelley merged 3 commits into
mainfrom
bokelley/operator-auth-account-lifecycle
Oct 12, 2026
Merged

bokelley merged 3 commits into
mainfrom
bokelley/operator-auth-account-lifecycle

Conversation

@bokelley

@bokelley bokelley commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This PR takes the non-breaking 3.3 steps toward a single account reference after provisioning (#7850). It also clarifies the parts of the account model that implementers keep misreading: what "operator auth" means, how list_accounts and sync_accounts relate, and principals vs. operators.

Schema (minor)

  • New optional account.stable_account_id capability. A seller that declares it:

    • MUST return account_id on every non-failed sync_accounts provisioning result;
    • MUST accept { "account_id": "..." } wherever an AccountRef is accepted, including for buyer-declared accounts;
    • MUST NOT change an account's id for the life of the account, including across identity reconciliation.

    Buyers SHOULD send the id to these sellers. Natural keys keep working throughout 3.x.

  • Returning account_id from sync_accounts changes from MAY to SHOULD.

  • Without the capability, buyers still MUST NOT assume a returned account_id is accepted.

  • Nothing becomes required. Per versioning.mdx, optional → required needs a deprecation release first, so making the id mandatory is 4.0 scope.

Compliance

  • New scenario media_buy_seller/stable_account_id. It is gated on stable_account_id: true + require_operator_auth: false.
  • Steps:
    1. Provision a per-run natural key and capture the returned account_id.
    2. Check that list_accounts returns the same account whether filtered by id or by the natural key.
    3. Address the account by id on get_media_buys.
    4. Re-sync the natural key and check the id is unchanged.
  • Requires @adcp/sdk 15.8.0 or later (now on main via chore(deps): update @adcp/sdk to 15.8.1 #8148), whose runner sends an authored { account_id } as written (adcp-client#3195).

Docs

  • Accounts overview:

    • explains require_operator_auth as who holds the credential the seller authorizes, with a table of who authenticates, where accounts come from, and which reference to use;
    • states that the operator in a natural key is a property of the account, not an authenticated party;
    • adds "Toward account IDs everywhere".
  • sync_principal and glossary:

    • a principal exists from authentication alone;
    • sync_principal is optional configuration, not registration;
    • one principal per credential, not per operator;
    • it grants no account authority;
    • get_principal can serve as a preflight against the account model.

    The glossary previously called "principal" a deprecated term, which contradicted the 3.3 sync_principal surface.

  • versioning.mdx: removes a self-contradiction. One passage said fields never go optional → required within a major; the stability table allows it after a deprecation release.

  • 3.3 docs: migration guide and what's new updated.

Deprecation (usage-level)

Not in this PR

  • Training-agent conformance (it declares the capability and keys { account_id } and the natural key to one account state) is in a stacked follow-up PR. Until that lands, this scenario is N/A against the training agent in CI. The scenario passed 6/6 locally against the sales tenant with that work applied.

Test plan

  • node scripts/build-schemas.cjs, node scripts/build-compliance.cjs, node scripts/link-compliance-symbols.mjs --check
  • Storyboard and compliance lint suites (25 test:storyboard-* / compliance suites), tests/schema-validation.test.cjs
  • json-schema-validation on the edited docs
  • Pre-commit hook (full server unit suite + typecheck)
  • Changeset scope and status checks

🤖 Generated with Claude Code


Open workspace in Conductor

@aao-secretariat

Copy link
Copy Markdown
Contributor

Ladon cannot review this PR until merge conflicts are resolved.

@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: Escalate to human review

Escalate — gated schema paths require human/CODEOWNERS approval.

This is a clean, additive 3.3 protocol PR: adds optional account.stable_account_id, loosens returning account_id from MAY→SHOULD, docs clarifications, and one capability-gated compliance scenario. The reviewer found no blocking or Medium findings — schema↔docs coherence holds across all four schema files, the minor changeset is correct for an additive-optional + MAY→SHOULD change, no undiscriminated oneOf, no dist/** touched, and naming/fictional-company conventions are satisfied.

However, the PR modifies files under static/schemas/source/**, which are a deterministic hard approval gate (gated_paths: true), and review_decision is REVIEW_REQUIRED — not APPROVED. Per decision rule row 2, the outcome must be escalate until a real human/CODEOWNERS approval satisfies the gate. The diff itself is non-breaking (Normative, not Breaking-class), so once an authorized reviewer approves, this can fall through to a normal approve.

Escalation reasons

  • Modifies gated schema source files (static/schemas/source/account/sync-accounts-request.json, sync-accounts-response.json, core/account-ref.json, protocol/get-adcp-capabilities-response.json) — hard approval gate; human/CODEOWNERS review required (review_decision: REVIEW_REQUIRED).

Why human review

  • Modifies gated paths under static/schemas/source/** (sync-accounts-request.json, sync-accounts-response.json, core/account-ref.json, get-adcp-capabilities-response.json) while review_decision is REVIEW_REQUIRED — hard approval gate requires human/CODEOWNERS approval before merge.
  • This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/account/sync-accounts-request.json (modified) matches static/schemas/source/**; static/schemas/source/account/sync-accounts-response.json (modified) matches static/schemas/source/**; static/schemas/source/core/account-ref.json (modified) matches static/schemas/source/**; static/schemas/source/protocol/get-adcp-capabilities-response.json (modified) matches static/schemas/source/**) 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.

@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: Escalate to human review

Escalate — gated schema paths require human/CODEOWNERS approval.

This PR layers a usage-level deprecation (natural-key AccountRef as the reference after provisioning) onto the existing stable_account_id work: documentation + schema-description coherence. The reviewer verified schema↔docs coherence (account-ref.json and get-adcp-capabilities-response.json descriptions agree with docs tables; natural-key arm intentionally not marked deprecated: true, which is documented), confirmed the changeset stays correctly minor (usage keeps working throughout 3.x, nothing removed/renamed), confirmed removal-in-4.0 / 6-month-notice framing matches versioning.mdx, and resolved all cross-reference anchors. No critical/high/medium findings in the delta; prior pass was also clean.

However, this PR modifies gated paths under static/schemas/source/** (sync-accounts-request.json, sync-accounts-response.json, core/account-ref.json, get-adcp-capabilities-response.json) and the current review_decision is REVIEW_REQUIRED, not APPROVED. Per the hard approval-gate rule (decision table row 2), Ladon cannot auto-approve a gated-path change until a human/CODEOWNERS approval is recorded — regardless of how clean the diff is. A real human/CODEOWNERS approval lifts this gate automatically.

Escalation reasons

  • Modifies protocol-source schemas under static/schemas/source/** (hard approval gate) while review_decision is REVIEW_REQUIRED. Human/CODEOWNERS approval required before merge.

Why human review

  • Modifies gated paths under static/schemas/source/** (sync-accounts-request.json, sync-accounts-response.json, core/account-ref.json, get-adcp-capabilities-response.json) while review_decision is REVIEW_REQUIRED — hard approval gate requires human/CODEOWNERS approval before merge.
  • This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/account/sync-accounts-request.json (modified) matches static/schemas/source/**; static/schemas/source/account/sync-accounts-response.json (modified) matches static/schemas/source/**; static/schemas/source/core/account-ref.json (modified) matches static/schemas/source/**; static/schemas/source/protocol/get-adcp-capabilities-response.json (modified) matches static/schemas/source/**) 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.

bokelley and others added 3 commits October 12, 2026 09:56
… auth vs. principals

Non-breaking 3.3 step toward one account reference after provisioning (#7850).

- New optional account.stable_account_id capability: account_id is returned
  from sync_accounts, accepted on every account-scoped task, and never
  changes. Returning account_id from sync_accounts becomes a SHOULD.
- Capability-gated storyboard media_buy_seller/stable_account_id.
- Accounts overview explains require_operator_auth as who holds the
  credential, separates the account operator from authenticated parties,
  and adds "Toward account IDs everywhere".
- sync_principal and the glossary: a principal exists from authentication
  alone, sync_principal is optional configuration, and the operators an
  agent acts for are not principals.
- versioning.mdx no longer contradicts its optional -> required rule.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…ioning

Using the natural-key AccountRef as the reference on account-scoped tasks
after provisioning is deprecated as of 3.3 and planned for removal in 4.0
(#7850). It keeps working throughout 3.x. The natural key itself stays: it
opens accounts through sync_accounts and filters list_accounts. Sellers
SHOULD declare account.stable_account_id during 3.x so buyers can migrate.

Usage-level deprecation only: the natural-key arm of AccountRef is not
marked deprecated: true because it remains valid as a list_accounts filter.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@adcp/sdk 15.8.0 (adcp-client#3195) sends an authored account as written,
so the account_id-on-a-domain-task check moves from list_creatives (which
graded only sellers with a creative library) to get_media_buys.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@bokelley
bokelley force-pushed the bokelley/operator-auth-account-lifecycle branch from 3f6da30 to 3b39cb2 Compare October 12, 2026 09:57

@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: Escalate to human review

Escalate — gated-paths hard approval gate not yet satisfied.

This PR modifies published protocol schema source under static/schemas/source/** (sync-accounts-request.json, sync-accounts-response.json, core/account-ref.json, get-adcp-capabilities-response.json). gated_paths: true and review_decision: REVIEW_REQUIRED (not APPROVED), so the hard approval gate (decision rule row 2) requires a human/CODEOWNERS approval before merge.

The diff itself is clean: additive optional account.stable_account_id capability (default false) plus description-only schema clarifications. No field removed/renamed, no enum change, no required[] change, no optional→required flip. Correctly carried by a minor changeset scoped to the protocol surface. Schema↔docs cohere across capabilities, sync_accounts, migration, versioning, and release notes. New compliance scenario reuses the established default-gating pattern, per-run UUID ids, and fictional names. The account-ref oneOf is pre-existing and discriminated. No Critical/High/Medium findings.

Escalation reasons

  • Modifies gated paths under static/schemas/source/** while review_decision is REVIEW_REQUIRED — hard, non-overridable approval gate requires recorded human/CODEOWNERS approval before merge, regardless of how clean the diff is.

This sustains the prior escalate on the same ground; the gate lifts automatically once review_decision becomes APPROVED.

Why human review

  • Modifies gated schema source files (static/schemas/source/account/sync-accounts-request.json, sync-accounts-response.json, core/account-ref.json, protocol/get-adcp-capabilities-response.json) while review_decision is REVIEW_REQUIRED — hard approval gate requires human/CODEOWNERS approval before merge.
  • This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/account/sync-accounts-request.json (modified) matches static/schemas/source/**; static/schemas/source/account/sync-accounts-response.json (modified) matches static/schemas/source/**; static/schemas/source/core/account-ref.json (modified) matches static/schemas/source/**; static/schemas/source/protocol/get-adcp-capabilities-response.json (modified) matches static/schemas/source/**) 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.

@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: Escalate to human review

Escalate — gated schema source files touched and review not yet approved.

This is an additive, clean 3.3 change: new optional account.stable_account_id capability (default: false), account_id promoted to SHOULD, a usage deprecation targeted for 4.0, and a capability-gated compliance scenario. The reviewer confirms schema↔docs coherence (capabilities doc row matches schema; sync-accounts-response/account-ref descriptions align with SHOULD/MUST wording), no oneOf regression (account-ref.json oneOf structurally unchanged, description-only edit), no dist/immutable-artifact edits, no required[] changes, and a correct minor changeset for an additive optional capability + non-breaking deprecation. No Critical/High/Medium findings.

Despite the clean diff, the PR modifies gated schema source files under static/schemas/source/** and review_decision is REVIEW_REQUIRED, not APPROVED. Per decision table row 2 (gated_paths: true AND review_decision ≠ APPROVED), this is a hard, non-overridable approval gate — Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the change is. This maintains the prior decision's escalation on an unchanged gate condition; no new blocking findings surfaced.

Escalation reasons

  • Modifies gated schema source files (sync-accounts-request.json, sync-accounts-response.json, core/account-ref.json, protocol/get-adcp-capabilities-response.json) under static/schemas/source/** while review_decision is REVIEW_REQUIRED — human/CODEOWNERS approval required before merge.

Why human review

  • Gated paths: modifies schema source files (static/schemas/source/account/sync-accounts-request.json, sync-accounts-response.json, core/account-ref.json, protocol/get-adcp-capabilities-response.json) under static/schemas/source/** while review_decision is REVIEW_REQUIRED, not APPROVED — hard approval gate requires human/CODEOWNERS sign-off before merge.
  • This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/account/sync-accounts-request.json (modified) matches static/schemas/source/**; static/schemas/source/account/sync-accounts-response.json (modified) matches static/schemas/source/**; static/schemas/source/core/account-ref.json (modified) matches static/schemas/source/**; static/schemas/source/protocol/get-adcp-capabilities-response.json (modified) matches static/schemas/source/**) 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ladon/needs-human-review Ladon has escalated this PR for human review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant