Parent: #452
Depends on: #456
JS source
6.7 commit eda2648f feat(adapters): createRosterAccountStore.
Use case
For publisher-curated rosters where the adopter has a fixed list of allowed accounts (not OAuth, not multi-tenant). Currently adopters write ExplicitAccounts(loader=...) from scratch and re-implement the same lookup-by-id logic.
Proposed API
from adcp.decisioning import create_roster_account_store
store = create_roster_account_store(
roster={
"acct_alpha": Account(account_id="acct_alpha", ...),
"acct_beta": Account(account_id="acct_beta", ...),
},
)
Returns an AccountStore whose resolve does the dict lookup, whose list returns the roster, and whose upsert / sync_governance are no-ops or raise (TBD on shape).
Acceptance criteria
create_roster_account_store exported from adcp.decisioning.
- Tests: resolve hit / miss; list returns full roster; upsert behavior documented and tested.
Parent: #452
Depends on: #456
JS source
6.7 commit
eda2648f feat(adapters): createRosterAccountStore.Use case
For publisher-curated rosters where the adopter has a fixed list of allowed accounts (not OAuth, not multi-tenant). Currently adopters write
ExplicitAccounts(loader=...)from scratch and re-implement the same lookup-by-id logic.Proposed API
Returns an
AccountStorewhoseresolvedoes the dict lookup, whoselistreturns the roster, and whoseupsert/sync_governanceare no-ops or raise (TBD on shape).Acceptance criteria
create_roster_account_storeexported fromadcp.decisioning.