fix(tests): 원장 회귀가 프로젝트 이름을 적지 않게 한다
verify-pipeline.py 의 FORBIDDEN_LITERAL 가드가 scripts/ 안에서 저장소 체크아웃 이름을 금지한다. B-005 의 회귀가 그 이름으로 실제 원장을 찾다가 PIPELINE CONTRACT 를 FAIL 로 만들었다. glob 으로 아무 원장이나 고르게 바꿨고 시험의 뜻은 그대로다 — 더한 칸이 있어도 검사기가 읽는가. 병합에서 드러난 계약 충돌이라 통합 브랜치에서 조정한다. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GksxvQvM6A85xy8viYtWk6
This commit is contained in:
co-authored by
Claude Opus 5
parent
fdb38e9012
commit
230ad874ca
@@ -4,6 +4,7 @@
|
||||
`startedAt` 부터 지금까지를 누적에 더한다. 여기서는 그것이 `runs/` 쪽에서도 성립하는지 본다.
|
||||
"""
|
||||
import importlib.util
|
||||
import glob
|
||||
import json
|
||||
import os
|
||||
import subprocess
|
||||
@@ -187,14 +188,18 @@ class LedgerTest(unittest.TestCase):
|
||||
# ── 옛 원장을 깨지 않는다 ─────────────────────────────────────────
|
||||
def test_the_added_fields_do_not_break_the_verifier(self):
|
||||
"""이 도구가 더한 칸이 있어도 검사기가 그대로 읽어야 한다."""
|
||||
real = os.path.join(ROOT, "runs/document-haness/2026-09-10-1033/run.json")
|
||||
if not os.path.exists(real):
|
||||
# 프로젝트 이름을 적지 않는다 — verify-pipeline.py 의 FORBIDDEN_LITERAL 가드가
|
||||
# scripts/ 안에서 저장소 체크아웃 이름을 금지한다. 아무 실제 원장이나 하나 고른다
|
||||
found = sorted(glob.glob(os.path.join(ROOT, "runs", "*", "*", "run.json")))
|
||||
if not found:
|
||||
self.skipTest("견줄 실제 원장이 없다")
|
||||
real = found[-1]
|
||||
d = json.load(open(real, encoding="utf-8"))
|
||||
d.update({"revision": 1, "riders": [], "sessions": [], "updatedAt": "x"})
|
||||
for st in d["stages"]:
|
||||
st.update({"startedAt": None, "finishedAt": None, "elapsedSeconds": 0})
|
||||
out = os.path.join(self.dir, "runs", "document-haness", "2026-09-10-1033")
|
||||
out = os.path.join(self.dir, "runs", os.path.basename(os.path.dirname(os.path.dirname(real))),
|
||||
os.path.basename(os.path.dirname(real)))
|
||||
os.makedirs(out, exist_ok=True)
|
||||
copy = os.path.join(out, "run.json")
|
||||
json.dump(d, open(copy, "w", encoding="utf-8"), ensure_ascii=False, indent=2)
|
||||
|
||||
Reference in New Issue
Block a user