Skip to content

Resource self-protection + back-pressure (eviction budget, load-shedding, GUI watchdog) #156

Description

@rolker

Part of #154.

Summary

The "teeth" — consume the ResourceMonitor snapshot (child 1) and keep camp from
crashing under resource pressure, instead of relying on the OS OOM/VRAM-alloc
failure (which killed camp on salmon, #153).

Scope

  • Eviction budget feed — expose the monitor's self-accounted GPU/RAM totals as
    the budget the live-cache eviction (Live tile cache is unbounded -> memory/VRAM exhaustion (crashed camp on salmon after enabling live data) #153) consumes (evict until under budget,
    persist-then-drop). This is the concrete first consumer.
  • Load-shedding / back-pressure — as a configurable soft limit is approached,
    force-evict and/or stop accepting new live tiles (drop with a logged WARN) rather
    than allocating into a crash. A hard limit triggers aggressive shed + ERROR.
  • GUI responsiveness watchdog — a timer that should tick every N s on the GUI
    thread; if it's late by a threshold, flag camp as hung/stalled (event loop
    blocked) even though the process hasn't crashed. Surfaced via diagnostics (child
    3) and the status dot (child 4).

Health levels (OK / WARN / ERROR) derived here from the snapshot + thresholds, fed
to children 3 and 4.

Depends on

Child 1 (the snapshot). Drives #153 (eviction).


Authored-By: Claude Code Agent
Model: Claude Opus 4.8

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions