claude-failover/internal
Ubuntu eb6b74c547 feat(pool): add start_index so manual and auto pools can coexist
Production had two disjoint tmux pools named alike but for different
purposes:
  ccl-0..ccl-9           — manual/interactive sessions (operator)
  ccl-auto-11..ccl-auto-20 — autonomous dispatcher pool

Until now the daemon's loops iterated prefix + 0..Max, so with the
deployed config ("prefix: ccl-auto", min=2, max=10) the dispatcher
looked for sessions "ccl-auto0..ccl-auto9" that never existed, while
the real auto pool ccl-auto-11..20 was invisible. Net effect: no task
was ever dispatched, and killAllPoolSessions fabricated phantom
"ccl-auto0/1" sessions on each swap.

- AutonomousConfig gains StartIndex (yaml start_index, default 0).
  Behaviour is unchanged when StartIndex is 0.
- Monitor, switcher (kill + recreate), dispatcher (findFreeSession),
  and lifecycle (EnsureAll + reconcile) all iterate
  [StartIndex, StartIndex+Max) so the daemon only touches its own
  range and leaves ccl-0..ccl-9 alone.
- Production config updated to prefix: "ccl-auto-", start_index: 11,
  min: 10, max: 10 — covering the 10 real ccl-auto-11..20 sessions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 20:39:57 +00:00
..
api feat: SessionLifecycleManager — auto-detect and repair dead tmux sessions 2026-04-14 18:02:25 +00:00
config feat(pool): add start_index so manual and auto pools can coexist 2026-04-15 20:39:57 +00:00
dispatcher feat(pool): add start_index so manual and auto pools can coexist 2026-04-15 20:39:57 +00:00
janitor feat: Phase 2.7+3 — full integration, config update, systemd unit 2026-04-15 00:15:06 +00:00
lifecycle feat(pool): add start_index so manual and auto pools can coexist 2026-04-15 20:39:57 +00:00
notify feat(notify): Phase 2.5 — Notifier Telegram + Resend email 2026-04-14 20:28:46 +00:00
quota feat(pool): add start_index so manual and auto pools can coexist 2026-04-15 20:39:57 +00:00
state fix(quota): add cooldown + 2-poll confirmation to prevent swap ping-pong 2026-04-15 19:18:27 +00:00
switcher feat(pool): add start_index so manual and auto pools can coexist 2026-04-15 20:39:57 +00:00
tmux feat: SessionLifecycleManager — auto-detect and repair dead tmux sessions 2026-04-14 18:02:25 +00:00
watcher feat(watcher): Phase 2.1 — SessionWatcher goroutine 2026-04-14 20:27:51 +00:00