Add Case Stage 3 copied repo PRD

This commit is contained in:
Svrnty
2026-05-31 23:09:33 -04:00
parent ccf45bf338
commit 41de06d9c9
7 changed files with 274 additions and 0 deletions
+56
View File
@@ -28,6 +28,8 @@ REQUIRED_FILES = [
".sot/03-PROTOCOLS/CTO-CASE-STAGE1-GATED-ENGINE-ISSUES.md",
".sot/03-PROTOCOLS/CTO-CASE-STAGE2-ARTIFICIAL-FIXTURE-PRD.md",
".sot/03-PROTOCOLS/CTO-CASE-STAGE2-ARTIFICIAL-FIXTURE-ISSUES.md",
".sot/03-PROTOCOLS/CTO-CASE-STAGE3-COPIED-REPO-PRD.md",
".sot/03-PROTOCOLS/CTO-CASE-STAGE3-COPIED-REPO-ISSUES.md",
".sot/03-PROTOCOLS/CTO-CASE-PROVIDER-ADMISSION-PRD.md",
".sot/03-PROTOCOLS/CTO-CASE-PROVIDER-ADMISSION-ISSUES.md",
".sot/03-PROTOCOLS/CTO-CASE-PROVIDER-BUILD-PRD.md",
@@ -268,6 +270,28 @@ REQUIRED_STAGE2_ISSUE_IDS = [
"CTO-WORK-012",
]
REQUIRED_STAGE3_PRD_PHRASES = [
"Local planning SOT only. Not a Core Protocol. Not active Core authority.",
"Stage 3 must prove the next narrow behavior",
"copied local repository fixture only",
"CTO_HARNESS_ALLOW_CASE=1",
"CTO_HARNESS_CASE_STAGE=3",
"Source repository HEAD and status are recorded before and after Case execution.",
"Source repository after-proof matches before-proof.",
"Copied fixture starts clean",
"Copied fixture ends clean",
"source_repository_mutated: false",
"dirty-starting-tree",
"dirty-ending-tree",
"artifact-write-failure",
"Stage 3 does not authorize sandbox, owned-repo, default backend, WebUI Runtime, or Core promotion behavior.",
]
REQUIRED_STAGE3_ISSUE_IDS = [
"CTO-WORK-033",
"CTO-WORK-034",
]
REQUIRED_PROVIDER_ADMISSION_PRD_PHRASES = [
"Local planning SOT only. Not a Core Protocol. Not active Core authority.",
"https://github.com/workos/case.git",
@@ -864,6 +888,28 @@ def main() -> int:
if issue_id not in text:
errors.append(f"missing_stage2_issue_id:{issue_id}")
stage3_prd = ROOT / ".sot/03-PROTOCOLS/CTO-CASE-STAGE3-COPIED-REPO-PRD.md"
if stage3_prd.is_file():
text = stage3_prd.read_text(encoding="utf-8")
if "core_promotion_status: not-promoted" not in text:
errors.append("stage3_prd_missing_not_promoted_frontmatter")
for phrase in REQUIRED_STAGE3_PRD_PHRASES:
checked.append(f"stage3_prd_phrase:{phrase}")
if phrase not in text:
errors.append(f"missing_stage3_prd_phrase:{phrase}")
stage3_issues = ROOT / ".sot/03-PROTOCOLS/CTO-CASE-STAGE3-COPIED-REPO-ISSUES.md"
if stage3_issues.is_file():
text = stage3_issues.read_text(encoding="utf-8")
if "core_promotion_status: not-promoted" not in text:
errors.append("stage3_issues_missing_not_promoted_frontmatter")
if "Local planning SOT only. Not a Core Protocol. Not active Core authority." not in text:
errors.append("stage3_issues_missing_local_planning_notice")
for issue_id in REQUIRED_STAGE3_ISSUE_IDS:
checked.append(f"stage3_issue_id:{issue_id}")
if issue_id not in text:
errors.append(f"missing_stage3_issue_id:{issue_id}")
provider_admission_prd = ROOT / ".sot/03-PROTOCOLS/CTO-CASE-PROVIDER-ADMISSION-PRD.md"
if provider_admission_prd.is_file():
text = provider_admission_prd.read_text(encoding="utf-8")
@@ -1059,6 +1105,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}")
for issue_id in REQUIRED_STAGE3_ISSUE_IDS:
checked.append(f"workboard_id:{issue_id}")
if issue_id not in text:
errors.append(f"missing_workboard_id:{issue_id}")
for issue_id in REQUIRED_PROVIDER_ADMISSION_ISSUE_IDS:
checked.append(f"workboard_id:{issue_id}")
if issue_id not in text:
@@ -1108,6 +1158,8 @@ def main() -> int:
"CTO-WORK-027": "validated",
"CTO-WORK-029": "validated",
"CTO-WORK-030": "validated",
"CTO-WORK-033": "validated",
"CTO-WORK-034": "blocked",
}
for issue_id, expected in expected_statuses.items():
checked.append(f"workboard_status:{issue_id}:{expected}")
@@ -1134,6 +1186,10 @@ def main() -> int:
errors.append("workboard_missing_stage2_prd_source")
if "CTO-CASE-STAGE2-ARTIFICIAL-FIXTURE-ISSUES.md" not in text:
errors.append("workboard_missing_stage2_issues_source")
if "CTO-CASE-STAGE3-COPIED-REPO-PRD.md" not in text:
errors.append("workboard_missing_stage3_prd_source")
if "CTO-CASE-STAGE3-COPIED-REPO-ISSUES.md" not in text:
errors.append("workboard_missing_stage3_issues_source")
if "CTO-CASE-PROVIDER-ADMISSION-PRD.md" not in text:
errors.append("workboard_missing_provider_admission_prd_source")
if "CTO-CASE-PROVIDER-ADMISSION-ISSUES.md" not in text: