The backup is procured and proven, so the loop runs on real evidence. - data/actuals/2026-08.json: first real observation. database 0.6365 GB, stored 0.0066 GB over 8 objects, backup success 1/1, restore RTO 1.08 min. Five proxies null, each with a named owner in measurement_gaps. - data/thresholds/platform-audit-storage.json + tools/thresholds.py: budget variance, abnormal growth, stale backup, unused commitment. Fail-closed — an unmeasured value is reported as unmeasured, never as within. - financial_exchange.py gains a usage mode emitting technical_usage records to fin-hub, with measurement gaps carried through and no infrastructure amount: fin-hub owns the booked fact and a null is never sent as 0.00. - observation schema 0.2 allows null cost and usage proxies; variance.py fails closed rather than reporting a 100% favourable variance on a missing amount. - platform-audit-storage: ordered -> active, commissioned 2026-08-14, on operational fact rather than on the purchase. The optimization case is now approved by the founder. That needed a schema change: Host Europe never supplied written terms, so options gained excluded/exclusion_reason. Previously an unevaluable alternative blocked its case forever, leaving the record claiming no decision while the bucket was in production. An excluded option keeps its unknowns and must say what would bring it back. August produces no variance and should not: the decision forecast starts at 2026-09, so August is a commissioning baseline. Threshold run is 2 within, 1 not applicable, 6 unmeasured, 0 breaches. Also fixes a pre-existing test failure: reef-storage consumers_actual is now rapp-postgres, which the assertion still expected to be empty. 136 tests pass. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
39 lines
1.5 KiB
Makefile
39 lines
1.5 KiB
Makefile
.PHONY: test forecast variance control-cycle exchange-forecast exchange-usage optimization portfolio-report settlement thresholds
|
|
|
|
test:
|
|
python3 -m unittest discover -s tests -p 'test_*.py'
|
|
python3 tools/validate.py
|
|
|
|
forecast:
|
|
python3 tools/cost_model.py data/demand/platform-audit-storage.json data/providers/object-storage.json
|
|
|
|
variance:
|
|
@test -n "$(ACTUAL)" || { echo 'ACTUAL=data/actuals/YYYY-MM.json is required' >&2; exit 2; }
|
|
python3 tools/variance.py data/forecasts/platform-audit-storage-scaleway-base-2026-08.json $(ACTUAL)
|
|
|
|
control-cycle:
|
|
@test -n "$(FORECAST)" -a -n "$(ACTUAL)" || { echo 'FORECAST=... ACTUAL=... are required' >&2; exit 2; }
|
|
python3 tools/control_cycle.py $(FORECAST) $(ACTUAL)
|
|
|
|
exchange-forecast:
|
|
python3 tools/financial_exchange.py forecast data/forecasts/platform-audit-storage-scaleway-base-2026-08.json
|
|
|
|
exchange-usage:
|
|
@test -n "$(ACTUAL)" || { echo 'ACTUAL=data/actuals/YYYY-MM.json is required' >&2; exit 2; }
|
|
python3 tools/financial_exchange.py usage $(ACTUAL) resource:platform:audit-storage
|
|
|
|
thresholds:
|
|
@test -n "$(PERIOD)" || { echo 'PERIOD=YYYY-MM is required' >&2; exit 2; }
|
|
python3 tools/thresholds.py data/thresholds/platform-audit-storage.json \
|
|
data/actuals/$(PERIOD).json $(PERIOD) \
|
|
data/forecasts/platform-audit-storage-scaleway-base-2026-08.json
|
|
|
|
optimization:
|
|
python3 tools/optimization.py $(CASE)
|
|
|
|
portfolio-report:
|
|
python3 tools/portfolio_report.py .
|
|
|
|
settlement:
|
|
@test -n "$(PERIOD)" || { echo 'PERIOD=YYYY-MM is required' >&2; exit 2; }
|
|
python3 tools/settlement.py close --period $(PERIOD)
|