Skip to content

Commit 440b671

Browse files
committed
docs: add runtime impossibility receipt schema v0.1
1 parent 51be297 commit 440b671

1 file changed

Lines changed: 102 additions & 0 deletions

File tree

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"$id": "https://github.com/LalaSkye/commit-gate-core/docs/schemas/Runtime_Impossibility_Receipt_Schema_v0.1.json",
4+
"title": "Runtime Impossibility Receipt Schema v0.1",
5+
"description": "Path-local schema for recording why a consequence-producing action could not validly proceed at runtime. Synthetic demonstration only; not production, compliance, medical, or field evidence.",
6+
"type": "object",
7+
"additionalProperties": false,
8+
"required": [
9+
"schema_version",
10+
"receipt_id",
11+
"timestamp",
12+
"attempted_action",
13+
"actor",
14+
"authority",
15+
"scope",
16+
"freshness",
17+
"replay",
18+
"state",
19+
"verdict",
20+
"reason",
21+
"downstream_effect_prevented",
22+
"human_review_required",
23+
"claim_boundary"
24+
],
25+
"properties": {
26+
"schema_version": { "type": "string", "const": "0.1" },
27+
"receipt_id": { "type": "string", "minLength": 1 },
28+
"timestamp": { "type": "string", "format": "date-time" },
29+
"attempted_action": { "type": "string", "minLength": 1 },
30+
"actor": { "type": "string", "minLength": 1 },
31+
"authority": {
32+
"type": "object",
33+
"additionalProperties": false,
34+
"required": ["present", "source", "valid"],
35+
"properties": {
36+
"present": { "type": "boolean" },
37+
"source": { "type": ["string", "null"] },
38+
"valid": { "type": "boolean" }
39+
}
40+
},
41+
"scope": {
42+
"type": "object",
43+
"additionalProperties": false,
44+
"required": ["allowed_action_class", "requested_action_class", "scope_match"],
45+
"properties": {
46+
"allowed_action_class": { "type": ["string", "null"] },
47+
"requested_action_class": { "type": "string", "minLength": 1 },
48+
"scope_match": { "type": "boolean" }
49+
}
50+
},
51+
"freshness": {
52+
"type": "object",
53+
"additionalProperties": false,
54+
"required": ["checked", "valid_until", "fresh"],
55+
"properties": {
56+
"checked": { "type": "boolean" },
57+
"valid_until": { "type": ["string", "null"], "format": "date-time" },
58+
"fresh": { "type": "boolean" }
59+
}
60+
},
61+
"replay": {
62+
"type": "object",
63+
"additionalProperties": false,
64+
"required": ["nonce", "replay_detected"],
65+
"properties": {
66+
"nonce": { "type": "string", "minLength": 1 },
67+
"replay_detected": { "type": "boolean" }
68+
}
69+
},
70+
"state": {
71+
"type": "object",
72+
"additionalProperties": false,
73+
"required": ["current_state", "execution_permitted"],
74+
"properties": {
75+
"current_state": { "type": "string", "minLength": 1 },
76+
"execution_permitted": { "type": "boolean" }
77+
}
78+
},
79+
"verdict": {
80+
"type": "string",
81+
"enum": [
82+
"ALLOW",
83+
"PAUSE",
84+
"REFUSE",
85+
"ESCALATE_TO_HUMAN",
86+
"DOWNGRADE_TO_ADVISORY",
87+
"HOLD_FOR_EVIDENCE",
88+
"INVALID_INPUT",
89+
"REPLAY_BLOCKED",
90+
"OUT_OF_SCOPE",
91+
"STATE_CONFLICT",
92+
"RECEIPT_FAILURE"
93+
]
94+
},
95+
"reason": { "type": "string", "minLength": 1 },
96+
"downstream_effect_prevented": { "type": "string", "minLength": 1 },
97+
"human_review_required": { "type": "boolean" },
98+
"receipt_hash": { "type": ["string", "null"] },
99+
"previous_receipt_hash": { "type": ["string", "null"] },
100+
"claim_boundary": { "type": "string", "minLength": 1 }
101+
}
102+
}

0 commit comments

Comments
 (0)