Skip to content

chore(harness): orient Makefile around iii engine config (playground-style)#135

Merged
ytallo merged 8 commits into
mainfrom
chore/harness-makefile-worker-add
May 14, 2026
Merged

chore(harness): orient Makefile around iii engine config (playground-style)#135
ytallo merged 8 commits into
mainfrom
chore/harness-makefile-worker-add

Conversation

@ytallo
Copy link
Copy Markdown
Contributor

@ytallo ytallo commented May 14, 2026

Summary

  • Replace harness/Makefile's build+spawn orchestration with a thin engine driver. The iii engine reads harness/config.yaml and spawns each worker via its own iii.worker.yaml scripts.start (cargo run for Rust workers — builds on demand).
  • Expand harness/config.yaml from 8 lines to a full playground-style manifest with inline per-worker config (shell denylist, iii-http port, iii-state path, etc.). harness itself registers with worker_path: . — relative, so no machine paths in git.
  • Shrink harness/Makefile from 229 → 113 lines. Remove the hardcoded WORKERS array, _spawn-one, REMOTE_WORKERS, BIN_NAME_FOR macro, per-worker pid/log files, and tmux. New web target backgrounds vite with a pidfile.
  • New make lock runs iii worker add . to refresh iii.lock when iii.worker.yaml changes (verified that iii worker add preserves pre-existing inline config: blocks).
  • Delete the parallel harness/scripts/demo.sh (256-line bash duplicate of the Makefile), harness/shell-config.yaml, and iii-directory/config.yaml.

Behavior change worth flagging

Today, every dep worker runs from local source (cargo build --release per worker). After this PR, only harness runs from local source; deps come from the registry per the versions in harness/iii.worker.yaml. Developers hacking on a sibling worker (e.g., provider-router) need to either edit harness/config.yaml to add a worker_path: line for that worker, or run iii worker add /path/to/sibling to inject one (it preserves existing inline configs).

Test plan

  • cargo build + cargo test --lib in harness/ — 41/41 pass
  • make clean && make all — engine boots, harness::status returns ok
  • make web — vite serves on :5173 without tmux; make logs W=web tails it; make stop kills it
  • make restart — clean stop + restart
  • CI green

Summary by CodeRabbit

Release Notes

  • Chores
    • Migrated local demo orchestration from shell scripts to Makefile-based targets
    • Consolidated configuration files and removed legacy demo driver script
    • Updated documentation for local setup workflow

Review Change Stack

…style)

Replace the bespoke build+spawn orchestration with a thin engine driver.
Workers and per-worker config live in harness/config.yaml — the single
source of truth the iii engine reads. The engine spawns each worker via
its iii.worker.yaml scripts.start (cargo run for local Rust crates), so
the Makefile no longer needs a hardcoded WORKERS array, _spawn-one
helper, or per-worker config-file plumbing.

harness/config.yaml: expand from 8 lines (iii-directory only) to a full
playground-style manifest. Inline configs migrate from shell-config.yaml,
iii-directory/config.yaml, and Makefile per-worker overrides. harness
itself is registered with `worker_path: .` (relative — engine runs with
harness/ as cwd, so state stores land under harness/data/).

harness/Makefile: shrink from 229 to 113 lines. Drop `build`, `start`,
`remote-install`, `_spawn-one`, WORKERS, REMOTE_WORKERS, BIN_NAME_FOR,
per-worker pid/log files, and tmux. New `web` target backgrounds vite
with a pidfile like the engine. Add `make lock` for refreshing iii.lock
via `iii worker add .` when iii.worker.yaml changes.

Delete:
- harness/scripts/demo.sh (256-line bash duplicate of the Makefile)
- harness/shell-config.yaml (inlined into config.yaml)
- iii-directory/config.yaml (inlined into config.yaml)
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 14, 2026

Warning

Rate limit exceeded

@ytallo has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 8 minutes and 37 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 322bcbb9-d8ba-47a7-b075-16f5e388c529

📥 Commits

Reviewing files that changed from the base of the PR and between 0b90ef7 and 4f57b14.

📒 Files selected for processing (19)
  • .gitignore
  • harness/ARCHITECTURE.md
  • harness/Makefile
  • harness/README.md
  • harness/config.yaml
  • harness/skill.md
  • harness/skills/iii/iii.md
  • harness/src/lib.rs
  • harness/src/sse.rs
  • harness/tests/harness_info.rs
  • harness/tests/sse_bridge.rs
  • harness/web/src/App.tsx
  • harness/web/src/bridge.ts
  • harness/web/src/components/FunctionPalette.tsx
  • harness/web/src/iii-client.ts
  • harness/web/src/palette.test.ts
  • harness/web/src/palette.ts
  • harness/web/vite.config.ts
  • policy-denylist/src/main.rs
📝 Walkthrough

Walkthrough

The PR migrates the demo harness from shell script orchestration to a Makefile-driven workflow. The harness/Makefile is substantially refactored to replace removed targets (build, start, remote-install, _spawn-one) with streamlined lifecycle management using PID-based process tracking instead of tmux sessions. Engine and web services are managed as background processes with health checks and log aggregation. Documentation and worker configuration are updated to align with the new structure.

Changes

Harness Workflow Refactor

Layer / File(s) Summary
Makefile lifecycle and orchestration targets
harness/Makefile
Refactored orchestration removes old build/start/spawn pattern and introduces simplified lifecycle: engine target runs configured iii instance with PID tracking and health polling; web target manages Vite dev server via background process; logs switches to conditional tailing (engine/web); stop iterates PID files instead of tmux cleanup; restart and clean updated accordingly. Header establishes DEMO_DIR, data directories, and lifecycle variable setup.
Harness worker configuration restructuring
harness/config.yaml
Worker list entries reordered, with iii-directory block relocated within the YAML file; parameter values remain unchanged.
Demo stack documentation update
harness/README.md
"Local demo stack" section updated to document Makefile targets (make all/engine/verify/web/stop/restart/logs/lock/clean) replacing prior scripts/demo.sh references. PID/log directory locations and engine working directory context clarified.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Suggested reviewers

  • sergiofilhowz

Poem

🐰 From scripts to Makefiles, a leap we take,
No more tmux dancers for the demo's sake,
PIDs march in order, logs branch left and right,
The harness now dances—make all day and night! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: refactoring the harness Makefile to center on the iii engine config with a playground-style approach, replacing build-and-spawn orchestration with a thin engine driver.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/harness-makefile-worker-add

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 14, 2026

skill-check — worker

0 verified, 25 skipped (no docs/).

Layer Result
structure
vale
ai

Three for three. Nicely done.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 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.

Inline comments:
In `@harness/Makefile`:
- Line 30: DEMO_ENGINE_WS is computed from III_DEMO_ENGINE_URL but never used;
either remove the DEMO_ENGINE_WS assignment from the Makefile or wire it into
the build by templating config.yaml or passing it to the iii CLI invocations
used by the engine target (or related targets). If you want override support,
update the engine target to consume DEMO_ENGINE_WS (or export it) when invoking
iii or when rendering config.yaml; otherwise delete the DEMO_ENGINE_WS line to
avoid an unused variable.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ea441482-ee0f-4019-8b74-14c547f0fac2

📥 Commits

Reviewing files that changed from the base of the PR and between 6b83928 and 0b90ef7.

📒 Files selected for processing (6)
  • harness/Makefile
  • harness/README.md
  • harness/config.yaml
  • harness/scripts/demo.sh
  • harness/shell-config.yaml
  • iii-directory/config.yaml
💤 Files with no reviewable changes (3)
  • iii-directory/config.yaml
  • harness/scripts/demo.sh
  • harness/shell-config.yaml

Comment thread harness/Makefile
ytallo added 7 commits May 14, 2026 18:32
The worker reads its own config from this file when run standalone.
Was incorrectly deleted in the harness Makefile refactor.
…t it)

config.yaml is now produced by `iii worker add .` on `make config`
(invoked transitively by `make all` / `make engine`). The committed
playground-style config is removed; each worker's own config.yaml
(e.g., iii-directory/config.yaml) carries its overrides. Generated
file gitignored. `make clean` removes it.
Drop the Makefile / local-demo / Expected-workers / contributor-link
sections. Keep title+summary, Install (with mcp companion), Quickstart,
Configuration. The README now answers the three required questions
(what / install / first call) without dragging in source-build or
development-process detail.
The web client moved to the WebSocket subscription path (registerWorker
+ on()) for live agent events. bridge::events had no production caller
left — only the smoke test exercising it. Remove the handler, HTTP
trigger registration, helper pump_events(), the sse module (its
format_frame/heartbeat were only used here), and tests/sse_bridge.rs.
Drop the events field from HarnessFunctionRefs. Update README, skill.md,
ARCHITECTURE.md, and the lib.rs module doc that walked through the SSE
discovery decision.

bridge::trigger stays — still load-bearing for the bridge::info
bootstrap fetch in iii-client.ts.
… harness/call)

Function id moves into the harness:: namespace, matching harness::status
and harness::fs::*. HTTP api_path renamed in lockstep (browser URL goes
from POST /bridge/trigger to POST /harness/call). Vite proxy now
forwards /harness instead of /bridge.

Web: bridge.ts BRIDGE_URL, iii-client.ts bootstrap fetch, palette.ts
curl snippet, palette.test.ts expectations, FunctionPalette comment,
App.tsx footer tooltip.

Docs: README, skill.md, ARCHITECTURE.md, skills/iii/iii.md, lib.rs
module + BRIDGE_TIMEOUT_MS doc. policy-denylist comments updated for
consistency.

bridge::info stays — different function, only consumed by the harness
itself during boot. Web cosmetic WIP in the working tree is left
intact; only the rename hunks are staged.
Last bridge::* function moves into the harness namespace, matching
harness::status / harness::call / harness::fs::*. Updates the handler
registration, the iii-client.ts boot fetch body, comments, and renames
tests/bridge_info.rs -> tests/harness_info.rs. Drops the now-dead
"bridge::" prefix from FunctionPalette's PALETTE_HIDDEN_PREFIXES.

After this commit, the bridge:: namespace is fully retired:
  - bridge::trigger -> harness::call (previous commit)
  - bridge::events  -> deleted
  - bridge::info    -> harness::info (this commit)
@ytallo ytallo merged commit 673f85b into main May 14, 2026
2 checks passed
@andersonleal andersonleal deleted the chore/harness-makefile-worker-add branch May 14, 2026 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants