Implement hosted Phase/Extension Registry (WP-0006-T03)
Adds migrations/0001_registries.sql (licensors, phase_manifests, extensions tables; trf_app role with no UPDATE/DELETE grant on either table, canonicalization only via a SECURITY DEFINER function), and src/target_revenue/registry.py + service/app.py: a thin FastAPI layer wrapping the existing validation.py checks with persistence and per-Licensor token auth, adding no new validation logic per ADR-0002. New optional service/service-dev dependency groups keep the core offline library dependency-free. tests/test_registry_hosting.py (7 tests, Docker-gated, auto-skip otherwise) spins an ephemeral disposable Postgres container and verifies registration, rejection, duplicate/ unknown-token handling, extension canonicalization, and two explicit database-privilege checks that the app role cannot bypass the append-only/governance-gated guarantees.
This commit is contained in:
parent
e8e8629efd
commit
7e0c62a8b5
8 changed files with 580 additions and 2 deletions
3
src/target_revenue/service/__init__.py
Normal file
3
src/target_revenue/service/__init__.py
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
"""Hosted Trust Service (WP-0006). Thin ASGI layer over `target_revenue`'s
|
||||
already-tested schema, validation, and registry logic — see ADR-0002 for
|
||||
why this stays thin rather than reimplementing that logic."""
|
||||
Loading…
Add table
Add a link
Reference in a new issue