diff --git a/.claude/agents/verify-api.md b/.claude/agents/verify-api.md index 8b1d5faa..704e1c83 100644 --- a/.claude/agents/verify-api.md +++ b/.claude/agents/verify-api.md @@ -18,9 +18,9 @@ Gradle·Docker는 desktop에서만 돈다. 절차의 정본은 `docs/work/operat 1. desktop에 따로 worktree를 만든다. 기존 checkout `~/workspace/clean-architecture-backend-template`의 브랜치와 `stash@{0}`는 건드리지 않는다. 2. 로그 폴더 `~/<작업 이름>-logs/`를 만들고 `uptime`으로 부하를 본다. -3. worktree 루트에서 `flock /tmp/claude-gates/heavy.lock scripts/bootstrap-local.sh > ~/<작업 이름>-logs/bootstrap.log 2>&1; echo "rc=$?"`를 돌린다. 스크립트가 컴파일 → DB 기동 → 앱 기동 → health 200과 `status=UP`을 차례로 본다. +3. worktree 루트에서 `scripts/verify.sh app --on here > ~/<작업 이름>-logs/bootstrap.log 2>&1; echo "rc=$?"`를 돌린다. `verify.sh`가 공유 잠금을 잡고 Gradle daemon을 끈 채 `scripts/bootstrap-local.sh`를 부른다. 스크립트가 컴파일 → DB 기동 → 앱 기동 → health 200과 `status=UP`을 차례로 본다. 4. 앱이 떠 있는 동안 받은 endpoint를 `curl --silent --show-error --max-time 5 --write-out '\n%{http_code}'`로 부르고 응답을 로그 폴더에 남긴다. -5. 저장소 루트에서 `docker compose --profile '*' down`으로 내린다. 컨테이너가 만든 root 소유 폴더가 남으면 4.1절의 정리법을 따른 뒤 worktree를 지운다. +5. 저장소 루트에서 `docker compose --profile '*' down`으로 내리고 `git worktree remove`로 worktree를 지운다. 지우지 못하면 「남은 것」에 적는다. ## 돌려줄 것 diff --git a/scripts/tests/test_claude_setup.py b/scripts/tests/test_claude_setup.py index e06afa9e..961087a7 100644 --- a/scripts/tests/test_claude_setup.py +++ b/scripts/tests/test_claude_setup.py @@ -140,9 +140,13 @@ class SubagentTest(unittest.TestCase): def test_verify_api_runs_the_app_on_the_desktop_under_the_shared_lock(self) -> None: text = (AGENTS / "verify-api.md").read_text(encoding="utf-8") - for fragment in ("docs/work/operate.md", "flock /tmp/claude-gates/heavy.lock", "scripts/bootstrap-local.sh", - "stash@{0}", "down"): + # verify.sh takes the shared lock and turns the Gradle daemon off; a bare flock around the bootstrap script + # left a daemon behind on the desktop, and the cleanup it pointed at was in no manual. + for fragment in ("docs/work/operate.md", "scripts/verify.sh app --on here", "scripts/bootstrap-local.sh", + "stash@{0}", "down", "git worktree remove"): self.assertIn(fragment, text) + self.assertNotIn("heavy.lock scripts/bootstrap-local.sh", text) + self.assertNotIn("정리법", text) class SkillTest(unittest.TestCase):