Skip to content

feat(server): createRosterAccountStore — Shape C explicit AccountStore for publisher-curated rosters #459

@bokelley

Description

@bokelley

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions