T06: optimization-case schema, fail-closed evaluator, cadence and decision template. Every option including the baseline must present all ten decision fields; one unknown blocks the comparison. Validated on the storage case (Hetzner computes and loses to Scaleway by EUR 29.14/month on operator labour; Host Europe blocks on four named gaps) and on the non-storage reef-railiance k3s rightsizing case (low utilization is real, but nothing is costable while the railiance01 price is unknown). T07: portfolio report over coverage, lifecycle, utilization, cost, renewals, risks, open cases, and next actions, derived only from committed evidence. Portfolio spend is reported null rather than as a partial sum, unattributed cost is a named list rather than a spread, and unmeasurable resources are reported rather than dropped. RESOURCE-WP-0003 is finished; both cases remain blocked_on_evidence against live delegated records in other repositories. RESOURCE-WP-0002 is untouched. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
43 lines
2.1 KiB
JSON
43 lines
2.1 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://coulomb.social/resource-control/monthly-resource-observation.schema.json",
|
|
"title": "Monthly resource forecast or technical usage observation",
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["schema_version", "record_type", "workload", "cost_attribution_key", "provider_id", "created_at", "rows"],
|
|
"properties": {
|
|
"schema_version": {"const": "0.1"},
|
|
"record_type": {"enum": ["forecast", "usage_observation"]},
|
|
"workload": {"type": "string"},
|
|
"cost_attribution_key": {"type": "string"},
|
|
"provider_id": {"type": "string"},
|
|
"created_at": {"type": "string", "format": "date-time"},
|
|
"scenario": {"type": ["string", "null"]},
|
|
"forecast_ref": {"type": ["string", "null"]},
|
|
"rows": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["period", "database_gb", "stored_gb", "wal_gb", "restore_egress_gb", "write_requests", "read_requests", "infrastructure_eur", "internal_labor_hours", "internal_labor_eur", "total_eur"],
|
|
"properties": {
|
|
"period": {"type": "string", "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])$"},
|
|
"database_gb": {"type": "number", "minimum": 0},
|
|
"stored_gb": {"type": "number", "minimum": 0},
|
|
"wal_gb": {"type": "number", "minimum": 0},
|
|
"restore_egress_gb": {"type": "number", "minimum": 0},
|
|
"write_requests": {"type": "integer", "minimum": 0},
|
|
"read_requests": {"type": "integer", "minimum": 0},
|
|
"infrastructure_eur": {"type": "number", "minimum": 0},
|
|
"internal_labor_hours": {"type": "number", "minimum": 0},
|
|
"internal_labor_eur": {"type": "number", "minimum": 0},
|
|
"total_eur": {"type": "number", "minimum": 0},
|
|
"backup_success_pct": {"type": ["number", "null"], "minimum": 0, "maximum": 100},
|
|
"restore_rto_minutes": {"type": ["number", "null"], "minimum": 0},
|
|
"max_rpo_minutes": {"type": ["number", "null"], "minimum": 0},
|
|
"evidence": {"type": "array", "items": {"type": "string"}}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|