Release: unfreeze agent status view + smoothed throughput autoscaler + log pane #165

Merged
bvandeusen merged 1 commits from dev into main 2026-06-30 20:20:34 -04:00
Owner

Agent-only. Fixes the operator report that the status tiles (state/active/processed) and Start/Stop freeze while the GPU meters stay live.

Root cause: /status made an inline blocking queue_status call to a curator buried under a 112k backlog → the whole status refresh stalled (/gpu survived because it's a lock-free local read). Compounded by the old util-band autoscaler growing to the 32-worker cap forever (util plateaus ~50% on this IO-bound load, never hit the 70 threshold), piling on load.

  • /status is now a pure in-memory read — status() is lock-free and the queue snapshot comes from a background poller.
  • Autoscaler → smoothed, throughput-aware climb that settles: EWMA-smoothed util, grow-while-jobs/s-improves, back off + hold when a grow stops helping. No runaway, no flopping.
  • GPU util bar shows a smoothed value (agent EWMA util_smooth on /gpu, else client-side) instead of bouncing 0↔99.
  • act() aborts a slow POST after 8s so buttons can't stick.
  • Log pane bounded to the viewport (scrolls internally, no off-screen overflow); ring buffer capped at 400 lines.

Ships in the agent image.

🤖 Generated with Claude Code

Agent-only. Fixes the operator report that the status tiles (state/active/processed) and Start/Stop freeze while the GPU meters stay live. **Root cause:** `/status` made an inline blocking `queue_status` call to a curator buried under a 112k backlog → the whole status refresh stalled (`/gpu` survived because it's a lock-free local read). Compounded by the old util-band autoscaler growing to the 32-worker cap forever (util plateaus ~50% on this IO-bound load, never hit the 70 threshold), piling on load. - `/status` is now a pure in-memory read — `status()` is lock-free and the queue snapshot comes from a background poller. - Autoscaler → smoothed, throughput-aware climb that **settles**: EWMA-smoothed util, grow-while-jobs/s-improves, back off + hold when a grow stops helping. No runaway, no flopping. - GPU util bar shows a **smoothed** value (agent EWMA `util_smooth` on `/gpu`, else client-side) instead of bouncing 0↔99. - `act()` aborts a slow POST after 8s so buttons can't stick. - Log pane bounded to the viewport (scrolls internally, no off-screen overflow); ring buffer capped at 400 lines. Ships in the agent image. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
bvandeusen added 1 commit 2026-06-30 20:20:27 -04:00
fix(agent): unfreeze status view + smoothed throughput-aware autoscaler + log pane
CI / lint (push) Successful in 3s
CI / frontend-build (push) Successful in 21s
CI / backend-lint-and-test (push) Successful in 26s
CI / integration (push) Successful in 3m23s
f0f031782d
Operator: the status tiles (state/active/processed) and the Start/Stop buttons
freeze while the GPU meters stay live. Root cause: /status made an INLINE
blocking curator call (queue_status) on every poll, and with curator buried
under a 112k-job backlog that call stalled — freezing the whole status refresh
(the GPU bars survived because /gpu is a lock-free local read). Made worse by the
old util-band autoscaler, which grew workers toward the 32 cap forever because
util plateaus ~50% on this IO-bound load and never hit the 70 grow threshold —
piling load onto curator and the agent process.

- /status is now a pure in-memory read: worker.status() is lock-free, and the
  curator queue snapshot is refreshed by a background poller (never inline).
- Autoscaler replaced with a smoothed, throughput-aware climb that SETTLES:
  samples util every 2s and EWMA-smooths it (raw util swings 0↔99), then every
  ~24s grows by one only while each grow keeps lifting smoothed jobs/s; when a
  grow stops helping it backs off one and holds, re-probing occasionally. No
  runaway, no flopping.
- GPU util bar now shows a smoothed value: the agent's own EWMA (util_smooth,
  exposed on /gpu) when running, else smoothed client-side — so it glides
  instead of bouncing 0↔99.
- act() aborts a slow Start/Stop POST after 8s so the buttons can't stick; the
  now-always-fast /status refresh recovers state regardless.
- Log pane: bound the page to the viewport (height:100vh) so the Logs card
  scrolls INTERNALLY instead of overflowing off-screen; cap the ring buffer at
  400 lines.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ttrj5P7upUTueSfoJcxEqa
bvandeusen merged commit a28c33281a into main 2026-06-30 20:20:34 -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#165