|
| 1 | +{ |
| 2 | + "$schema": "https://json-schema.org/draft/2020-12/schema", |
| 3 | + "$id": "https://schemas.srcos.ai/v2/SyncCycleReceipt.json", |
| 4 | + "title": "SyncCycleReceipt", |
| 5 | + "description": "Immutable receipt emitted after a content sync cycle is planned or applied. Captures the before/after content view versions, steps executed, outcome, and audit reference. Owned by SourceOS-Linux/sourceos-syncd.", |
| 6 | + "type": "object", |
| 7 | + "required": [ |
| 8 | + "id", |
| 9 | + "type", |
| 10 | + "specVersion", |
| 11 | + "cycleId", |
| 12 | + "engineId", |
| 13 | + "org", |
| 14 | + "contentView", |
| 15 | + "toVersion", |
| 16 | + "lifecycleEnv", |
| 17 | + "locus", |
| 18 | + "outcome", |
| 19 | + "steps", |
| 20 | + "issuedAt", |
| 21 | + "auditId" |
| 22 | + ], |
| 23 | + "additionalProperties": false, |
| 24 | + "properties": { |
| 25 | + "id": { |
| 26 | + "type": "string", |
| 27 | + "pattern": "^urn:srcos:sync-receipt:", |
| 28 | + "description": "Globally unique receipt identifier." |
| 29 | + }, |
| 30 | + "type": { |
| 31 | + "const": "SyncCycleReceipt" |
| 32 | + }, |
| 33 | + "specVersion": { |
| 34 | + "type": "string", |
| 35 | + "description": "sourceos-spec version this receipt was emitted against." |
| 36 | + }, |
| 37 | + "cycleId": { |
| 38 | + "type": "string", |
| 39 | + "description": "Correlation ID for the sync cycle; may span plan + apply." |
| 40 | + }, |
| 41 | + "engineId": { |
| 42 | + "type": "string", |
| 43 | + "pattern": "^sourceos\\.sync\\.", |
| 44 | + "description": "SyncEngineManifest engineId that produced this receipt." |
| 45 | + }, |
| 46 | + "org": { |
| 47 | + "type": "string", |
| 48 | + "description": "Katello organization name." |
| 49 | + }, |
| 50 | + "contentView": { |
| 51 | + "type": "string", |
| 52 | + "description": "Katello content view name (e.g. sourceos-builder-aarch64)." |
| 53 | + }, |
| 54 | + "fromVersion": { |
| 55 | + "type": ["string", "null"], |
| 56 | + "description": "Content view version before the sync; null on first sync." |
| 57 | + }, |
| 58 | + "toVersion": { |
| 59 | + "type": "string", |
| 60 | + "description": "Content view version targeted by this sync." |
| 61 | + }, |
| 62 | + "lifecycleEnv": { |
| 63 | + "type": "string", |
| 64 | + "description": "Katello lifecycle environment (dev, candidate, stable)." |
| 65 | + }, |
| 66 | + "locus": { |
| 67 | + "enum": ["local", "trusted_private", "attested_fog", "burst_cloud"], |
| 68 | + "description": "Execution locus at which the sync was authorized." |
| 69 | + }, |
| 70 | + "outcome": { |
| 71 | + "enum": ["planned", "dry_run", "applied", "skipped", "denied", "failed"], |
| 72 | + "description": "Result of the sync cycle." |
| 73 | + }, |
| 74 | + "policyGate": { |
| 75 | + "type": "string", |
| 76 | + "description": "Policy gate value from the ContentSyncPlan (allowed, denied, no-op)." |
| 77 | + }, |
| 78 | + "policyReason": { |
| 79 | + "type": "string", |
| 80 | + "description": "Human-readable reason for the policy gate decision." |
| 81 | + }, |
| 82 | + "steps": { |
| 83 | + "type": "array", |
| 84 | + "items": { |
| 85 | + "type": "object", |
| 86 | + "required": ["step", "status"], |
| 87 | + "additionalProperties": false, |
| 88 | + "properties": { |
| 89 | + "step": { "type": "string" }, |
| 90 | + "status": { |
| 91 | + "enum": ["dry_run", "ok", "failed", "skipped", "timeout"] |
| 92 | + }, |
| 93 | + "returncode": { "type": "integer" }, |
| 94 | + "stdout": { "type": "string" }, |
| 95 | + "stderr": { "type": "string" }, |
| 96 | + "reason": { "type": "string" } |
| 97 | + } |
| 98 | + } |
| 99 | + }, |
| 100 | + "nixCacheUrl": { |
| 101 | + "type": "string", |
| 102 | + "description": "Pulp content server URL used as the Nix binary cache." |
| 103 | + }, |
| 104 | + "flakeRef": { |
| 105 | + "type": "string", |
| 106 | + "description": "NixOS flake ref passed to nixos-rebuild." |
| 107 | + }, |
| 108 | + "durationMs": { |
| 109 | + "type": "integer", |
| 110 | + "minimum": 0, |
| 111 | + "description": "Wall-clock duration of the sync execution in milliseconds." |
| 112 | + }, |
| 113 | + "issuedAt": { |
| 114 | + "type": "string", |
| 115 | + "format": "date-time" |
| 116 | + }, |
| 117 | + "auditId": { |
| 118 | + "type": "string", |
| 119 | + "pattern": "^urn:srcos:audit:", |
| 120 | + "description": "AuditEvent id that records this sync cycle in the append-only audit log." |
| 121 | + } |
| 122 | + } |
| 123 | +} |
0 commit comments