Rust crate orch (binary), replaces the O0 spike (spike stays for reference until O3).
Profiles: ~/.config/orch/profiles/NAME.toml (override dir with ORCH_CONFIG_DIR): hx command, home (own HOME so each profile has its own hx auth), provider, sandbox, yolo, gate, budget (wall_secs, max_turns, max_tokens). Unknown keys are rejected; yolo = true requires sandbox = true.
Run state: one JSON file per run in ~/.local/state/orch/runs/ (ORCH_STATE_DIR), written atomically. States: queued, running, gating, done, failed (with reason: hx-failed, gate-failed, timeout, budget:turns, budget:tokens, interrupted, setup).
Crash safety: status detects a dead orchestrator pid, marks the run failed/interrupted and kills hx's process group, so no orphan keeps spending tokens.
hx runs in its own process group; timeout and budget kill the whole group, including bash children.
CLI: orch run TASK --repo DIR --profile NAME, orch status [ID], orch logs ID.
Verification: sh tests/all.sh (fmt, clippy -D warnings, 5 unit tests, e2e with a fake hx, spike check): exit 0. E2E covers done, gate-failed, hx error, no-JSON crash, timeout, turn budget, token budget, yolo-without-sandbox refused, and kill -9 of orch mid-run (status interrupted, hx dead).
Not in this PR (by design): retry (O2), sources/sinks (O3), locks and pool (O4), allowlist and audit (O5). Known ceiling: pid reuse can make a dead orch look alive (comment in state.rs, fix with O4 locking). Not run against real hx (no login on this box).
Closes #2
Rust crate `orch` (binary), replaces the O0 spike (spike stays for reference until O3).
- Profiles: `~/.config/orch/profiles/NAME.toml` (override dir with ORCH_CONFIG_DIR): hx command, `home` (own HOME so each profile has its own hx auth), provider, sandbox, yolo, gate, budget (wall_secs, max_turns, max_tokens). Unknown keys are rejected; `yolo = true` requires `sandbox = true`.
- Run state: one JSON file per run in `~/.local/state/orch/runs/` (ORCH_STATE_DIR), written atomically. States: queued, running, gating, done, failed (with reason: hx-failed, gate-failed, timeout, budget:turns, budget:tokens, interrupted, setup).
- Crash safety: `status` detects a dead orchestrator pid, marks the run failed/interrupted and kills hx's process group, so no orphan keeps spending tokens.
- hx runs in its own process group; timeout and budget kill the whole group, including bash children.
- CLI: `orch run TASK --repo DIR --profile NAME`, `orch status [ID]`, `orch logs ID`.
Verification: `sh tests/all.sh` (fmt, clippy -D warnings, 5 unit tests, e2e with a fake hx, spike check): exit 0. E2E covers done, gate-failed, hx error, no-JSON crash, timeout, turn budget, token budget, yolo-without-sandbox refused, and kill -9 of orch mid-run (status interrupted, hx dead).
Not in this PR (by design): retry (O2), sources/sinks (O3), locks and pool (O4), allowlist and audit (O5). Known ceiling: pid reuse can make a dead orch look alive (comment in state.rs, fix with O4 locking). Not run against real hx (no login on this box).
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Closes #2
Rust crate
orch(binary), replaces the O0 spike (spike stays for reference until O3).~/.config/orch/profiles/NAME.toml(override dir with ORCH_CONFIG_DIR): hx command,home(own HOME so each profile has its own hx auth), provider, sandbox, yolo, gate, budget (wall_secs, max_turns, max_tokens). Unknown keys are rejected;yolo = truerequiressandbox = true.~/.local/state/orch/runs/(ORCH_STATE_DIR), written atomically. States: queued, running, gating, done, failed (with reason: hx-failed, gate-failed, timeout, budget:turns, budget:tokens, interrupted, setup).statusdetects a dead orchestrator pid, marks the run failed/interrupted and kills hx's process group, so no orphan keeps spending tokens.orch run TASK --repo DIR --profile NAME,orch status [ID],orch logs ID.Verification:
sh tests/all.sh(fmt, clippy -D warnings, 5 unit tests, e2e with a fake hx, spike check): exit 0. E2E covers done, gate-failed, hx error, no-JSON crash, timeout, turn budget, token budget, yolo-without-sandbox refused, and kill -9 of orch mid-run (status interrupted, hx dead).Not in this PR (by design): retry (O2), sources/sinks (O3), locks and pool (O4), allowlist and audit (O5). Known ceiling: pid reuse can make a dead orch look alive (comment in state.rs, fix with O4 locking). Not run against real hx (no login on this box).