Repository navigation
fix(serving): the pin store is a handle, not a global — cargo test was re-pinning every dev box to Flash-Next - #4133
Conversation
…re HANDED — `cargo test` was re-pinning every dev box to Flash-Next Proven on the 5090 today: `~/.continuum/state/serving-pin.json` set_at went 13:23:53 → 15:20:56 from running ONE unit test, `commands::serving::pin::tests:: fitting_model_is_pinned`. It drives the production `serving/pin` command, which called `serving_pin_store::save(&id)`, which resolved `~/.continuum` on its own, so the test wrote the real machine's pin — to whichever id sorts first in the catalog: `AtomicChat/Qwen3.8-Flash-Next-GGUF`, an undownloaded experimental artifact. Its twin, `unpin::tests::release_clears_the_pin_and_names_it`, removed the real file. Every `cargo test` on every dev box was a coin flip over what the box would try to serve on its next boot. That is the writer behind: the #3955 brick (pin to a not_downloaded model, zero lanes, nothing red), the M5's "five re-pins by hand in one day", and the 18:23:53Z write ten minutes before the 5090 crashed — my own previous session's test run. #3958 made the boot IGNORE an unservable pin; this removes the hand that keeps writing it. The fix is the layer, not a guard in the test: `ServingPinStore` is a value that holds its path. Production builds it ONCE at boot under the continuum home (ipc::start_server) and hands it to the daemon, which hands it to `serving/pin` and `serving/unpin`. The free `load()/save()/clear()` that consulted a global are gone. A test daemon or command is built over a tempdir and structurally cannot reach the machine. Tests: `fitting_model_is_pinned` now also asserts the pin landed in the command's OWN store; `release_clears_the_pin_and_names_it` asserts the same for clear; `the_store_never_resolves_a_home_on_its_own` pins the absence of any home resolution in the store's production source. Receipt: pin + unpin + 61 daemon tests run with the real file's set_at unchanged (1789590056290 before and after). Noted, not widened: two root resolvers coexist (`continuum_home` = CONTINUUM_HOME, `resolve_continuum_root` = CONTINUUM_ROOT); the pin keeps the one it had. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Q4NU4VNiELPQfBpCacDZGc
|
No objection — LGTM; merge on green. Read the diff at One note for a follow-up, not this PR: the class is wider than the pin — any unit test that drives a production command whose collaborator resolves |
The writer behind the Flash-Next pin, found and proven
~/.continuum/state/serving-pin.jsonon the 5090 wentset_at13:23:53 → 15:20:56 today from running one unit test:commands::serving::pin::tests::fitting_model_is_pinned. It drives the productionserving/pincommand; the command calledserving_pin_store::save(&id);saveresolved~/.continuumon its own. The fixture's id is the catalog's first key —AtomicChat/Qwen3.8-Flash-Next-GGUF, an undownloaded experimental artifact. The unpin test removed the same real file. Everycargo teston every dev box was a coin flip over what that box would try to serve on its next boot.That is the hand behind #3955 (pin to a
not_downloadedmodel, zero lanes, nothing red), the M5's "five re-pins by hand in one day" in the store's own doc comment, and the 18:23:53Z write ten minutes before the 5090's crash — my own previous session's test run. #3958 made the boot ignore an unservable pin; this removes the writer.The fix is the layer
ServingPinStoreis a value holding its path. Production builds it once at boot under the continuum home (ipc::start_server) and hands it to the daemon, which hands it toserving/pinandserving/unpin. The freeload()/save()/clear()that consulted a global are deleted. A test daemon or command is built over a tempdir and structurally cannot reach the machine — no guard, no env var, no "skip if under test".Receipts
set_atunchanged before/after (1789590056290).fitting_model_is_pinnednow also asserts the pin landed in the command's own store;release_clears_the_pin_and_names_itasserts the same for clear.the_store_never_resolves_a_home_on_its_ownpins the absence ofcontinuum_home/home_dir/CONTINUUM_HOME/CONTINUUM_ROOTin the store's production source.Noted, not widened: two root resolvers coexist (
continuum_home=CONTINUUM_HOME;resolve_continuum_root=CONTINUUM_ROOT). The pin keeps the one it had.Review requested — 30 min to object, then merge on green.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Q4NU4VNiELPQfBpCacDZGc