feat(org): enforce Sentinel audit input contract with hard gate
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"version": "sentinel-audit-contract-v1",
|
||||
"purpose": "Force complete audit input payload for Sentinel to avoid blind-audit failures.",
|
||||
"required_fields": [
|
||||
"task_id",
|
||||
"audit_scope",
|
||||
"audit_payload",
|
||||
"source_type",
|
||||
"requested_output_schema"
|
||||
],
|
||||
"field_rules": {
|
||||
"task_id": {
|
||||
"type": "string",
|
||||
"min_length": 8
|
||||
},
|
||||
"audit_scope": {
|
||||
"type": "string",
|
||||
"allowed": ["safety", "logic", "cost", "full"]
|
||||
},
|
||||
"audit_payload": {
|
||||
"type": "object",
|
||||
"required_any_of": ["inline_text", "file_paths", "artifact_refs"],
|
||||
"min_content_chars": 500
|
||||
},
|
||||
"source_type": {
|
||||
"type": "string",
|
||||
"allowed": ["inline", "workspace_file", "mixed"]
|
||||
},
|
||||
"requested_output_schema": {
|
||||
"type": "array",
|
||||
"must_include": ["decision", "scores", "issues", "must_fix", "release_conditions"]
|
||||
}
|
||||
},
|
||||
"gates": {
|
||||
"pre_audit_validation": true,
|
||||
"reject_on_missing_payload": true,
|
||||
"reject_on_unreadable_file_refs": true,
|
||||
"fallback_behavior": "return_input_contract_error"
|
||||
},
|
||||
"input_contract_error": {
|
||||
"code": "SENTINEL_INPUT_CONTRACT_MISSING",
|
||||
"message": "Audit payload incomplete. Provide inline_text or readable file_paths/artifact_refs before running Sentinel."
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user