af1236202d
- F14: late_chase_risk_score 검증 * GAS가 유일한 생산처 (Python canonical 없음) * migration_action: KEEP_IN_GAS로 정정, status: DONE - F02/F03/F04/F06: priceBasis 로직 포팅 * formulas/price_basis_v1.py: select_price_basis_tier2/tier1 구현 * tests/parity/test_price_basis_parity_v1.py: 8 parity 테스트 (모두 PASS) * GAS Number.isFinite() 의미론 정확히 재현 (math.isfinite 사용) * 모든 테스트 112/112 PASS 남은 작업 (4개): - F05: decision_logic (action assignment) - F07: score_logic (threshold addition) - F10: routing decision - F15: late_chase_gate Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
62 lines
1.7 KiB
Python
62 lines
1.7 KiB
Python
#!/usr/bin/env python3
|
|
from __future__ import annotations
|
|
|
|
import json
|
|
from pathlib import Path
|
|
|
|
ROOT = Path(__file__).resolve().parents[1]
|
|
|
|
REQUIRED_PATTERNS = {
|
|
".gitea/workflows/kis_data_collection.yml": [
|
|
"vars.KIS_APP_KEY_TEST",
|
|
"vars.KIS_APP_SECRET_TEST",
|
|
"vars.KIS_APP_KEY",
|
|
"vars.KIS_APP_SECRET",
|
|
],
|
|
".gitea/workflows/qualitative_sell_strategy.yml": [
|
|
"vars.KIS_APP_KEY_TEST",
|
|
"vars.KIS_APP_SECRET_TEST",
|
|
"vars.KIS_APP_KEY",
|
|
"vars.KIS_APP_SECRET",
|
|
],
|
|
".gitea/workflows/ci.yml": [
|
|
"vars.KIS_APP_KEY_TEST",
|
|
"vars.KIS_APP_SECRET_TEST",
|
|
],
|
|
}
|
|
|
|
|
|
def main() -> int:
|
|
errors: list[str] = []
|
|
evidence: dict[str, dict[str, bool]] = {}
|
|
|
|
for rel, patterns in REQUIRED_PATTERNS.items():
|
|
path = ROOT / rel
|
|
text = path.read_text(encoding="utf-8") if path.exists() else ""
|
|
file_evidence: dict[str, bool] = {}
|
|
if not path.exists():
|
|
errors.append(f"missing:{rel}")
|
|
evidence[rel] = file_evidence
|
|
continue
|
|
for pattern in patterns:
|
|
found = pattern in text
|
|
file_evidence[pattern] = found
|
|
if not found:
|
|
errors.append(f"{rel}:{pattern}")
|
|
evidence[rel] = file_evidence
|
|
|
|
result = {
|
|
"formula_id": "GITEA_SECRETS_CONTRACT_V1",
|
|
"gate": "PASS" if not errors else "FAIL",
|
|
"evidence": evidence,
|
|
"errors": errors,
|
|
}
|
|
out = ROOT / "Temp" / "gitea_secrets_contract_v1.json"
|
|
out.write_text(json.dumps(result, ensure_ascii=False, indent=2), 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())
|