릴리스 DAG와 실현 성과 게이트 연결

This commit is contained in:
2026-06-18 01:48:17 +09:00
parent fee8131d5d
commit d7f9d3a944
7 changed files with 365 additions and 14 deletions
+36
View File
@@ -3,9 +3,12 @@ from __future__ import annotations
import argparse
import json
import zipfile
from functools import lru_cache
from datetime import datetime, timezone
from pathlib import Path
import yaml
from tools.orchestration_harness_v1 import run_plan
from src.quant_engine.pipeline_runtime_anomaly_lib_v1 import finalize_runtime_profile, runtime_profile_from_steps
@@ -86,6 +89,8 @@ TEMP_KEEP_FILES = {
"canonical_artifact_resolver_v1.json",
"final_execution_decision_v2.json",
"prediction_accuracy_harness_v2.json",
"realized_performance_v1.json",
"validate_realized_performance_v1.json",
"single_truth_ledger_v2.json",
"smart_cash_recovery_v7.json",
"smart_cash_recovery_v9.json",
@@ -107,6 +112,35 @@ UPLOAD_KEEP_DIRS_UPLOAD = {
}
@lru_cache(maxsize=1)
def _active_manifest_refs() -> set[str]:
manifest_path = ROOT / "runtime" / "active_artifact_manifest.yaml"
if not manifest_path.exists():
return set()
try:
manifest = yaml.safe_load(manifest_path.read_text(encoding="utf-8")) or {}
except Exception:
return set()
refs: set[str] = set()
if isinstance(manifest, dict):
canonical = manifest.get("canonical_source")
if isinstance(canonical, str) and canonical.strip():
refs.add(Path(canonical).as_posix())
aliases = manifest.get("active_aliases")
if isinstance(aliases, dict):
for val in aliases.values():
if isinstance(val, str) and val.strip():
refs.add(Path(val).as_posix())
rows = manifest.get("manifest_rows")
if isinstance(rows, list):
for row in rows:
if isinstance(row, dict):
active_artifact = row.get("active_artifact")
if isinstance(active_artifact, str) and active_artifact.strip():
refs.add(Path(active_artifact).as_posix())
return refs
def _load_json(path: Path) -> dict:
if not path.exists():
return {}
@@ -151,6 +185,8 @@ def should_include(path: Path, mode: str, include_xlsx: bool, include_backups: b
return False
if path.name == DEFAULT_OUTPUT.name:
return False
if mode == "upload" and rel.as_posix() in _active_manifest_refs():
return True
if parts[0] == "Temp":
if path.name in TEMP_EXCLUDED_FILES:
return False