KIT: 이슈별 검사 파일 checks/ — 여러 하이쿠 동시 작업 준비

이슈마다 검사를 checks/ 의 파일 하나로 두어, 여러 이슈를 다른 폴더(git worktree)에서
동시에 해도 check.sh 가 충돌하지 않게 함. 코치가 저장소 밖 사본에서 통과·실패·
오류 파일·부분 검사·두 브랜치 합치기를 시험함.

check.sh 마지막 줄: 결과: PASS 153 / FAIL 0 / SKIP 3 (검사 범위 F01~F47)

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
오문성andClaude Haiku 5.5 committed 2026-10-30 13:39:08 +09:00
1 parent 3308c2759b
commit 4d21c3bb08
3 files changed
+27 -2

No files matched your search

+22 -1
View File
@@ -1,7 +1,8 @@
#!/usr/bin/env bash
# check.sh — drawing3d-web 합격 판정 (설계 단계에서 작성, 하이쿠는 수정 금지)
# 사용: bash check.sh → 전체 기능 검사
# bash check.sh F06 → F01~F06 만 검사, 뒤 기능은 SKIP
# bash check.sh F06 → F01~F06 만 검사, 뒤 기능·이슈 검사는 SKIP
# 이슈 검사: checks/i<번호>_<이름>.py 를 번호 순으로 모아 돌린다 (F01~F47 은 1차 검사)
# 판정: FAIL 이 0 이면 종료 코드 0
cd "$(dirname "$0")" || exit 2
python3 - "$@" <<'PY'
@@ -1093,6 +1094,26 @@ report("F47", bool(trk47) and not gone47, "FEATURES.json·PROGRESS.md 없음 —
cl47 = read("CLAUDE.md") or ""
report("F47", "Gitea 이슈" in cl47 and "그 이슈만" in cl47 and "(#이슈번호)" in cl47, "CLAUDE.md 에 이슈 규칙(작업 목록은 이슈·그 이슈만 읽기·커밋에 #번호)")
# ---- 이슈별 검사: checks/i<번호>_<이름>.py (이슈 #N 의 완료 기준) ----
# 이슈마다 파일 하나라 여러 이슈를 동시에 해도 check.sh 는 바뀌지 않는다.
# 검사 파일은 위의 값(MODEL·html·viewer·read·near 등)을 쓰고 check(ok, 메시지) 로 판정한다.
def issue_no(p):
m = re.match(r"i(\d+)_", os.path.basename(p))
return int(m.group(1)) if m else 10 ** 6
ichecks = sorted(glob.glob("checks/i*.py"), key=lambda p: (issue_no(p), p))
for cp in ichecks:
def check(ok, msg, cid=(f"#{issue_no(cp)}" if issue_no(cp) < 10 ** 6 else os.path.basename(cp))):
tag = "SKIP" if LIMIT < len(ORDER) - 1 else ("PASS" if ok else "FAIL")
count[tag] += 1
print(f"[{tag}] {cid} {msg}")
g = dict(globals())
g["check"] = check
try:
exec(compile(read(cp) or "", cp, "exec"), g)
except (Exception, SystemExit) as e:
check(False, f"{cp} 실행 오류: {type(e).__name__}: {e}")
print(f"이슈 검사 파일 {len(ichecks)}개" + (f": {', '.join(os.path.basename(p) for p in ichecks)}" if ichecks else ""))
print(f"결과: PASS {count['PASS']} / FAIL {count['FAIL']} / SKIP {count['SKIP']} (검사 범위 F01~{upto})")
sys.exit(0 if count["FAIL"] == 0 else 1)
PY