Reject Svrnty Vision generated cache residue
This commit is contained in:
@@ -3,11 +3,19 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
sys.dont_write_bytecode = True
|
||||
|
||||
GENERATED_ARTIFACT_DIRS = [
|
||||
"src/svrnty_vision/__pycache__",
|
||||
"tools/__pycache__",
|
||||
".pytest_cache",
|
||||
]
|
||||
REQUIRED = [
|
||||
"AGENTS.md",
|
||||
"INDEX.md",
|
||||
@@ -81,6 +89,7 @@ def main() -> int:
|
||||
],
|
||||
"CONTEXT.md": ["Visual Perception Package Candidate", "Research Handoff"],
|
||||
"docs/VISION-PACKAGE-CANDIDATE.md": ["Research reads sources; Vision sees media", "wildcard grant"],
|
||||
"docs/LEGACY-INGEST.md": ["Generated Cache Custody", "svrnty-vision-python-cache-preserved-141800"],
|
||||
"outputs/2026-06-12-svrnty-vision-workboard-readiness-reconciliation.md": [
|
||||
"No Core promotion",
|
||||
"Seed consumption",
|
||||
@@ -99,9 +108,12 @@ def main() -> int:
|
||||
if not path.exists():
|
||||
errors.append(f"missing:{rel}")
|
||||
continue
|
||||
env = os.environ.copy()
|
||||
env["PYTHONDONTWRITEBYTECODE"] = "1"
|
||||
completed = subprocess.run(
|
||||
[sys.executable, str(path)],
|
||||
cwd=ROOT,
|
||||
env=env,
|
||||
text=True,
|
||||
capture_output=True,
|
||||
check=False,
|
||||
@@ -109,6 +121,9 @@ def main() -> int:
|
||||
validator_outputs[rel] = completed.stdout.strip()
|
||||
if completed.returncode != 0:
|
||||
errors.append(f"validator_failed:{rel}:{completed.stderr.strip()}")
|
||||
for rel in GENERATED_ARTIFACT_DIRS:
|
||||
if (ROOT / rel).exists():
|
||||
errors.append(f"generated_artifact_residue:{rel}")
|
||||
result = {
|
||||
"ok": not errors,
|
||||
"validator": "svrnty-vision-child-v1",
|
||||
|
||||
Reference in New Issue
Block a user