feat(portfolio): fold in RAILIANCE-WP-0016 apps-pg evidence

First delegated evidence from RESOURCE-WP-0003-T04 to land. railiance-platform
delivered apps-pg capacity, utilization, consumers, and the apps-pg-dbbytes-v1
allocation driver, and correctly delivered no EUR.

- data/resources/apps-pg.json: real capacity; allocation unattributed -> shared
  under apps-pg-dbbytes-v1; second consumer vergabe-teilnahme registered
- data/control-cycle/apps-pg-2026-09-base.json: first operational control-cycle
  record in the repository
- examples/control-cycle/apps-pg-*.json retired; the invented fixture collided
  with the real record's identifier
- data/portfolio-coverage-2026-08-14.json: gap marked delivered with three
  residual unknowns still open

The real evidence exposed a design gap in the T05 schema: v0.1 required a number
for every cost field, so recording genuine usage without a booked cost meant
inventing one. Schema 0.2 permits null costs, null unattributed_eur, a technical
unattributed_share, and null measurements. Null is unknown, never zero; an
unknown component makes the total null rather than the sum of the known parts;
and the comparator classifies unknown amounts as data_quality instead of
computing a variance. Existing 0.1 records are not rewritten.

apps-pg is now measured (idle at 5.8% of volume) and attributed, and remains
unpriced: delivered technical evidence does not create a booked cost.

86 tests pass.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
tegwick 2026-08-14 09:36:57 +02:00
parent b64b5683df
commit 17de8b831e
16 changed files with 908 additions and 71 deletions

View file

@ -159,5 +159,40 @@ class LivePortfolioTest(unittest.TestCase):
self.assertEqual(self.report, build(ROOT, TODAY))
class DeliveredEvidenceTest(unittest.TestCase):
"""RAILIANCE-WP-0016 delivered apps-pg evidence; partial delivery must not
read as full coverage."""
@classmethod
def setUpClass(cls):
cls.report = build(ROOT, TODAY)
def test_delivered_gap_leaves_the_open_list(self):
owners = {gap["owner"] for gap in self.report["coverage"]["unresolved_gaps"]}
self.assertNotIn("railiance-platform", owners)
def test_delivered_gap_stays_visible_with_its_interface(self):
delivered = self.report["coverage"]["delivered_gaps"]
self.assertEqual(1, len(delivered))
self.assertEqual("railiance-platform", delivered[0]["owner"])
self.assertTrue(delivered[0]["interface"])
def test_residual_unknowns_still_produce_next_actions(self):
residuals = [a for a in self.report["next_actions"] if "delivered, still open" in a]
self.assertEqual(3, len(residuals))
def test_apps_pg_is_now_measurable_and_idle(self):
self.assertIn("resource:railiance:apps-pg", self.report["utilization"]["idle"])
unmeasured = {row["resource_id"] for row in self.report["utilization"]["unmeasured"]}
self.assertNotIn("resource:railiance:apps-pg", unmeasured)
def test_apps_pg_cost_is_now_attributed_but_still_unpriced(self):
unattributed = {row["resource_id"] for row in self.report["cost"]["unattributed_allocation"]}
self.assertNotIn("resource:railiance:apps-pg", unattributed)
unpriced = {row["resource_id"] for row in self.report["cost"]["unpriced"]}
self.assertIn("resource:railiance:apps-pg", unpriced)
self.assertIsNone(self.report["cost"]["known_monthly_spend_eur"])
if __name__ == "__main__":
unittest.main()