On a card with most experts in VRAM (RTX 4090) generation could stop for
good after thousands of tokens: the GPU "100%" at low power, one CPU core
busy, no tokens, no error.
- The pool's workers sleep after 20 ms without work (issue #4). With most
experts resident many layers have no CPU work, so they also slept
mid-request, and a worker that woke late was still counted as parked: it
could claim from the next batch while the host was writing it, run a job
twice, or add to `done` after the reset - and `done != n` then never
ended while the GPU waited on the pool. Every claim now carries its
batch: `head` is one 64-bit word (epoch | njobs | index), a claim is a
CAS that only succeeds for the epoch the worker woke for, and the host
waits with `<` instead of `!=`. Same speed (pool_test 47.2 GB/s).
- Every pool wait is bounded (60 s: a message and the engine stops), and
--serve runs a watchdog: a request with no progress (tokens, prompt
chunks, verify windows) for STRATA_WATCHDOG_S (120) seconds ends the
engine with where it was stuck (strata/core/progress.hpp). The server
(issue #27) answers with an error, names the cause from the log, and
starts the engine again on the next request.
- pool_stress: tiny batches with sleeping workers; STRATA_POOL_SPIN_US
shortens the spin to make them sleep constantly.
Tested: pool_test, pool_stress; 25,000-token generation at 262K with KV
streaming and constantly sleeping workers (73.9 tok/s, unchanged); the
watchdog deliberately tripped (2 s): error, log line, restart, next answer.