[PR #2489] [MERGED] tools/remote.sh: run a command on playhorizon at a worktree's commit #4362

Closed
opened 2026-11-03 04:16:37 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2489
Author: @ludovic111
Created: 10/26/2026
Status: ✅ Merged
Merged: 10/26/2026
Merged by: @ludovic111

Base: main ← Head: tools/remote-linux


📝 Commits (1)

  • 4afd517 tools/remote.sh: run a command on playhorizon at a worktree's commit

📊 Changes

2 files changed (+115 additions, -0 deletions)

View changed files

📝 docs/parity-workflow.md (+11 -0)
➕ tools/remote.sh (+104 -0)

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

tools/remote.sh <worktree> <command...> runs a command on playhorizon at the worktree's commit and streams the output back, so agents' Linux builds, tests and harnesses stop loading the Mac mini.

  • The host fetches the commit from GitHub. Nothing else is sent: no files, no credentials, no environment. No token is needed there, because the clone is a public HTTPS clone.
  • Each worktree keeps one checkout with its own target/ under ~/remote-work/<name>, so later runs are incremental. Only one run per name at a time (flock). Daemons the run starts don't inherit the lock.
  • The command runs under nice -n 10 in the host's horizon-ci.slice, pinned to CPUs 4-7 by default (--cpus), so 0-3 stay free for perf-world-entry's benchmarks.
  • It gets scratch HORIZON_HOME, launcher and XDG homes, HORIZON_LAUNCHER_NO_SELF_UPDATE=1 and no audio.
  • A harness command (one naming parity, lan_e2e or horizon-prepare) also gets .local/horizon-client, prepared by tools/ci/vanilla-data.sh as CI prepares it.
  • --list and --gc [DAYS] manage the checkouts on the host.
  • It refuses to run while the host's runner is paused.
  • docs/parity-workflow.md documents it, including that a result from this host is never a CI result.

Measured (the Mac mini at load ~50):

Command Mac mini, here remote.sh
python3 tools/parity.py food 188 s wall, 229 CPU-s here 19 s warm (3.9 min the first time, including the data prep), ~0.1 CPU-s here
cargo test -p horizon-world --lib 33.5 s, sccache warm
  • The environment on the host has no token, secret or password variables (checked).
  • A second run right after the first takes the lock: true finished in 1.3 s, rc 0.

skip-release: a dev tool, nothing players run.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/2489 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/26/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `tools/remote-linux` --- ### 📝 Commits (1) - [`4afd517`](https://github.com/horizon-rust/horizon/commit/4afd517c2213fad4476e0b3442d16893a720f4f1) tools/remote.sh: run a command on playhorizon at a worktree's commit ### 📊 Changes **2 files changed** (+115 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `docs/parity-workflow.md` (+11 -0) ➕ `tools/remote.sh` (+104 -0) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. `tools/remote.sh <worktree> <command...>` runs a command on playhorizon at the worktree's commit and streams the output back, so agents' Linux builds, tests and harnesses stop loading the Mac mini. - The host fetches the commit from GitHub. Nothing else is sent: no files, no credentials, no environment. No token is needed there, because the clone is a public HTTPS clone. - Each worktree keeps one checkout with its own `target/` under `~/remote-work/<name>`, so later runs are incremental. Only one run per name at a time (flock). Daemons the run starts don't inherit the lock. - The command runs under `nice -n 10` in the host's `horizon-ci.slice`, pinned to CPUs 4-7 by default (`--cpus`), so 0-3 stay free for perf-world-entry's benchmarks. - It gets scratch `HORIZON_HOME`, launcher and XDG homes, `HORIZON_LAUNCHER_NO_SELF_UPDATE=1` and no audio. - A harness command (one naming `parity`, `lan_e2e` or `horizon-prepare`) also gets `.local/horizon-client`, prepared by `tools/ci/vanilla-data.sh` as CI prepares it. - `--list` and `--gc [DAYS]` manage the checkouts on the host. - It refuses to run while the host's runner is paused. - `docs/parity-workflow.md` documents it, including that a result from this host is never a CI result. Measured (the Mac mini at load ~50): | Command | Mac mini, here | `remote.sh` | |---|---|---| | `python3 tools/parity.py food` | 188 s wall, 229 CPU-s here | 19 s warm (3.9 min the first time, including the data prep), ~0.1 CPU-s here | | `cargo test -p horizon-world --lib` | | 33.5 s, sccache warm | - The environment on the host has no token, secret or password variables (checked). - A second run right after the first takes the lock: `true` finished in 1.3 s, rc 0. skip-release: a dev tool, nothing players run. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:16:37 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#4362
No description provided.