From 452d88d5613bbb04ddbc1a5232a01e0aa822d5bf Mon Sep 17 00:00:00 2001 From: Hyungi Ahn Date: Sat, 2 May 2026 23:53:28 +0000 Subject: [PATCH] =?UTF-8?q?docs(eval):=20Phase=202=20=EA=B2=BD=EB=A1=9C=20?= =?UTF-8?q?=EC=A0=95=EC=B1=85=20=EC=A0=95=EC=A0=95=20=E2=80=94=202-B=20/ap?= =?UTF-8?q?p/logs=20vs=202-C=20/app/scripts=20canonical?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plan/README 가 /app/scripts 를 통일 경로로 가정했으나 실측 결과 read-only bind-mount 라 docker cp 불가. soft lock 으로 --build 도 금지. 단계별로 다른 경로 사용해야 함: - 2-B canary (pre-merge): /app/logs/phase2_backfill.py + /app/logs/*.csv (docker cp worktree → /app/logs rw bind-mount). canary 검증 동안 미검증 코드 main 진입 회피. - 2-C nightly (post-merge canonical): /app/scripts/phase2_backfill.py + /app/evals/markdown/phase2_* (feat/phase2-backfill main 머지 + parent git pull 후 bind-mount 자동 활성). cron 도 canonical path. evals/markdown/README.md 의 enqueue 예제 + 신규 #### 경로 정책 섹션 반영. --- evals/markdown/README.md | 36 +++++++++++++++++++++++++++++++----- 1 file changed, 31 insertions(+), 5 deletions(-) diff --git a/evals/markdown/README.md b/evals/markdown/README.md index 47eb305..26baa3a 100644 --- a/evals/markdown/README.md +++ b/evals/markdown/README.md @@ -165,15 +165,41 @@ docker exec hyungi_document_server-fastapi-1 python /app/scripts/phase2_backfill - inventory 의 `forecast_skip_reason='none'` 만 선정 후보. - 시드 고정 → 재실행 시 동일 sample. +### 경로 정책 (2-B canary vs 2-C nightly) + +`/app/scripts/` 와 `/app/evals/` 는 parent repo (`~/Documents/code/hyungi_Document_Server`, branch=main) 의 read-only bind-mount. `docker cp ... :/app/scripts/...` 는 read-only 위반으로 실패. `docker compose --build` 은 검색 실험 soft lock 위반. → 단계별로 다른 경로 사용: + +| 단계 | script 경로 | sample CSV 경로 | 메커니즘 | +|---|---|---|---| +| **2-B canary (pre-merge)** | `/app/logs/phase2_backfill.py` | `/app/logs/phase2_canary_sample.csv` | `docker cp` worktree → /app/logs (rw bind-mount) | +| **2-C nightly (post-merge canonical)** | `/app/scripts/phase2_backfill.py` | `/app/evals/markdown/phase2_*` | feat/phase2-backfill main 머지 + parent `git pull` 후 bind-mount 자동 활성 | + +**2-B 임시 sync** (canary 실행 직전 1회): +```bash +docker cp ~/Documents/code/hyungi_Document_Server_phase2/scripts/phase2_backfill.py \ + hyungi_document_server-fastapi-1:/app/logs/phase2_backfill.py +docker cp ~/Documents/code/hyungi_Document_Server_phase2/evals/markdown/phase2_canary_sample.csv \ + hyungi_document_server-fastapi-1:/app/logs/phase2_canary_sample.csv +``` + +**2-C 진입 시점** (canary GO 결정 후): +```bash +cd ~/Documents/code/hyungi_Document_Server_phase2 && git push origin feat/phase2-backfill +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 단계 없음). + ### enqueue (one-shot, 사용자 승인 게이트) ```bash -# dry-run (default) -docker exec hyungi_document_server-fastapi-1 python /app/scripts/phase2_backfill.py enqueue \ - --csv /app/evals/markdown/phase2_canary_sample.csv +# dry-run (default) — 2-B 단계 = /app/logs 임시 경로 (위 §"경로 정책" 참조) +docker exec hyungi_document_server-fastapi-1 python /app/logs/phase2_backfill.py enqueue \ + --csv /app/logs/phase2_canary_sample.csv # actual (사용자 승인 후) -docker exec hyungi_document_server-fastapi-1 python /app/scripts/phase2_backfill.py enqueue \ - --csv /app/evals/markdown/phase2_canary_sample.csv --no-dry-run +docker exec hyungi_document_server-fastapi-1 python /app/logs/phase2_backfill.py enqueue \ + --csv /app/logs/phase2_canary_sample.csv --no-dry-run ``` - marker-service `/ready` 사전 검증. - `enqueue_stage` idempotent — 중복 호출 안전.