Add CTO Case failure fixture matrix

This commit is contained in:
Svrnty
2026-05-31 18:53:12 -04:00
parent 44ad43d958
commit 3fe48451f3
4 changed files with 129 additions and 3 deletions
+50
View File
@@ -21,6 +21,7 @@ REQUIRED_FILES = [
"sot/03-PROTOCOLS/CTO-HARNESS-EVIDENCE-INTERFACE-CONTRACT.md",
"sot/03-PROTOCOLS/CTO-CASE-SOURCE-ADMISSION-RECORD.md",
"sot/03-PROTOCOLS/CTO-CASE-ADAPTER-CONTRACT.md",
"sot/03-PROTOCOLS/CTO-CASE-FAILURE-FIXTURE-MATRIX.md",
]
REQUIRED_BRIEF_PHRASES = [
@@ -119,6 +120,43 @@ REQUIRED_ADAPTER_CONTRACT_PHRASES = [
"This contract deliberately does not create `case-engine.sh`.",
]
REQUIRED_FAILURE_FIXTURE_PHRASES = [
"Local planning SOT only. Not a Core Protocol. Not active Core authority.",
"This matrix does not authorize Runtime behavior",
"This matrix is planning-only and does not run Case.",
"no-diff",
"disallowed-file",
"failed-tests",
"missing-test-command",
"missing-event",
"reviewer-reject",
"approval-denied",
"timeout",
"dirty-starting-tree",
"dirty-ending-tree",
"artifact-write-failure",
"provider-unavailable",
"`no_diff`",
"`disallowed_file_change`",
"`verification_failed`",
"`missing_test_command`",
"`missing_required_event`",
"`reviewer_rejected`",
"`approval_denied`",
"`dirty_starting_tree`",
"`dirty_ending_tree`",
"`artifact_write_failure`",
"`provider_unavailable`",
"report.json",
"events.normalized.jsonl",
"patch.diff",
"test.log",
"trace.jsonl",
"artifact_digests",
"freshness proof",
"fail closed",
]
def main() -> int:
checked: list[str] = []
@@ -196,6 +234,16 @@ def main() -> int:
if phrase not in text:
errors.append(f"missing_adapter_contract_phrase:{phrase}")
failure_matrix = ROOT / "sot/03-PROTOCOLS/CTO-CASE-FAILURE-FIXTURE-MATRIX.md"
if failure_matrix.is_file():
text = failure_matrix.read_text(encoding="utf-8")
if "core_promotion_status: not-promoted" not in text:
errors.append("failure_matrix_missing_not_promoted_frontmatter")
for phrase in REQUIRED_FAILURE_FIXTURE_PHRASES:
checked.append(f"failure_matrix_phrase:{phrase}")
if phrase not in text:
errors.append(f"missing_failure_matrix_phrase:{phrase}")
board = ROOT / "WORKBOARD.yaml"
if board.is_file():
text = board.read_text(encoding="utf-8")
@@ -211,6 +259,8 @@ def main() -> int:
errors.append("workboard_missing_source_admission_record_source")
if "CTO-CASE-ADAPTER-CONTRACT.md" not in text:
errors.append("workboard_missing_adapter_contract_source")
if "CTO-CASE-FAILURE-FIXTURE-MATRIX.md" not in text:
errors.append("workboard_missing_failure_matrix_source")
payload = {
"ok": not errors,