From d34b532ccf7fc1c78e377f7336200c28a2df4e23 Mon Sep 17 00:00:00 2001 From: Godopu Date: Mon, 14 Sep 2026 21:53:51 +0900 Subject: [PATCH] release(v4.6.0): bump framework and eight skills to 4.6.0 in lockstep; archive PR #22 merge-side reviews Issue #21 phase-1 prerequisites (PR #22) add loop runner options and the control-plane module: MINOR. VERSIONS.md gains the v4.6.0 entry, the archived design reviews lose their markdown trailing whitespace so `git diff --check` is clean, and the three merge-side PASS reports (claude, agy, codex @ 4a81d15) are archived under .agents/reports/. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01VCgu9Fa9iT7TbJUSzdq4Ff --- .../report-2b62056b.md | 191 ++++++++++++++++++ .../report-fa5cfb00.md | 51 +++++ .../reviewer-agy-01/report-de72b12e.md | 130 ++++++++++++ .agents/skills/lib.sh | 2 +- .agents/skills/lib_py/loop/eager.py | 2 +- .../skills/multi-agent-mux-create/SKILL.md | 2 +- .../multi-agent-mux-delegate-job/SKILL.md | 2 +- .agents/skills/multi-agent-mux-loop/SKILL.md | 2 +- .../skills/multi-agent-mux-monitor/SKILL.md | 2 +- .../multi-agent-mux-orc-onboard/SKILL.md | 2 +- .../skills/multi-agent-mux-resume/SKILL.md | 2 +- .../skills/multi-agent-mux-status/SKILL.md | 2 +- .agents/skills/multi-agent-mux-stop/SKILL.md | 2 +- .venv | 1 + BOOTSTRAP.ko.md | 2 +- BOOTSTRAP.md | 2 +- MESSAGING.md | 2 +- README.ko.md | 2 +- README.md | 2 +- VERSIONS.md | 35 +++- docs/design/reviews/review-agy-fd384d6b.md | 26 +-- 21 files changed, 426 insertions(+), 38 deletions(-) create mode 100644 .agents/reports/planner-reviewer-claude-01/report-2b62056b.md create mode 100644 .agents/reports/planner-reviewer-codex-01/report-fa5cfb00.md create mode 100644 .agents/reports/reviewer-agy-01/report-de72b12e.md create mode 120000 .venv diff --git a/.agents/reports/planner-reviewer-claude-01/report-2b62056b.md b/.agents/reports/planner-reviewer-claude-01/report-2b62056b.md new file mode 100644 index 0000000..b56d489 --- /dev/null +++ b/.agents/reports/planner-reviewer-claude-01/report-2b62056b.md @@ -0,0 +1,191 @@ +# ๐Ÿ” PR Review โ€” Job 2b62056b (PR #22 `feat/issue-21-worktree-prereqs` @ `4a81d15`, base `main` `5611859`) + +- **Reviewer**: `planner-reviewer-claude-01` (role: planner,reviewer) ยท 2026-09-14 +- **๋Œ€์ƒ**: + - ์›ŒํฌํŠธ๋ฆฌ `multi-agent-mux-wt/pr-22`(detached `4a81d15`) + - `git log 5611859..HEAD` 9์ปค๋ฐ‹, `git diff 5611859...HEAD` 19ํŒŒ์ผ +1905/โˆ’78 + - ์„ค๊ณ„ ์ปค๋ฐ‹ `fe96db1`ยท`dcf2fab` ๊ณผ ๊ตฌํ˜„ยท๊ต์ • ์ปค๋ฐ‹ 7๊ฐœ(`d3d3a76` โ†’ `4a81d15`) +- **๋ฐฉ๋ฒ•**: + - ์›ŒํฌํŠธ๋ฆฌ diff ๋ฅผ ์ •๋…ํ•˜๊ณ  ์ด์Šˆ #21ยทPR ๋ณธ๋ฌธ๊ณผ ๋Œ€์กฐํ–ˆ๋‹ค. + - ์ž„์‹œ ๋””๋ ‰ํ„ฐ๋ฆฌ์—์„œ ์‹คํ—˜ 1๊ฑด์„ ํ–ˆ๋‹ค(๊ณต๋ฐฑ ๊ฒฝ๋กœ ๋ช…๋ น ์‹คํ–‰). + - ์›ŒํฌํŠธ๋ฆฌ์—์„œ **์ „์ฒด ์Šค์œ„ํŠธ**๋ฅผ ์ฝ๊ธฐ ์ „์šฉ ์กฐ๊ฑด(`PYTHONDONTWRITEBYTECODE=1 -p no:cacheprovider`)์œผ๋กœ ์‹คํ–‰ํ–ˆ๋‹ค. ์‹คํŒจ๋Š” base(๋ณธ ์ฒดํฌ์•„์›ƒ `5611859`)์—์„œ ๊ฐ™์€ ์‹œํ—˜์œผ๋กœ ๋Œ€์กฐํ–ˆ๋‹ค. + - ์ฝ”๋“œ๋Š” ์ˆ˜์ •ํ•˜์ง€ ์•Š์•˜๋‹ค. +- **์•ˆ์ „ ๊ทœ์น™ ์ค€์ˆ˜**: + - ๋ณธ ์ฒดํฌ์•„์›ƒ์€ `main` `5611859` ๋ฅผ ์œ ์ง€ํ–ˆ๋‹ค(checkoutยทswitchยทmerge ์—†์Œ). ์›ŒํฌํŠธ๋ฆฌ์˜ ์ถ”์  ํŒŒ์ผ์€ ๋ฐ”๊พธ์ง€ ์•Š์•˜๋‹ค(HEADยท`git status` ์ „ํ›„ ๋™์ผ). ๋‹ค๋งŒ ์Šค์œ„ํŠธ ์‹คํ–‰ ์ค‘ ์ผ๋ถ€ ์‹œํ—˜์ด ๋ฌด์‹œ ๋Œ€์ƒ `.mam/`(`delegate_job_logs`ยท`shim`)์„ ์›ŒํฌํŠธ๋ฆฌ์— ๋งŒ๋“ค์—ˆ๋‹ค. ๊ธฐ์กด #20 ์œ„์ƒ ๋ฌธ์ œ์ด๋ฉฐ ยง7 ์— ์ ์—ˆ๋‹ค. + - ์‹ค์ œ `.mam`ยทmonitor ๋ฐ๋ชฌยท์—์ด์ „ํŠธ ์„ธ์…˜์€ ์กฐ์ž‘ํ•˜์ง€ ์•Š์•˜๋‹ค. pushยทmergeยท์ด์Šˆ/PR ์ƒํƒœ ๋ณ€๊ฒฝ๋„ ์—†์—ˆ๋‹ค. + +## 0. ์š”์•ฝ + +| # | ํ•ญ๋ชฉ | ํŒ์ • | +|---|---|---| +| (1) | ๋ž˜ํผ ์ ˆ๋Œ€๊ฒฝ๋กœํ™” | โœ… ๊ณต๋ฐฑ ๊ฒฝ๋กœยท๋‹ค๋ฅธ cwd ์—์„œ๋„ ๋™์ž‘ํ•œ๋‹ค(์‹คํ—˜ E1) | +| (2) | ๋ฃจํ”„ ๋Ÿฌ๋„ˆ `--worktree`/`--base`/`--review-only` | โœ… ์†Œ์Šค ๋ฃจํŠธ์™€ ์ œ์–ด ๋ฃจํŠธ๊ฐ€ ์ •ํ™•ํžˆ ๋‚˜๋‰œ๋‹ค. ๋นˆ ๋ณ€๊ฒฝ๋ถ„ ๊ฐ€๋“œ๋Š” diff ์ˆ˜์ง‘๊ณผ ๊ฐ™์€ ์ •์˜๋ผ ๋ฌธ์„œ๋งŒ ๋ฐ”๋€ ๊ฒฝ์šฐ๋ฅผ ์˜คํƒํ•˜์ง€ ์•Š๋Š”๋‹ค | +| (3) | `control_plane.py` ์™€ create/resume/stop/status/reconcile | โœ… ๋ฐ”์ธ๋”ฉ ์—†๋Š” ๊ธฐ์กด ํ–‰๊ณผ ๊ธฐ๋ณธ ์›Œํฌ์ŠคํŽ˜์ด์Šค๋Š” ๋™์ž‘์ด ๋ฐ”๋€Œ์ง€ ์•Š๋Š”๋‹ค(ํ•˜์œ„ ํ˜ธํ™˜) | +| (4) | `lib.sh`ยทshim ๊ณ„์•ฝ ์‹œํ—˜ | โœ… `_sks_*`ยท`send_keys_safe` ๋ฅผ ๊ฑด๋“œ๋ฆฌ์ง€ ์•Š์•˜๋‹ค. h25 ๋Š” ์˜คํžˆ๋ ค ๊ฐ•ํ™”๋˜์—ˆ๋‹ค | +| (5) | ์„ค๊ณ„ ๋ฌธ์„œ ์ •์ • | โœ… codex NOT PASS ์‚ฌ์œ  4๊ฐ€์ง€๋ฅผ ๋ฐ˜์˜ํ–ˆ๋‹ค. ๋น„์ฐจ๋‹จ ๋ณด๊ฐ• 1๊ฑด | +| (6) | ์‹ ๊ทœ ์‹œํ—˜ ๊ฒฐ์ •์„ฑยท๊ฒฉ๋ฆฌ | โœ… tmp/sandbox ๋งŒ ์“ฐ๊ณ  ๋ธŒ๋กœ์ปค๊ฐ€ ํ•„์š” ์—†๋‹ค. ์œ„์ƒ ๋น„์ฐจ๋‹จ 1๊ฑด | +| (7) | ์Šค์œ„ํŠธ ๊ฒฐ๊ณผ๋กœ ํšŒ๊ท€ ํ™•์ธ | โœ…(๋น„์ฐจ๋‹จ) 937 passed / 4 failed. 4๊ฑด ๋ชจ๋‘ ๊ธฐ์กด T-1 ์‹œ๊ฐ„ ์ž„๊ณ„(๊ณต๊ฐœ ๋ธŒ๋กœ์ปค) ์‹œํ—˜์ด๊ณ , base ์—์„œ๋„ ๊ฐ™์€ ๋ถ€๋ฅ˜๊ฐ€ ์‹คํŒจํ•œ๋‹ค. PR ํšŒ๊ท€ ์—†์Œ | +| (8) | #21 ํ•ญ๋ชฉ ์™„๋ฃŒยท๋ฒ”์œ„ | โœ… 1ยท2ยท3ยท6 ์™„๋ฃŒ, 4ยท5ยท7ยท8 ์€ ํƒ€๋‹นํ•˜๊ฒŒ ์ œ์™ธ๋๋‹ค. ํ›„์† ๊ถŒ๊ณ  2๊ฑด ์ถ”๊ฐ€ | +| (9) | ์•Œ๋ ค์ง„ ๋ฏธ๋น„ (a)(b) ์™ธ ์ฐจ๋‹จ ๊ฒฐํ•จ | ์—†์Œ. (a)(b)๋Š” ํ™•์ธํ–ˆ๋‹ค(ยง9). ๋‚˜๋จธ์ง€๋Š” ๋น„์ฐจ๋‹จ ๊ถŒ๊ณ ๋ฟ์ด๋‹ค | + +## 1. (1) ๋ž˜ํผ ์ ˆ๋Œ€๊ฒฝ๋กœํ™” (`d3d3a76`) + +- **๋ ˆ์ง€์ŠคํŠธ๋ฆฌ**: + - `REGISTRY_DIR_DEFAULT="${MAM_JOBS_DIR:-.mam/jobs}"` ๋กœ ์ด์ œ `MAM_JOBS_DIR` ์„ ์กด์ค‘ํ•œ๋‹ค. + - `cmd_submit` ์€ `cd "$WORKDIR"` ์งํ›„ `_abs_registry_dir` ๋กœ `cd -P โ€ฆ && pwd -P` ์ ˆ๋Œ€ํ™”ํ•˜๊ณ  `SKS_REGISTRY_DIR` ๋กœ export ํ•œ๋‹ค. ์ƒ๋Œ€ ๋ ˆ์ง€์ŠคํŠธ๋ฆฌ๋Š” ์ข…์ „์ฒ˜๋Ÿผ `WORKDIR` ๊ธฐ์ค€์ด๋‹ค. +- **๋ช…๋ น ๋ฌธ์ž์—ด**: `_pub_cmd` ๊ฐ€ ๋ชจ๋“  ํ† ํฐ์„ `printf %q` ๋กœ ์ธ์šฉํ•œ๋‹ค. + - ๊ฐ์‚ฌ ๋กœ๊ทธ ๋ฃจํŠธ๋Š” ๊ตฌ๋…์ž์™€ ๊ฐ™์€ ํ•ด์„๊ธฐ(`get_logs_dir`)์˜ ์ ˆ๋Œ€๊ฒฝ๋กœ๋ฅผ `DELEGATE_JOB_LOGS_DIR=%q` ์ ‘๋‘๋กœ ๊ณ ์ •ํ•œ๋‹ค. + - `_instructions` ๋Š” `%s` ์ž๋ฆฌํ‘œ์‹œ์ž๋งŒ ์“ฐ๋ฏ€๋กœ ๊ฒฝ๋กœ์˜ `%` ๋กœ ์ธํ•œ ํฌ๋งท ์ฃผ์ž…์ด ์—†๋‹ค. +- **๊ฒฝ๋กœ ๋ชฉ๋ก**: + - ๋ธŒ๋ฆฌํ”„ ๊ฒฝ๋กœ: `$REGISTRY_DIR/$JOB_ID/brief.md` + - Output Report Path(directยทloop ๋‘ ๊ณณ) + - ์ƒ๋Œ€ `PY` ๋ฅผ `cd` ์ „์— ์ ˆ๋Œ€ํ™” + - create ์˜ onboarding ๋ฐœํ–‰ ๋ช…๋ น(`create_session.sh` delegate ๋ธ”๋ก) +- **์‹คํ—˜ E1** โ€” ๋ ˆ์ง€์ŠคํŠธ๋ฆฌ `โ€ฆ/reg a b/jobs`, ๊ฐ์‚ฌ ๋กœ๊ทธ `โ€ฆ/logs dir`, ๋ชจ๋‘ ๊ณต๋ฐฑ ํฌํ•จ. ์ฃผ์ž…๋œ ๋ช…๋ น์„ **๋‹ค๋ฅธ cwd** ์—์„œ ๊ทธ๋Œ€๋กœ `eval` ํ–ˆ๋‹ค(๋ธŒ๋กœ์ปค๋Š” ๋‹ซํžŒ ํฌํŠธ). + +| ํ™•์ธ | ๊ฒฐ๊ณผ | +|---|---| +| ์‹œ์ž‘ ๋ช…๋ น | `DELEGATE_JOB_LOGS_DIR=โ€ฆ/logs\ dir โ€ฆ/python โ€ฆ/publish_event.py --registry-dir โ€ฆ/reg\ a\ b/jobs --job โ€ฆ --event started --heartbeat 30` | +| ์‹œ์ž‘ยท์„ฑ๊ณต ๋ช…๋ น rc | 2, 2(๋ธŒ๋กœ์ปค ๋ถˆ๊ฐ€, ๋กœ์ปฌ ๊ธฐ๋ก ๋’ค) | +| ๊ณต๋ฐฑ ๋ ˆ์ง€์ŠคํŠธ๋ฆฌ์˜ events | `['started', 'completed']`, ๋ ˆ์ฝ”๋“œ `completed` | +| ๊ฐ์‚ฌ ๋กœ๊ทธ ๋ฃจํŠธ | ์ง€์ •ํ•œ `logs dir` ์•„๋ž˜์— job ๋””๋ ‰ํ„ฐ๋ฆฌ | +| ๋‹ค๋ฅธ cwd ์— `.mam` ์ƒ์„ฑ | 0 | +| heartbeat ํƒ€์ด๋จธ ์ž”์—ฌ | 0(ํ„ฐ๋ฏธ๋„ ๋ฐœํ–‰์ด ๋ฉˆ์ถค) | + +- ๊ธฐ์กด ์ฃผ์ž… ๋ฌธ๊ตฌ ๊ณ„์•ฝ: `test_t1_4` ๊ฐ€ ์†Œ์Šค์—์„œ `.mam/jobs/$JOB_ID` ๋ฆฌํ„ฐ๋Ÿด์„ ๊ธˆ์ง€ํ•œ๋‹ค. issue14ยทissue6ยทissue18 ์‹œํ—˜ ๊ฒฐ๊ณผ๋Š” ยง7. +- ๋‚จ๋Š” ์ œํ•œ: ์ž‘์€๋”ฐ์˜ดํ‘œ๊ฐ€ ๋“  ๊ฒฝ๋กœ๋Š” ์ง€์›ํ•˜์ง€ ์•Š๋Š”๋‹ค(์ฃผ์ž… ๋ฌธ๊ตฌ๊ฐ€ ๋ช…๋ น์„ `'โ€ฆ'` ๋กœ ๊ฐ์‹ธ๋Š” prose ํ˜•์‹). ๋ฌธ์„œ ยง7 ์— ์ ํ˜€ ์žˆ๋‹ค. + +## 2. (2) ๋ฃจํ”„ ๋Ÿฌ๋„ˆ (`d907359`) + +- **์˜๋ฏธ์™€ ์ƒํ˜ธ์ž‘์šฉ**: + - `--worktree` ๋Š” ์†Œ์Šค ๋ฃจํŠธ๋‹ค. ๊ฒฝ๋กœ๊ฐ€ ๋””๋ ‰ํ„ฐ๋ฆฌ์ด๊ณ , `--show-toplevel` ์ด ์ž๊ธฐ ์ž์‹ ์ด๋ฉฐ, `git-common-dir` ๊ฐ€ ์ œ์–ด ๋ฃจํŠธ์™€ ๊ฐ™์•„์•ผ ํ•œ๋‹ค(`runner.py` `_validate_worktree`). + - `--base` ๋Š” ์†Œ์Šค HEAD ์˜ ์กฐ์ƒ์ธ ์ปค๋ฐ‹์ด์–ด์•ผ ํ•œ๋‹ค(`_resolve_base`). env ํด๋ฐฑ์€ ์—†๋‹ค(D17). + - `--review-only` ๋Š” `--base` ๊ฐ€ ํ•„์ˆ˜์ด๊ณ  `--plan` ๊ณผ ๋ฐฐํƒ€๋‹ค. + - `MAM_LOOP_WORKTREE` env ๋Š” CLI ๊ฐ€ ์šฐ์„ ์ด๋‹ค. +- **๋ฃจํŠธ ๋ถ„๋ฆฌ**: + - **์†Œ์Šค ๋ฃจํŠธ ๊ธฐ์ค€**: diff(์ œ์–ด ๋ฃจํŠธ์˜ `diff_collect.sh` ๋ฅผ ์†Œ์Šค cwd ์—์„œ ์‹คํ–‰ โ€” ์›ŒํฌํŠธ๋ฆฌ์˜ ๋ฏธ๊ฒ€ํ†  ์ˆ˜์ง‘๊ธฐ๋Š” ์‹คํ–‰ํ•˜์ง€ ์•Š์Œ), `base_commit`(`--base` ๋˜๋Š” Phase 2 ์‹œ์ž‘ ์‹œ ์†Œ์Šค HEAD), head, ๋ณ€๊ฒฝ๋ถ„ ๊ฐ€๋“œ. + - **์ œ์–ด ๋ฃจํŠธ ๊ธฐ์ค€**: wrapper ๊ฒฝ๋กœ, ๋ž˜ํผ์— ๋„˜๊ธฐ๋Š” `--registry-dir self.jobs_dir`, `wait_for_job`ยท`find_report`ยทcleanup ์˜ `jobs_dir`, ์ฒดํฌํฌ์ธํŠธ(`worktree_root`ยท`head_commit` ํ•„๋“œ ์ถ”๊ฐ€), loop guard, ๋ฆฌํฌํŠธ ์Šน๊ฒฉ. + - `jobs_dir` ๋Š” `MAM_JOBS_DIR` ์„ ์กด์ค‘ํ•œ๋‹ค. ์ƒ๋Œ€๊ฐ’์€ ์ œ์–ด ๋ฃจํŠธ ๊ธฐ์ค€์ด๋ฉฐ, ๋ž˜ํผ ํ•ด์„๊ณผ ๊ฐ™๋‹ค(`t2_15`). +- **๋นˆ ๋ณ€๊ฒฝ๋ถ„ fail-closed**: + - `git diff --quiet `(์ถ”์  ํŒŒ์ผ์˜ ์ž‘์—… ํŠธ๋ฆฌ ๋Œ€ base)์™€ `ls-files -o --exclude-standard`(๋ฏธ์ถ”์ )๋กœ ํŒ์ •ํ•œ๋‹ค. ์ด๋Š” `diff_collect.sh` ๊ฐ€ ์ˆ˜์ง‘ํ•˜๋Š” ๋‚ด์šฉ(`git diff "$base"` + ๋ฏธ์ถ”์  ํŒŒ์ผ, `:40-48`, `:73-74`)๊ณผ ๊ฐ™์€ ์ •์˜๋‹ค. + - ๋”ฐ๋ผ์„œ **๋ฌธ์„œ๋งŒ ๋ฐ”๋€ ๋ฆฌ๋ทฐ ์ „์šฉ ํ๋ฆ„๋„ `present`** ๋กœ ํŒ์ •๋œ๋‹ค. ์˜คํƒ์ด ์—†๋‹ค. + - `empty` ๋Š” base ๋Œ€๋น„ ์ถ”์  ๋ณ€๊ฒฝ๊ณผ ๋ฏธ์ถ”์  ํŒŒ์ผ์ด ๋ชจ๋‘ ์—†์„ ๋•Œ๋ฟ์ด๋‹ค. ๋ฌด์‹œ ํŒŒ์ผ๋งŒ ๋ฐ”๋€ ๊ฒฝ์šฐ๋Š” ๋ฆฌ๋ทฐํ•  ๊ฒƒ์ด ์—†์œผ๋ฏ€๋กœ ๊ฑฐ๋ถ€๊ฐ€ ๋งž๋‹ค. + - git ์˜ค๋ฅ˜๋Š” `unknown` ์ด ๋˜์–ด ์—ญ์‹œ ๊ฑฐ๋ถ€๋œ๋‹ค. ๊ฐ€๋“œ๋Š” `--worktree`/`--base` ๊ฐ€ ์žˆ์„ ๋•Œ๋งŒ, ๋ฆฌ๋ทฐ ๋ฐ˜๋ณต๋งˆ๋‹ค ๋™์ž‘ํ•œ๋‹ค. +- **`run_loop.sh`**: + - ์ƒˆ ์ธ์ž๋Š” ๊ธฐ์กด `MAM_LOOP_ARGV` ๋กœ Python ๋Ÿฌ๋„ˆ์— ๊ทธ๋Œ€๋กœ ์ „๋‹ฌ๋œ๋‹ค. freeze ์žฌ์‹คํ–‰๋„ ์›๋ž˜ argv ๋ฅผ ๋„˜๊ธด๋‹ค. + - ๋ ˆ๊ฑฐ์‹œ `MAM_LOOP_PY=0` ์€ ์ƒˆ ์˜ต์…˜(๊ณผ `MAM_LOOP_WORKTREE`)์„ freezeยทloop lock **์ด์ „์—** exit 1 ๋กœ ๊ฑฐ๋ถ€ํ•œ๋‹ค(`t2_8`, `mam_sandbox` ์—์„œ). +- ์ฐธ๊ณ : ๊ฐ€๋“œ๋Š” "์ž‘์—… ํŠธ๋ฆฌ ๋Œ€ base" ์ด๊ณ , ๋ธŒ๋ฆฌํ”„์˜ `[์›ŒํฌํŠธ๋ฆฌ ์ปจํ…์ŠคํŠธ]` ๋Š” ์ปค๋ฐ‹ ์ˆ˜์™€ ๋ฏธ์ปค๋ฐ‹ ๋ณ€๊ฒฝ ์œ ๋ฌด๋ฅผ ํ•จ๊ป˜ ๋ณด์—ฌ ์ค€๋‹ค. ๋”ฐ๋ผ์„œ ์ปค๋ฐ‹ 0๊ฐœยท๋ฏธ์ปค๋ฐ‹ ๋ณ€๊ฒฝ๋งŒ ์žˆ๋Š” ์ƒํƒœ๋„ ๋ฆฌ๋ทฐ์–ด์—๊ฒŒ ๋“œ๋Ÿฌ๋‚œ๋‹ค. + +## 3. (3) `control_plane.py` ์™€ ์ „ํŒŒ ๊ฒฝ๋กœ (`ee1d896`ยท`af8a54c`ยท`13259ed`) + +- **์Šคํ‚ค๋งˆ**: ํ–‰ ํ•„๋“œ `control_plane = {workspace_root, agent_sessions_yaml, mam_jobs_dir, delegate_job_logs_dir}`, ๋ชจ๋‘ realpath ๋‹ค. +- **ํ•ด์„ ์ˆœ์„œ**: `describe()` ๋Š” ํ–‰ ๋ฐ”์ธ๋”ฉ(์™„์ „ํ•  ๋•Œ)์„ ํ˜ธ์ถœ์ž env ๋ณด๋‹ค ์šฐ์„ ํ•˜๊ณ , ๋‹ค๋ฅด๋ฉด stderr ๋กœ ๊ฒฝ๊ณ ํ•œ๋‹ค. `forward` ๋Š” `--workspace` ์˜ ๊ธฐ๋ณธ ๋ฐ”์ธ๋”ฉ๊ณผ ๋‹ค๋ฅผ ๋•Œ๋งŒ ์ฐธ์ด๋‹ค. +- **์ „ํŒŒ**: + - createยทresume ์€ `K=V ` ์ ‘๋‘๋ฅผ `CMD_FULL` ์•ž์— ๋ถ™์ธ๋‹ค. `lib.sh` new-session ์ด ์ด๊ฒƒ์„ `--env` ๋กœ ๋ฐ”๊พธ๋Š” ๊ธฐ์กด ๊ฒฝ๋กœ๋ฅผ ์“ด๋‹ค. + - `13259ed`/`af8a54c`: env ํ”Œ๋ž˜๊ทธ๊ฐ€ ์žˆ์œผ๋ฉด **idle pane ์„ ์žฌ์‚ฌ์šฉํ•˜์ง€ ์•Š๊ณ ** `pane split`/`workspace create` ํ˜ธ์ถœ์— `--env` ๋ฅผ ์‹ฃ๋Š”๋‹ค(`lib.sh` 775-787 ๋ถ€๊ทผ). + - ์žฌ์‚ฌ์šฉ pane ์— `env K=V` ๋ฅผ `agent start --` ๋’ค ์—์ด์ „ํŠธ ์ธ์ž๋กœ ๋„˜๊ธฐ๋˜ ์ข…์ „ ๊ฒฐํ•จ(R1)์ด ์—†์–ด์กŒ๋‹ค. + - ๊ณต๋ฐฑ์ด ๋“  ๋ฐ”์ธ๋”ฉ์„ ์ „ํŒŒํ•ด์•ผ ํ•˜๋ฉด rc 3 โ†’ createยทresume ์ด exit 2 ๋กœ ๊ฑฐ๋ถ€ํ•œ๋‹ค(`lib.sh` ๊ฐ€ `--env` ํ”Œ๋ž˜๊ทธ๋ฅผ ์ธ์šฉ ์—†์ด ๋‚˜๋ˆ„๋ฏ€๋กœ). +- **resume**: ํ–‰ ๋ฐ”์ธ๋”ฉ์„ ๋‹ค์‹œ ์ „ํŒŒํ•œ๋‹ค. ๋ฐ”์ธ๋”ฉ ์—†๋Š” ๊ธฐ์กด ํ–‰์€ ์ด๋ฒˆ resume ์˜ ๋ฐ”์ธ๋”ฉ์œผ๋กœ ์ฑ„์šด๋‹ค(`update_yaml_resumed.sh`). +- **stop**: env ๊ฐ€ ์—†์„ ๋•Œ๋งŒ ํ–‰์˜ `mam_jobs_dir`ยท`delegate_job_logs_dir` ๋ฅผ export ํ•œ๋‹ค. ์ทจ์†Œ ๋ฐœํ–‰๊ณผ ๊ฐ์‚ฌ ๋กœ๊ทธ๊ฐ€ ํ–‰์˜ ์ œ์–ด ํ‰๋ฉด์œผ๋กœ ๊ฐ„๋‹ค(R3). +- **statusยทreconcile**: + - `MAM_JOBS_DIR`ยทํ–‰ ๋ฐ”์ธ๋”ฉยท๊ฐ์‚ฌ ๋กœ๊ทธ๋ฅผ ๋จผ์ € ๋ณด๊ณ , ๊ทธ ๋’ค ์ข…์ „ ํ›„๋ณด๋ฅผ ๊ทธ๋Œ€๋กœ ๋ณธ๋‹ค. + - reconcile ๊ตฌ๋… ๋ฃจํ”„๋Š” `MAM_JOBS_DIR` ์„ ์šฐ์„ ํ•œ๋‹ค(`reconcile.sh:239-245`). ์ด ๋ถ€๋ถ„์˜ ์‹œํ—˜์€ ์†Œ์Šค ์ •์  ๊ฐ€๋“œ๋ฟ์ด๋‹ค(`t3_7`). +- **ํ•˜์œ„ ํ˜ธํ™˜**: + - `--workspace` ๊ฐ€ ์ œ์–ด ๋ฃจํŠธ์™€ ๊ฐ™์€ ์ผ๋ฐ˜ ์„ธ์…˜์€ ๋ฐ”์ธ๋”ฉ์ด ๊ธฐ๋ณธ๊ฐ’๊ณผ ๊ฐ™๋‹ค. ๊ทธ๋ž˜์„œ ๊ธฐ๋ก๋งŒ ๋˜๊ณ  ์ „ํŒŒ๋˜์ง€ ์•Š์œผ๋ฉฐ(`t3_2`), pane ์ƒ์„ฑ ๊ฒฝ๋กœ(idle pane ์žฌ์‚ฌ์šฉ ํฌํ•จ)๊ฐ€ ์ข…์ „๊ณผ ๊ฐ™๋‹ค. + - ๋ฐ”์ธ๋”ฉ ์—†๋Š” ๊ธฐ์กด ํ–‰์€ statusยทstopยทreconcile ์—์„œ ์ข…์ „ ํ›„๋ณด ์ˆœ์„œ๋กœ ์ฒ˜๋ฆฌ๋œ๋‹ค. +- ๋น„์ฐจ๋‹จ: `mam_control_plane_json โ€ฆ 2>/dev/null || true`(create)๊ฐ€ ์‹คํŒจ๋ฅผ ์‚ผํ‚ค๋ฉด ๋ฐ”์ธ๋”ฉ ์—†์ด ์ข…์ „ ๋™์ž‘์œผ๋กœ ์กฐ์šฉํžˆ ๋–จ์–ด์ง„๋‹ค. PR ํ›„์† 1ยท2 ์™€ ๊ฐ™๋‹ค. + +## 4. (4) `lib.sh`ยทshim ๊ณ„์•ฝ ์‹œํ—˜ + +- **`lib.sh` ๋ณ€๊ฒฝ์€ ๋‘ ๊ณณ๋ฟ์ด๋‹ค**: + - new-session ์˜ idle pane ์žฌ์‚ฌ์šฉ ์กฐ๊ฑด์— `&& [ -z "$env_flags" ]` ๋ฅผ ์ถ”๊ฐ€ํ•˜๊ณ , ์žฌ์‚ฌ์šฉ pane ์— `env โ€ฆ` ๋ฅผ ๋ถ™์ด๋˜ ์ฝ”๋“œ๋ฅผ ์ œ๊ฑฐํ–ˆ๋‹ค. + - ํŒŒ์ผ ๋์— ์–‡์€ ์ง„์ž…์  `mam_control_plane_json`ยท`mam_control_plane_prefix` ๋ฅผ ์ถ”๊ฐ€ํ–ˆ๋‹ค. + - `_sks_*`ยท`send_keys_safe` ๋ฅผ ํฌํ•จํ•œ ๋‹ค๋ฅธ hunk ๋Š” ์—†๋‹ค. +- **h25 ๋Š” ์•ฝํ™”๊ฐ€ ์•„๋‹ˆ๋ผ ๊ฐ•ํ™”๋‹ค**: + - ์ข…์ „ h25 ๋Š” ๊ฒฐํ•จ ์žˆ๋Š” ๋™์ž‘(idle pane ์žฌ์‚ฌ์šฉ + ์—์ด์ „ํŠธ ์ธ์ž๋กœ env)์„ ๊ณ ์ •ํ•˜๊ณ  ์žˆ์—ˆ๋‹ค. + - ์ƒˆ h25 ๋Š” env ๊ฐ€ **์ƒ์„ฑ ํ˜ธ์ถœ์˜ `--env`** ์— ์žˆ๊ณ  `agent start --` ์ธ์ž์—๋Š” ์—†์Œ์„ ๋‹จ์ •ํ•œ๋‹ค. + - env ์—†๋Š” ์žฌ์‚ฌ์šฉ์€ h24 ๊ฐ€ ๊ทธ๋Œ€๋กœ ๊ณ ์ •ํ•œ๋‹ค. + +## 5. (5) ์„ค๊ณ„ ๋ฌธ์„œ ์ •์ • (`b61c8b1`) + +- **codex NOT PASS ์‚ฌ์œ ๋ณ„ ๋ฐ˜์˜**: + - ๋ถ€๋ถ„ ์ง€์›: ยง3 ์ œ๋ชฉ์ด "ํ˜„์žฌ ์ฝ”๋“œ ๊ธฐ์ค€" ์—์„œ "๋ถ€๋ถ„ ์ง€์› + 1๋‹จ๊ณ„ ์ˆ˜์ • ๋ฐ˜์˜" ์œผ๋กœ ๋ฐ”๋€Œ์—ˆ๋‹ค. + - ๋ฃจํŠธ 3์ข…: ยง7 ์ด ์ œ์–ดยท์†Œ์Šคยท๋Ÿฐํƒ€์ž„ ์ฝ”๋“œ ๋ฃจํŠธ๋ฅผ ์ •์˜ํ•œ๋‹ค. + - ๋ฆฌ๋ทฐ identity: ยง2-C ๊ฐ€ ํ•ญ๋ชฉ 5 ๋กœ ๋ฏธ๋ค˜๋‹ค๊ณ  ๋ช…์‹œํ•œ๋‹ค. + - ๊ณผ์žฅ ํ‘œํ˜„: A ์˜ "์™„์ „ ๊ฒฉ๋ฆฌ", ๋ฆฌ๋ทฐ์–ด "์ฝ๊ธฐ ์ „์šฉ", ์žก ํ† ํ”ฝ๊ณผ ์ง€๋ฌธ์„ ์ •์ •ํ–ˆ๋‹ค(ยง1 ํ‘œ). +- **์ถ”๊ฐ€๋œ ๋‚ด์šฉ**: + - ์Šคํ‚ฌ๋ณ„ ํ˜ธํ™˜์„ฑ ํ‘œ(ยง7) + - 1๋‹จ๊ณ„ ์šด์˜ ํ˜•ํƒœ(๊ตฌํ˜„์€ ๋ฃจํ”„ ๋ฐ–, ๋ฆฌ๋ทฐ๋Š” `--review-only` ๋กœ ํ•˜๋‚˜์”ฉ) + - ๋‘ ๋ฒˆ์งธ ๋ฃจํ”„๋Š” **๊ฑฐ๋ถ€**๋œ๋‹ค๋Š” ์„œ์ˆ  + - "์‹ค์ œ herdr `--env` ์ „ํŒŒ๋Š” mock ์ˆ˜์ค€๊นŒ์ง€๋งŒ ๊ฒ€์ฆ" ์ด๋ผ๋Š” ์ •์งํ•œ ๋‹จ์„œ +- ๋น„์ฐจ๋‹จ ๋ณด๊ฐ•: ยง3 ์˜ create ๋ ˆ์‹œํ”ผ์— `MAM_NO_SUBSCRIBER_DAEMON=1` ์„ ๋„ฃ์„ ๊ฒƒ. + - `create_session.sh:567` ์˜ `start_watchdog "$DELEGATE_JOB_ID" "$WORKSPACE"` ๋Š” ์—ฌ์ „ํžˆ ์›ŒํฌํŠธ๋ฆฌ์˜ `reconcile.sh` ๋กœ ๋ฐ๋ชฌ์„ ๋„์šธ ์ˆ˜ ์žˆ๋‹ค(ํ•ญ๋ชฉ 4 ์—์„œ ๊ธฐ๋ณธํ™” ์˜ˆ์ •). + - "๋ชจ๋‹ˆํ„ฐ๋Š” ๋ณธ ์ฒดํฌ์•„์›ƒ์—์„œ๋งŒ"(ยง3 ๋ณธ๋ฌธ)์„ ์ง€ํ‚ค๋ ค๋ฉด, ํ•ญ๋ชฉ 4 ๊ฐ€ ์˜ค๊ธฐ ์ „๊นŒ์ง€๋Š” ๋ ˆ์‹œํ”ผ ํ•œ ์ค„๋กœ ๋ง‰๋Š” ํŽธ์ด ์•ˆ์ „ํ•˜๋‹ค. + +## 6. (6) ์‹ ๊ทœ ์‹œํ—˜ 780์ค„์˜ ๊ฒฐ์ •์„ฑยท๊ฒฉ๋ฆฌ + +- ํŒŒ์ผ ๋จธ๋ฆฌ์˜ ๊ทœ์น™๋Œ€๋กœ ๋ชจ๋“  ์“ฐ๊ธฐ๊ฐ€ `tmp_path`ยท`mam_sandbox` ์•„๋ž˜์—์„œ ์ผ์–ด๋‚œ๋‹ค. + - `wt_repo` ํ”ฝ์Šค์ฒ˜๋Š” `monkeypatch.setenv` ๋กœ `WORKSPACE_ROOT`ยท`MAM_JOBS_DIR` ์„ ์ž„์‹œ ๋ฃจํŠธ์— ๋ฌถ๋Š”๋‹ค. + - ๋ž˜ํผ ์‹œํ—˜์€ ๋ธŒ๋กœ์ปค๋ฅผ `127.0.0.1:9`(`UNREACHABLE`)๋กœ ๋‘์–ด **๋ธŒ๋กœ์ปค๊ฐ€ ํ•„์š” ์—†๋‹ค**. +- ๋น„์ฐจ๋‹จ ์œ„์ƒ: `t2_6` ์ด `monkeypatch` ๋Œ€์‹  `os.environ` ์„ ์ง์ ‘ ๋ฐ”๊พผ๋‹ค. `try/finally` ๋กœ ๋ณต๊ตฌํ•˜๋ฏ€๋กœ ์ƒˆ์ง€๋Š” ์•Š๋Š”๋‹ค(PR ํ›„์† 3). +- `t3_7` ์€ reconcile ์˜ `MAM_JOBS_DIR` ์šฐ์„ ์„ ์†Œ์Šค ๋ฌธ์ž์—ด๋กœ๋งŒ ๊ณ ์ •ํ•œ๋‹ค(๋ธŒ๋กœ์ปค๊ฐ€ ํ•„์š”ํ•œ ๊ฒฝ๋กœ๋ผ์„œ๋‹ค). ์•ฝํ•˜์ง€๋งŒ ๋ช…์‹œ๋˜์–ด ์žˆ๋‹ค. +- ๊ฒฉ๋ฆฌ ์‹ค์ธก(์‹ค์ œ `.mam/jobs`, ๋ฐ๋ชฌ, ์›ŒํฌํŠธ๋ฆฌ ์ƒํƒœ)์€ ยง7. + +## 7. (7) ํ…Œ์ŠคํŠธ ์‹คํ–‰ ๊ฒฐ๊ณผ + +| ์‹คํ–‰ | ๊ฒฐ๊ณผ | +|---|---| +| **์ „์ฒด ์Šค์œ„ํŠธ** @ `4a81d15`(์›ŒํฌํŠธ๋ฆฌ, 11:52โ€“12:27Z, ์˜ค์ผ€์ŠคํŠธ๋ ˆ์ดํ„ฐยท๋‹ค๋ฅธ ๋ฆฌ๋ทฐ์–ด ์Šค์œ„ํŠธ์™€ ๋™์‹œ) | **937 passed, 4 failed in 2103 s**. HEAD ์ „ํ›„ ๋™์ผ(`4a81d15`) | +| ์‹คํŒจ 4๊ฑด | pane-busy `test_issue14โ€ฆ::โ€ฆignores_pane_busy_token`(rc 0: ๋Šฆ์€ completed ๊ฐ€ ์ˆ˜๋ฝ๋จ), ๋ฒฝ์‹œ๊ณ„ `โ€ฆnever_outlives_the_wall_clock`(closed after **28.12 s** > 28), AC1(rc 2), AC5(rc 2) | +| 4๊ฑด ๋‹จ๋… ์žฌ์‹คํ–‰ โ€” PR `4a81d15` | 3 failed / 1 passed(AC1 ํ†ต๊ณผ). ์ด๋•Œ ๊ณต๊ฐœ ๋ธŒ๋กœ์ปค๊ฐ€ `no CONNACK from broker` ๋กœ ์žฌ์‹œ๋„ํ•˜๊ณ  ์žˆ์—ˆ๋‹ค | +| 4๊ฑด ๋‹จ๋… ์žฌ์‹คํ–‰ โ€” base `5611859`(๋ณธ ์ฒดํฌ์•„์›ƒ) | 2 failed / 2 passed(AC1ยทAC5 ์‹คํŒจ) | + +- **ํŒ๋‹จ**: + - 4๊ฑด์€ #18 ๋ฆฌ๋ทฐ์—์„œ main ๊ณ„์—ด ์ฝ”๋“œ(`135d76f`ยท`7e1d3f0`ยท`ab842f1`)๋กœ๋„ ๊ฐ™์€ ๋ฐฉ์‹์œผ๋กœ ์—ฌ๋Ÿฌ ๋ฒˆ ์‹คํŒจํ–ˆ๋˜ T-1 ๋ถ€๋ฅ˜๋‹ค. ๋ฒฝ์‹œ๊ณ„ 28.1 s ๋Š” ๊ทธ๋•Œ์™€ ๊ฐ™์€ ๊ฐ’์ด๋‹ค. + - ๊ฐ™์€ ๋ธŒ๋กœ์ปค ์ƒํƒœ์—์„œ base ๋„ ์ด ๋ถ€๋ฅ˜๊ฐ€ ์‹คํŒจํ•œ๋‹ค. + - PR ์ด ๋ž˜ํผ submit ์— python ํ˜ธ์ถœ 1ํšŒ(`_logs_dir_abs`)๋ฅผ ์ถ”๊ฐ€ํ–ˆ์ง€๋งŒ, ์ธก์ •๋œ ๋ฒฝ์‹œ๊ณ„ ๊ฐ’์€ main ๊ณผ ๊ฐ™๋‹ค. + - **PR ์ด ๋งŒ๋“  ์‹คํŒจ๋Š” 0๊ฑด์œผ๋กœ ๋ณธ๋‹ค.** +- PR ๋ณธ๋ฌธ์˜ "33๊ฑด ํ™˜๊ฒฝ ์‹คํŒจ" ๋Š” ์ด ํ™˜๊ฒฝ(macOS, venv Python 3.9)์—์„œ๋Š” ์žฌํ˜„๋˜์ง€ ์•Š์•˜๋‹ค. ์ด ํ™˜๊ฒฝ์˜ ์‹คํŒจ๋Š” ์œ„ 4๊ฑด๋ฟ์ด๋‹ค. +- **๊ฒฉ๋ฆฌ**: + - ๋ณธ ์ฒดํฌ์•„์›ƒ์€ `main` `5611859` ํด๋ฆฐ์„ ์œ ์ง€ํ–ˆ๋‹ค. ์‹ค์ œ `.mam/jobs` ์ถ”๊ฐ€๋Š” 0 ์ด๋‹ค. + - ์›ŒํฌํŠธ๋ฆฌ์˜ ์ถ”์  ํŒŒ์ผ์€ ๋ณ€ํ•˜์ง€ ์•Š์•˜๋‹ค(`?? .venv` ๋งŒ). + - **๊ทธ๋Ÿฌ๋‚˜ ๋ฌด์‹œ ๋Œ€์ƒ `.mam/` ์ด ์›ŒํฌํŠธ๋ฆฌ์— ์ƒ๊ฒผ๋‹ค**: `.mam/delegate_job_logs`(์žก 21๊ฐœ)์™€ `.mam/shim`. ์ƒ์„ฑ ์‹œ๊ฐ์ด 20:52โ€“21:13 KST ๋กœ ์ด ์Šค์œ„ํŠธ ์‹คํ–‰ ์ค‘์ด๋‹ค. + - ์ผ๋ถ€ ์‹œํ—˜์ด `$REPO_ROOT/.mam` ์— ์“ด๋‹ค(#20 ์œ„์ƒ ๋ฌธ์ œ). PR ํ›„์† 4 ๊ฐ€ ์ง€๋ชฉํ•œ `test_issue14โ€ฆ::_job_for_inprocess_publish` ์˜ ๊ฐ์‚ฌ ๋กœ๊ทธ์™€, ์ƒŒ๋“œ๋ฐ•์Šค ์—†์ด `lib.sh` ๋ฅผ ์†Œ์‹ฑํ•  ๋•Œ ์ƒ๊ธฐ๋Š” shim ์ด๋‹ค. + - PR ์ด ์ƒˆ๋กœ ๋งŒ๋“  ๋ฌธ์ œ๋Š” ์•„๋‹ˆ์ง€๋งŒ, ์›ŒํฌํŠธ๋ฆฌ ๋ณ‘๋ ฌ ์šด์˜์—์„œ๋Š” ์›ŒํฌํŠธ๋ฆฌ๋งˆ๋‹ค ์Œ“์ธ๋‹ค. + - ์ฝ๊ธฐ ์ „์šฉ ๊ทœ์น™์— ๋”ฐ๋ผ ์ง€์šฐ์ง€ ์•Š์•˜๋‹ค. ์˜ค์ผ€์ŠคํŠธ๋ ˆ์ดํ„ฐ๊ฐ€ ์ •๋ฆฌํ•  ๊ฒƒ์„ ๊ถŒํ•œ๋‹ค. + - ์ƒŒ๋“œ๋ฐ•์Šค heartbeat ํƒ€์ด๋จธ: ์‹คํ–‰ ์งํ›„ ์ง‘๊ณ„์—์„œ pytest ๊ฒฝ๋กœ ํƒ€์ด๋จธ 3๊ฐœ๊ฐ€ ๋ณด์˜€์œผ๋‚˜, ์žฌํ™•์ธํ–ˆ์„ ๋•Œ๋Š” 0๊ฐœ์˜€๋‹ค(๋™์‹œ์— ๋Œ๋˜ ๋‹ค๋ฅธ ์Šค์œ„ํŠธ์˜ ๊ฒƒ์œผ๋กœ ๋ณด์ธ๋‹ค). + - ๋ชจ๋‹ˆํ„ฐ ๋ฐ๋ชฌ ์ „ํ›„ ๋น„๊ต๋Š” ์Šค๋ƒ…์ƒท ํ•„ํ„ฐ ์˜ค๋ฅ˜๋กœ ํŒ์ •ํ•˜์ง€ ๋ชปํ–ˆ๋‹ค. + +## 8. (8) #21 ์ž‘์—… ํ•ญ๋ชฉ๊ณผ ํ›„์† + +- **์™„๋ฃŒ**: ํ•ญ๋ชฉ 1(๋ž˜ํผ ๊ฒฝ๋กœ), 2(๋Ÿฌ๋„ˆ ์˜ต์…˜ยท๊ฐ€๋“œ), 3(๋ฐ”์ธ๋”ฉ ์˜์†ยท์ „ํŒŒ, status/reconcile/stop/loop ์˜ `MAM_JOBS_DIR`), 6(๋ฌธ์„œ ์ •์ •). ๊ฐ๊ฐ ์‹œํ—˜์œผ๋กœ ๊ณ ์ •๋˜์–ด ์žˆ๋‹ค. +- **์ œ์™ธ์˜ ํƒ€๋‹น์„ฑ**: 4(์ค€๋น„ยทํ•ด์ฒด ํ—ฌํผ, ๋ฐ๋ชฌ ๊ธฐ๋ณธํ™”), 5(๋ฆฌ๋ทฐ identityยท๊ฒ€์ฆ ๊ฒฉ๋ฆฌ), 7(์‹ค์ œ herdr ์ˆ˜์šฉ ์‚ฌ๋ก€), 8(๋‹ค์ค‘ ๋ฃจํ”„). ๋ชจ๋‘ ์„ค๊ณ„ ๊ฒฐ์ •์ด๋‚˜ ์‹คํ™˜๊ฒฝ์ด ํ•„์š”ํ•œ ๋ณ„๋„ ์ž‘์—…์ด๋‹ค. 1๋‹จ๊ณ„ ์šด์˜(๊ตฌํ˜„์€ ๋ฃจํ”„ ๋ฐ–, ๋ฆฌ๋ทฐ ๋ฃจํ”„ ํ•˜๋‚˜)์— ํ•„์š”ํ•œ ์ตœ์†Œ ๋ณ€๊ฒฝ๋งŒ ์ด PR ์— ๋“ค์–ด๊ฐ”๋‹ค๋Š” ํŒ๋‹จ์— ๋™์˜ํ•œ๋‹ค. +- **ํ›„์† ๊ถŒ๊ณ  5๊ฑด์€ ์ ์ ˆํ•˜๋‹ค**. ์ถ”๊ฐ€๋กœ ๋‘ ๊ฐ€์ง€๋ฅผ ๊ถŒํ•œ๋‹ค. + - 6) ํ•ญ๋ชฉ 4 ์ „๊นŒ์ง€ ยง3 ๋ ˆ์‹œํ”ผ์— `MAM_NO_SUBSCRIBER_DAEMON=1`(ยง5). + - 7) ์ฒซ ์‹ค์ œ ์›ŒํฌํŠธ๋ฆฌ creator ์ „์— ํ•ญ๋ชฉ 7 ์˜ "์‹ค์ œ herdr `--env` ์ „ํŒŒ" ์ˆ˜์šฉ ์‚ฌ๋ก€๋ฅผ ๋จผ์ € ํ™•์ธํ•œ๋‹ค(ํ˜„์žฌ๋Š” mock ๊ฒ€์ฆ๋ฟ). ์ „ํŒŒ๊ฐ€ ์•ˆ ๋˜๋”๋ผ๋„ ์ฃผ์ž… ๋ช…๋ น์ด ์ ˆ๋Œ€๊ฒฝ๋กœ๋ผ ์žก ๋ฐœํ–‰์€ ๋™์ž‘ํ•˜์ง€๋งŒ, creator ๊ฐ€ ์Šค์Šค๋กœ ๋ถ€๋ฅด๋Š” ์Šคํ‚ฌ์€ ์›ŒํฌํŠธ๋ฆฌ `.mam` ์„ ์“ฐ๊ฒŒ ๋œ๋‹ค. + +## 9. (9) ๋ณ‘ํ•ฉ์„ ๋ง‰์„ ๊ฒฐํ•จ + +- **์•Œ๋ ค์ง„ ๋ฏธ๋น„**: + - (a) ๋ฒ„์ „ bump ๊ฐ€ ์—†๋‹ค(4.5.0 ์œ ์ง€). ์ƒˆ CLI ์˜ต์…˜๊ณผ ์ƒˆ ๋ชจ๋“ˆ์ด๋ฏ€๋กœ 4.6.0(MINOR)๊ณผ VERSIONS ํ•ญ๋ชฉ์ด ํ•„์š”ํ•˜๋‹ค. + - (b) `docs/design/reviews/review-agy-fd384d6b.md` ์˜ markdown ์ค„๋ฐ”๊ฟˆ์šฉ trailing whitespace ๋กœ `git diff --check` ๊ฐ€ ์‹คํŒจํ•œ๋‹ค. + - ๋‘˜ ๋‹ค ํ™•์ธํ–ˆ๋‹ค. ์ฝ”๋“œ ํŒŒ์ผ์—๋Š” whitespace ๋ฌธ์ œ๊ฐ€ ์—†๋‹ค. +- **๊ทธ ๋ฐ–์— ๋ณ‘ํ•ฉ์„ ๋ง‰์„ ๊ฒฐํ•จ์€ ์ฐพ์ง€ ๋ชปํ–ˆ๋‹ค**. +- ๋น„์ฐจ๋‹จ: + - create ์˜ ๋ฐ”์ธ๋”ฉ ํ•ด์„ ์‹คํŒจ ์‚ผํ‚ด(ยง3, PR ํ›„์† 1) + - ยง3 ๋ ˆ์‹œํ”ผ์˜ `MAM_NO_SUBSCRIBER_DAEMON=1`(ยง5) + - `t2_6` ์˜ `os.environ` ์ง์ ‘ ์กฐ์ž‘(ยง6) + - ์‹œํ—˜์˜ `$REPO_ROOT/.mam` ์“ฐ๊ธฐ(ยง7, #20) + - T-1 ์‹œ๊ฐ„ ์ž„๊ณ„ ์‹œํ—˜ + +## 10. ์ข…ํ•ฉ + +- PR #22 ๋Š” #21 ํ•ญ๋ชฉ 1ยท2ยท3ยท6 ์„ ์ •ํ™•ํžˆ ๊ตฌํ˜„ํ–ˆ๋‹ค. + - ๋ž˜ํผ ๊ฒฝ๋กœ๋Š” ๊ณต๋ฐฑ ๊ฒฝ๋กœ์™€ ๋‹ค๋ฅธ cwd ์—์„œ๋„ ์ ˆ๋Œ€ยท์ธ์šฉ์ด ๋งž๋‹ค(์‹คํ—˜). + - ๋Ÿฌ๋„ˆ๋Š” ์†Œ์Šค ๋ฃจํŠธ์™€ ์ œ์–ด ๋ฃจํŠธ๋ฅผ ๋ถ„๋ฆฌํ•˜๊ณ  diff ์ˆ˜์ง‘๊ณผ ๊ฐ™์€ ์ •์˜์˜ fail-closed ๊ฐ€๋“œ๋ฅผ ๋‘”๋‹ค. + - ์ œ์–ด ํ‰๋ฉด ๋ฐ”์ธ๋”ฉ์„ ์˜์†ยท์ „ํŒŒํ•˜๋ฉด์„œ๋„ ๊ธฐ์กด ์›Œํฌ์ŠคํŽ˜์ด์Šค์™€ ๋ฐ”์ธ๋”ฉ ์—†๋Š” ํ–‰์˜ ๋™์ž‘์„ ๋ฐ”๊พธ์ง€ ์•Š๋Š”๋‹ค. + - `lib.sh` ๋ณ€๊ฒฝ์€ idle pane ์žฌ์‚ฌ์šฉ ์กฐ๊ฑด์— ํ•œ์ •๋˜๋ฉฐ ๊ณ„์•ฝ ์‹œํ—˜์€ ๊ฐ•ํ™”๋˜์—ˆ๋‹ค. +- ์ „์ฒด ์Šค์œ„ํŠธ์˜ ์‹คํŒจ 4๊ฑด์€ base ์—์„œ๋„ ๊ฐ™์€ ๋ถ€๋ฅ˜๋กœ ์‹คํŒจํ•˜๋Š” ๊ธฐ์กด ๋ธŒ๋กœ์ปค ์‹œ๊ฐ„ ์ž„๊ณ„ ์‹œํ—˜์ด๋‹ค. +- ๋ณ‘ํ•ฉ ์ „์— ์•Œ๋ ค์ง„ ๋ฏธ๋น„ (a)(b)๋ฅผ ๋ฆด๋ฆฌ์Šค ์ปค๋ฐ‹์œผ๋กœ ์ฒ˜๋ฆฌํ•˜๋ฉด ๋œ๋‹ค. ์„ค๊ณ„ ์žฌ๊ฒ€ํ† ๋Š” ํ•„์š” ์—†๋‹ค. + +[VERDICT: PASS] diff --git a/.agents/reports/planner-reviewer-codex-01/report-fa5cfb00.md b/.agents/reports/planner-reviewer-codex-01/report-fa5cfb00.md new file mode 100644 index 0000000..84a52f7 --- /dev/null +++ b/.agents/reports/planner-reviewer-codex-01/report-fa5cfb00.md @@ -0,0 +1,51 @@ +# PR #22 independent review + +Reviewer: planner-reviewer-codex-01. Job: fa5cfb00. +Reviewed detached worktree `multi-agent-mux-wt/pr-22` at `4a81d15d95632d54c47b15297549ab28c41006f3`, against main `5611859`; reviewed the nine commits and aggregate diff. + +PASS for the scoped implementation of #21 items 1, 2, 3, and 6. I found no additional merge-blocking implementation defect. This is not approval to merge the current tree without the two release corrections already identified in the brief: + +- Add the 4.6.0 MINOR lockstep version changes and VERSIONS.md release entry. Passing version-consistency tests on the current 4.5.0 tree does not satisfy this release requirement. +- Remove trailing whitespace in `docs/design/reviews/review-agy-fd384d6b.md` (lines 3โ€“8, 36, 38, 104, 106, 108, 115, 117). `git diff --check 5611859...HEAD` currently fails on those known lines. + +## Review findings + +1. **Delegation paths and quoting:** The wrapper resolves the registry after entering the requested workdir, then supplies absolute brief/report paths and explicit registry and audit-log locations in injected lifecycle commands. The CLI registry override retains priority over MAM_JOBS_DIR. Executable paths containing a slash are made absolute before changing cwd. Bash quoting and execution from another cwd are exercised by the new tests, including spaces. Single-quote-containing paths remain an explicitly documented limitation. + +2. **Loop roots and flags:** The runtime code and control plane remain in the control checkout; diff collection, base/head and creator context use the selected source worktree. Worktree validation checks the repository common directory. An explicit base must resolve to a commit and be an ancestor of source HEAD. Review-only requires a base and skips initial implementation, while later correction/compliance rounds may still dispatch a creator. That behavior is now documented. The empty-change guard accepts documentation changes and fails closed on unknown git state; it includes untracked files, so an unignored preparation symlink such as `.venv` can make an otherwise empty set nonempty. The design explicitly requires excluding that preparation artifact. The legacy shell runtime rejects unsupported options/environment configuration rather than silently ignoring them. + +3. **Control-plane bindings:** The new resolver normalizes the four binding fields and persists them on creation. Resume prefers a complete saved binding, warns when the caller differs, and populates legacy rows without a binding. Stop retains both registry and audit-log routing; status checks the new locations alongside legacy candidates. Relative MAM_JOBS_DIR handling is covered. Reconcile's environment precedence has a static regression guard, not full runtime integration coverage. Forwarding paths containing whitespace is explicitly rejected; the legacy external wrapper path warns that propagation is unavailable. These are stated compatibility limits rather than hidden claims of complete support. + +4. **Herdr shim:** With environment flags present, session creation bypasses idle-pane reuse and forwards environment through pane/workspace creation. It does not inject `env K=V` into agent arguments. The no-environment reuse path remains covered. The revised h25 assertions pin both environment forwarding and the absence of inappropriate agent arguments; I did not find a weakened contract. `_sks_*` and `send_keys_safe` implementations are unchanged by this diff. + +5. **Design corrections and scope:** The revised document addresses my previous design objections: partial support, control/source/runtime roots, test-side writes, pending immutable review identity, and logical ownership rather than assumed database corruption. The first phase permits parallel implementation outside the loop and one review loop, with the base captured before implementation. Deferring preparation/recovery helpers (4), immutable review identity and isolated verification (5), real-herdr acceptance (7), and multi-loop scheduling (8) is reasonable for this bounded prerequisite PR. It must not be presented as completed production support for concurrent loops. + +6. **Tests and isolation:** The new worktree tests use temporary repositories or mam_sandbox; the final T2-8 change places shell rejection checks in the sandbox. Static checks and mocked delegation/herdr behavior provide useful bounded coverage but do not establish actual pane environment propagation. The provided `.venv` symlink in the review tree predates this review. No source files, production sessions, monitor configuration, or checkout state were modified by this reviewer. + +## Verification + +Tests ran from the review worktree with `PYTHONDONTWRITEBYTECODE=1`, its supplied `.venv/bin/python`, and pytest's cache provider disabled. + +| Check | Result | +|---|---| +| `test_issue21_worktree_prereqs.py`, `test_herdr_shim_contract.py`, `test_issue5_phase2a_loop.py`, `test_version_consistency.py` | 146 passed in 136.14 s | +| `test_issue18_liveness_contract.py`, `test_issue6_turn_handshake.py` | 43 passed, 2 failed in 250.40 s | +| Isolated stock acknowledgement-test rerun | 1 passed in 4.46 s | +| Remote acceptance rerun with unique UUID4 session and secret | 1 passed in 32.00 s | +| `bash -n` for nine changed shell files | Passed | +| `git diff --check 5611859...HEAD` | Known archived-review trailing whitespace only | + +The two initial failures require explicit qualification: + +- `tests/test_issue18_liveness_contract.py:512`, `test_send_keys_safe_is_confirmed_by_the_job_started_event`: the command succeeded, but the elapsed-time assertion measured 13.393 s against an 11 s limit. The test joins the publisher thread before checking elapsed time, so publication latency affects that measurement. The isolated unmodified rerun passed. This test and the relevant acknowledgement implementation are unchanged relative to base; the observed result does not demonstrate a deterministic PR regression. +- `tests/test_issue18_liveness_contract.py:1189`, `test_acceptance5_remote_runner_completes_a_job_over_the_broker_only`: the wrapper awaited job `fa85ad57`, but its `--once` runner consumed and completed job `4fd23659`. The stock test uses a fixed `sim-worker` session and shared secret on a wildcard broker subscription, allowing concurrently running suites to collide. I reran the same test with a pytest collection plugin replacing only those session/secret string constants in memory with UUID4 values; all original assertions remained, and it passed. No repository test file was edited. This supports a shared-broker test-isolation diagnosis, not a product-code regression. The stock acceptance test should gain unique identifiers in follow-up work. + +I have not independently verified the PR's claim that all 33 full-suite failures are environmental or match base. These focused results should be combined with the orchestrator's separate full-suite evidence; they must not be generalized into a blanket endorsement of that claim. + +## Follow-up recommendations + +The remaining work is appropriately sequenced as: (1) preparation/teardown and original-cwd recovery helpers, (2) immutable review identity and isolated test execution, (3) real-herdr environment and lifecycle acceptance, (4) explicit reviewer ownership/queueing before multiple loops, and (5) reproducible operational recipes coordinated with the #17 shell-layer reduction. Keep the documented compatibility restrictions until those acceptance cases exist. Additionally, make the broker acceptance test's session and secret unique to avoid cross-suite interference. + +Final checkout verification: main remains clean; the review tree remains at the requested detached commit with only its preexisting untracked `.venv` symlink. The two known release gates remain the orchestrator's responsibility before merge. + +[VERDICT: PASS] diff --git a/.agents/reports/reviewer-agy-01/report-de72b12e.md b/.agents/reports/reviewer-agy-01/report-de72b12e.md new file mode 100644 index 0000000..6338755 --- /dev/null +++ b/.agents/reports/reviewer-agy-01/report-de72b12e.md @@ -0,0 +1,130 @@ +# PR #22 Review Report: Worktree Creator Operating Model Prerequisites (Phase 1) + +- **Reviewer**: Antigravity (`herdr:reviewer-agy-01`) +- **Job ID**: `de72b12e` +- **Target PR**: [PR #22](https://git.godopu.com/tmpl/multi-agent-mux/pulls/22) (`feat/issue-21-worktree-prereqs` @ `4a81d15`, base `main` `5611859`) +- **Target Worktree**: `/Users/godopu16/PuKi/laa/canary_projects/multi-agent-mux-wt/pr-22` (detached @ `4a81d15`) +- **Base Repo**: `/Users/godopu16/PuKi/laa/canary_projects/multi-agent-mux` (`main` @ `5611859`, unmodified) +- **Status**: Review Complete + +--- + +## 1. Executive Summary + +PR #22 implements Phase 1 prerequisites for the Worktree Creator Operating Model (addressing Issue #21 items 1, 2, 3, and 6). This review was conducted independently in worktree `/Users/godopu16/PuKi/laa/canary_projects/multi-agent-mux-wt/pr-22` without modifying any files in either the worktree or the main working copy. + +All 9 checklist verification items have been thoroughly inspected and verified against the codebase and test suites. + +Two known limitations (pre-identified and documented in the brief) were verified: +1. **Version Lockstep**: Currently at 4.5.0. New CLI flags (`--worktree`, `--base`, `--review-only`) and new module `lib_py/control_plane.py` require a MINOR bump to 4.6.0 and an entry in `VERSIONS.md`. This is scheduled to be performed by the orchestrator in the merge release commit. +2. **Markdown Trailing Whitespace**: `git diff 5611859...HEAD --check` flags trailing whitespace on lines in `docs/design/reviews/review-agy-fd384d6b.md` used for markdown line breaks (` \n`). No source code (`.py`, `.sh`) contains trailing whitespace or syntax issues. This is also scheduled for cleanup in the orchestrator release commit. + +Beyond these two orchestrator release tasks, PR #22 is clean, robust, backwards-compatible, and passes all prerequisite test suites (100% pass rate on relevant tests). + +--- + +## 2. Checklist Item-by-Item Verification + +### (1) Wrapper Absolute Paths (`d3d3a76`) +- **Path Resolution**: In `multi-agent-mux-delegate-job`, the brief file path, the `--registry-dir` argument in injected commands (`start`, `success`, `error`), the `Output Report Path`, and the audit log root (`DELEGATE_JOB_LOGS_DIR`) are strictly resolved to absolute paths rooted at `$REGISTRY_DIR` / canonical root, independent of the Creator's working directory (`$CWD`). +- **Shell Quoting**: All path interpolations are enclosed in double quotes (`"$REGISTRY_DIR"`, `"$BRIEF_FILE"`), preventing word splitting on paths with spaces or special characters. +- **Contract Alignment**: Conforms with existing prompt injection contracts: + - Issue 14 (Delivery ACK): Start command with `--event started` and token verification remains intact. + - Issue 6 (Turn Handshake): Handshake status sequence and wrapper idle checks remain compatible. + - Issue 18 (Liveness Contract): `--heartbeat ` argument in start command is properly formatted. +- **Tests**: `tests/test_issue21_worktree_prereqs.py` tests `test_t1_1_wrapper_emits_absolute_brief_path`, `test_t1_2_wrapper_emits_absolute_start_command_registry_dir`, `test_t1_3_wrapper_emits_absolute_audit_log_path`, `test_t1_4_wrapper_emits_absolute_output_report_path`, and `test_t1_5_wrapper_handles_spaces_in_root_path` all pass. + +### (2) Loop Runner Worktree Integration (`d907359`) +- **CLI Flags**: `lib_py/loop/runner.py` introduces `--worktree `, `--base `, and `--review-only`. +- **Worktree vs Control Plane Separation**: + - `collect_changes_diff()` and `base_commit` resolution execute with `cwd=str(self.worktree_root)`. The diff passed to peer reviewers reflects changes in the worktree against base. + - Control plane artifactsโ€”the delegation wrapper (`multi-agent-mux-delegate-job`), jobs registry (`$MAIN/.mam/jobs`), loop checkpoint file (`$MAIN/.mam/loop-checkpoints/...`), and promoted reports (`$MAIN/.mam/reviews/...`)โ€”remain strictly anchored to the main repository root. +- **Fail-Closed Empty Change-Set Guard**: + - `collect_changes_diff()` raises a fail-closed error if the diff between base and worktree is completely empty, preventing reviewers from hallucinating reviews over non-existent changes. + - Documents-only changes produce non-empty diffs and correctly pass through to review. +- **`run_loop.sh` & Freeze Mode**: + - `run_loop.sh` passes `--worktree`, `--base`, and `--review-only` directly to `lib_py.loop.runner`. + - The legacy bash loop path (`MAM_LOOP_PY=0`) explicitly rejects `--worktree` with an informative error message directing users to the Python runner, preventing silent misconfiguration. +- **Tests**: Tests `test_t2_1` through `test_t2_14` in `test_issue21_worktree_prereqs.py` verify all flag combinations, diff scoping, empty diff fail-closed behavior, and review promotion. + +### (3) Control Plane Binding & Persistence (`ee1d896`, `af8a54c`, `13259ed`) +- **Binding Schema**: `lib_py/control_plane.py` defines clean dataclass and serialization helpers for control plane bindings: + - `control_workspace_root` + - `control_agent_sessions_yaml` + - `control_mam_jobs_dir` + - `control_delegate_job_logs_dir` +- **Persistence & Forwarding**: + - `create_session.sh`, `resume_session.sh`, and `stop_session.sh` propagate and persist binding fields into `agent-sessions.yaml`. + - `status` and `reconcile` commands respect `MAM_JOBS_DIR` without corrupting state. +- **Reused Pane vs New Pane Contract (h25 & af8a54c)**: + - Reused panes do not receive environment variables as CLI arguments (`af8a54c`), avoiding argument pollution. + - Per `13259ed` (h25 contract update): when env flags are present during `new-session`, the idle pane wait is skipped and environment variables are passed directly to the pane creation call. +- **Relative `MAM_JOBS_DIR`**: Relative paths are normalized against `control_workspace_root`. +- **Backwards Compatibility**: Rows in `agent-sessions.yaml` without binding fields fall back cleanly to default paths relative to the current workspace root. +- **Tests**: Tests `test_t3_1` through `test_t3_13` in `test_issue21_worktree_prereqs.py` pass without regression. + +### (4) `lib.sh` & Herdr Shim Contract (`4a81d15`, `13259ed`) +- **Scope of Changes**: Changes in `lib.sh` (29 lines) are narrowly focused on the `new-session` path to forward environment flags to `herdr split-window` / `new-session`. +- **Side Effects**: Critical primitives `_sks_*` and `send_keys_safe` are completely untouched. +- **Contract Integrity**: `tests/test_herdr_shim_contract.py` (17 tests) passed 100% in 21.51s, including `test_h25_new_session_with_env_flags_skips_the_idle_pane_and_uses_env_on_split`. The contract is maintained and strengthened, not weakened. + +### (5) Design Document Corrections (`b61c8b1`) +- **Review Feedback Incorporation**: `docs/design/worktree-creator-model.md` was updated in commit `b61c8b1` to address all points raised in prior review rounds: + - Replaced overgeneralized claims with explicit Phase 1 boundaries (review-only worktree workflow). + - Formalized the 3 distinct filesystem roots: (1) Control Workspace Root, (2) Target Workspace Root, and (3) Worktree Root. + - Explicitly defined reviewer session identity preserving `herdr` pane mappings. + - Added compatibility table between control plane modes and agent roles. + +### (6) New Test Suite Quality & Hermeticity (`test_issue21_worktree_prereqs.py`) +- **Size & Coverage**: 780 lines, 35 unit and integration tests covering wrapper paths, runner worktree flags, control plane bindings, and freeze-mode guards. +- **Hermetic Isolation**: + - Uses `mam_sandbox` fixtures and `tmp_path`. + - Never writes to the actual `.mam` directory or real session registries. + - UUIDs generated via `uuid.uuid4()`. + - Zero external MQTT broker dependency (no network flakiness). +- **Execution**: 35 passed in 145.14s on the target worktree. + +### (7) Regression & Test Suite Verification +Targeted test execution in worktree `/Users/godopu16/PuKi/laa/canary_projects/multi-agent-mux-wt/pr-22`: +| Test Suite | Result | Time | +| :--- | :---: | :---: | +| `tests/test_issue21_worktree_prereqs.py` | **35 / 35 PASS** | 145.14s | +| `tests/test_herdr_shim_contract.py` | **17 / 17 PASS** | 21.51s | +| `tests/test_issue5_phase2a_loop.py` | **91 / 91 PASS** | 2.75s | +| `tests/test_version_consistency.py` | **3 / 3 PASS** | 0.87s | +| `tests/test_issue6_turn_handshake.py` | **14 / 14 PASS** | 56.44s | + +- **Verification of Author's "33 Failures" Claim**: + - Investigated test failures in suites outside PR #22's diff (e.g. `test_issue18_liveness_contract.py::test_acceptance5` and `test_issue14_delivery_ack.py::test_wrapper_idle_grace_never_outlives_the_wall_clock`). + - Analysis confirmed: + - `test_acceptance5` failure was caused by collisions on the public shared MQTT broker (`python/mqtt/jobs/+/dispatch`) receiving dispatches from concurrent runs on other machines (`pu-macbook-pro.local`). + - `test_issue14` timing test failure was a 56ms jitter (28.05s vs 28.00s threshold) under multi-process CPU contention with `slow-python sleep 0.7`. + - Neither test was modified in PR #22 (zero diff against `5611859`). + - All core subsystem and prerequisite tests for PR #22 pass 100%. No regressions introduced. + +### (8) Issue #21 Scope Adherence & Deferrals +- **Phase 1 Complete**: + - Item 1: Wrapper absolute paths (Complete, verified). + - Item 2: Loop runner worktree options & diff scoping (Complete, verified). + - Item 3: Control plane binding propagation & persistence (Complete, verified). + - Item 6: Dedicated test suite (Complete, verified). +- **Properly Deferred to Phase 2**: + - Item 4: Multi-loop worktree contention and queuing. + - Item 5: Reviewer test artifact isolation / sandbox. + - Item 7: Worktree deletion and cleanup safety script. + - Item 8: Autonomous end-to-end worktree creator lifecycle. +- **Follow-up Recommendations**: The 5 follow-up recommendations (Phase 2 worktree lifecycle script, isolated scratch spaces for reviewer test runs, worktree removal safety validation, loop lock file, telemetry) are appropriate and correctly planned for subsequent PRs. + +### (9) Merge Readiness Assessment +- **Blocker Scan**: No unhandled edge cases, no security vulnerabilities, no broken imports, no regressions. +- **Known Limitations Acknowledged**: + 1. Version bump to 4.6.0 + `VERSIONS.md` entry (orchestrator release commit). + 2. Trailing markdown whitespace in review notes (orchestrator release commit). + +--- + +## 3. Final Conclusion + +PR #22 successfully delivers the Phase 1 prerequisites for the Worktree Creator Operating Model with high code quality, robust test isolation, and strict backwards compatibility. + +[VERDICT: PASS] diff --git a/.agents/skills/lib.sh b/.agents/skills/lib.sh index d19040f..30ac927 100644 --- a/.agents/skills/lib.sh +++ b/.agents/skills/lib.sh @@ -29,7 +29,7 @@ export WORKSPACE_ROOT # Framework semantic version. Single runtime source of truth; kept in lockstep # with VERSIONS.md and the 8 SKILL.md frontmatters by tests/test_version_consistency.py. # NOTE: unlike other MAM_* variables this one is intentionally NOT env-overridable. -MAM_VERSION="4.5.0" +MAM_VERSION="4.6.0" export MAM_VERSION AGENT_SESSIONS_YAML="${AGENT_SESSIONS_YAML:-$WORKSPACE_ROOT/.mam/agent-sessions.yaml}" diff --git a/.agents/skills/lib_py/loop/eager.py b/.agents/skills/lib_py/loop/eager.py index 61da21e..4fb4b34 100644 --- a/.agents/skills/lib_py/loop/eager.py +++ b/.agents/skills/lib_py/loop/eager.py @@ -13,7 +13,7 @@ import sys from typing import List, Sequence # Framework version locked with framework constants -FRAMEWORK_VERSION = "4.5.0" +FRAMEWORK_VERSION = "4.6.0" CORE_MODULES: Sequence[str] = ( # Standard library modules diff --git a/.agents/skills/multi-agent-mux-create/SKILL.md b/.agents/skills/multi-agent-mux-create/SKILL.md index 4dd5b12..fc5628c 100644 --- a/.agents/skills/multi-agent-mux-create/SKILL.md +++ b/.agents/skills/multi-agent-mux-create/SKILL.md @@ -1,7 +1,7 @@ --- name: multi-agent-mux-create description: "Create a new agent session (claude, antigravity/agy) in a dedicated herdr session for context-preserving long-running work. Always creates a herdr session โ€” never backgrounds with nohup/disown. Writes the new session to .mam/agent-sessions.yaml. Use when you want to start a fresh agent (no prior UUID) for a new project workspace." -version: 4.5.0 +version: 4.6.0 author: godopu license: MIT platforms: [linux, macos] diff --git a/.agents/skills/multi-agent-mux-delegate-job/SKILL.md b/.agents/skills/multi-agent-mux-delegate-job/SKILL.md index e073daa..84ed3f4 100644 --- a/.agents/skills/multi-agent-mux-delegate-job/SKILL.md +++ b/.agents/skills/multi-agent-mux-delegate-job/SKILL.md @@ -1,7 +1,7 @@ --- name: multi-agent-mux-delegate-job description: "Delegate a unit of work to any autonomous agent (claude-code, hermes, agy, grok-build, codex, or a human) and observe it asynchronously over an MQTT event channel. Supported roles include orchestrator, worker, and reviewer." -version: 4.5.0 +version: 4.6.0 author: godopu license: MIT platforms: [linux, macos, windows] diff --git a/.agents/skills/multi-agent-mux-loop/SKILL.md b/.agents/skills/multi-agent-mux-loop/SKILL.md index 66bae18..d453597 100644 --- a/.agents/skills/multi-agent-mux-loop/SKILL.md +++ b/.agents/skills/multi-agent-mux-loop/SKILL.md @@ -1,7 +1,7 @@ --- name: multi-agent-mux-loop description: "Run an autonomous planning-execution-review loop using multiple agents (Planner, Creator, Reviewers) in the workspace. Automatically orchestrates plan discussion, code changes, and peer reviews until a unanimous PASS is achieved or the maximum iteration limit is reached." -version: 4.5.0 +version: 4.6.0 author: godopu license: MIT platforms: [linux, macos] diff --git a/.agents/skills/multi-agent-mux-monitor/SKILL.md b/.agents/skills/multi-agent-mux-monitor/SKILL.md index 316f291..570c860 100644 --- a/.agents/skills/multi-agent-mux-monitor/SKILL.md +++ b/.agents/skills/multi-agent-mux-monitor/SKILL.md @@ -1,7 +1,7 @@ --- name: multi-agent-mux-monitor description: "Run a long-lived reconciler that watches .mam/agent-sessions.yaml against the actual herdr/agent runtime state and reconciles them. Use when you want live visibility into which agent sessions are running, which are dead, which have stale YAML entries, and which have new session ids that haven't been recorded yet. Runs as a persistent loop (`reconcile.sh --subscribe`) that keeps going until it times out, idles out, or is interrupted." -version: 4.5.0 +version: 4.6.0 author: godopu license: MIT platforms: [linux, macos] diff --git a/.agents/skills/multi-agent-mux-orc-onboard/SKILL.md b/.agents/skills/multi-agent-mux-orc-onboard/SKILL.md index 8f2f656..95cb8b0 100644 --- a/.agents/skills/multi-agent-mux-orc-onboard/SKILL.md +++ b/.agents/skills/multi-agent-mux-orc-onboard/SKILL.md @@ -1,7 +1,7 @@ --- name: multi-agent-mux-orc-onboard description: "Register current or specified orchestrator session UUID into agent-sessions.yaml orchestrator_uuids list to prevent sub-agent discovery capture." -version: 4.5.0 +version: 4.6.0 author: godopu license: MIT platforms: [linux, macos] diff --git a/.agents/skills/multi-agent-mux-resume/SKILL.md b/.agents/skills/multi-agent-mux-resume/SKILL.md index 50aee73..4410cf6 100644 --- a/.agents/skills/multi-agent-mux-resume/SKILL.md +++ b/.agents/skills/multi-agent-mux-resume/SKILL.md @@ -1,7 +1,7 @@ --- name: multi-agent-mux-resume description: "Resume an existing agent (claude, antigravity/agy) conversation by UUID into a herdr session. Reads .mam/agent-sessions.yaml for the saved session/conversation id, spawns (or reuses) a herdr session of the matching name, and runs `claude -r ` or `agy --conversation ` inside. Use when you want to reattach to a previous session's context, or revive a session whose herdr died but the agent's conversation is still on disk." -version: 4.5.0 +version: 4.6.0 author: godopu license: MIT platforms: [linux, macos] diff --git a/.agents/skills/multi-agent-mux-status/SKILL.md b/.agents/skills/multi-agent-mux-status/SKILL.md index 0a92c21..73f0b30 100644 --- a/.agents/skills/multi-agent-mux-status/SKILL.md +++ b/.agents/skills/multi-agent-mux-status/SKILL.md @@ -1,7 +1,7 @@ --- name: multi-agent-mux-status description: "Read-only instant snapshot of all agent herdr sessions โ€” name, YAML status, herdr alive, pane cmd/cwd, resume UUID on disk, and any drift. No mutation. Reuses reconcile.sh --dry-run for the diff logic. Use when you want to know 'what's running RIGHT NOW' without spinning up the monitor loop." -version: 4.5.0 +version: 4.6.0 author: godopu license: MIT platforms: [linux, macos] diff --git a/.agents/skills/multi-agent-mux-stop/SKILL.md b/.agents/skills/multi-agent-mux-stop/SKILL.md index 8da1a8e..43db5b3 100644 --- a/.agents/skills/multi-agent-mux-stop/SKILL.md +++ b/.agents/skills/multi-agent-mux-stop/SKILL.md @@ -1,7 +1,7 @@ --- name: multi-agent-mux-stop description: "Stop an agent herdr session (claude, antigravity/agy) and update .mam/agent-sessions.yaml. Default stops gracefully and marks status=stopped with conversation preserved for resume. Does NOT delete on-disk conversation artifacts (jsonl/db) โ€” those are preserved unless --purge-conversation is passed. Use when ending a work session, switching to a different one, or cleaning up before a fresh start." -version: 4.5.0 +version: 4.6.0 author: godopu license: MIT platforms: [linux, macos] diff --git a/.venv b/.venv new file mode 120000 index 0000000..b85ffa8 --- /dev/null +++ b/.venv @@ -0,0 +1 @@ +/Users/godopu16/PuKi/laa/canary_projects/multi-agent-mux/.venv \ No newline at end of file diff --git a/BOOTSTRAP.ko.md b/BOOTSTRAP.ko.md index b53029f..4f568b3 100644 --- a/BOOTSTRAP.ko.md +++ b/BOOTSTRAP.ko.md @@ -2,7 +2,7 @@ ๋ณธ ๋ฌธ์„œ๋Š” `herdr_agent_orchestration` ์˜ค์ผ€์ŠคํŠธ๋ ˆ์ด์…˜ ๋ฐ ๋ฉ”์‹œ์ง• ๋ฐฑํ”Œ๋ ˆ์ธ ์›Œํฌํ”Œ๋กœ์šฐ๋ฅผ ์ƒˆ๋กœ์šด ํ”„๋กœ์ ํŠธ์— ๋„์ž…ํ•˜์—ฌ ์ด์‹ํ•˜๊ณ , ์ƒˆ๋กœ์šด ๊ฐœ๋ฐœ์ž/์—์ด์ „ํŠธ๊ฐ€ ์ดˆ๊ธฐ ๊ฐ€๋™์„ ์‹œ์ž‘ํ•  ๋•Œ ์ˆ˜ํ–‰ํ•ด์•ผ ํ•˜๋Š” ํ™˜๊ฒฝ ์„ค์ • ๋ฐ ๊ตฌ์ถ• ์ ˆ์ฐจ๋ฅผ ์•ˆ๋‚ดํ•ฉ๋‹ˆ๋‹ค. -[![Version: v4.5.0](https://img.shields.io/badge/version-v4.5.0-blue.svg)](VERSIONS.md) +[![Version: v4.6.0](https://img.shields.io/badge/version-v4.6.0-blue.svg)](VERSIONS.md) ์ƒˆ๋กœ์šด ์—์ด์ „ํŠธ๋Š” ์ด ์•ˆ๋‚ด์„œ์— ๊ธฐ์ˆ ๋œ ์ ˆ์ฐจ๋ฅผ ์ˆœ์ฐจ์ ์œผ๋กœ ์‹คํ–‰ํ•˜์—ฌ ์ดˆ๊ธฐ ํ™˜๊ฒฝ์„ ์•ˆ์ •์ ์œผ๋กœ ์„ค์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. diff --git a/BOOTSTRAP.md b/BOOTSTRAP.md index e161945..fa304e2 100644 --- a/BOOTSTRAP.md +++ b/BOOTSTRAP.md @@ -2,7 +2,7 @@ This document guides you through the setup and initialization procedures required to adopt the `herdr_agent_orchestration` orchestration and messaging backplane workflow in a new project, enabling a new developer or agent to get up and running quickly. -[![Version: v4.5.0](https://img.shields.io/badge/version-v4.5.0-blue.svg)](VERSIONS.md) +[![Version: v4.6.0](https://img.shields.io/badge/version-v4.6.0-blue.svg)](VERSIONS.md) A new agent can follow the steps in this guide sequentially to establish a stable and reliable initial environment. diff --git a/MESSAGING.md b/MESSAGING.md index a2c53b0..9efb484 100644 --- a/MESSAGING.md +++ b/MESSAGING.md @@ -1,6 +1,6 @@ # Messaging System Technical Analysis & Architecture Report -Applies to: MAM v4.5.0 +Applies to: MAM v4.6.0 This report provides a comprehensive, deep-dive analysis of the messaging system implemented in the `multi-agent-mux-delegate-job` skill. It covers the MQTT broker architecture, event protocols, job lifecycles, codebase internals, cross-system integration, and a list of known limitations along with production recommendations. diff --git a/README.ko.md b/README.ko.md index 8cbf299..1faac87 100644 --- a/README.ko.md +++ b/README.ko.md @@ -2,7 +2,7 @@ Herdr์™€ MQTT ๋ธŒ๋กœ์ปค๋ฅผ ๊ธฐ๋ฐ˜์œผ๋กœ ๊ตฌ์ถ•๋œ ๊ณ ์‹ ๋ขฐ์„ฑ **๋‹ค์ค‘ ์—์ด์ „ํŠธ ์˜ค์ผ€์ŠคํŠธ๋ ˆ์ด์…˜ ๋ฐ ๋ฉ”์‹œ์ง• ๋ฐฑํ”Œ๋ ˆ์ธ** ํ”„๋ ˆ์ž„์›Œํฌ์ž…๋‹ˆ๋‹ค. `claude`, `agy`, `hermes`, `grok`, `opencode`, `codex` ๋“ฑ ๋‹ค์ค‘ LLM ๋ฐฑ์—”๋“œ ์—์ด์ „ํŠธ ์ „๋ฐ˜์— ๊ฑธ์ณ ์žฅ์‹œ๊ฐ„ ์ˆ˜ํ–‰๋˜๋Š” ์ž‘์—…(์ฝ”๋“œ ์ƒ์„ฑ, ๋ฆฌํŒฉํ† ๋ง, ๋ณด์•ˆ ๊ฒ€ํ†  ๋“ฑ)์„ ์กฐ์ •, ๊ฒฉ๋ฆฌ ๋ฐ ๊ฐ์‚ฌํ•  ์ˆ˜ ์žˆ๋„๋ก ์„ค๊ณ„๋˜์—ˆ์Šต๋‹ˆ๋‹ค. -[![Version: v4.5.0](https://img.shields.io/badge/version-v4.5.0-blue.svg)](VERSIONS.md) +[![Version: v4.6.0](https://img.shields.io/badge/version-v4.6.0-blue.svg)](VERSIONS.md) --- diff --git a/README.md b/README.md index a19c586..931688d 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ An advanced, high-reliability **Multi-Agent Orchestration & Messaging Backplane** framework built on Herdr and MQTT. It is designed to coordinate, isolate, and audit long-running agent tasks (such as code generation, refactoring, and security reviews) across multiple LLM backend clients (`claude`, `agy`, `hermes`, `grok`, `opencode`, `codex`). -[![Version: v4.5.0](https://img.shields.io/badge/version-v4.5.0-blue.svg)](VERSIONS.md) +[![Version: v4.6.0](https://img.shields.io/badge/version-v4.6.0-blue.svg)](VERSIONS.md) --- diff --git a/VERSIONS.md b/VERSIONS.md index 42e8842..d3b6ed3 100644 --- a/VERSIONS.md +++ b/VERSIONS.md @@ -6,7 +6,7 @@ ## ๐Ÿ“Œ ํ˜„์žฌ ๋ฒ„์ „ ๊ฐœ์š” (Current Release) -- **ํ”„๋ ˆ์ž„์›Œํฌ ๋ฒ„์ „**: `v4.5.0` +- **ํ”„๋ ˆ์ž„์›Œํฌ ๋ฒ„์ „**: `v4.6.0` - **์ตœ์‹  ๋ฆด๋ฆฌ์Šค ์ผ์‹œ**: 2026-09-13 (KST) - **๊ธฐ์ค€ ๋ธŒ๋žœ์น˜**: `main` - **ํ•ต์‹ฌ ์•„ํ‚คํ…์ฒ˜**: @@ -21,23 +21,38 @@ ## ๐Ÿงญ ์Šคํ‚ฌ ํŒจํ‚ค์ง€ ๋ฒ„์ „ ๋งคํŠธ๋ฆญ์Šค (Skills Version Matrix) -๋ชจ๋“  8๊ฐœ ์Šคํ‚ฌ์€ YAML frontmatter ๋ฉ”ํƒ€๋ฐ์ดํ„ฐ(`author`, `version`, `platforms`, `environments`) ํ‘œ์ค€ํ™”๋ฅผ ํ†ตํ•ด `v4.5.0`๋กœ ๋™๊ธฐํ™”๋˜์–ด ๋ฐฐํฌ๋ฉ๋‹ˆ๋‹ค. +๋ชจ๋“  8๊ฐœ ์Šคํ‚ฌ์€ YAML frontmatter ๋ฉ”ํƒ€๋ฐ์ดํ„ฐ(`author`, `version`, `platforms`, `environments`) ํ‘œ์ค€ํ™”๋ฅผ ํ†ตํ•ด `v4.6.0`๋กœ ๋™๊ธฐํ™”๋˜์–ด ๋ฐฐํฌ๋ฉ๋‹ˆ๋‹ค. | ์Šคํ‚ฌ๋ช… | ๋ฒ„์ „ | ์—ญํ•  ๋ฐ ์ฃผ์š” ์ฑ…์ž„ | ์ƒํƒœ | | :--- | :---: | :--- | :---: | -| **`multi-agent-mux-create`** | `4.5.0` | ์—์ด์ „ํŠธ ์„ธ์…˜ ์‹ ๊ทœ ์ƒ์„ฑ ๋ฐ Herdr ์ปจํ…Œ์ด๋„ˆ ๊ฒฉ๋ฆฌ ์Šคํฐ | โœ… ๋ฐฐํฌ | -| **`multi-agent-mux-stop`** | `4.5.0` | ๋Œ€ํ™” UUID ์›์ž์  ์บก์ฒ˜ ๋ฐ ์„ธ์…˜ ์•ˆ์ „ ์ข…๋ฃŒ (Graceful Stop) | โœ… ๋ฐฐํฌ | -| **`multi-agent-mux-resume`** | `4.5.0` | ์˜จ๋””์Šคํฌ ๋Œ€ํ™” ์ปจํ…์ŠคํŠธ ๊ธฐ๋ฐ˜ Tier-1 ์ดˆ๊ณ ์† ์„ธ์…˜ ๋ณต์› | โœ… ๋ฐฐํฌ | -| **`multi-agent-mux-status`** | `4.5.0` | ์‹ค์‹œ๊ฐ„ Herdr ์„ธ์…˜ ๋ฐ ๋ ˆ์ง€์ŠคํŠธ๋ฆฌ ๋“œ๋ฆฌํ”„ํŠธ ์Šค๋ƒ…์ƒท ์กฐํšŒ | โœ… ๋ฐฐํฌ | -| **`multi-agent-mux-monitor`** | `4.5.0` | YAML โ†” ๋Ÿฐํƒ€์ž„ ์ƒํƒœ ๊ฐ„ ์ž์œจ ์กฐ์ •์ž (Reconciler Loop) | โœ… ๋ฐฐํฌ | -| **`multi-agent-mux-delegate-job`** | `4.5.0` | MQTT ์ด๋ฒคํŠธ ์ฑ„๋„ ๊ธฐ๋ฐ˜ ๋น„๋™๊ธฐ ๋‹จ์œ„ ์ž‘์—… ์œ„์ž„ | โœ… ๋ฐฐํฌ | -| **`multi-agent-mux-loop`** | `4.5.0` | Planner-Creator-Reviewer 3์ž ์ž์œจ ๊ณ„ํšยท์‹คํ–‰ยทํ”ผ์–ด๋ฆฌ๋ทฐ ๋ฃจํ”„ | โœ… ๋ฐฐํฌ | -| **`multi-agent-mux-orc-onboard`** | `4.5.0` | ์˜ค์ผ€์ŠคํŠธ๋ ˆ์ดํ„ฐ UUID ๊ฒฉ๋ฆฌ ๋“ฑ๋ก ๋ฐ ์„œ๋ธŒ ์„ธ์…˜ ์˜ค์—ผ ๋ฐฉ์ง€ | โœ… ๋ฐฐํฌ | +| **`multi-agent-mux-create`** | `4.6.0` | ์—์ด์ „ํŠธ ์„ธ์…˜ ์‹ ๊ทœ ์ƒ์„ฑ ๋ฐ Herdr ์ปจํ…Œ์ด๋„ˆ ๊ฒฉ๋ฆฌ ์Šคํฐ | โœ… ๋ฐฐํฌ | +| **`multi-agent-mux-stop`** | `4.6.0` | ๋Œ€ํ™” UUID ์›์ž์  ์บก์ฒ˜ ๋ฐ ์„ธ์…˜ ์•ˆ์ „ ์ข…๋ฃŒ (Graceful Stop) | โœ… ๋ฐฐํฌ | +| **`multi-agent-mux-resume`** | `4.6.0` | ์˜จ๋””์Šคํฌ ๋Œ€ํ™” ์ปจํ…์ŠคํŠธ ๊ธฐ๋ฐ˜ Tier-1 ์ดˆ๊ณ ์† ์„ธ์…˜ ๋ณต์› | โœ… ๋ฐฐํฌ | +| **`multi-agent-mux-status`** | `4.6.0` | ์‹ค์‹œ๊ฐ„ Herdr ์„ธ์…˜ ๋ฐ ๋ ˆ์ง€์ŠคํŠธ๋ฆฌ ๋“œ๋ฆฌํ”„ํŠธ ์Šค๋ƒ…์ƒท ์กฐํšŒ | โœ… ๋ฐฐํฌ | +| **`multi-agent-mux-monitor`** | `4.6.0` | YAML โ†” ๋Ÿฐํƒ€์ž„ ์ƒํƒœ ๊ฐ„ ์ž์œจ ์กฐ์ •์ž (Reconciler Loop) | โœ… ๋ฐฐํฌ | +| **`multi-agent-mux-delegate-job`** | `4.6.0` | MQTT ์ด๋ฒคํŠธ ์ฑ„๋„ ๊ธฐ๋ฐ˜ ๋น„๋™๊ธฐ ๋‹จ์œ„ ์ž‘์—… ์œ„์ž„ | โœ… ๋ฐฐํฌ | +| **`multi-agent-mux-loop`** | `4.6.0` | Planner-Creator-Reviewer 3์ž ์ž์œจ ๊ณ„ํšยท์‹คํ–‰ยทํ”ผ์–ด๋ฆฌ๋ทฐ ๋ฃจํ”„ | โœ… ๋ฐฐํฌ | +| **`multi-agent-mux-orc-onboard`** | `4.6.0` | ์˜ค์ผ€์ŠคํŠธ๋ ˆ์ดํ„ฐ UUID ๊ฒฉ๋ฆฌ ๋“ฑ๋ก ๋ฐ ์„œ๋ธŒ ์„ธ์…˜ ์˜ค์—ผ ๋ฐฉ์ง€ | โœ… ๋ฐฐํฌ | --- ## ๐Ÿ“‹ ๋ฒ„์ „๋ณ„ ์ƒ์„ธ ๋ณ€๊ฒฝ ๋‚ด์—ญ (Changelog) +### ๐Ÿš€ `v4.6.0` โ€” Issue #21 ์›ŒํฌํŠธ๋ฆฌ ์šด์˜ ๋ชจ๋ธ 1๋‹จ๊ณ„ ์„ ํ–‰ ์ž‘์—…: ๋ž˜ํผ ์ ˆ๋Œ€๊ฒฝ๋กœ, ๋ฃจํ”„ `--worktree`, ์ œ์–ด ํ‰๋ฉด ๋ฐ”์ธ๋”ฉ, ์„ค๊ณ„ ๋ฌธ์„œ (2026-09-14, PR #22) + +> **๋งˆ์ด๋„ˆ ๋งˆ์ผ์Šคํ†ค (MINOR Release)**: "์›Œํฌ์ŠคํŽ˜์ด์Šค = ์ฒดํฌ์•„์›ƒ ๊ฒฝ๋กœ" ๊ฐ€์ •์„ ๋А์Šจํ•˜๊ฒŒ ํ•˜๋Š” 1๋‹จ๊ณ„๋‹ค. creator ๋Š” ์ด์Šˆ๋ณ„ git ์›ŒํฌํŠธ๋ฆฌ์—์„œ, ๋ฆฌ๋ทฐ์–ด ํ’€์€ ๋ณธ ์ฒดํฌ์•„์›ƒ์—์„œ, ์žก ๋ธŒ๋ฆฌํ”„ยท๋ ˆ์ง€์ŠคํŠธ๋ฆฌยท๋ฆฌํฌํŠธยท์ฒดํฌํฌ์ธํŠธ(์ œ์–ด ํ‰๋ฉด)๋Š” ๋ณธ ์ฒดํฌ์•„์›ƒ ํ•˜๋‚˜์— ๋‘๋Š” ์šด์˜ ๋ชจ๋ธ(#21, `docs/design/worktree-creator-model.md`)์˜ ์„ ํ–‰ ์กฐ๊ฑด 4๊ฑด(์ž‘์—… ํ•ญ๋ชฉ 1ยท2ยท3ยท6)์„ ๊ตฌํ˜„ํ–ˆ๋‹ค. ๋ฃจํ”„ ๋Ÿฌ๋„ˆ ์˜ต์…˜ 3๊ฐœ์™€ `lib_py/control_plane.py` ๊ฐ€ ์ถ”๊ฐ€๋˜์–ด MINOR ๋กœ ์˜ฌ๋ฆฐ๋‹ค. ์˜ต์…˜ ์—†์ด ์“ฐ๋ฉด ์ข…์ „ ๋™์ž‘๊ณผ ํ”„๋กฌํ”„ํŠธ๊ฐ€ ๋ฐ”์ดํŠธ ๋‹จ์œ„๋กœ ๊ฐ™๋‹ค. ํ•ญ๋ชฉ 4(์›ŒํฌํŠธ๋ฆฌ ์ค€๋น„/์ข…๋ฃŒ ํ—ฌํผ)ยท5(๋ฆฌ๋ทฐ identity)ยท7(์‹œํ—˜ ์šด์˜)ยท8(๋‹ค์ค‘ ๋ฃจํ”„)์€ #21 ์— ๋‚จ์•„ ์žˆ๋‹ค. + +#### ๐ŸŒŸ ์ฃผ์š” ๊ฐœ์„  ์‚ฌํ•ญ +1. **๋ž˜ํผ ์ ˆ๋Œ€๊ฒฝ๋กœํ™” (`multi-agent-mux-delegate-job`)**: ์ฃผ์ž… ๋ฌธ๊ตฌ์˜ brief ๊ฒฝ๋กœ, ์‹œ์ž‘/์„ฑ๊ณต/์˜ค๋ฅ˜ ๋ช…๋ น์˜ `--registry-dir`, ๊ฐ์‚ฌ ๋กœ๊ทธ ๋ฃจํŠธ(`DELEGATE_JOB_LOGS_DIR`), ๋ธŒ๋ฆฌํ”„์˜ Output Report Path ๊ฐ€ `$REGISTRY_DIR` ๊ธฐ์ค€ ์ ˆ๋Œ€๊ฒฝ๋กœ๊ฐ€ ๋๋‹ค(`_abs_registry_dir`ยท`_pub_cmd`ยท`_instructions`, `printf %q` ์ธ์šฉ). ์›ŒํฌํŠธ๋ฆฌ cwd ์˜ creator ๊ฐ€ `started` ๋ฅผ ๋ฐœํ–‰ํ•˜๊ณ  ๋ฆฌํฌํŠธ๋ฅผ ๋ณธ ์ฒดํฌ์•„์›ƒ์˜ ์žก ๋””๋ ‰ํ„ฐ๋ฆฌ์— ์“ด๋‹ค. +2. **๋ฃจํ”„ ๋Ÿฌ๋„ˆ `--worktree ` / `--base ` / `--review-only` (`lib_py/loop/runner.py`, `run_loop.sh`)**: diff ์ˆ˜์ง‘ยท`base_commit`ยทhead ๋Š” ์›ŒํฌํŠธ๋ฆฌ ๊ธฐ์ค€, wrapperยท๋ ˆ์ง€์ŠคํŠธ๋ฆฌ(`MAM_JOBS_DIR` ์กด์ค‘)ยท์ฒดํฌํฌ์ธํŠธยท๋ฆฌํฌํŠธ ์Šน๊ฒฉ์€ ๋ณธ ์ฒดํฌ์•„์›ƒ ๊ธฐ์ค€. ์›ŒํฌํŠธ๋ฆฌ๋Š” ๊ฐ™์€ ์ €์žฅ์†Œ์˜ top-level ์ด์–ด์•ผ ํ•˜๊ณ  `--base` ๋Š” head ์˜ ์กฐ์ƒ์ด์–ด์•ผ ํ•œ๋‹ค. ์œ„์ž„ ํ”„๋กฌํ”„ํŠธ ์•ž์— `[์›ŒํฌํŠธ๋ฆฌ ์ปจํ…์ŠคํŠธ]`(์†Œ์Šค ๊ฒฝ๋กœยท๋ธŒ๋žœ์น˜ยทbaseยทheadยท์ปค๋ฐ‹ ์ˆ˜ยท๋ฏธ์ปค๋ฐ‹ ์—ฌ๋ถ€ยท์ œ์–ด ํ‰๋ฉด) ๋ธ”๋ก์„ ๋ถ™์ธ๋‹ค. ๋ณ€๊ฒฝ ์ง‘ํ•ฉ์ด ๋น„๋ฉด fail-closed. `MAM_LOOP_WORKTREE` env ๋™์น˜. +3. **์ œ์–ด ํ‰๋ฉด ๋ฐ”์ธ๋”ฉ (`lib_py/control_plane.py`, create/resume/stop/status/reconcile)**: `WORKSPACE_ROOT`/`AGENT_SESSIONS_YAML`/`MAM_JOBS_DIR`/`DELEGATE_JOB_LOGS_DIR` 4๊ฐœ ๊ฒฝ๋กœ๋ฅผ ์„ธ์…˜ ํ–‰์˜ `control_plane` ํ•„๋“œ๋กœ ์˜์†ํ™”ํ•˜๊ณ , `--workspace` ๋งŒ์œผ๋กœ ์œ ๋„๋˜๋Š” ๊ธฐ๋ณธ๊ฐ’๊ณผ ๋‹ค๋ฅผ ๋•Œ๋งŒ pane ์ƒ์„ฑ ํ˜ธ์ถœ์˜ `--env` ๋กœ ์ „ํŒŒํ•œ๋‹ค(์žฌ์‚ฌ์šฉ idle pane ์—๋Š” env ๋ฅผ ์—์ด์ „ํŠธ ์ธ์ž๋กœ ๋„˜๊ธฐ์ง€ ์•Š์œผ๋ฏ€๋กœ env ๊ฐ€ ํ•„์š”ํ•˜๋ฉด pane ์„ ์ƒˆ๋กœ ๋งŒ๋“ ๋‹ค โ€” h25 ๊ณ„์•ฝ ๊ฐฑ์‹ ). ์ƒ๋Œ€ `MAM_JOBS_DIR` ์€ jobs dir ํ•˜๋‚˜๋กœ ์ •๊ทœํ™”, stop ์€ ๊ฐ์‚ฌ ๋กœ๊ทธ ๋ฃจํŠธ๋ฅผ ์œ ์ง€, status/reconcile ์€ `MAM_JOBS_DIR` ์„ ์กด์ค‘ํ•œ๋‹ค. ๊ฒฝ๋กœ์— ๊ณต๋ฐฑ์ด ์žˆ์œผ๋ฉด ์ „ํŒŒ๋ฅผ ๊ฑฐ๋ถ€(rc 3)ํ•œ๋‹ค. +4. **์„ค๊ณ„ ๋ฌธ์„œ ์ •์ • (`docs/design/worktree-creator-model.md`)**: 4์ธ ๋ฆฌ๋ทฐ(#21 ๋Œ“๊ธ€, `docs/design/reviews/`)๋ฅผ ๋ฐ˜์˜ํ•ด "ํ˜„์žฌ ์ฝ”๋“œ ๊ธฐ์ค€" ์„ ๋ถ€๋ถ„ ์ง€์› + ํ•„์š”ํ•œ ์ˆ˜์ •์œผ๋กœ, 1๋‹จ๊ณ„ ๋ฆฌ๋ทฐ ์ „์šฉ ํ๋ฆ„, ์Šคํ‚ฌ๋ณ„ ํ˜ธํ™˜์„ฑ ํ‘œ, ๋ฃจํŠธ 3์ข…(์ œ์–ด/์†Œ์Šค/๋Ÿฐํƒ€์ž„)๊ณผ ๋ฆฌ๋ทฐ identity ๋ฅผ ๋ช…์‹œํ–ˆ๋‹ค. + +#### โœ… ํ’ˆ์งˆ ๊ฒ€์ฆ +- **์‹ ๊ทœ ํ…Œ์ŠคํŠธ**: `tests/test_issue21_worktree_prereqs.py`(๋ž˜ํผ ์ ˆ๋Œ€๊ฒฝ๋กœยท๋Ÿฌ๋„ˆ ์˜ต์…˜ยท์›ŒํฌํŠธ๋ฆฌ ๊ฒ€์ฆยท์ œ์–ด ํ‰๋ฉด ๋ฐ”์ธ๋”ฉยท์ „ํŒŒยทํ˜ธํ™˜์„ฑ), `tests/test_herdr_shim_contract.py` h25 ๊ฐฑ์‹ , T2-8 ์ƒŒ๋“œ๋ฐ•์Šคํ™”. +- **๋ฆฌ๋ทฐ**: ์ž‘์„ฑ ์›Œํฌ์ŠคํŽ˜์ด์Šค ๋ฃจํ”„์—์„œ claudeยทagyยทgrok PASS @13259ed, codex PASS @4a81d15; ๋ณ‘ํ•ฉ ์›Œํฌ์ŠคํŽ˜์ด์Šค์—์„œ PR head ๋ฅผ detached ์›ŒํฌํŠธ๋ฆฌ์— ๋ฐ›์•„ claudeยทagyยทcodex ์žฌ๊ฒ€ํ†  PASS @4a81d15(๋ฆฌํฌํŠธ `.agents/reports/`). ๋ณ‘ํ•ฉ ์›Œํฌ์ŠคํŽ˜์ด์Šค ์ „์ฒด ์Šค์œ„ํŠธ @4a81d15: 940 ํ†ต๊ณผ, ์‹คํŒจ 1๊ฑด์€ ๋ถ€ํ•˜ ์‹œ ๊ฒฝ๊ณ„๊ฐ’์— ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„ ํŒ์ •(๋‹จ๋… ์žฌ์‹คํ–‰ ํ†ต๊ณผ). +- **ํ›„์†(๋น„์ฐจ๋‹จ, #21ยท#20)**: create/resume ์˜ `mam_control_plane_json โ€ฆ || true` ๊ฐ€ ์‹คํŒจ๋ฅผ ์‚ผํ‚ด โ†’ ๊ฒฝ๊ณ /exit 2; resume ์˜ "herdr ์ด๋ฏธ ์‚ด์•„ ์žˆ์Œ" ๊ฒฝ๋กœ๊ฐ€ `CONTROL_PLANE_JSON` ๋ฏธ์ „๋‹ฌ; T2-6 ์˜ `os.environ` ์ง์ ‘ ๋ณ€๊ฒฝ; issue14 `_job_for_inprocess_publish` ๊ฐ€ ambient `WORKSPACE_ROOT` ๋กœ ์‹ค์ œ ๊ฐ์‚ฌ ๋กœ๊ทธ์— ๊ธฐ๋ก; acceptance5 ๊ฐ€ ๊ณต์šฉ ๋ธŒ๋กœ์ปค์—์„œ ๋™์‹œ ์‹คํ–‰ ์‹œ ๊ฐ™์€ ์„ธ์…˜ ์ด๋ฆ„์˜ ๋Ÿฌ๋„ˆ๊ฐ€ ์„œ๋กœ์˜ dispatch ๋ฅผ ์†Œ๋น„(์„ธ์…˜ ์ด๋ฆ„ uuid4 ํ™” ํ•„์š”); create ๋ ˆ์‹œํ”ผ์— `MAM_NO_SUBSCRIBER_DAEMON=1`. + ### ๐Ÿš€ `v4.5.0` โ€” Issue #18 ์ƒ์กดยท์ „๋‹ฌ ํŒ์ •์„ ํ”„๋กœํ† ์ฝœ ๊ณ„์•ฝ์œผ๋กœ ์™„๊ฒฐ: heartbeat ์ž๋™ํ™”, Kร—N ๋ฌด์‘๋‹ต, T ๋‚ด `started`, retained ์ƒํƒœ, ์›๊ฒฉ ์ „์†ก (2026-09-13) > **๋งˆ์ด๋„ˆ ๋งˆ์ผ์Šคํ†ค (MINOR Release)**: ์—์ด์ „ํŠธ์˜ ์ƒ์กดยท์ „๋‹ฌ ํŒ์ •์„ TUI ์Šคํฌ๋ž˜ํ•‘(herdr `agent_status`, pane ๋ฌธ์ž์—ด, ํ™”๋ฉด ๋ณ€ํ™”)์—์„œ ๋–ผ์–ด๋‚ด์–ด, ์—์ด์ „ํŠธ๊ฐ€ ์Šค์Šค๋กœ ๋ฐœํ–‰ํ•˜๋Š” ์ด๋ฒคํŠธ(`started`/`progress`/`completed`/`error`)์— **์˜๋ฌดยท์ฃผ๊ธฐยทํƒ€์ž„์•„์›ƒ ๊ทœ์น™์ด ์žˆ๋Š” ๊ณ„์•ฝ**์„ ๋ถ€์—ฌํ–ˆ๋‹ค(Issue #18, #17 ํ•ญ๋ชฉ 1). ์ƒˆ ์ด๋ฒคํŠธ ์ข…๋ฅ˜๋Š” ์—†๋‹ค. ์›๊ฒฉ ํ˜ธ์ŠคํŠธ์˜ ์—์ด์ „ํŠธ(paneยท๋””์Šคํฌ ๊ณต์œ  ์—†์Œ)๋ฅผ ๊ฐ™์€ ๊ณ„์•ฝ์œผ๋กœ ๋‹ค๋ฃจ๋Š” `remote:` ์ „์†ก์„ ์ถ”๊ฐ€ํ–ˆ๋‹ค. ๋ž˜ํผ ์˜ต์…˜ 3๊ฐœ(`--heartbeat`, `--heartbeat-misses`, `--ack-timeout`)์™€ `publish_event --heartbeat`, `job_subscriber --remote`, `remote.py` CLI ๊ฐ€ ์ถ”๊ฐ€๋˜์–ด MINOR ๋กœ ์˜ฌ๋ฆฐ๋‹ค. ๊ธฐ๋ณธ๊ฐ’(N=30, K=4 โ†’ idle 120 s, T=180)์€ ์ข…์ „ idle ๊ธฐ๋ณธ๊ฐ’๊ณผ ๊ฐ™์œผ๋ฏ€๋กœ ๊ธฐ์กด ํ˜ธ์ถœ์€ ๋™์ž‘์ด ์œ ์ง€๋œ๋‹ค. diff --git a/docs/design/reviews/review-agy-fd384d6b.md b/docs/design/reviews/review-agy-fd384d6b.md index 964405a..a0e5490 100644 --- a/docs/design/reviews/review-agy-fd384d6b.md +++ b/docs/design/reviews/review-agy-fd384d6b.md @@ -1,11 +1,11 @@ # Design Review Report: Worktree Creator Operating Model -**Reviewer**: Antigravity (`herdr:reviewer-agy-01`) -**Job ID**: `fd384d6b` -**Target Document**: `docs/design/worktree-creator-model.md` -**Branch / Commit**: `design/worktree-model` @ [`fe96db1`](file:///Users/godopu16/PuKi/laa/canary_projects/multi-agent-mux-wt/design-worktree-model/docs/design/worktree-creator-model.md) -**Date**: 2026-09-14 -**Status**: Review Complete +**Reviewer**: Antigravity (`herdr:reviewer-agy-01`) +**Job ID**: `fd384d6b` +**Target Document**: `docs/design/worktree-creator-model.md` +**Branch / Commit**: `design/worktree-model` @ [`fe96db1`](file:///Users/godopu16/PuKi/laa/canary_projects/multi-agent-mux-wt/design-worktree-model/docs/design/worktree-creator-model.md) +**Date**: 2026-09-14 +**Status**: Review Complete --- @@ -33,9 +33,9 @@ The proposal evaluates three candidate models: - **Branch Switching Collision**: Resolved completely. The Creator is the *only* agent that edits source code and creates git commits. Binding the Creator's `cwd` to `$WT` (e.g. `fix/issue-20`) guarantees that commits can only land on the issue branch. Even if another process alters HEAD in `$MAIN`, the worktree's HEAD remains untouched. - **Parallelism**: Resolved for implementation. Multiple Creators can work simultaneously on separate worktrees without filesystem contention. - **Missed Failure Paths & Countermeasures**: - 1. **Reviewer Test Pollution in Worktree**: ยง3 states that reviewers run tests in the worktree path (`$WT`). However, standard test runners (e.g. `pytest`) create untracked artifacts (`.pytest_cache`, `__pycache__`, `.pyc`, and temporary scratch files) directly in `$WT`. This contaminates the Creator's working tree and risks accidental inclusion in git commits. + 1. **Reviewer Test Pollution in Worktree**: ยง3 states that reviewers run tests in the worktree path (`$WT`). However, standard test runners (e.g. `pytest`) create untracked artifacts (`.pytest_cache`, `__pycache__`, `.pyc`, and temporary scratch files) directly in `$WT`. This contaminates the Creator's working tree and risks accidental inclusion in git commits. *Countermeasure*: Reviewers must run verification with cache suppression (e.g., `PYTHONDONTWRITEBYTECODE=1 pytest -o cache_dir=/tmp/...`), or tests must be executed with `--basetemp` outside `$WT`. - 2. **Stale Session Rows After Worktree Deletion**: When an issue branch is merged and `$WT` is unlinked (`git worktree remove $WT`), the Creator session row in `agent-sessions.yaml` still records `pane.cwd: $WT`. If the session is resumed or reconciled later, missing paths can trigger errors. + 2. **Stale Session Rows After Worktree Deletion**: When an issue branch is merged and `$WT` is unlinked (`git worktree remove $WT`), the Creator session row in `agent-sessions.yaml` still records `pane.cwd: $WT`. If the session is resumed or reconciled later, missing paths can trigger errors. *Countermeasure*: Establish a documented retirement procedure (`scripts/worktree_remove.sh`) enforcing that `multi-agent-mux-stop --session --purge` runs before `git worktree remove`. --- @@ -101,20 +101,20 @@ The proposal evaluates three candidate models: ### 3.2 Prompt Injection Relative Brief Paths (ยง5-1) - **Finding**: Prompt injection templates currently hardcode relative paths (`.mam/jobs//brief.md`), which will break when an agent's `cwd` is `$WT`. - **Evidence**: - - [`multi-agent-mux-delegate-job:199`](file:///Users/godopu16/PuKi/laa/canary_projects/multi-agent-mux/.agents/skills/multi-agent-mux-delegate-job/multi-agent-mux-delegate-job#L199): + - [`multi-agent-mux-delegate-job:199`](file:///Users/godopu16/PuKi/laa/canary_projects/multi-agent-mux/.agents/skills/multi-agent-mux-delegate-job/multi-agent-mux-delegate-job#L199): `"task brief file at: .mam/jobs/$JOB_ID/brief.md. Please READ and follow .mam/jobs/$JOB_ID/brief.md"` - - [`multi-agent-mux-delegate-job:455`](file:///Users/godopu16/PuKi/laa/canary_projects/multi-agent-mux/.agents/skills/multi-agent-mux-delegate-job/multi-agent-mux-delegate-job#L455): + - [`multi-agent-mux-delegate-job:455`](file:///Users/godopu16/PuKi/laa/canary_projects/multi-agent-mux/.agents/skills/multi-agent-mux-delegate-job/multi-agent-mux-delegate-job#L455): `"documented in the task brief file at: .mam/jobs/$JOB_ID/brief.md"` - - [`multi-agent-mux-delegate-job:352`](file:///Users/godopu16/PuKi/laa/canary_projects/multi-agent-mux/.agents/skills/multi-agent-mux-delegate-job/multi-agent-mux-delegate-job#L352): + - [`multi-agent-mux-delegate-job:352`](file:///Users/godopu16/PuKi/laa/canary_projects/multi-agent-mux/.agents/skills/multi-agent-mux-delegate-job/multi-agent-mux-delegate-job#L352): `- **Output Report Path**: .mam/jobs/$JOB_ID/${clean_session}-reports/report-final.md` - **Actionable Fix**: Update these three lines to use absolute path `$REGISTRY_DIR/$JOB_ID/brief.md` and `$REGISTRY_DIR/$JOB_ID/${clean_session}-reports/report-final.md`. ### 3.3 Loop Runner Diff Collection & `base_commit` (ยง5-2) - **Finding**: `LoopRunner` currently evaluates git status strictly against `self.workspace_root` ($MAIN). - **Evidence**: - - [`lib_py/loop/runner.py:564`](file:///Users/godopu16/PuKi/laa/canary_projects/multi-agent-mux/.agents/skills/lib_py/loop/runner.py#L564): + - [`lib_py/loop/runner.py:564`](file:///Users/godopu16/PuKi/laa/canary_projects/multi-agent-mux/.agents/skills/lib_py/loop/runner.py#L564): `subprocess.run(["git", "rev-parse", "HEAD"], cwd=str(self.workspace_root))` - - [`lib_py/loop/runner.py:402, 408`](file:///Users/godopu16/PuKi/laa/canary_projects/multi-agent-mux/.agents/skills/lib_py/loop/runner.py#L402): + - [`lib_py/loop/runner.py:402, 408`](file:///Users/godopu16/PuKi/laa/canary_projects/multi-agent-mux/.agents/skills/lib_py/loop/runner.py#L402): `subprocess.run(..., cwd=str(self.workspace_root))` - **Actionable Fix**: Introduce `--worktree ` (or `MAM_LOOP_WORKTREE`). Set `self.worktree_root = Path(args.worktree).resolve() if args.worktree else self.workspace_root`. Execute `git rev-parse HEAD` and `collect_changes_diff()` in `cwd=str(self.worktree_root)`.