Skip to content

Commit bd91aff

Browse files
committed
feat(v3-ref-seller): sync_accounts/list_accounts via AccountStore (closes #377)
Moves the sync_accounts / list_accounts implementations off the platform class (where they were dead code — the framework never dispatched there) onto the AccountStore returned by _make_account_store. The framework's tool-advertising layer probes platform.accounts.upsert and platform.accounts.list as callables; without them every sales-* agent silently dropped both tools and the AdCP 3.0.9 §accounts/overview probe failed. upsert(refs, ctx) persists the buyer's AccountReference (full billing_entity, bank and all) and returns SyncAccountsResultRow per account. The framework projects through to_wire_sync_accounts_row, applying the billing_entity.bank write-only strip on emit. list(filter, ctx) returns Account[TMeta] with the billing_entity populated from Postgres; framework's to_wire_account strips bank on emit. Per-principal scoping by buyer-agent agent_url is enforced — unauthenticated callers see an empty list. Tests cover both projections end-to-end (bank persists on write, never appears on the wire) plus a surface-check that AccountStore exposes upsert/list callables. Drops account_discovery from the storyboard allowlist; allowlist now covers only the refine_products feature gap.
1 parent edc897b commit bd91aff

3 files changed

Lines changed: 335 additions & 249 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -683,19 +683,16 @@ jobs:
683683
# honest and gets pruned as upstream issues close).
684684
#
685685
# Allowlist:
686-
# - media_buy_seller/refine_products/get_products_refine — upstream
687-
# storyboard YAML bug (adcontextprotocol/adcp#702): the runner
688-
# sends 'brief' alongside buying_mode='refine', the seller
689-
# correctly rejects.
690-
# - __spec_conformance__/account_discovery/list_or_sync_accounts —
691-
# list_accounts / sync_accounts on the v3 ref seller is tracked
692-
# under #377.
686+
# - media_buy_seller/refine_products/get_products_refine — the
687+
# v3 reference seller does not implement refine_get_products();
688+
# the framework correctly returns INVALID_REQUEST for refine
689+
# requests on platforms without that optional method. Feature
690+
# gap tracked separately.
693691
run: |
694692
python -c "
695693
import json, sys, pathlib
696694
allowed = {
697695
('media_buy_seller/refine_products', 'get_products_refine'),
698-
('__spec_conformance__/account_discovery', 'list_or_sync_accounts'),
699696
}
700697
p = pathlib.Path('examples/v3_reference_seller/v3-storyboard-result.json')
701698
with p.open() as f:

0 commit comments

Comments
 (0)