Add CTO harness evidence interface contract
This commit is contained in:
@@ -18,6 +18,7 @@ REQUIRED_FILES = [
|
||||
"sot/03-PROTOCOLS/CTO-CASE-BACKEND-BRIEF.md",
|
||||
"sot/03-PROTOCOLS/CTO-CASE-CANDIDATE-BACKEND-PRD.md",
|
||||
"sot/03-PROTOCOLS/CTO-CASE-CANDIDATE-BACKEND-ISSUES.md",
|
||||
"sot/03-PROTOCOLS/CTO-HARNESS-EVIDENCE-INTERFACE-CONTRACT.md",
|
||||
]
|
||||
|
||||
REQUIRED_BRIEF_PHRASES = [
|
||||
@@ -56,6 +57,29 @@ REQUIRED_ISSUE_IDS = [
|
||||
"CTO-WORK-008",
|
||||
]
|
||||
|
||||
REQUIRED_EVIDENCE_INTERFACE_PHRASES = [
|
||||
"Local planning SOT only. Not a Core Protocol. Not active Core authority.",
|
||||
"This contract does not authorize Runtime behavior",
|
||||
"The Harness Evidence Interface is the only accepted proof surface for backend comparison.",
|
||||
"report.json",
|
||||
"events.normalized.jsonl",
|
||||
"patch.diff",
|
||||
"test.log",
|
||||
"trace.jsonl",
|
||||
"artifact_digests",
|
||||
"SHA-256",
|
||||
"run_started_at",
|
||||
"run_finished_at",
|
||||
"backend_exit_code",
|
||||
"allowed_writes_passed",
|
||||
"approval.requested",
|
||||
"approval.granted",
|
||||
"approval.denied",
|
||||
"Case may recommend. Case must not approve itself.",
|
||||
"No merge, push, deploy, close, or real-repo mutation is allowed without explicit task-contract permission.",
|
||||
"fail closed",
|
||||
]
|
||||
|
||||
|
||||
def main() -> int:
|
||||
checked: list[str] = []
|
||||
@@ -103,6 +127,16 @@ def main() -> int:
|
||||
if issue_id not in text:
|
||||
errors.append(f"missing_issue_id:{issue_id}")
|
||||
|
||||
evidence_interface = ROOT / "sot/03-PROTOCOLS/CTO-HARNESS-EVIDENCE-INTERFACE-CONTRACT.md"
|
||||
if evidence_interface.is_file():
|
||||
text = evidence_interface.read_text(encoding="utf-8")
|
||||
if "core_promotion_status: not-promoted" not in text:
|
||||
errors.append("evidence_interface_missing_not_promoted_frontmatter")
|
||||
for phrase in REQUIRED_EVIDENCE_INTERFACE_PHRASES:
|
||||
checked.append(f"evidence_interface_phrase:{phrase}")
|
||||
if phrase not in text:
|
||||
errors.append(f"missing_evidence_interface_phrase:{phrase}")
|
||||
|
||||
board = ROOT / "WORKBOARD.yaml"
|
||||
if board.is_file():
|
||||
text = board.read_text(encoding="utf-8")
|
||||
@@ -110,6 +144,10 @@ def main() -> int:
|
||||
checked.append(f"workboard_id:{issue_id}")
|
||||
if issue_id not in text:
|
||||
errors.append(f"missing_workboard_id:{issue_id}")
|
||||
if "CTO-HARNESS-EVIDENCE-INTERFACE-CONTRACT.md" not in text:
|
||||
errors.append("workboard_missing_evidence_interface_contract_source")
|
||||
if "CTO-WORK-004" in text and "status: validated" not in text:
|
||||
errors.append("workboard_cto_work_004_not_validated")
|
||||
|
||||
payload = {
|
||||
"ok": not errors,
|
||||
|
||||
Reference in New Issue
Block a user