Skip to content

Commit 04e667a

Browse files
fix: add require_approval to required fields
1 parent a18d1a1 commit 04e667a

1 file changed

Lines changed: 16 additions & 8 deletions

File tree

schemas/policy-decision.schema.json

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,20 @@
2828
"decision": {
2929
"type": "string",
3030
"enum": ["auto-approve", "needs-human-approval", "deny"],
31-
"description": "Summary verdict"
31+
"description": "Summary verdict — must match guardrails.rego output"
3232
},
3333
"reasons": {
3434
"type": "array",
3535
"items": { "type": "string" },
36+
"minItems": 1,
3637
"description": "Human-readable reasons for the decision"
3738
},
39+
"risk_score": {
40+
"type": "number",
41+
"minimum": 0,
42+
"maximum": 1,
43+
"description": "Computed risk score that informed the decision"
44+
},
3845
"constraints": {
3946
"type": "object",
4047
"description": "Execution constraints imposed by the policy",
@@ -45,12 +52,6 @@
4552
"timeout_seconds": { "type": "integer" }
4653
}
4754
},
48-
"risk_score": {
49-
"type": "number",
50-
"minimum": 0,
51-
"maximum": 1,
52-
"description": "Computed risk score that informed the decision"
53-
},
5455
"approval": {
5556
"type": ["object", "null"],
5657
"description": "Present only if require_approval was true and approval was obtained",
@@ -67,5 +68,12 @@
6768
"required": ["approved_by", "approved_at"]
6869
}
6970
},
70-
"required": ["decision_id", "evaluated_at", "allow", "decision", "reasons"]
71+
"required": [
72+
"decision_id",
73+
"evaluated_at",
74+
"allow",
75+
"require_approval",
76+
"decision",
77+
"reasons"
78+
]
7179
}

0 commit comments

Comments
 (0)