{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://coulomb.social/schemas/railiance/custody-cleanup-receipt.v1.json",
  "title": "Railiance custody cleanup receipt v1",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "interface", "version", "workplan_id", "state", "lease_id", "engagement_id",
    "projection_receipt_id", "cleaned_at", "removed_resources", "target_ready",
    "secret_values_observed"
  ],
  "properties": {
    "interface": {"const": "railiance.custody-cleanup-receipt"},
    "version": {"const": 1},
    "workplan_id": {"const": "RAILIANCE-WP-0025"},
    "state": {"const": "cleaned"},
    "lease_id": {"type": "string", "pattern": "^custody:[0-9a-f]{32}$"},
    "engagement_id": {"type": "string"},
    "projection_receipt_id": {"type": "string", "pattern": "^sha256:[0-9a-f]{64}$"},
    "cleaned_at": {"type": "string", "format": "date-time"},
    "removed_resources": {"type": "array", "items": {"type": "string"}},
    "target_ready": {"const": true},
    "secret_values_observed": {"const": false}
  }
}
