target-revenue/src/target_revenue
tegwick 7e0c62a8b5 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.
2026-07-29 21:03:52 +02:00
..
service Implement hosted Phase/Extension Registry (WP-0006-T03) 2026-07-29 21:03:52 +02:00
__init__.py Implement TREV-WP-0002 Stage 0 foundation: schemas, pure fold, golden Phase 2026-07-28 18:47:29 +02:00
conversion.py Implement TREV-WP-0002 Stage 0 foundation: schemas, pure fold, golden Phase 2026-07-28 18:47:29 +02:00
fold.py Merge spec/ into specs/: one specs directory for the whole repo 2026-07-29 10:22:14 +02:00
hashing.py Implement TREV-WP-0002 Stage 0 foundation: schemas, pure fold, golden Phase 2026-07-28 18:47:29 +02:00
registry.py Implement hosted Phase/Extension Registry (WP-0006-T03) 2026-07-29 21:03:52 +02:00
validation.py Implement TREV-WP-0002 Stage 0 foundation: schemas, pure fold, golden Phase 2026-07-28 18:47:29 +02:00