Add hosted conformance suite and close WP-0006 (T08)

tests/test_hosted_conformance.py (6 Docker-gated tests) addresses all
three requirements from the task description: the golden Phase example
(manifest + full ledger + all 4 extensions) replayed through the
hosted API reproduces exactly the offline-established outcome
(Development Credit 67000, Remission Credit 33000, Outstanding Target
0, MIT) including the hosted Attestation; two Phases under different
Licensors operate with interleaved appends and are proven isolated
both positively and negatively (cross-Licensor writes rejected); a
parametrized regression test across four ledger shapes (credits-only,
remission, reversal, admin corrections) confirms hosted-append-then-
offline-fold always matches expected totals.

WP-0006 is now finished - all 8 tasks (PRD, ADR-0002, registries,
ledger API, metrics, attestation, onboarding, conformance) done. T01's
flagged gap (no task owns hosting the Breach/Compliance Record
component from License V1C1 §7.4) remains open and unassigned.
This commit is contained in:
tegwick 2026-07-29 22:07:39 +02:00
parent 12e8ae218f
commit 151ed3e97c
3 changed files with 335 additions and 3 deletions

View file

@ -4,7 +4,7 @@ type: workplan
title: "Trust Service reference implementation (PRD Phase 4b)"
domain: infotech
repo: target-revenue
status: active
status: finished
owner: claude
topic_slug: infotech
created: "2026-07-29"
@ -317,7 +317,7 @@ offline, 71 passing with Docker; no stray containers left running.
```task
id: TREV-WP-0006-T08
status: todo
status: done
priority: medium
state_hub_task_id: "359c9c5e-a49a-40c1-82ea-2bf80e93e7d6"
```
@ -327,3 +327,22 @@ multiple concurrent Phases across different repos, the golden Phase
example replayed through the hosted API rather than only the offline
library, and a specific regression test that hosted and offline folds of
the same exported ledger always agree.
**Result:** `tests/test_hosted_conformance.py` (6 Docker-gated tests)
addresses all three named requirements directly: (1) the entire golden
Phase (`examples/phase-001/manifest.json` + full 6-entry ledger + all 4
extensions) replayed through the hosted API reproduces exactly the
36-test-suite-established offline outcome — Development Credit 67000,
Remission Credit 33000, Outstanding Target 0, `future_license` MIT — and
the hosted Attestation matches it field-for-field; (2) two Phases under
two different Licensors (standing in for `coulomb-loop`/`net-kingdom`)
operate with interleaved, concurrent-style appends and are proven isolated
both positively (each Phase's metrics reflect only its own entries) and
negatively (a cross-Licensor write attempt is rejected); (3) a
parametrized regression test across four distinct ledger shapes
(credits-only, with remission, with a reversal, with both administrative
correction types) asserts hosted-append-then-offline-fold always
reproduces the exact expected totals, generalizing the single-shape check
already added ad hoc in T04. This closes WP-0006 — all 8 tasks done. Full
suite: 49 passing offline (plain system Python, no new dependency), 77
passing with Docker; no stray containers left running.