데이터 게이트 진척도 검증 체인 추가
This commit is contained in:
@@ -375,6 +375,7 @@ MDD = (peak_total_asset - current_total_asset) / peak_total_asset × 100
|
||||
| **공식 ID** | `ALPHA_FEEDBACK_LOOP_V2` (lifecycle: DATA_GATED) |
|
||||
| **활성화 조건** | live_t20_count ≥ 30 건 (~2026-07-15 예상) |
|
||||
| **담당 파일** | `tools/build_operational_t20_outcome_ledger_v1.py` |
|
||||
| **진척 아티팩트** | `Temp/data_gated_progress_v1.json` |
|
||||
| **현재 상태** | 스키마 완성, 데이터 0건 |
|
||||
|
||||
**성공 하네스 (데이터 기준)**:
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
"build-alpha-feedback-loop": "python tools/build_alpha_feedback_loop_v2.py",
|
||||
"build-operational-alpha-calibration": "python tools/build_operational_alpha_calibration_v2.py",
|
||||
"build-sector-flow-history-progress": "python tools/build_sector_flow_history_progress_v1.py",
|
||||
"validate-data-gated-progress": "python tools/validate_data_gated_progress_v1.py",
|
||||
"build-realized-performance": "python tools/build_realized_performance_v1.py",
|
||||
"validate-completion-harness": "python tools/validate_completion_harness_instructions_v1.py",
|
||||
"validate-prediction-accuracy-harness": "python tools/validate_prediction_accuracy_harness_v2.py",
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"formula_id": "AUDIT_REPOSITORY_ENTROPY_V2",
|
||||
"gate": "PASS",
|
||||
"total_file_count": 1894,
|
||||
"package_script_count": 31,
|
||||
"temp_json_count": 193,
|
||||
"total_file_count": 1896,
|
||||
"package_script_count": 32,
|
||||
"temp_json_count": 194,
|
||||
"budget": {
|
||||
"schema_version": "repository_entropy_budget.v1",
|
||||
"max_total_files": 2200,
|
||||
@@ -15,5 +15,5 @@
|
||||
"keep package scripts within release envelope"
|
||||
]
|
||||
},
|
||||
"source_zip_sha256": "ce6afd425a6dbabb4bc4876703080a9dd639077ed52a8bca9ffa39452982c309"
|
||||
"source_zip_sha256": "3ac3719981890d601de8d49a0d43fdb6a88c0b95d5503d7e2a6e5df4d35eb18c"
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
schema_version: release_dag.v3
|
||||
step_count: 98
|
||||
step_count: 99
|
||||
goal: Linearize package.json scripts into a validated DAG execution graph.
|
||||
execution_order:
|
||||
# 토폴로지 정렬 기준 병렬 실행 wave (의존성 없는 노드들을 동시에 실행 가능)
|
||||
@@ -90,6 +90,7 @@ execution_order:
|
||||
- build_honest_proof_gap_analyzer
|
||||
- build_operational_alpha_calibration
|
||||
- build_prediction_accuracy_harness
|
||||
- validate_data_gated_progress
|
||||
- validate_sector_flow_history_progress
|
||||
- validate_json_generator_outputs
|
||||
- validate_alpha_feedback_loop
|
||||
@@ -159,6 +160,18 @@ dag:
|
||||
artifact_policy: "keep"
|
||||
note: "DATA_GATED 항목별 실측 진척도 — non-blocking diagnostic"
|
||||
|
||||
validate_data_gated_progress:
|
||||
id: validate_data_gated_progress
|
||||
command: ["python", "tools/validate_data_gated_progress_v1.py"]
|
||||
inputs: ["tools/validate_data_gated_progress_v1.py", "Temp/data_gated_progress_v1.json"]
|
||||
outputs: ["Temp/validate_data_gated_progress_v1.json"]
|
||||
depends_on: ["build_data_gated_progress"]
|
||||
timeout_sec: 30
|
||||
cache_key: "validate_data_gated_progress_v1"
|
||||
strict: true
|
||||
artifact_policy: "keep"
|
||||
note: "WBS-4.x DATA_GATED 진척도 계약 검증"
|
||||
|
||||
build_sector_flow_history_progress:
|
||||
id: build_sector_flow_history_progress
|
||||
command: ["python", "tools/build_sector_flow_history_progress_v1.py"]
|
||||
@@ -1314,7 +1327,7 @@ dag:
|
||||
command: ["python", "tools/prepare_upload_zip.py", "--skip-validate", "--skip-convert", "--validation-mode", "package-only"]
|
||||
inputs: ["tools/prepare_upload_zip.py"]
|
||||
outputs: []
|
||||
depends_on: ["audit_entropy", "validate_specs", "validate_active_manifest", "validate_report_sync", "validate_report_numeric_consistency", "validate_field_dict", "validate_provenance", "validate_low_capability", "validate_golden_coverage", "validate_calibration", "validate_schema_model", "validate_gas_adapter", "validate_agents_shrink", "validate_no_replay_live_mix", "validate_prediction_accuracy_harness", "validate_alpha_feedback_loop", "validate_operational_alpha_calibration", "validate_realized_performance", "validate_sector_flow_history_progress", "validate_runtime_source_whitelist", "validate_cash_ledger", "validate_factor_lifecycle", "validate_factor_lifecycle_completeness", "validate_metric_alias_collision", "validate_architecture_boundaries", "validate_module_io_coverage", "validate_artifact_chain_hash", "validate_artifact_sync", "validate_renderer_no_calc", "validate_packaged_refs", "validate_property_invariants", "validate_anti_late_entry", "validate_rule_lifecycle", "validate_change_requests", "validate_completion_harness_instructions", "validate_engine_health_card", "validate_llm_regression", "validate_llm_copy_only", "build_final_decision", "build_final_context", "build_provenance_ledger", "build_live_replay_separation", "build_late_chase_attribution", "build_profit_giveback_ratchet", "build_shadow_ledger", "build_operating_cadence_signal", "build_engine_health_card", "build_module_io_coverage", "build_artifact_chain_hash", "build_report", "build_bundle", "build_schema_models", "build_architecture_boundaries", "validate_decision_trace", "validate_factor_conflicts", "validate_no_lookahead", "validate_execution_sim", "validate_render_diff", "build_shadow_promotion", "validate_llm_determinism", "build_time_stop_forecast", "validate_live_activation", "build_rebalance_sheet", "build_prediction_accuracy_harness", "build_alpha_feedback_loop", "build_operational_alpha_calibration", "build_sector_flow_history_progress"]
|
||||
depends_on: ["audit_entropy", "validate_specs", "validate_active_manifest", "validate_report_sync", "validate_report_numeric_consistency", "validate_field_dict", "validate_provenance", "validate_low_capability", "validate_golden_coverage", "validate_calibration", "validate_schema_model", "validate_gas_adapter", "validate_agents_shrink", "validate_no_replay_live_mix", "validate_prediction_accuracy_harness", "validate_alpha_feedback_loop", "validate_operational_alpha_calibration", "validate_realized_performance", "validate_data_gated_progress", "validate_sector_flow_history_progress", "validate_runtime_source_whitelist", "validate_cash_ledger", "validate_factor_lifecycle", "validate_factor_lifecycle_completeness", "validate_metric_alias_collision", "validate_architecture_boundaries", "validate_module_io_coverage", "validate_artifact_chain_hash", "validate_artifact_sync", "validate_renderer_no_calc", "validate_packaged_refs", "validate_property_invariants", "validate_anti_late_entry", "validate_rule_lifecycle", "validate_change_requests", "validate_completion_harness_instructions", "validate_engine_health_card", "validate_llm_regression", "validate_llm_copy_only", "build_final_decision", "build_final_context", "build_provenance_ledger", "build_live_replay_separation", "build_late_chase_attribution", "build_profit_giveback_ratchet", "build_shadow_ledger", "build_operating_cadence_signal", "build_engine_health_card", "build_module_io_coverage", "build_artifact_chain_hash", "build_report", "build_bundle", "build_schema_models", "build_architecture_boundaries", "validate_decision_trace", "validate_factor_conflicts", "validate_no_lookahead", "validate_execution_sim", "validate_render_diff", "build_shadow_promotion", "validate_llm_determinism", "build_time_stop_forecast", "validate_live_activation", "build_rebalance_sheet", "build_prediction_accuracy_harness", "build_alpha_feedback_loop", "build_operational_alpha_calibration", "build_sector_flow_history_progress"]
|
||||
timeout_sec: 60
|
||||
cache_key: "prepare_zip_v1"
|
||||
strict: true
|
||||
|
||||
@@ -96,6 +96,8 @@ TEMP_KEEP_FILES = {
|
||||
"validate_operational_alpha_calibration_v2.json",
|
||||
"sector_flow_history_progress_v1.json",
|
||||
"validate_sector_flow_history_progress_v1.json",
|
||||
"data_gated_progress_v1.json",
|
||||
"validate_data_gated_progress_v1.json",
|
||||
"realized_performance_v1.json",
|
||||
"validate_realized_performance_v1.json",
|
||||
"single_truth_ledger_v2.json",
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
"""validate_data_gated_progress_v1.py — DATA_GATED_PROGRESS_VALIDATE_V1
|
||||
|
||||
Temp/data_gated_progress_v1.json의 기본 계약을 검증한다.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
import json
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
DEFAULT_INPUT = ROOT / "Temp" / "data_gated_progress_v1.json"
|
||||
DEFAULT_OUT = ROOT / "Temp" / "validate_data_gated_progress_v1.json"
|
||||
FORMULA_ID = "DATA_GATED_PROGRESS_VALIDATE_V1"
|
||||
|
||||
|
||||
def _load(path: Path) -> Any:
|
||||
if not path.exists():
|
||||
return {}
|
||||
try:
|
||||
return json.loads(path.read_text(encoding="utf-8"))
|
||||
except Exception:
|
||||
return {}
|
||||
|
||||
|
||||
def main() -> int:
|
||||
ap = argparse.ArgumentParser()
|
||||
ap.add_argument("--input", default=str(DEFAULT_INPUT))
|
||||
ap.add_argument("--out", default=str(DEFAULT_OUT))
|
||||
args = ap.parse_args()
|
||||
|
||||
input_path = Path(args.input)
|
||||
input_path = input_path if input_path.is_absolute() else ROOT / input_path
|
||||
out_path = Path(args.out)
|
||||
out_path = out_path if out_path.is_absolute() else ROOT / out_path
|
||||
|
||||
payload = _load(input_path)
|
||||
errors: list[str] = []
|
||||
|
||||
if not isinstance(payload, dict) or not payload:
|
||||
errors.append("payload must be object")
|
||||
else:
|
||||
if payload.get("formula_id") != "DATA_GATED_PROGRESS_V1":
|
||||
errors.append("formula_id mismatch")
|
||||
if payload.get("gate") not in {"PASS", "IN_PROGRESS"}:
|
||||
errors.append(f"gate={payload.get('gate')}")
|
||||
for key in ["as_of", "done_count", "total_count", "items"]:
|
||||
if key not in payload:
|
||||
errors.append(f"missing field: {key}")
|
||||
|
||||
done_count = payload.get("done_count")
|
||||
total_count = payload.get("total_count")
|
||||
items = payload.get("items")
|
||||
|
||||
if isinstance(done_count, int) and isinstance(total_count, int):
|
||||
if done_count < 0:
|
||||
errors.append("done_count < 0")
|
||||
if total_count <= 0:
|
||||
errors.append("total_count <= 0")
|
||||
if done_count > total_count:
|
||||
errors.append("done_count > total_count")
|
||||
|
||||
if isinstance(items, list):
|
||||
if not items:
|
||||
errors.append("items empty")
|
||||
for idx, item in enumerate(items):
|
||||
if not isinstance(item, dict):
|
||||
errors.append(f"item[{idx}] not object")
|
||||
continue
|
||||
for key in ["id", "label", "status", "source"]:
|
||||
if key not in item:
|
||||
errors.append(f"item[{idx}] missing {key}")
|
||||
if item.get("status") not in {"DONE", "IN_PROGRESS", "DATA_GATED", "PASS", "FAIL", "USER_ACTION_REQUIRED"}:
|
||||
errors.append(f"item[{idx}].status={item.get('status')}")
|
||||
|
||||
result = {
|
||||
"formula_id": FORMULA_ID,
|
||||
"gate": "PASS" if not errors else "FAIL",
|
||||
"checked_file": str(input_path.as_posix()),
|
||||
"errors": errors,
|
||||
}
|
||||
out_path.write_text(json.dumps(result, ensure_ascii=False, indent=2) + "\n", encoding="utf-8")
|
||||
print(json.dumps(result, ensure_ascii=False, indent=2))
|
||||
return 0 if not errors else 1
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
Reference in New Issue
Block a user