Files
multi-agent-mux/.agents/reports/planner-reviewer-codex-01/report-8db89564.md
T
GodopuandClaude Opus 5.5 121eab71d4 release(v4.9.3): u1e no longer writes the checkout's .mam/shim/herdr - archive the review reports and bump the lockstep version
Review loop (--review-only, --all-reviewer): round 1 (@3a30d7d) 4/4 PASS;
each reviewer reproduced W1 failing on the pre-fix tree. Seven #50/#55 and
leak modules (112 tests) from a clean worktree left no .mam in the
checkout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VCgu9Fa9iT7TbJUSzdq4Ff
2026-10-13 12:33:02 +09:00

55 lines
5.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 테스트 격리 수정 리뷰 — 8db89564
판정: PASS. u1e의 체크아웃 쓰기 원인을 정확히 수정했고, 추가된 W1 노드가 그 수정의 제거를 실제로 검출합니다. 차단할 결함은 발견하지 못했습니다.
## Identity 및 변경 범위
- loop: `loop-20261013T025803Z-c69408`
- base: `42e2a7ea9bd3e2770ed8626d789193428ca3aa8b`
- head: `3a30d7da894cdac26b7ec054b4e66fe9fa3dc8db`
- tree: `bd43e4642f0109091f5f497b2703dcbaf8e2616b`
- 검증 경로: `/var/folders/q_/68sxgw3j073dgjg8wl9s08vw0000gn/T/mam-review/loop-20261013T025803Z-c69408/1`
- 변경은 테스트 두 파일뿐입니다. 시작과 종료 시 HEAD/tree 일치 및 clean 상태를 확인했고, 종료 시 리뷰 체크아웃에 `.mam`이 없음을 확인했습니다. 리뷰 트리나 creator 작업 트리를 수정하지 않았습니다.
## 원인과 수정 검토
`tests/test_issue50_dispatch.py:169–170`은 래퍼 subprocess에 `WORKSPACE_ROOT=str(tmp_path)`를 명시하여 상속된 루트와 체크아웃 기본값을 모두 덮어씁니다.
원인은 `.agents/skills/lib.sh:26`이 변수 미설정 시 라이브러리 위치에서 체크아웃 루트를 계산하고, 3168행에서 `_init_herdr_isolation`을 무조건 호출하기 때문입니다. 이 함수의 150–157행은 `$WORKSPACE_ROOT/.mam/shim`을 만들고 shim 파일을 씁니다. 래퍼 `.agents/skills/multi-agent-mux-delegate-job/multi-agent-mux-delegate-job:53`은 dry-run 처리를 하기 전에 이 라이브러리를 source합니다. 따라서 기존의 임시 HOME/cwd 설정만으로는 격리가 되지 않으며, 이번 명시적 루트 설정이 필요한 최소 수정입니다.
u1e의 원래 검증(미전달 dry-run 레코드는 admission을 막지 않고, running 또는 일반 pending 레코드는 막음)은 175–186행에 그대로 남아 있습니다. 새 환경 설정이 테스트를 우회하거나 assertion을 약화하지 않습니다.
`tests/test_issue17_workspace_root_isolation.py:43`의 노드 추가는 적절합니다. W1은 복사본의 루트를 의도적으로 상속시키고(62행), 내부 테스트가 모두 실행·통과했는지 검사한 뒤(67–69행), 복사본 `.mam`의 생성 자체를 확인합니다(70–72행). 이 때문에 u1e가 환경을 다시 덮어쓰지 않으면 회귀를 잡습니다.
## 실행 검증
아티팩트 루트: `/tmp/review-8db89564-gw9g__7l`
1. **수정된 리뷰 트리: 51 passed, 68.05초, 종료 코드 0.**
- 대상: `tests/test_issue50_dispatch.py` 전체와 `tests/test_issue17_workspace_root_isolation.py` 전체(W1/W2 포함).
- 로그: `/tmp/review-8db89564-gw9g__7l/positive.log`.
- W1 내부 노드 실행의 통과·누수 부재 검사도 통과했습니다.
2. **수정 제거 대조군: W1이 기대한 위치에서 실패, 30.06초, pytest 종료 코드 1.**
- 현재 HEAD의 추적 파일을 임시 체크아웃으로 복사했습니다. 새 W1 NODES는 유지하고, `tests/test_issue50_dispatch.py`만 base 버전으로 교체했습니다.
- W1의 내부 테스트 실행 및 통과 수 검사를 지난 뒤, 71행에서 `tests wrote into the checkout they ran in: ['.mam/shim', '.mam/shim/herdr']`로 실패했습니다.
- 이는 단순 실행 오류가 아니라 원래 누수에 대한 회귀 검출입니다.
- 로그: `/tmp/review-8db89564-gw9g__7l/negative.log`.
- 수정 전 코드와 누수가 생긴 중첩 복사본을 포함한 negative 임시 트리는 검증 뒤 삭제했습니다.
3. **`git diff --check 42e2a7e..HEAD`: 성공.**
두 실행은 요구된 `env -u HERDR_SOCKET_PATH -u HERDR_PANE_ID -u HERDR_TAB_ID -u HERDR_WORKSPACE_ID -u HERDR_SESSION_NAME -u HERDR_SESSION -u WORKSPACE_ROOT -u MAM_ENV_FILE`을 적용했습니다. 외부 가상환경 Python, `PYTHONDONTWRITEBYTECODE=1`, `-p no:cacheprovider` 및 리뷰 트리 밖 basetemp를 사용했습니다. 시작 환경의 HOME/XDG_CONFIG_HOME도 임시 경로로 설정하고 에이전트·제어 평면 관련 상속 변수를 제거했습니다. 실제 서버나 에이전트를 실행하지 않았으며, #55의 다른 에이전트 대화 파일 관련 오탐도 발생하지 않았습니다.
## 유사 경로 점검 및 한계
래퍼 실행 및 `source lib.sh` 검색 결과의 주요 테스트 헬퍼를 추가로 검토했습니다. 살펴본 경로에서는 동일한 누락을 발견하지 못했습니다.
- `test_issue18_liveness_contract.py:54–60`, `test_issue14_delivery_ack.py:32–36`, `test_issue33_budget.py:42–47`, `test_issue34_job_tree.py:50–64`, `test_issue36_prompt_transport.py:47–61`, `test_issue26_envfile.py:73–76`, `test_issue26_ints.py:127–129`: 명시적으로 임시 WORKSPACE_ROOT 설정.
- `test_issue17_item4_decisions.py:225–233`, 689–699: 래퍼 source/submit 환경에서 임시 루트를 고정.
- `test_issue6_fail_closed.py:21–23`, `test_version_consistency.py:11–13`, `test_b19_headless_reconcile_fixes.py:11–13`, `test_b8_send_keys_verification.py:5–7`: 모듈의 `own_workspace_root` 픽스처 사용.
- `test_issue21_worktree_prereqs.py`의 `_dry_submit` 호출부 92–149행은 루트를 전달하며, legacy loop 테스트 398–408행은 샌드박스 루트를 명시합니다.
- `test_issue20_state_isolation.py:192–202`, `test_workspace_scope.py:30–32`, `test_layout.py:318`: 호출 환경에서 루트 지정. `test_a4_adapter_contract.py`의 `test_wait_for_tui_ready_missing_tokens_diagnostic` 및 `test_issue5_phase1_delegation.py`의 `_run_helper`는 샌드박스 픽스처·복사본을 사용합니다.
전체 테스트 스위트를 실행하거나 모든 동적 호출 경로의 무누수를 증명한 것은 아닙니다. 이번 수정에 직접 관련된 51건 및 W1의 수정 제거 검증으로 동작과 회귀 방지 효과를 확인했습니다.
[VERDICT: PASS]