Skip to content

spec(accounts): discovery and negotiation tasks never provision accounts - #7848

Merged
bokelley merged 14 commits into
mainfrom
w-552/get-products-without-synced-account
Oct 2, 2026
Merged

bokelley merged 14 commits into
mainfrom
w-552/get-products-without-synced-account

Conversation

@bokelley

@bokelley bokelley commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

The patch clarifications shipped in #7871 (merged; backported to 3.2.x in #7884). This PR is the minor delta for 3.3: discovery and negotiation tasks never provision, the lazy-seller exception, the advisory storyboard, and the training-agent fix (#7849).

Summary

A buyer integration skipped sync_accounts because payment terms weren't chosen yet, and still sent the buyer-declared natural key on get_products. The spec only implied what should happen. Depending on the seller, the buyer could get ACCOUNT_NOT_FOUND, public products silently returned in place of account pricing, or a lazy-provisioning seller creating an account on default terms from a discovery call. Buyer health tracking then risked blaming the seller.

This PR adds a canonical section, Account references before provisioning, and points the related texts at it.

  • Provisioned means sync_accounts returned the account without action: "failed", or a lazy-provisioning seller created it on a provisioning task. A natural key resolves only after that.
  • Only provisioning tasks provision. These are tasks that commit spend or create account-owned resources: create_media_buy, buy_products, accept_proposal, sync_*, activate_signal. Discovery and negotiation tasks (get_products, list_products, get_signals, request_proposals, refine_proposals, decline_proposals) MUST NOT create or activate an account, or accept default terms.
  • An unresolved account returns ACCOUNT_NOT_FOUND, including where account is optional. There's no silent public fallback: cache_scope: "public" on an account request already claims the account prices off the rate card. One exception: a seller that lazily provisions instead of exposing sync_accounts MAY answer discovery for the account it would create, without creating it. list_accounts is unaffected, because its account field is a filter.
  • Buyers omit unprovisioned keys and send brand. When they intend to accept a proposal, they provision before request_proposals. Buyer SDKs SHOULD track provisioning per seller agent.
  • Account errors (ACCOUNT_NOT_FOUND, ACCOUNT_SETUP_REQUIRED, ACCOUNT_PAYMENT_REQUIRED) describe buyer setup. Buyers SHOULD NOT count them against seller health.
  • An echoed account_id for a buyer-declared account is a seller handle. Sellers MAY accept it; buyers MUST NOT assume they do. This is consistent with [codex] Clarify account reference models #5062.
  • ACCOUNT_NOT_FOUND recovery is now the same everywhere. It previously said "terminal, verify via list_accounts" in error-code.json but "re-run sync_accounts" in the L2 docs. It now says: provision a natural key, or verify an account_id.
  • Small fixes: the sandbox lifecycle example now assumes sync_accounts first. The "read-only operations are always available" sentence contradicted the status table and is reworded.
  • New advisory storyboard media_buy_seller/unprovisioned_account_reference. It is gated to buyer-declared sellers that expose sync_accounts. It sends get_products with a natural key that was never synced and accepts either ACCOUNT_NOT_FOUND or a schema-valid answer, through a branch set. An advisory ACCOUNT_NOT_FOUND check and an advisory "list_accounts returns nothing" check expire at 15.0.0. Sellers that were conformant under the old wording see the gap without failing.

Release classification

minor. The provisioning rule narrows an earlier MAY: a seller that provisioned on the first account-scoped request, including get_products, was conformant before. The wire result is unchanged, because the lazy-seller exception still lets it answer discovery. The storyboard's two checks are advisory until runner capability 14.1.0 and required from then on. introduced_in is 3.3. Splitting out the pure clarifications as a patch for 3.2.x is possible if someone wants them backported.

Follow-ups

Validation

  • Generate Python SDK had been failing on every schema PR since adcp-client-python 8.0.0; ci(schema-bundle): fix Generate Python SDK for major.minor schema packaging #7880 fixed it.

  • npm run build:schemas, npm run build:compliance

  • test:schemas, test:json-schema, test:error-codes, test:docs-nav, test:docs-error-handling-copy, test:doc-compliance-drift, test:owned-links, lint:schema-links -- --check, test:compliance-snippets

  • Storyboard lints, all passing: test:storyboard-*, plus tests/lint-storyboard-account-fixtures.node.mjs

  • Training-agent storyboards, run locally:

    • current /sales: 163/163 clean after rerunning one load flake;
    • current /signals: 54/54 clean, 123 steps passed;
    • 3.0-compat /sales: 39/39 clean.
  • unprovisioned_account_reference now passes through the rejection arm, with its advisory checks clean.

  • 69 training-agent vitest files pass (2131 tests), plus the new training-agent-unprovisioned-account-reference test; npm run typecheck passes.

  • Full npm test: pass (exit 0); pre-commit and pre-push hooks pass

🤖 Generated with Claude Code

A buyer-declared natural key resolves only after the account is
provisioned. Discovery and negotiation tasks never provision. An
unresolved account returns ACCOUNT_NOT_FOUND even where account is
optional, instead of a silent public fallback. Buyers omit unprovisioned
keys, and account errors are not seller-health signals. An echoed
account_id is a seller handle. ACCOUNT_NOT_FOUND recovery is now
consistent. Adds an advisory storyboard for get_products with an
unprovisioned natural key.

Co-Authored-By: Claude Opus 5.5 (1M context) <[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: Request changes

Request changes — 1 blocking finding.

Blocking findings

  • .changeset/account-refs-before-provisioning.md — patch changeset fails patch-eligibility: the PR reverses a stated MAY (lazy-provision on first account-scoped request, incl. get_products) into a MUST NOT and adds a new MUST ACCOUNT_NOT_FOUND. This is a new normative requirement that the PR body concedes makes previously-conformant sellers non-conformant — Normative/breaking at minimum, not a clarification where any conformant implementation would already satisfy the new MUST. Shipping this as a patch is high (new normative requirement + breaking-class under constitution/patch-eligibility rules).

Medium findings

  • static/compliance/source/protocols/media-buy/scenarios/unprovisioned_account_reference.yaml — the storyboard's sole enforcement gate is a 15.0.0 placeholder, leaving the new MUSTs with no biting conformance check.

Decision table: Row 1 fires (a high-severity finding is present) → request-changes. Schema↔docs coherence holds (description-only schema edits with docs updated in parallel); no oneOf, dist-immutability, or changeset-presence issues. Note: gated_paths is true with review_decision REVIEW_REQUIRED, which independently blocks auto-approve; resolve the changeset type/governance question and obtain CODEOWNERS/human approval before merge.

Blocking findings

  • .changeset/account-refs-before-provisioning.md — patch changeset ships a new normative MUST (ACCOUNT_NOT_FOUND) and reverses a stated MAY into a MUST NOT, making previously-conformant sellers non-conformant; not patch-eligible (high)

The provisioning rule narrows an earlier MAY, so the changeset is minor.
The storyboard's advisory checks promote at runner capability 14.1.0, and
introduced_in moves to 3.3. Released error-details schema links in
error-handling.mdx are pinned to v3 for the schema link check.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@aao-secretariat
aao-secretariat Bot dismissed their stale review October 1, 2026 15:26

Superseded by a later Ladon review that rechecked and resolved its blocking findings.

@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: Request changes

Request changes — 1 blocking finding.

Blocking findings

  • docs/media-buy/task-reference/get_products.mdx / static/schemas/source/enums/error-code.json — The PR reverses an explicitly stated MAY (lazy-provision on get_products) into a MUST NOT and adds a new MUST ACCOUNT_NOT_FOUND requirement on optional-account tasks. This turns previously-conformant sellers into non-conformant implementations on a stable (non-experimental) surface — a breaking-class normative change. Per the constitution's decision classes and the repo's changeset-scope rule, a breaking wire/normative change takes major; the changeset only moved patch→minor. Severity: high.

Medium findings

  • static/compliance/source/protocols/media-buy/scenarios/unprovisioned_account_reference.yaml — The scenario's sole enforcement advisory gates promotion at expires_after_version 14.1.0 (~11 majors past its introduced_in 3.3), so the new MUSTs ship with no biting conformance check. Severity: medium.

Why request-changes: The reviewer re-surfaced a high-severity breaking-class finding (decision table row 1). This is a subsequent pass — the prior changeset type bump partially addressed feedback (patch→minor), which I credit, but the core issue stands: a breaking normative change still carries the wrong (minor) changeset and must take major. Note also this PR touches gated paths with no APPROVED review and the change is breaking-class, which independently would require human ratification/escalation; the high finding takes precedence and blocks.

Blocking findings

  • docs/media-buy/task-reference/get_products.mdx — reverses stated MAY (lazy-provision) into MUST NOT and adds new MUST ACCOUNT_NOT_FOUND on optional-account tasks, making previously-conformant sellers non-conformant on a stable surface; breaking-class change requires major changeset, PR only ships minor (high)

bokelley and others added 2 commits October 1, 2026 17:50
…asks

Implements #7849. On get_products, list_products, get_signals, and
request/refine/decline_proposals, a buyer-declared natural key the
principal never provisioned (sync_accounts, seed_account/fixtures, the
compliance pool, or a durable reporting binding) now returns
ACCOUNT_NOT_FOUND instead of a synthetic account with public results.
account_id refs, other tools, omitted accounts, controller lifecycle
probes, and the frozen 3.0-compat surface are unchanged. Storyboards that
relied on implicit accounts now seed or sync them first.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
bokelley and others added 2 commits October 1, 2026 18:22
The storyboard runner adds a self-operated acme-outdoor natural key to
account-less discovery probes (adcontextprotocol/adcp-client#3095), which
broke security_baseline on /signals. Exempt that exact key until the
runner stops synthesizing it. The changeset now covers only the minor
delta on top of the clarification patch.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Spells out what the error table and cache_scope contract already
required. A buyer-declared natural key resolves only after provisioning.
An unresolved account that the seller doesn't lazily provision returns
ACCOUNT_NOT_FOUND even where account is optional. Buyers omit
unprovisioned keys and send brand. Account errors are not seller-health
signals. An echoed account_id is a seller handle. ACCOUNT_NOT_FOUND
recovery is now consistent.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@bokelley
bokelley changed the base branch from main to w-552/account-refs-clarifications October 1, 2026 22:49
@aao-secretariat
aao-secretariat Bot dismissed their stale review October 1, 2026 22:58

Superseded by a later Ladon review that rechecked and resolved its blocking findings.

@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 modifies four files under static/schemas/source/**, which are under a hard, deterministic approval gate (gated_paths: true). The required review_decision is not APPROVED (unknown/none), so the gate is NOT satisfied and the PR cannot be auto-approved (decision table row 2).

Reviewer re-evaluation (head e83996c): Clean pass — the two prior blockers do not survive:

  • Prior HIGH (changeset should be major) does not hold: all four schema files change only description text; no field/enum/tool removed or renamed, no required flip, no response-shape change. The wire-scoped major-changeset rule is not triggered.
  • Prior MEDIUM does not hold: expires_after_version:"14.1.0" gates on runner_capability_version, a different version line from protocol 3.3.
  • Schema↔docs coherence, changeset presence, oneOf discriminators, immutable artifacts, and training-agent implementation + tests all check out. No new findings.

Escalation reason:

  • Gated files static/schemas/source/{error-code.json, get-products-request.json, get-adcp-capabilities-response.json, get-signals-request.json} are under a hard approval gate and review_decision is not APPROVED. Human/CODEOWNERS review is required before merge.

No blocking (critical/high) findings exist, so this is not a request-changes. The diff is mechanically clean, but the deterministic schema-path gate forces escalation until a human/CODEOWNERS approval lands.

Why human review

  • Gated schema paths touched (static/schemas/source/error-code.json, get-products-request.json, get-adcp-capabilities-response.json, get-signals-request.json) and review_decision is not APPROVED — human/CODEOWNERS approval required before merge.
  • This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/enums/error-code.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/get-products-request.json (modified) matches static/schemas/source/**; static/schemas/source/protocol/get-adcp-capabilities-response.json (modified) matches static/schemas/source/**; static/schemas/source/signals/get-signals-request.json (modified) matches static/schemas/source/**) 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.

@aao-secretariat aao-secretariat Bot added the ladon/needs-human-review Ladon has escalated this PR for human review. label Oct 1, 2026
@bokelley
bokelley changed the base branch from w-552/account-refs-clarifications to main October 1, 2026 23:02
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…thout-synced-account

# Conflicts:
#	docs/accounts/overview.mdx
#	docs/building/by-layer/L2/accounts-and-agents.mdx
#	docs/media-buy/task-reference/get_products.mdx
#	docs/signals/tasks/get_signals.mdx
#	docs/snippets/compliance-error-codes.mdx
#	static/schemas/source/enums/error-code.json
#	static/schemas/source/media-buy/get-products-request.json
#	static/schemas/source/signals/get-signals-request.json
@bokelley bokelley changed the title spec(accounts): define account references before provisioning spec(accounts): discovery and negotiation tasks never provision accounts Oct 2, 2026
@bokelley
bokelley merged commit a25b8a8 into main Oct 2, 2026
61 checks passed
@bokelley
bokelley deleted the w-552/get-products-without-synced-account branch October 2, 2026 13:20
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