{ "$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": { "enum": [ "0.1", "0.2" ], "description": "0.2 permits null cost fields for periods the provider has not yet invoiced. Existing 0.1 records stay valid and are never rewritten." }, "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", "null" ], "minimum": 0, "description": "Null when the period's evidence does not separate or measure this proxy. Null is unknown, never zero." }, "stored_gb": { "type": [ "number", "null" ], "minimum": 0, "description": "Null when the period's evidence does not separate or measure this proxy. Null is unknown, never zero." }, "wal_gb": { "type": [ "number", "null" ], "minimum": 0, "description": "Null when the period's evidence does not separate or measure this proxy. Null is unknown, never zero." }, "restore_egress_gb": { "type": [ "number", "null" ], "minimum": 0, "description": "Null when the period's evidence does not separate or measure this proxy. Null is unknown, never zero." }, "write_requests": { "type": [ "integer", "null" ], "minimum": 0, "description": "Null when no request metric is available for the period. Null is unknown, never zero." }, "read_requests": { "type": [ "integer", "null" ], "minimum": 0, "description": "Null when no request metric is available for the period. Null is unknown, never zero." }, "infrastructure_eur": { "type": [ "number", "null" ], "minimum": 0, "description": "EUR, or null when no invoice or valued time record exists for the period. Null is unknown, never zero." }, "internal_labor_hours": { "type": [ "number", "null" ], "minimum": 0, "description": "Null when no time record exists for the period. Null is unknown, never zero." }, "internal_labor_eur": { "type": [ "number", "null" ], "minimum": 0, "description": "EUR, or null when no invoice or valued time record exists for the period. Null is unknown, never zero." }, "total_eur": { "type": [ "number", "null" ], "minimum": 0, "description": "EUR, or null when no invoice or valued time record exists for the period. Null is unknown, never zero." }, "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" } }, "measurement_gaps": { "type": "array", "items": { "type": "string" }, "uniqueItems": true, "description": "Named reasons a proxy is null, each attributable to an owner or a missing source." } } } }, "evidence": { "type": "array", "items": { "type": "string" }, "uniqueItems": true, "description": "Non-secret references to the provider usage export or invoice, the database and CNPG measurement, the restore drill record, and any internal time record." }, "notes": { "type": "array", "items": { "type": "string" }, "description": "Conditions a reader needs to interpret the row correctly, such as a partial first period." } } }