Correct llama.cpp observation freshness and idle-safe probes #22
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Discovered while reviewing the unpublished RAM-13 commit c2439ce against the upstream server README. Confidence: high, reproduced by inspection of discover(), observe(), and parse_models(). The adapter probes /v1/models despite claiming all probes are idle-timer exempt; upstream only lists /health, /props, /models, and /metrics. Unauthorized or absent endpoints and props-only answers can mark stale inventory current, missing status becomes unloaded, and router mode persists across refreshes. Loaded residency is labeled Active without measured request activity. This can disturb native sleep and manufacture idle/current evidence. Fix within the existing RAM-13 branch; no separate implementation PR. Router unload is documented and per-model ID/status can confirm logical state, but the existing substring confirmation contract cannot safely correlate those fields. Memory release still requires separate measurements.
The correction this card asks for is contained in the RAM-13 branch: commit "fix: keep llama.cpp observation idle-safe and conservative" removes /v1/models from discovery, replaces stale observations each pass, requires a valid inventory rather than unauthorized/absent/props-only answers, preserves a missing status as unknown, and re-evaluates mode per pass.
It ships with the RAM-13 PR: #31
No separate implementation PR, per this card.
Reviewed, fix verified, left in review.
The RAM-55 correction on branch feature/ram-13-llamacpp-adapter (PR #31) is complete and correct, checked against the card point by point:
I am not moving this card to done yet, and it is not a problem with the fix: RAM-55 has no branch of its own, so it rides on PR #31, which I have sent back to todo as a partial delivery of RAM-13 (the router administration and measurement criteria). When that branch lands, this fix lands with it. No action needed from the implementer on this card; keep the correction commits intact.
Re-verified at the current PR #31 head (
8069135), which added router unload confirmation after the previous review. The RAM-55 correction is intact:discover()still probes only /health, /models and /props, with /v1/models deliberately unused; a failed, unauthorized, absent, or props-only answer cannot refresh stale inventory (inventory_is_currentrequires a fresh read); a resident model reports unknown activity rather than Active; a missing or unrecognized status stays unknown; and router mode is re-evaluated per pass. Left in review: the fix rides on PR #31, which is still a partial delivery of RAM-13, so it lands with that card. No action needed on this card.Re-verified at PR #31 head
7bc9e64(rebased onto main2d0965e, CI success, mergeable true). The RAM-55 correction is intact:What changed this pass: the stale docs that contradicted the unload path are fixed (module header plus docs/LLAMACPP.md now state the router POST /models/unload with structured confirmation), the host llama-server revision is recorded (0.5.0-dev build 11146, no model file so no real relief measured), and the workload limit_bytes fixture is fixed. No regression in the RAM-55 scope.
Left in review: this fix rides on PR #31, which is a partial delivery of RAM-13 (PR body says Part of RAM-13), so it lands with that card. No action needed on this card. Parent RAM-13 next change: exercise a real supported build with a loaded model, verify inference after relief, and report separate host RAM and device RAM measurements.
Re-verified at PR #31 head
34d2b9e(rebased onto main44a23a5, CI success, mergeable true). The RAM-55 correction is intact, byte for byte against the last verified head7bc9e64: the branch files (llamacpp.rs, hook.rs, mod.rs, docs/LLAMACPP.md) are identical, and the only differences are main side changes from the rebase.Left in review: this fix rides on PR #31, which is a partial delivery of RAM-13, so it lands with that card. No action needed on this card.
Re-verified at PR #31 head
3bd0e64(base main2d18cac, CI success, mergeable true). The RAM-55 correction is intact:Left in review: this fix rides on PR #31, which I have sent back to todo on RAM-13 for a router-guard correctness issue (operation() at llamacpp.rs:496-515 needs a state.router check so an awake single-model fallback entry is never offered POST /models/unload) plus two stale doc lines. No action needed on this card; keep the correction commits intact. It lands with RAM-13.
Re-verified at the merged head
a1adebfand landed with PR #31 (squashed as19ab3dc, branch deleted). The correction is intact: discover() probes only GET /health, GET /models, GET /props with /v1/models deliberately unused and pinned by it_probes_only_idle_timer_exempt_endpoints; each refresh replaces the observation and inventory_is_current requires a fresh read; loaded residency reports Unknown and missing status stays Unknown; router mode is re-evaluated per pass; structured unload confirmation by exact id plus status is intact with the sibling-substring tests. No action was needed on this card; it rode on the RAM-13 branch as specified.