Add CTO Core promotion decision packet

This commit is contained in:
Svrnty
2026-06-02 07:00:34 -04:00
parent 00d13f6b6f
commit dd58709f0d
8 changed files with 649 additions and 0 deletions
+193
View File
@@ -84,6 +84,10 @@ REQUIRED_FILES = [
".sot/03-PROTOCOLS/CTO-CASE-STAGE6-REPEATABILITY-REFRESH-PRD.md",
".sot/03-PROTOCOLS/CTO-CASE-STAGE6-REPEATABILITY-REFRESH-ISSUES.md",
".sot/03-PROTOCOLS/CTO-CASE-STAGE6-REPEATABILITY-REFRESH-EVIDENCE.md",
".sot/03-PROTOCOLS/CTO-CORE-PROMOTION-DECISION-PACKET-PRD.md",
".sot/03-PROTOCOLS/CTO-CORE-PROMOTION-DECISION-PACKET-ISSUES.md",
".sot/03-PROTOCOLS/CTO-CORE-PROMOTION-DECISION-RECORD.md",
".sot/03-PROTOCOLS/CTO-CORE-PROMOTION-DECISION-PACKET-CLOSEOUT.md",
".sot/03-PROTOCOLS/CTO-FIRST-REAL-GOVERNED-WORKFLOW-PRD.md",
".sot/03-PROTOCOLS/CTO-FIRST-REAL-GOVERNED-WORKFLOW-ISSUES.md",
".sot/03-PROTOCOLS/CTO-FIRST-REAL-GOVERNED-WORKFLOW-APPROVAL-PACKET.md",
@@ -1408,6 +1412,139 @@ REQUIRED_STAGE6_REPEATABILITY_REFRESH_EVIDENCE_PHRASES = [
"JP chat approval on 2026-06-01",
]
REQUIRED_CORE_PROMOTION_DECISION_PACKET_PRD_PHRASES = [
"Local planning SOT only. Not a Core Protocol. Not active Core authority.",
"Core Promotion Decision Packet",
"CTO-WORK-085",
"CTO-WORK-086",
"CTO-WORK-087",
"CTO-WORK-088",
"not_decided",
"core_promotion_requested",
"core_promotion_deferred",
"ready_for_core_review: true",
"candidate_default_repeatability_eligible: true",
"repeatability_count: 2",
"repeatability_status: pass",
"runtime_default_activation: false",
"core_promotion_status: not-promoted",
"recommended_next_decision: open_governed_core_prd_route",
"Core Sequence Protocol route required",
"Core validator coverage required",
"runtime default activation requires a separate governed Core route",
"No Harness aggregate is required for this slice",
"Do not promote CTO artifacts into Core.",
"Do not activate Case as default backend.",
"Do not mutate `../core/`.",
"No Core promotion occurs.",
"This closeout does not authorize another Case run.",
]
REQUIRED_CORE_PROMOTION_DECISION_PACKET_ISSUE_PHRASES = [
"Local planning SOT only. Not a Core Protocol. Not active Core authority.",
"Core Promotion Decision Packet",
"CTO-WORK-085",
"CTO-WORK-086",
"CTO-WORK-087",
"CTO-WORK-088",
"not_decided",
"core_promotion_requested",
"core_promotion_deferred",
"ready_for_core_review: true",
"candidate_default_repeatability_eligible: true",
"repeatability_count: 2",
"repeatability_status: pass",
"runtime_default_activation: false",
"core_promotion_status: not-promoted",
"recommended_next_decision: open_governed_core_prd_route",
"Core Sequence Protocol route required",
"Core validator coverage required",
"runtime default activation requires a separate governed Core route",
"validated child-local repeatability evidence; not Core promotion; not Runtime default activation",
"Runtime default activation remains false.",
"No Core promotion occurs.",
"Do not activate Case as default backend.",
"This closeout does not authorize another Case run.",
"python3 tools/validate_cto_child.py",
]
REQUIRED_CORE_PROMOTION_DECISION_RECORD_PHRASES = [
"Local planning SOT only. Not a Core Protocol. Not active Core authority.",
"Core Promotion Decision Packet",
"decision_status: core_promotion_requested",
"allowed_decision_states: `not_decided`, `core_promotion_requested`, `core_promotion_deferred`",
"resolver: JP or governed Core route",
"ready_for_core_review: true",
"recommended_next_decision: open_governed_core_prd_route",
"candidate_default_repeatability_eligible: true",
"repeatability_count: 2",
"repeatability_status: pass",
"runtime_default_activation: false",
"core_promotion_status: not-promoted",
"Core Sequence Protocol route required.",
"Core validator coverage required.",
"Core promotion, if chosen later, must happen only in `core/` or a governed Core worktree, not `cto/`.",
"No Core promotion occurs.",
"No Core mutation occurs.",
"Runtime default activation remains false.",
"Do not activate Case as default backend.",
"no target repository mutation attempted",
"no Case execution attempted",
"This closeout does not authorize another Case run.",
]
REQUIRED_CORE_PROMOTION_DECISION_PACKET_CLOSEOUT_PHRASES = [
"Local planning SOT only. Not a Core Protocol. Not active Core authority.",
"Core Promotion Decision Packet",
"CTO-WORK-085",
"CTO-WORK-086",
"CTO-WORK-087",
"CTO-WORK-088",
"validated child-local repeatability evidence; not Core promotion; not Runtime default activation",
"decision_status: core_promotion_requested",
"ready_for_core_review: true",
"recommended_next_decision: open_governed_core_prd_route",
"candidate_default_repeatability_eligible: true",
"repeatability_count: 2",
"repeatability_status: pass",
"runtime_default_activation: false",
"core_promotion_status: not-promoted",
"Runtime default activation remains false.",
"No Core promotion occurs.",
"No Core mutation occurs.",
"no target repository mutation attempted",
"no Case execution attempted",
"Do not activate Case as default backend.",
"This closeout does not authorize another Case run.",
"CTO-WORK-071",
"CTO-WORK-075",
"CTO-WORK-077",
"CTO-WORK-080",
"CTO-WORK-081",
"CTO-WORK-082",
"CTO-WORK-083",
"CTO-WORK-084",
"/home/svrnty/.hermes/profiles/cto-planb/harness-runs/20260602T104507Z-stage6-real-governed-refresh/stage6-real-governed-refresh-comparison.json",
"/home/svrnty/.hermes/profiles/cto-planb/harness-runs/20260602T104552Z-run-all-fake-2738738/webui-summary.json",
"7706f99",
"2fa1601",
"05ab2ff",
"40b0d9a",
"00d13f6",
"Cortex governs: proven",
"Harness proves: proven",
"Case executes only after proof: proven",
"candidate-default evidence: proven",
"Codex lane: blocked with rationale",
"Pi lane: blocked with rationale",
"Core Sequence Protocol",
"No Core PRD exists for CTO promotion.",
"No Core SOT Issue exists for CTO promotion.",
"No Core validator for CTO promotion exists.",
"No Core Evidence file exists for CTO promotion.",
"No Core Sequence Protocol route has selected CTO promotion as current work.",
]
def workboard_status(text: str, issue_id: str) -> str | None:
pattern = rf"- id: {re.escape(issue_id)}\n(?: .+\n)*? status: ([^\n]+)"
@@ -1956,6 +2093,46 @@ def main() -> int:
if phrase not in text:
errors.append(f"missing_stage6_repeatability_evidence_phrase:{phrase}")
core_promotion_decision_packet_prd = ROOT / ".sot/03-PROTOCOLS/CTO-CORE-PROMOTION-DECISION-PACKET-PRD.md"
if core_promotion_decision_packet_prd.is_file():
text = core_promotion_decision_packet_prd.read_text(encoding="utf-8")
if "core_promotion_status: not-promoted" not in text:
errors.append("core_promotion_decision_packet_prd_missing_not_promoted_frontmatter")
for phrase in REQUIRED_CORE_PROMOTION_DECISION_PACKET_PRD_PHRASES:
checked.append(f"core_promotion_decision_packet_prd_phrase:{phrase}")
if phrase not in text:
errors.append(f"missing_core_promotion_decision_packet_prd_phrase:{phrase}")
core_promotion_decision_packet_issues = ROOT / ".sot/03-PROTOCOLS/CTO-CORE-PROMOTION-DECISION-PACKET-ISSUES.md"
if core_promotion_decision_packet_issues.is_file():
text = core_promotion_decision_packet_issues.read_text(encoding="utf-8")
if "core_promotion_status: not-promoted" not in text:
errors.append("core_promotion_decision_packet_issues_missing_not_promoted_frontmatter")
for phrase in REQUIRED_CORE_PROMOTION_DECISION_PACKET_ISSUE_PHRASES:
checked.append(f"core_promotion_decision_packet_issue_phrase:{phrase}")
if phrase not in text:
errors.append(f"missing_core_promotion_decision_packet_issue_phrase:{phrase}")
core_promotion_decision_record = ROOT / ".sot/03-PROTOCOLS/CTO-CORE-PROMOTION-DECISION-RECORD.md"
if core_promotion_decision_record.is_file():
text = core_promotion_decision_record.read_text(encoding="utf-8")
if "core_promotion_status: not-promoted" not in text:
errors.append("core_promotion_decision_record_missing_not_promoted_frontmatter")
for phrase in REQUIRED_CORE_PROMOTION_DECISION_RECORD_PHRASES:
checked.append(f"core_promotion_decision_record_phrase:{phrase}")
if phrase not in text:
errors.append(f"missing_core_promotion_decision_record_phrase:{phrase}")
core_promotion_decision_packet_closeout = ROOT / ".sot/03-PROTOCOLS/CTO-CORE-PROMOTION-DECISION-PACKET-CLOSEOUT.md"
if core_promotion_decision_packet_closeout.is_file():
text = core_promotion_decision_packet_closeout.read_text(encoding="utf-8")
if "core_promotion_status: not-promoted" not in text:
errors.append("core_promotion_decision_packet_closeout_missing_not_promoted_frontmatter")
for phrase in REQUIRED_CORE_PROMOTION_DECISION_PACKET_CLOSEOUT_PHRASES:
checked.append(f"core_promotion_decision_packet_closeout_phrase:{phrase}")
if phrase not in text:
errors.append(f"missing_core_promotion_decision_packet_closeout_phrase:{phrase}")
prd = ROOT / ".sot/03-PROTOCOLS/CTO-CASE-CANDIDATE-BACKEND-PRD.md"
if prd.is_file():
text = prd.read_text(encoding="utf-8")
@@ -2489,6 +2666,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 ["CTO-WORK-085", "CTO-WORK-086", "CTO-WORK-087", "CTO-WORK-088"]:
checked.append(f"workboard_id:{issue_id}")
if issue_id not in text:
errors.append(f"missing_workboard_id:{issue_id}")
expected_statuses = {
"CTO-WORK-001": "validated",
"CTO-WORK-002": "validated",
@@ -2571,6 +2752,10 @@ def main() -> int:
"CTO-WORK-082": "validated",
"CTO-WORK-083": "validated",
"CTO-WORK-084": "validated",
"CTO-WORK-085": "validated",
"CTO-WORK-086": "validated",
"CTO-WORK-087": "validated",
"CTO-WORK-088": "validated",
}
for issue_id, expected in expected_statuses.items():
checked.append(f"workboard_status:{issue_id}:{expected}")
@@ -2649,6 +2834,14 @@ def main() -> int:
errors.append("workboard_missing_qwen_local_admission_json_source")
if "CTO-CASE-SPARK-ENDPOINT-CONFIG-ISSUES.md" not in text:
errors.append("workboard_missing_spark_endpoint_config_issues_source")
if "CTO-CORE-PROMOTION-DECISION-PACKET-PRD.md" not in text:
errors.append("workboard_missing_core_promotion_decision_packet_prd_source")
if "CTO-CORE-PROMOTION-DECISION-PACKET-ISSUES.md" not in text:
errors.append("workboard_missing_core_promotion_decision_packet_issues_source")
if "CTO-CORE-PROMOTION-DECISION-RECORD.md" not in text:
errors.append("workboard_missing_core_promotion_decision_record_source")
if "CTO-CORE-PROMOTION-DECISION-PACKET-CLOSEOUT.md" not in text:
errors.append("workboard_missing_core_promotion_decision_packet_closeout_source")
payload = {
"ok": not errors,