Worker pool: profile workers = N (default 1); orch pull runs N tasks at once from a shared queue.
Locks (flock, <state>/locks, released by the kernel when the holder dies, so no stale locks exist): per task (two orch instances on one queue never run the same task), per repo (worktree creation is serialized), per run (liveness), per provider account slots.
Run liveness now uses the run lock instead of the pid, which removes the pid-reuse ceiling from O1.
Account concurrency: account (default = profile name; profiles sharing one login set the same name) and max_concurrent (default = workers) cap simultaneous hx runs across all orch processes.
Quota: orch reads hx's stream/quota events. A window at or above 99.5 % pauses the account until its reset time; an api 429 / rate-limit failure pauses it for 15 min. The run ends requeued (not failed), the source puts the task back (dir: moved out of .running/), and pull stops handing out work for a paused account. A clean run that saw a full window also pauses the account for the following tasks.
Run IDs use milliseconds: a requeued task can start again within the same second and collided on the branch name (found by the flake loop).
Verification: sh tests/all.sh exit 0. New e2e: 5 tasks on 2 workers (max concurrency measured by a +/- log: exactly 2, 5 runs), two profiles on one account with max_concurrent = 1 in two processes (strictly serial), two orch processes on a stateful-claim cmd queue with 6 tasks (each exactly once), quota pause and requeue with resume after the window, pause after a clean run. tests/flake.py: e2e 10/10 idle and 10/10 under 6 CPU hogs.
Not verified against real hx: the quota event shape comes from hx's StreamEvent::Quota serde output (README does not list it), and the 429 text from hx_ai::Error::Api; both are covered with fakes only. Skipped: scheduling by priority, per-repo concurrency cap (repo lock only serializes worktree creation).
Closes #5
- Worker pool: profile `workers = N` (default 1); `orch pull` runs N tasks at once from a shared queue.
- Locks (flock, `<state>/locks`, released by the kernel when the holder dies, so no stale locks exist): per task (two orch instances on one queue never run the same task), per repo (worktree creation is serialized), per run (liveness), per provider account slots.
- Run liveness now uses the run lock instead of the pid, which removes the pid-reuse ceiling from O1.
- Account concurrency: `account` (default = profile name; profiles sharing one login set the same name) and `max_concurrent` (default = workers) cap simultaneous hx runs across all orch processes.
- Quota: orch reads hx's `stream/quota` events. A window at or above 99.5 % pauses the account until its reset time; an `api 429` / rate-limit failure pauses it for 15 min. The run ends `requeued` (not failed), the source puts the task back (`dir`: moved out of `.running/`), and `pull` stops handing out work for a paused account. A clean run that saw a full window also pauses the account for the following tasks.
- Run IDs use milliseconds: a requeued task can start again within the same second and collided on the branch name (found by the flake loop).
Verification: `sh tests/all.sh` exit 0. New e2e: 5 tasks on 2 workers (max concurrency measured by a +/- log: exactly 2, 5 runs), two profiles on one account with `max_concurrent = 1` in two processes (strictly serial), two orch processes on a stateful-claim `cmd` queue with 6 tasks (each exactly once), quota pause and requeue with resume after the window, pause after a clean run. `tests/flake.py`: e2e 10/10 idle and 10/10 under 6 CPU hogs.
Not verified against real hx: the `quota` event shape comes from hx's `StreamEvent::Quota` serde output (README does not list it), and the 429 text from `hx_ai::Error::Api`; both are covered with fakes only. Skipped: scheduling by priority, per-repo concurrency cap (repo lock only serializes worktree creation).
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 #5
workers = N(default 1);orch pullruns N tasks at once from a shared queue.<state>/locks, released by the kernel when the holder dies, so no stale locks exist): per task (two orch instances on one queue never run the same task), per repo (worktree creation is serialized), per run (liveness), per provider account slots.account(default = profile name; profiles sharing one login set the same name) andmax_concurrent(default = workers) cap simultaneous hx runs across all orch processes.stream/quotaevents. A window at or above 99.5 % pauses the account until its reset time; anapi 429/ rate-limit failure pauses it for 15 min. The run endsrequeued(not failed), the source puts the task back (dir: moved out of.running/), andpullstops handing out work for a paused account. A clean run that saw a full window also pauses the account for the following tasks.Verification:
sh tests/all.shexit 0. New e2e: 5 tasks on 2 workers (max concurrency measured by a +/- log: exactly 2, 5 runs), two profiles on one account withmax_concurrent = 1in two processes (strictly serial), two orch processes on a stateful-claimcmdqueue with 6 tasks (each exactly once), quota pause and requeue with resume after the window, pause after a clean run.tests/flake.py: e2e 10/10 idle and 10/10 under 6 CPU hogs.Not verified against real hx: the
quotaevent shape comes from hx'sStreamEvent::Quotaserde output (README does not list it), and the 429 text fromhx_ai::Error::Api; both are covered with fakes only. Skipped: scheduling by priority, per-repo concurrency cap (repo lock only serializes worktree creation).