Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ jobs:
run: |
pytest tests/ -v --cov=src/adcp --cov-report=term-missing

pg-replay-store:
name: PgReplayStore tests (Postgres 16)
pg-conformance:
name: Postgres conformance tests (Postgres 16)
runs-on: ubuntu-latest
services:
postgres:
Expand Down Expand Up @@ -73,12 +73,13 @@ jobs:
python -m pip install --upgrade pip
pip install -e ".[dev,pg]"

- name: Run PgReplayStore tests (unit + full-wire e2e)
- name: Run Postgres conformance tests
env:
ADCP_PG_TEST_URL: postgresql://postgres@localhost:5432/adcp_test
run: |
pytest tests/conformance/signing/test_pg_replay_store.py \
tests/conformance/signing/test_pg_replay_store_e2e.py \
tests/conformance/decisioning/test_pg_buyer_agent_registry.py \
-v

conventional-commits:
Expand Down
32 changes: 32 additions & 0 deletions src/adcp/decisioning/pg/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
"""PostgreSQL-backed implementations for the decisioning module.

Ships durable backends behind the ``[pg]`` optional extra so the
base ``adcp.decisioning`` import path stays free of SQL dependencies
for adopters who only need the in-memory primitives.

Available when ``adcp[pg]`` is installed:

* :class:`PgBuyerAgentRegistry` — durable Tier 2 commercial-identity
layer for v3 sellers. The framework calls the registry on every
request to gate dispatch on the seller's commercial relationship
with the buyer agent (allowlist + onboarding state + billing
capabilities).

The schema DDL ships alongside the Python code (e.g.
``adcp/decisioning/pg/buyer_agent_registry.sql``) so adopters can run
it through whatever migration tool they use (Alembic, Flyway, psql).
"""

from __future__ import annotations

from adcp.decisioning.pg.buyer_agent_registry import (
DEFAULT_TABLE_NAME,
PG_AVAILABLE,
PgBuyerAgentRegistry,
)

__all__ = [
"DEFAULT_TABLE_NAME",
"PG_AVAILABLE",
"PgBuyerAgentRegistry",
]
Loading
Loading