(MOT-3893) chore(harness): tmux-based local dev stack in Makefile - #437
Conversation
Replaces the build-and-symlink script with a tmux dev workflow: dev-up brings up engine + full worker stack, restart <worker...> rebuilds selected workers (worktree-aware via WORKTREE_ROOT), plus stop/status/smoke/where helpers and an engine-port guard.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
skill-check — worker0 verified, 35 skipped (no docs/).
Four for four. Nicely done. |
📝 WalkthroughWalkthroughThe harness/Makefile is rewritten from a minimal worker build/link/restart helper into a full tmux-driven local development harness controller. It introduces configurable stack/port/profile defaults, engine lifecycle management, worker restart/stop targets, and diagnostic commands (status, smoke, logs, where). ChangesHarness Makefile Orchestration
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant Developer
participant Make as Makefile
participant Tmux
participant Engine as iii Engine
Developer->>Make: make dev-up
Make->>Make: ensure-session
Make->>Tmux: create session (if missing)
Make->>Tmux: start/respawn engine window
Make->>Engine: iii trigger engine::workers::list (poll)
Engine-->>Make: readiness response
Make->>Tmux: respawn worker windows (restart-worker)
Tmux-->>Engine: cargo run worker processes
Make->>Make: status
Make->>Engine: iii trigger engine::workers::list
Engine-->>Make: worker status
Make-->>Developer: print console URL and attach command
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
harness/Makefile (1)
80-84: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value
statusmay report a partial/empty worker list right afterrestart.
restart $(STACK)only creates/respawns the tmux windows; thecargo runbuilds compile and workers register asynchronously. Runningstatusimmediately afterward can print an incomplete list, which is misleading for a readiness summary. Consider polling for the expected worker count (similar towait-engine) before printing, or note thatstatusreflects a point-in-time snapshot.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@harness/Makefile` around lines 80 - 84, The readiness summary in dev-up is calling status immediately after restart, so it can print a partial worker list before the tmux windows and cargo run workers finish registering. Update dev-up to wait for the expected workers to appear before invoking status, ideally by reusing or extending the wait logic in wait-engine, or otherwise make the status output explicitly a point-in-time snapshot. Keep the change centered on dev-up, restart, status, and wait-engine so the readiness output is accurate.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@harness/Makefile`:
- Around line 80-84: The readiness summary in dev-up is calling status
immediately after restart, so it can print a partial worker list before the tmux
windows and cargo run workers finish registering. Update dev-up to wait for the
expected workers to appear before invoking status, ideally by reusing or
extending the wait logic in wait-engine, or otherwise make the status output
explicitly a point-in-time snapshot. Keep the change centered on dev-up,
restart, status, and wait-engine so the readiness output is accurate.
Rewrites
harness/Makefilefrom a build-and-symlink script into a tmux-based local dev workflow for the full worker stack.What changed
make dev-upstarts the engine (iii -c harness/engine.config.yaml) plus the full stack (iii-directory, llm-router, session-manager, context-manager, providers, shell, web, harness, approval-gate, console), each in its own tmux window, waits for engine readiness, and prints status.make restart <worker...>rebuilds and respawns selected workers viacargo run;WORKTREE_ROOT=.worktrees/<branch>runs a worker from a feature worktree while the rest stay on the main tree.make stop <worker...>/stop-work/stop-engine/dev-downfor teardown;status,smoke,where,logsfor inspection;make helpis the new default goal.require-engineverifies reachability before restarts.build/install-localkeep the old build-and-symlink flow, now scoped to selected workers and worktree-aware.Test plan
make dev-upboots engine + stack in tmux,wait-enginegates on readinessmake restart harness WORKTREE_ROOT=.worktrees/<branch>respawns from the worktreemake smokeprobes engine/harness/router triggersFixes MOT-3893
Summary by CodeRabbit
New Features
Bug Fixes