From c1b22d88334b4df7db9bf57d389e05f9902fc4c6 Mon Sep 17 00:00:00 2001 From: Hyungi Ahn Date: Sun, 3 May 2026 02:46:22 +0000 Subject: [PATCH] =?UTF-8?q?docs(eval):=20Phase=202=20path=20fix=20?= =?UTF-8?q?=E2=80=94=20log=5Ftsv/post-report=20=EB=8A=94=20/app/logs=20(bi?= =?UTF-8?q?nd-mount),=20/app/evals=20=EB=8A=94=20=EB=AF=B8=EB=A7=88?= =?UTF-8?q?=EC=9A=B4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit cron dry-run 검증 중 발견: - /app/scripts/ 는 bind-mount 활성 (Phase 2 main FF 후 컨테이너 가시화 ✓) - /app/evals/ 는 fastapi 이미지에도 없고 compose 마운트도 없음 - 이전 README/plan 의 --log-tsv /app/evals/markdown/... 은 컨테이너 writable layer 에 쓰여 재기동 시 유실되는 문제 해결: nightly --log-tsv 와 post-report --output-* 는 /app/logs/ 사용 (rw bind-mount → host ~/Documents/code/hyungi_Document_Server/logs/ 영구). 주 1회 git commit 시 logs/ → evals/markdown/ 로 cp 후 add. post-report 도 동일 패턴. --- evals/markdown/README.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/evals/markdown/README.md b/evals/markdown/README.md index 26baa3a..8c8c791 100644 --- a/evals/markdown/README.md +++ b/evals/markdown/README.md @@ -189,7 +189,10 @@ cd ~/Documents/code/hyungi_Document_Server && git fetch origin \ && git merge --ff-only origin/feat/phase2-backfill && git push origin main ``` -이유: 미검증 코드를 main 에 미리 박지 않음 / canary 결과 따라 worktree 에서 hot-fix 가능 / nightly cron 은 canonical path 만 사용 (cp 단계 없음). +이유: 미검증 코드를 main 에 미리 박지 않음 / canary 결과 따라 worktree 에서 hot-fix 가능 / nightly cron 은 canonical path 사용 (script 자체). + +**추가 (2026-05-03)**: nightly cron 의 `--log-tsv` 와 post-report 출력은 `/app/logs/` 사용 (위 표의 canonical path 가 아님). `/app/evals/markdown/` 는 fastapi 컨테이너에 **bind-mount 되어 있지 않아** 컨테이너 writable layer 에 쓰면 컨테이너 재기동 시 유실. `/app/logs/` 는 rw bind-mount → host `~/Documents/code/hyungi_Document_Server/logs/` 에 영구 저장. 주 1회 commit 시 `cp ~/Documents/code/hyungi_Document_Server/logs/phase2_nightly_log.tsv evals/markdown/` 로 복사 후 git add. + ### enqueue (one-shot, 사용자 승인 게이트) ```bash @@ -208,7 +211,7 @@ docker exec hyungi_document_server-fastapi-1 python /app/logs/phase2_backfill.py ```bash docker exec hyungi_document_server-fastapi-1 python /app/scripts/phase2_backfill.py nightly-enqueue \ --limit 50 --max-active-queue 5 \ - --log-tsv /app/evals/markdown/phase2_nightly_log.tsv + --log-tsv /app/logs/phase2_nightly_log.tsv # /app/evals/ 미 bind-mount, /app/logs/ rw 사용 ``` - 가드 순서: disable flag (`/tmp/phase2_disable`) → marker /ready → active_queue ≤ threshold → DB pool 비어있지 않음 → enqueue. - 매 sweep log_tsv 한 줄. abort_reason ∈ {disable_flag / marker_unhealthy / active_queue_threshold / pool_empty / empty}. @@ -217,8 +220,8 @@ docker exec hyungi_document_server-fastapi-1 python /app/scripts/phase2_backfill ### post-report ```bash docker exec hyungi_document_server-fastapi-1 python /app/scripts/phase2_backfill.py post-report \ - --output-csv /app/evals/markdown/phase2_post_report.csv \ - --output-md /app/evals/markdown/phase2_post_report.md \ + --output-csv /app/logs/phase2_post_report.csv \ + --output-md /app/logs/phase2_post_report.md \ --phase2-start 2026-05-03T00:00:00Z ``` - `--phase2-start` ISO timestamp 이후 `md_generated_at` 만 집계 (Phase 2 코드 push 시점 권장).