Add CTO Case staged proof gates

This commit is contained in:
Svrnty
2026-05-31 18:55:07 -04:00
parent d68156d9d1
commit 2ef6ff513c
4 changed files with 306 additions and 3 deletions
+37
View File
@@ -22,6 +22,7 @@ REQUIRED_FILES = [
"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",
"sot/03-PROTOCOLS/CTO-CASE-STAGED-PROOF-GATES.md",
]
REQUIRED_BRIEF_PHRASES = [
@@ -157,6 +158,30 @@ REQUIRED_FAILURE_FIXTURE_PHRASES = [
"fail closed",
]
REQUIRED_STAGED_PROOF_PHRASES = [
"Local planning SOT only. Not a Core Protocol. Not active Core authority.",
"Default status is earned, not assumed.",
"Stages must be completed in order.",
"Missing evidence means blocked, not partially accepted.",
"Stage 1 - Gated Case Engine",
"Stage 2 - Artificial Fixture",
"Stage 3 - Copied Repo Fixture",
"Stage 4 - Disposable Sandbox Repo",
"Stage 5 - Owned Noncritical Repo",
"Stage 6 - Candidate Default",
"Allowed mutation scope: none.",
"Allowed mutation scope: copied artificial case only.",
"Allowed mutation scope: copied local repository fixture only.",
"Allowed mutation scope: disposable repository only.",
"Allowed mutation scope: explicitly owned low-risk repository only.",
"Allowed mutation scope: scoped real-repo use only.",
"fake, Codex, and Pi where applicable",
"Case matches or beats existing lanes on report shape",
"Case matches or beats existing lanes on failure closure",
"Any future implementation must start with Stage 1",
"must not skip to real-repo execution",
]
def main() -> int:
checked: list[str] = []
@@ -244,6 +269,16 @@ def main() -> int:
if phrase not in text:
errors.append(f"missing_failure_matrix_phrase:{phrase}")
staged_proof = ROOT / "sot/03-PROTOCOLS/CTO-CASE-STAGED-PROOF-GATES.md"
if staged_proof.is_file():
text = staged_proof.read_text(encoding="utf-8")
if "core_promotion_status: not-promoted" not in text:
errors.append("staged_proof_missing_not_promoted_frontmatter")
for phrase in REQUIRED_STAGED_PROOF_PHRASES:
checked.append(f"staged_proof_phrase:{phrase}")
if phrase not in text:
errors.append(f"missing_staged_proof_phrase:{phrase}")
board = ROOT / "WORKBOARD.yaml"
if board.is_file():
text = board.read_text(encoding="utf-8")
@@ -261,6 +296,8 @@ def main() -> int:
errors.append("workboard_missing_adapter_contract_source")
if "CTO-CASE-FAILURE-FIXTURE-MATRIX.md" not in text:
errors.append("workboard_missing_failure_matrix_source")
if "CTO-CASE-STAGED-PROOF-GATES.md" not in text:
errors.append("workboard_missing_staged_proof_gates_source")
payload = {
"ok": not errors,