target-revenue/tests
tegwick dfc1d90c28 Implement public metrics service (WP-0006-T05)
src/target_revenue/metrics.py: compute_metrics(manifest, entries, as_of)
is pure/deterministic like fold.py, reusing fold.py/conversion.py
unchanged. Returns facts/calculations/forecasts as three explicitly
separated blocks (TrustServicePRD TS-FR-5), covering the mandatory Q9
set plus the recommended velocity/forecast tier - forecasts are always
null rather than populated once a Phase has converted or velocity is
non-positive, so nothing disguises a projection as a fact.

Adds GET /phases/{id}/metrics (unauthenticated per FR-9/FR-10).
tests/test_metrics.py (6 tests) needs no Docker/Postgres and runs
under plain system Python. One new Docker-gated test in
test_ledger_hosting.py proves the hosted /metrics response exactly
matches compute_metrics() run offline against the same export.
2026-07-29 21:42:52 +02:00
..
fixtures Implement TREV-WP-0002 Stage 0 foundation: schemas, pure fold, golden Phase 2026-07-28 18:47:29 +02:00
conftest.py Implement TREV-WP-0002 Stage 0 foundation: schemas, pure fold, golden Phase 2026-07-28 18:47:29 +02:00
test_conversion.py Implement TREV-WP-0002 Stage 0 foundation: schemas, pure fold, golden Phase 2026-07-28 18:47:29 +02:00
test_extension_conformance.py Implement TREV-WP-0002 Stage 0 foundation: schemas, pure fold, golden Phase 2026-07-28 18:47:29 +02:00
test_ledger_fold.py Merge spec/ into specs/: one specs directory for the whole repo 2026-07-29 10:22:14 +02:00
test_ledger_hosting.py Implement public metrics service (WP-0006-T05) 2026-07-29 21:42:52 +02:00
test_manifest_validation.py Implement TREV-WP-0002 Stage 0 foundation: schemas, pure fold, golden Phase 2026-07-28 18:47:29 +02:00
test_metrics.py Implement public metrics service (WP-0006-T05) 2026-07-29 21:42:52 +02:00
test_registry_hosting.py Implement hosted Phase/Extension Registry (WP-0006-T03) 2026-07-29 21:03:52 +02:00