Add Stage 5 target repository admission template

This commit is contained in:
Svrnty
2026-05-31 23:46:22 -04:00
parent 51977d36cd
commit f8a6d6873d
5 changed files with 163 additions and 1 deletions
+34
View File
@@ -34,6 +34,7 @@ REQUIRED_FILES = [
".sot/03-PROTOCOLS/CTO-CASE-STAGE4-DISPOSABLE-SANDBOX-ISSUES.md",
".sot/03-PROTOCOLS/CTO-CASE-STAGE5-OWNED-NONCRITICAL-REPO-PRD.md",
".sot/03-PROTOCOLS/CTO-CASE-STAGE5-OWNED-NONCRITICAL-REPO-ISSUES.md",
".sot/03-PROTOCOLS/CTO-CASE-STAGE5-TARGET-REPOSITORY-ADMISSION-TEMPLATE.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",
@@ -332,6 +333,26 @@ REQUIRED_STAGE5_PRD_PHRASES = [
REQUIRED_STAGE5_ISSUE_IDS = [
"CTO-WORK-037",
"CTO-WORK-038",
"CTO-WORK-039",
]
REQUIRED_STAGE5_TARGET_ADMISSION_TEMPLATE_PHRASES = [
"Local planning SOT only. Not a Core Protocol. Not active Core authority.",
"This artifact is a template only. No Target Repository is admitted by this file.",
"Stage 5 execution remains blocked until JP records a concrete admission record",
"admission_status",
"target_repository_path",
"repository_owner",
"ownership_evidence",
"risk_classification",
"low_risk_noncritical",
"allowed_paths",
"forbidden_actions",
"approval_source",
"operator_outcome_required",
"Missing admission record blocks before `case_process_started`.",
"This template does not authorize Case execution.",
"This template does not authorize owned repository mutation.",
]
REQUIRED_PROVIDER_ADMISSION_PRD_PHRASES = [
@@ -996,6 +1017,16 @@ def main() -> int:
if issue_id not in text:
errors.append(f"missing_stage5_issue_id:{issue_id}")
stage5_target_admission_template = ROOT / ".sot/03-PROTOCOLS/CTO-CASE-STAGE5-TARGET-REPOSITORY-ADMISSION-TEMPLATE.md"
if stage5_target_admission_template.is_file():
text = stage5_target_admission_template.read_text(encoding="utf-8")
if "core_promotion_status: not-promoted" not in text:
errors.append("stage5_target_admission_template_missing_not_promoted_frontmatter")
for phrase in REQUIRED_STAGE5_TARGET_ADMISSION_TEMPLATE_PHRASES:
checked.append(f"stage5_target_admission_template_phrase:{phrase}")
if phrase not in text:
errors.append(f"missing_stage5_target_admission_template_phrase:{phrase}")
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")
@@ -1254,6 +1285,7 @@ def main() -> int:
"CTO-WORK-036": "validated",
"CTO-WORK-037": "validated",
"CTO-WORK-038": "blocked",
"CTO-WORK-039": "validated",
}
for issue_id, expected in expected_statuses.items():
checked.append(f"workboard_status:{issue_id}:{expected}")
@@ -1292,6 +1324,8 @@ def main() -> int:
errors.append("workboard_missing_stage5_prd_source")
if "CTO-CASE-STAGE5-OWNED-NONCRITICAL-REPO-ISSUES.md" not in text:
errors.append("workboard_missing_stage5_issues_source")
if "CTO-CASE-STAGE5-TARGET-REPOSITORY-ADMISSION-TEMPLATE.md" not in text:
errors.append("workboard_missing_stage5_target_admission_template_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: