Record Stage 5 target custody preflight
This commit is contained in:
@@ -17,6 +17,7 @@ REQUIRED_FILES = [
|
||||
"CONTEXT.md",
|
||||
"docs/LEGACY-INGEST.md",
|
||||
"docs/STAGE5-TARGET-SANDBOX-STALE-CASE-STATE.md",
|
||||
"docs/STAGE5-TARGET-SANDBOX-CUSTODY-PREFLIGHT.md",
|
||||
".sot/00-START/CTO-WORKSPACE-INTENT.md",
|
||||
".sot/03-PROTOCOLS/CTO-CASE-BACKEND-BRIEF.md",
|
||||
".sot/03-PROTOCOLS/CTO-ARCHITECTURE-BRIEF-CLOSEOUT-PRD.md",
|
||||
@@ -882,6 +883,7 @@ REQUIRED_STAGE5_TARGET_ADMISSION_TEMPLATE_PHRASES = [
|
||||
|
||||
REQUIRED_STAGE5_TARGET_ADMISSION_JSON = {
|
||||
"admission_status": "admitted",
|
||||
"admission_lifecycle": "historical-proof-target",
|
||||
"target_repository_path": "/home/svrnty/workspaces/cortex-os/cto-stage5-target-sandbox",
|
||||
"repository_owner": "jp",
|
||||
"ownership_evidence": "JP chat approval on 2026-06-01 to create this dedicated Stage 5 target sandbox under /home/svrnty/workspaces/cortex-os.",
|
||||
@@ -890,6 +892,10 @@ REQUIRED_STAGE5_TARGET_ADMISSION_JSON = {
|
||||
"approval_source": "JP chat approval on 2026-06-01",
|
||||
"approval_timestamp": "2026-06-01",
|
||||
"operator_outcome_required": True,
|
||||
"future_execution_authorized": False,
|
||||
"future_execution_requires_new_admission": True,
|
||||
"root_path_dependency": "historical-reference-only",
|
||||
"custody_preflight_record": "docs/STAGE5-TARGET-SANDBOX-CUSTODY-PREFLIGHT.md",
|
||||
}
|
||||
|
||||
REQUIRED_STAGE5_TARGET_FORBIDDEN_ACTIONS = [
|
||||
@@ -920,6 +926,24 @@ REQUIRED_STAGE5_TARGET_STALE_STATE_PHRASES = [
|
||||
"No hard delete, Core mutation, Harness rerun, Case rerun, provider",
|
||||
]
|
||||
|
||||
REQUIRED_STAGE5_TARGET_CUSTODY_PREFLIGHT_PHRASES = [
|
||||
"Local planning evidence only. Not Core authority. Not Runtime authority.",
|
||||
"Source: CTO-WORK-099.",
|
||||
"Status: custody-preflight-complete.",
|
||||
"Original target path remains historical proof context only",
|
||||
"/home/svrnty/workspaces/cortex-os/cto-stage5-target-sandbox",
|
||||
"Do not move the target sandbox in this slice.",
|
||||
"`admission_lifecycle`: `historical-proof-target`",
|
||||
"`future_execution_authorized`: `false`",
|
||||
"`future_execution_requires_new_admission`: `true`",
|
||||
"`root_path_dependency`: `historical-reference-only`",
|
||||
"Any future Stage 5 execution requires a new admission record",
|
||||
"Physical relocation remains a separate host-aware custody gate.",
|
||||
"preserve the target sandbox outside the umbrella with a manifest",
|
||||
"prove root absence or record any MacBook sync rehydration",
|
||||
"No target source mutation, Case rerun, Harness rerun, provider call",
|
||||
]
|
||||
|
||||
REQUIRED_PROVIDER_ADMISSION_PRD_PHRASES = [
|
||||
"Local planning SOT only. Not a Core Protocol. Not active Core authority.",
|
||||
"https://github.com/workos/case.git",
|
||||
@@ -2689,6 +2713,14 @@ def main() -> int:
|
||||
if phrase not in text:
|
||||
errors.append(f"missing_stage5_target_stale_state_phrase:{phrase}")
|
||||
|
||||
stage5_target_custody_preflight = ROOT / "docs/STAGE5-TARGET-SANDBOX-CUSTODY-PREFLIGHT.md"
|
||||
if stage5_target_custody_preflight.is_file():
|
||||
text = stage5_target_custody_preflight.read_text(encoding="utf-8")
|
||||
for phrase in REQUIRED_STAGE5_TARGET_CUSTODY_PREFLIGHT_PHRASES:
|
||||
checked.append(f"stage5_target_custody_preflight_phrase:{phrase}")
|
||||
if phrase not in text:
|
||||
errors.append(f"missing_stage5_target_custody_preflight_phrase:{phrase}")
|
||||
|
||||
stage6_prd = ROOT / ".sot/03-PROTOCOLS/CTO-CASE-STAGE6-CANDIDATE-DEFAULT-PRD.md"
|
||||
if stage6_prd.is_file():
|
||||
text = stage6_prd.read_text(encoding="utf-8")
|
||||
@@ -3023,7 +3055,7 @@ 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-098"]:
|
||||
for issue_id in ["CTO-WORK-098", "CTO-WORK-099"]:
|
||||
checked.append(f"workboard_id:{issue_id}")
|
||||
if issue_id not in text:
|
||||
errors.append(f"missing_workboard_id:{issue_id}")
|
||||
@@ -3123,6 +3155,7 @@ def main() -> int:
|
||||
"CTO-WORK-096": "validated",
|
||||
"CTO-WORK-097": "validated",
|
||||
"CTO-WORK-098": "validated",
|
||||
"CTO-WORK-099": "validated",
|
||||
}
|
||||
for issue_id, expected in expected_statuses.items():
|
||||
checked.append(f"workboard_status:{issue_id}:{expected}")
|
||||
@@ -3227,6 +3260,8 @@ def main() -> int:
|
||||
errors.append("workboard_missing_legacy_ingest_source")
|
||||
if "docs/STAGE5-TARGET-SANDBOX-STALE-CASE-STATE.md" not in text:
|
||||
errors.append("workboard_missing_stage5_target_stale_state_source")
|
||||
if "docs/STAGE5-TARGET-SANDBOX-CUSTODY-PREFLIGHT.md" not in text:
|
||||
errors.append("workboard_missing_stage5_target_custody_preflight_source")
|
||||
|
||||
payload = {
|
||||
"ok": not errors,
|
||||
|
||||
Reference in New Issue
Block a user