refactor: retire core runner/ — pi's runner lives in the harness-pi plugin (merge after plugins #16) #25

Closed
gabrielvidal wants to merge 0 commits from runner-into-harness-pi into main
pull from: runner-into-harness-pi
Owner

Summary

This retires the core runner/, pi's session runner. It was a byte-for-byte duplicate of the harness-pi plugin's runner/, kept only because the plugin's driver fell back on the sidecar's config.RUNNER_BIN (approved 2026-11-27). The plugin half: gabrielvidal/ai-agent-plugins#16.

Merge order: merge this only after harness-pi 1.1.0 (ai-agent-plugins #16) is installed on the lab. harness-pi 1.0.x reads config.RUNNER_BIN, so on this core every pi run would fail with AttributeError. The sidecar suite shows it when it loads the old plugin (test_a_guests_own_pi_run_is_scoped). Workers don't run pi (runsOn: lab), but they get the plugin through /sync from the lab anyway.

Key changes

  • Deleted runner/: cli.mjs, extensions/folder-permissions.ts, test/cli.test.mjs, README.md, package.json and its lockfile. All of it lives in harness-pi now.
  • sidecar/config.py: RUNNER_BIN is dropped and the comments point at harness-pi. Nothing else in the core read it.
  • scripts/test.py: the runner suite is dropped; the runner's node --test now runs in ai-agent-plugins.
  • scripts/ab: the pi mirror replay uses the tree's runner/cli.mjs when the tree has one (refs from before this PR). Otherwise it uses the plugin's runner (AB_PI_RUNNER, default ~/projects/ai-agent-plugins/plugins/harness-pi/runner/cli.mjs). Its dir stands for <TREE>, so A/B dumps against old refs still compare. TREE_PATHS keeps runner, since missing paths are already skipped.
  • Docs: CLAUDE.md has a new section, "pi's runner lives in the harness-pi plugin". The error-card, folder-permissions, turn-end and tests references were updated, as were docs/transcript-format.md, docs/multi-user.md and the parser/test comments that name runner/cli.mjs.
  • Dockerfile / compose / entrypoint: no change needed. The image never copied runner/ or installed its npm deps. Node is only the frontend build stage, and the RUNNER_* variables there belong to the in-container Claude runner (RUNNER_IN_CONTAINER), not pi.

Key decisions

  • sidecar/local-model.md stays in core. harness-opencode reads it through config.LOCAL_MODEL_GUIDE; harness-pi ships its own copy next to its runner.
  • No compatibility shim keeping RUNNER_BIN around. A shim would mean keeping the duplicate. The merge order plus a loud failure is safer than a fallback that hides a stale plugin.
  • The hardcoded EVOX2 Wake-on-LAN MAC is gone along with the runner. harness-pi 1.1.0 passes provider-evox2's localInfra.wolMac instead.
  • Out of scope, left untouched: backend/toolproxy, users tools, the new-project policy and dead-code cleanup (sibling PRs).

Changelog

  • Core runner/ and the sidecar's RUNNER_BIN removed. pi runs use the harness-pi plugin's runner (needs harness-pi ≥ 1.1.0).

Test notes

  • Sidecar pytest on this branch, with SIDECAR_SEED_PLUGINS_DIR pointing at the plugin PR's branch: 657 passed and 9 failed. Those 9 are the same failures main has.
  • harness-pi's tests/test_harness_pi.py against this branch: 18/18 pass.
  • Pi mirror A/B (_mirror_worker.py --harness pi): main's core runner and the plugin's runner give byte-identical dumps.
  • py_compile of the touched scripts and modules passes, and scripts/test.py --help runs.
  • Not deployed from the EVOX2. Install the harness-pi update (ai-agent-plugins #16) from the Homelab first and check that a pi run works. Then merge this and deploy from the Homelab. After the pull, the lab checkout's leftover runner/node_modules (untracked) can be removed.

🤖 Generated with Claude Code

## Summary This retires the core `runner/`, pi's session runner. It was a byte-for-byte duplicate of the harness-pi plugin's `runner/`, kept only because the plugin's driver fell back on the sidecar's `config.RUNNER_BIN` (approved 2026-11-27). The plugin half: https://git.gabvdl.xyz/gabrielvidal/ai-agent-plugins/pulls/16. **Merge order: merge this only after harness-pi 1.1.0 (ai-agent-plugins #16) is installed on the lab.** harness-pi 1.0.x reads `config.RUNNER_BIN`, so on this core every pi run would fail with `AttributeError`. The sidecar suite shows it when it loads the old plugin (`test_a_guests_own_pi_run_is_scoped`). Workers don't run pi (`runsOn: lab`), but they get the plugin through `/sync` from the lab anyway. ## Key changes - **Deleted `runner/`**: `cli.mjs`, `extensions/folder-permissions.ts`, `test/cli.test.mjs`, `README.md`, `package.json` and its lockfile. All of it lives in harness-pi now. - **`sidecar/config.py`**: `RUNNER_BIN` is dropped and the comments point at harness-pi. Nothing else in the core read it. - **`scripts/test.py`**: the `runner` suite is dropped; the runner's `node --test` now runs in ai-agent-plugins. - **`scripts/ab`**: the pi mirror replay uses the tree's `runner/cli.mjs` when the tree has one (refs from before this PR). Otherwise it uses the plugin's runner (`AB_PI_RUNNER`, default `~/projects/ai-agent-plugins/plugins/harness-pi/runner/cli.mjs`). Its dir stands for `<TREE>`, so A/B dumps against old refs still compare. `TREE_PATHS` keeps `runner`, since missing paths are already skipped. - **Docs**: CLAUDE.md has a new section, "pi's runner lives in the harness-pi plugin". The error-card, folder-permissions, turn-end and tests references were updated, as were `docs/transcript-format.md`, `docs/multi-user.md` and the parser/test comments that name `runner/cli.mjs`. - **Dockerfile / compose / entrypoint: no change needed.** The image never copied `runner/` or installed its npm deps. Node is only the frontend build stage, and the `RUNNER_*` variables there belong to the in-container *Claude* runner (`RUNNER_IN_CONTAINER`), not pi. ## Key decisions - **`sidecar/local-model.md` stays in core.** harness-opencode reads it through `config.LOCAL_MODEL_GUIDE`; harness-pi ships its own copy next to its runner. - **No compatibility shim** keeping `RUNNER_BIN` around. A shim would mean keeping the duplicate. The merge order plus a loud failure is safer than a fallback that hides a stale plugin. - **The hardcoded EVOX2 Wake-on-LAN MAC is gone along with the runner.** harness-pi 1.1.0 passes provider-evox2's `localInfra.wolMac` instead. - Out of scope, left untouched: backend/toolproxy, users tools, the new-project policy and dead-code cleanup (sibling PRs). ## Changelog - Core `runner/` and the sidecar's `RUNNER_BIN` removed. pi runs use the harness-pi plugin's runner (needs harness-pi ≥ 1.1.0). ## Test notes - Sidecar pytest on this branch, with `SIDECAR_SEED_PLUGINS_DIR` pointing at the plugin PR's branch: 657 passed and 9 failed. Those 9 are the same failures main has. - harness-pi's `tests/test_harness_pi.py` against this branch: 18/18 pass. - Pi mirror A/B (`_mirror_worker.py --harness pi`): main's core runner and the plugin's runner give byte-identical dumps. - `py_compile` of the touched scripts and modules passes, and `scripts/test.py --help` runs. - **Not deployed from the EVOX2.** Install the harness-pi update (ai-agent-plugins #16) from the Homelab first and check that a pi run works. Then merge this and deploy from the Homelab. After the pull, the lab checkout's leftover `runner/node_modules` (untracked) can be removed. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
gabrielvidal self-assigned this 2026-11-27 11:45:37 +01:00
gabrielvidal added 1 commit 2026-11-27 11:45:38 +01:00
runner/ (cli.mjs, extensions/folder-permissions.ts, test, README) was a
byte-for-byte duplicate of the harness-pi plugin's runner/, kept only as the
driver's fallback through the sidecar's config.RUNNER_BIN.

- delete runner/ and sidecar config.RUNNER_BIN
- scripts/test.py: drop the `runner` suite (it runs in ai-agent-plugins now)
- scripts/ab: the pi mirror replay uses a tree's runner/ when it has one
  (refs before this), else the plugin's (AB_PI_RUNNER)
- CLAUDE.md / docs / comments point at harness-pi's runner
- sidecar/local-model.md stays (harness-opencode's LOCAL_MODEL_GUIDE)

Merge only after harness-pi 1.1.0 is installed on the lab: harness-pi 1.0.x
reads config.RUNNER_BIN and would fail every pi run on this core.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
Owner
Merged into `main` as 38f0b9df by the auto-ship batch https://ai-agent.lab.gabvdl.xyz/conversation/12d75a3b-25dc-487a-ac3b-17782cba4214.
gabrielvidal closed this pull request 2026-11-27 12:19:31 +01:00

Pull request closed

Please reopen this pull request to perform a merge.
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: gabrielvidal/ai-agent#25