Reject CTO generated cache residue

This commit is contained in:
Svrnty
2026-06-18 13:52:34 -04:00
parent fd313768a5
commit 077227c8ab
2 changed files with 32 additions and 0 deletions
+13
View File
@@ -73,6 +73,19 @@ Decision: keep the intention with caution.
The useful idea is explicit provider admission and metadata-only retention hygiene. Do not copy secrets, raw transcripts, or provider runtime behavior into CTO. Archive and deletion remain approval-gated.
### Generated Cache Custody
Reference cluster:
- ignored `tools/__pycache__/` observed on `2026-06-18`
- `/home/svrnty/workspaces/cortex-os-retired/2026-06-18/cto-python-cache-preserved-135154/MANIFEST.md`
Decision: archive-only custody.
The useful idea is none; this is generated Python bytecode residue. Keep the
manifest reference only. Do not treat cache files as CTO source, evidence,
backend state, target-repo state, provider state, or historical intention.
### Stage 5 Target Sandbox
Reference cluster:
+19
View File
@@ -5,10 +5,17 @@ from __future__ import annotations
import json
import re
import sys
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
sys.dont_write_bytecode = True
GENERATED_ARTIFACT_DIRS = [
"tools/__pycache__",
".pytest_cache",
]
REQUIRED_FILES = [
"AGENTS.md",
@@ -180,6 +187,7 @@ REQUIRED_LEGACY_INGEST_PHRASES = [
"Source Clusters Assessed By Intention",
"Do not activate Case as default backend.",
"Do not mutate target repositories.",
"Generated Cache Custody",
]
REQUIRED_ARCHITECTURE_CLOSEOUT_PRD_PHRASES = [
@@ -1903,6 +1911,15 @@ def workboard_status(text: str, issue_id: str) -> str | None:
return match.group(1).strip() if match else None
def validate_no_generated_artifact_residue(checked: list[str]) -> list[str]:
errors: list[str] = []
for relpath in GENERATED_ARTIFACT_DIRS:
checked.append(f"generated_artifact_absent:{relpath}")
if (ROOT / relpath).exists():
errors.append(f"generated_artifact_residue:{relpath}")
return errors
def main() -> int:
checked: list[str] = []
errors: list[str] = []
@@ -1945,6 +1962,8 @@ def main() -> int:
if phrase not in text:
errors.append(f"missing_legacy_ingest_phrase:{phrase}")
errors.extend(validate_no_generated_artifact_residue(checked))
brief = ROOT / ".sot/03-PROTOCOLS/CTO-CASE-BACKEND-BRIEF.md"
if brief.is_file():
text = brief.read_text(encoding="utf-8")