From 6ad6f08cc6655fd09ed50c05ce91102bf642978c Mon Sep 17 00:00:00 2001 From: Godopu Date: Sun, 6 Sep 2026 17:21:12 +0900 Subject: [PATCH] docs(issue-5): fold in the two non-blocking residuals from cross-review round 2 Both reviewers passed and each left one documentation item. Grok: the benchmark's fork table still named the shell path `-m lib_py.delegation.cli`, which is what R1 replaced. It now names the actual bootstrap, and says why the module-execution form was abandoned. The fork count is unchanged either way. Claude (O-4): inside a freeze tree, _delegate_py_bin walks up from its own location for a .venv and finds none, so it falls back to a system python that has no paho. Harmless in phase 1, because nothing in production calls the frozen lib.sh helpers; it becomes real in phase 3 when the loop process starts doing exactly that. Recorded on P3-02 rather than fixed here, since the fix belongs with the code that will depend on it. Verified the premise: the current freeze root has no .venv. No code changed. The unanimous PASS was issued on 95f3e9a. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01UrDNJkHmm18uu7n7JwV5Qd --- docs/contracts/issue-5/phase1-benchmark.md | 4 +++- docs/contracts/issue-5/task.md | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/contracts/issue-5/phase1-benchmark.md b/docs/contracts/issue-5/phase1-benchmark.md index dc1735b..7abff3f 100644 --- a/docs/contracts/issue-5/phase1-benchmark.md +++ b/docs/contracts/issue-5/phase1-benchmark.md @@ -66,8 +66,10 @@ Rev.1 계획 job의 `started` 이벤트는 payload timestamp 05:58:49Z에서 모 | 구현 | fork | |---|---:| | 레거시 (`_delegate_publish_event_legacy`) | 3 (`$(_delegate_py_bin)`, `$(_delegate_script)`, python) | -| 신규 (`-m lib_py.delegation.cli`) | 3 (`$(_delegate_py_bin)`, `$(_delegate_script)`, python) | +| 신규 (`_delegation_py` → `python -c` + `sys.path.insert(0, SKILL_DIR)`) | 3 (`$(_delegate_py_bin)`, `$(_delegate_script)`, python) | +> 신규 경로는 `-m`이 아니라 `_delegation_py`의 명시 부트스트랩이다(교차 리뷰 R1 대응: `-m`은 cwd가 `PYTHONPATH`보다 우선하므로 freeze 보장이 성립하지 않았다). fork 수는 그와 무관하게 동일하다. +> > 계획서 D8은 신규 경로가 2 fork일 것으로 예상했으나, **실제 구현은 3 fork로 동일하다.** `_delegate_script publish_event.py` 조회를 유지했기 때문이다. > > **이 조회가 실제로 보장하는 것 (교차 리뷰 `cc3468cb` 정정)**: 초기 서술은 이 조회가 "비치명 계약(C-02)을 만드는 유일한 지점"이라고 했으나 부정확하다. rc 0 자체는 `delegate_publish_event`의 `|| true`만으로도 보장되고, C-02도 rc만 단정한다. 조회가 보장하는 것은 **위임 스크립트 트리가 없을 때 인터프리터를 아예 띄우지 않아 stderr에 트레이스백을 남기지 않는다는 정숙성과, 레거시 본체와의 동작 동일성**이다(인터프리터 미호출 단정은 C-01에 있다). 유지 결정 자체는 세 리뷰어 전원이 지지했으며, fork 절감은 Phase 4에서 이 계약과 함께 재검토한다. diff --git a/docs/contracts/issue-5/task.md b/docs/contracts/issue-5/task.md index 2a52276..ba153b0 100644 --- a/docs/contracts/issue-5/task.md +++ b/docs/contracts/issue-5/task.md @@ -91,6 +91,7 @@ ## Phase 3: `run_loop.sh` Thin Wrapper 전환 및 전면 회귀 (후속) - [ ] **P3-01** planner/reviewer/rebuttal/promotion 및 strict 판정/예산/중재/합의 테스트. - [ ] **P3-02** thin wrapper 인자·interpreter·cwd·signal·guard·child cleanup 호환 검증. + - *인계 (교차 리뷰 `25609c81` O-4)*: freeze 사본의 `lib.sh`에서 `_delegate_py_bin`은 `AGENT_PYTHON_BIN`/`VIRTUAL_ENV`가 없으면 **자기 위치에서 상향 탐색**하는데, freeze 디렉터리 아래에는 `.venv`가 없어 paho가 없는 시스템 `python3`로 떨어진다. Phase 1에서는 freeze `lib.sh`의 위임 헬퍼를 호출하는 프로덕션 경로가 없어 무해하나, **Phase 3에서 루프 프로세스가 freeze `lib.sh`의 헬퍼를 직접 호출하기 시작하면** 인터프리터 해석을 `WORKSPACE_ROOT`(또는 `MAM_REAL_ROOT`) 기준으로 앵커링해야 한다. - [ ] **P3-03** 전체 suite+신규 race/restart/lifecycle, writer 단일성, rollback checkpoint 인계 검증. ---