Agent sleep mode: empty queue sheds to one downloader, lease poll backs off to 15 min #188

Merged
bvandeusen merged 1 commits from dev into main 2026-07-02 20:37:48 -04:00
Owner

One CI-green commit (run 1877):

  • b1cfbcc agent sleep mode (build 2026-07-02.6): fixes the operator-flagged idle behavior on .5 — the autoscaler no longer grows the pool against an empty queue (empty lease results now set an idle signal; the starving branch sheds to ONE downloader), and that downloader's empty-lease poll backs off exponentially 10 s → 15 min, snapping back the moment work appears. UI hint: "idle — queue empty, lease poll backed off".

Agent-only change; curator redeploy optional (no backend/migration changes).

🤖 Generated with Claude Code

https://claude.ai/code/session_01CDgx8bQS5YrGRK76v8HUnM

One CI-green commit (run 1877): - `b1cfbcc` **agent sleep mode** (build 2026-07-02.6): fixes the operator-flagged idle behavior on .5 — the autoscaler no longer grows the pool against an empty queue (empty lease results now set an idle signal; the starving branch sheds to ONE downloader), and that downloader's empty-lease poll backs off exponentially 10 s → 15 min, snapping back the moment work appears. UI hint: "idle — queue empty, lease poll backed off". Agent-only change; curator redeploy optional (no backend/migration changes). 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01CDgx8bQS5YrGRK76v8HUnM
bvandeusen added 1 commit 2026-07-02 20:37:40 -04:00
fix(agent): sleep mode — an empty queue sheds to one downloader and backs the lease poll off to 15 min
CI / lint (push) Successful in 2s
CI / frontend-build (push) Successful in 20s
CI / backend-lint-and-test (push) Successful in 32s
CI / integration (push) Successful in 3m29s
b1cfbcc06a
Operator-flagged on the deployed .5 build: the autoscaler grew the pool 1→8
against an EMPTY queue (an empty buffer read as 'GPU starving' regardless of
WHY), and every downloader kept polling lease every 10s all night.

- New idle signal straight from the lease results: an empty lease sets _idle,
  any jobs clear it. The occupancy-low branch now distinguishes three cases:
  queue empty → shed to ONE polling downloader; pinned at the bandwidth cap →
  shed toward 3; cap headroom + work flowing → grow.
- Idle lease polls back off exponentially per downloader to
  IDLE_POLL_MAX_SECONDS (15 min) and reset the moment work appears — so an
  idle night costs one HTTP call per 15 min, and new work is noticed within
  at most ~15 min (operator-accepted trade-off).
- UI hint: 'idle — queue empty, lease poll backed off'; /status gains idle.
  Agent build 2026-07-02.6.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CDgx8bQS5YrGRK76v8HUnM
bvandeusen merged commit e52090a4cf into main 2026-07-02 20:37:48 -04:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bvandeusen/FabledCurator#188