Add Case Stage 4 disposable sandbox PRD

This commit is contained in:
Svrnty
2026-05-31 23:25:58 -04:00
parent ea99b0fac9
commit f5680290b0
6 changed files with 259 additions and 0 deletions
+49
View File
@@ -30,6 +30,8 @@ REQUIRED_FILES = [
".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-STAGE4-DISPOSABLE-SANDBOX-PRD.md",
".sot/03-PROTOCOLS/CTO-CASE-STAGE4-DISPOSABLE-SANDBOX-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",
@@ -292,6 +294,25 @@ REQUIRED_STAGE3_ISSUE_IDS = [
"CTO-WORK-034",
]
REQUIRED_STAGE4_PRD_PHRASES = [
"Local planning SOT only. Not a Core Protocol. Not active Core authority.",
"Stage 4 must prove the next narrow behavior",
"disposable repository only",
"CTO_HARNESS_ALLOW_CASE=1",
"CTO_HARNESS_CASE_STAGE=4",
"approval requested/granted/denied",
"branch policy proof",
"No push, merge, deploy, close, PR open, or public publication occurs by default.",
"approval-denied",
"reviewer-reject",
"Stage 4 is successful when Case changes only a disposable repository",
]
REQUIRED_STAGE4_ISSUE_IDS = [
"CTO-WORK-035",
"CTO-WORK-036",
]
REQUIRED_PROVIDER_ADMISSION_PRD_PHRASES = [
"Local planning SOT only. Not a Core Protocol. Not active Core authority.",
"https://github.com/workos/case.git",
@@ -910,6 +931,28 @@ def main() -> int:
if issue_id not in text:
errors.append(f"missing_stage3_issue_id:{issue_id}")
stage4_prd = ROOT / ".sot/03-PROTOCOLS/CTO-CASE-STAGE4-DISPOSABLE-SANDBOX-PRD.md"
if stage4_prd.is_file():
text = stage4_prd.read_text(encoding="utf-8")
if "core_promotion_status: not-promoted" not in text:
errors.append("stage4_prd_missing_not_promoted_frontmatter")
for phrase in REQUIRED_STAGE4_PRD_PHRASES:
checked.append(f"stage4_prd_phrase:{phrase}")
if phrase not in text:
errors.append(f"missing_stage4_prd_phrase:{phrase}")
stage4_issues = ROOT / ".sot/03-PROTOCOLS/CTO-CASE-STAGE4-DISPOSABLE-SANDBOX-ISSUES.md"
if stage4_issues.is_file():
text = stage4_issues.read_text(encoding="utf-8")
if "core_promotion_status: not-promoted" not in text:
errors.append("stage4_issues_missing_not_promoted_frontmatter")
if "Local planning SOT only. Not a Core Protocol. Not active Core authority." not in text:
errors.append("stage4_issues_missing_local_planning_notice")
for issue_id in REQUIRED_STAGE4_ISSUE_IDS:
checked.append(f"stage4_issue_id:{issue_id}")
if issue_id not in text:
errors.append(f"missing_stage4_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")
@@ -1160,6 +1203,8 @@ def main() -> int:
"CTO-WORK-030": "validated",
"CTO-WORK-033": "validated",
"CTO-WORK-034": "validated",
"CTO-WORK-035": "validated",
"CTO-WORK-036": "blocked",
}
for issue_id, expected in expected_statuses.items():
checked.append(f"workboard_status:{issue_id}:{expected}")
@@ -1190,6 +1235,10 @@ def main() -> int:
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-STAGE4-DISPOSABLE-SANDBOX-PRD.md" not in text:
errors.append("workboard_missing_stage4_prd_source")
if "CTO-CASE-STAGE4-DISPOSABLE-SANDBOX-ISSUES.md" not in text:
errors.append("workboard_missing_stage4_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: