Skip to content

Runner pool: claim lease tuning + node runbook (#32) - #124

Merged
w4ffl35 merged 1 commit into
masterfrom
issues/w1-2026-10-12-2
Oct 12, 2026
Merged

w4ffl35 merged 1 commit into
masterfrom
issues/w1-2026-10-12-2

Conversation

@w4ffl35

@w4ffl35 w4ffl35 commented Oct 12, 2026

Copy link
Copy Markdown
Member

Closes #32 (claim-based balancing path).

Claim-based balancing itself was already implemented in-tree (#32 commits 7a18bc8, 67c0fbf, 1808667, 46cf165, 68cd7c0b — all ancestors of HEAD): GitHub-ref CAS claims (src/watcher/claims.ts), pool-mode sweep/capacity/reconciliation (src/watcher/watch.ts), --runner-id/--runner-assignee CLI + lock (src/watcher/cli.ts), and pool docs (docs/phase5-issue-watcher.md). This PR closes the remaining gaps:

  • --claim-lease-ms / HEADLESSCODE_CLAIM_LEASE_MS wired to WatcherConfig.claimLeaseMs (validated 30000..900000, matching claims.ts bounds)
  • docs/runner-pool-node.md: node install runbook, per-machine capacity cap, claim discipline, stale-claim recovery; linked from phase5 doc

Verification: npx tsc --noEmit clean; all watcher suites + routing suite pass (muse-executor.test.ts fails identically on clean main — pre-existing, unrelated).

- watch --claim-lease-ms / HEADLESSCODE_CLAIM_LEASE_MS wired to
  claimLeaseMs (validated 30s..15m, matching claims.ts bounds)
- docs/runner-pool-node.md: node install, per-machine capacity cap,
  claim discipline, stale-claim recovery; linked from phase5 doc

@w4ffl35 w4ffl35 left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Operator verification (the harness reviewer misfired with 'no real changes', so this substitutes for review+QA):

  • Read the full diff: CLI flag + env + range validation + config wiring follow the file's existing patterns; 30000..900000 matches CLAIM_TTL_MIN/MAX_MS in claims.ts, and the poll<=half-lease constraint is enforced in watch.ts, so the help text is accurate. Runbook is concrete (install, per-machine creds, systemd, capacity, claim discipline, stale-claim recovery).
  • On the PR head: npx tsc --noEmit clean; watcher suites pass (6 files).
  • One correction to the PR body: muse-executor.test.ts passes on main (12/12), so its failure in the worker run looks like a worktree-environment flake, not a pre-existing failure.

Not merging here; left for maintainer review.

@w4ffl35
w4ffl35 merged commit 9a3d3d6 into master Oct 12, 2026
2 checks passed
@w4ffl35
w4ffl35 deleted the issues/w1-2026-10-12-2 branch October 12, 2026 23:31
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.

Two-machine runner pool (node + workstation) with claim-based balancing

1 participant