feat: join audit-storage usage without inventing a booked Scaleway fact
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 1s

Ingest resource-control's August technical usage, omit nulls, and
reconcile forecast + usage + booked facts. Commissioning month reports
missing_booked_fact instead of 0.00. T05 still waits on the first invoice.
This commit is contained in:
tegwick 2026-08-15 20:32:55 +02:00
parent 75356ea19e
commit ac0949afd0
7 changed files with 426 additions and 1 deletions

View file

@ -0,0 +1,45 @@
# FIN-WP-0004-T05 — commissioning-period join, 2026-08
Date: 2026-08-15
Resource: `resource:platform:audit-storage`
Attribution key: `platform:audit-storage`
## What exists
| Record | Count | Authority |
| --- | --- | --- |
| Forecast (base, 2026-09 … 2027-08) | 12 rows | resource-control |
| Technical usage 2026-08 | 1 row | resource-control |
| Booked Scaleway fact 2026-08 | **0** | fin-hub |
The object store was commissioned 2026-08-14. resource-controls usage
record carries `infrastructure_eur: null` and names fin-hub as the
owner of that gap. There is no invoice. A null is not booked as 0.00.
## Join result
`ingest_resource_usage` stores only measured quantities (`database_gb`,
`stored_gb`, `backup_success_pct`, `restore_rto_minutes`). Null usage
fields and the missing infrastructure amount remain gaps in
`source_evidence`.
`reconcile_resource_period` for 2026-08 reports:
- usage present
- `missing_booked_fact: true`
- `booked_effective_amount: null`
- `invented_zero: false`
`exchange_health` raises `usage_without_booked_fact` for this period.
## Why T05 stays open
The done criterion is: the same cost booked once, projected,
joined to technical evidence, and returned without a second ledger.
That cost does not exist yet. The first comparable Scaleway invoice
period is 2026-09. This note is the commissioning baseline, not
closure.
When a provider charge or credit lands, book it once, bind
`financial_fact_id``resource:platform:audit-storage`, and rerun
`ledger reconcile-resource --period 2026-09`.