The hand-run lock is a bind in the abstract socket namespace named by the state
root: atomic, exclusive, gone with its owner, so the probe, the unlink and the
takeover race are deleted. Every write to the state root and every spawn calls
guard(), which asks held() at that moment; Idunn's held() reads the lease each
time and reports a loss through the handler the daemon registered, so a request
admitted before the loss stops at its next write and a respawn cannot outlive it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
serve(runtime) listens first, writes the state root only once the runtime
holds it, answers Idunn's route challenge ahead of the cross-site refusal,
and fences on lease loss. --health is deleted; the pid file and /proc
reclaim move behind the hand-run runtime. Adds scripts/idunn-entry.mjs,
the kimodo and SOMA-X gitlinks, encode_texts for the child, and tests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Closes the survivors StrykerJS reported over the new supervisor code (61 mutants, 41 killed, 20 survived): the pid
file is removed when its worker exits and not when it spawned nothing, the restart kill is SIGKILL (a stubborn stray
and a SIGTERM-proof encoder child), the group match is the pid file's, not any marked process. killGroup loses its
unused return value.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The worker's process group is killed when the worker exits for any reason, so no encoder child survives it.
A pid file in the state root names the group; the next daemon start kills a group left by a crashed
predecessor if one of its members carries this state root's embeddings directory, before serving. The
retired operator route's 404 test returns (built from parts, so the grep stays empty) and the test script
gets a per-test timeout.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Mutation triage (StrykerJS, 81 survivors on the first full run) showed worker.model was
written and never read. The new tests pin the survivors that were behaviour: the loopback
default, --host, stray flags, the models-root resolution, the SIGTERM grace, a worker that
dies while the daemon waits for its health, the POST route, and lastError after a
requested stop.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
vili-daemon.mjs spawns the Python worker itself (no shell, port 0 from the
ready line, nice 10, one child at a time, respawn after exit, group kill on
SIGTERM) with a closed environment. WSL/Docker, the Eve surfaces and deck
WebSocket, the provider advertisement, /smoke, CORS, JSON sidecars and the
pid file are deleted. POSTs with an Origin or a non-JSON body are refused
403 cross-site. cultcache-ts comes from the vendor/CultLib submodule at
b549d731; ws is dropped.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The worker builds CachedTextEncoder and passes it to load_model, so Kimodo's own
encoder selection (and the CPU encoder behind TEXT_ENCODER_DEVICE) is never built.
generate() returns the per-request encoder record (identity, hits, misses, seconds,
vector hashes) and the worker identity; /health adds the identity and stored count.
startKimodoWorker drops TEXT_ENCODER_DEVICE and mounts the scripts directory, the
cultcache-py source and .vili/embeddings, with the Kimodo commit and image id read
once per worker start. The encode clock is perf_counter: time.time went backwards
under WSL during a probe.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
It published idunn.daemon_health to 10.77.0.2:17870 (the retired Windows Idunn)
every 15 s and failed each time; Idunn on Yggdrasil binds no RUDP health ingress.
Deletes idunn-rudp.cjs, the publisher and its status, the --idunn-* args in the
daemon and the three launcher scripts, operator_state slot 4, and the
cultnet-ts and direct @msgpack/msgpack dependencies. transportProfile now states
local-cultcache-only. All commits build (node --check passes); not yet run on Raven.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
REC-120:
- Removed the unused `readFile` import (`readFile(` had zero call
sites in the file).
- Removed the never-read `backend-status.json` initializer block; the
`backendStatus` in-memory object it snapshotted is still very much
alive (read at lines 287, 378, 489, 504, 509, 515, 768) and untouched
here.
- Also removed the `existsSync` import, which the initializer block
was its only caller for; left in place it would have become a second
dead import introduced by this same cut.
Kill attempts that failed: none.
- `rg -n "readFile\(" scripts/vili-daemon.mjs` -> no matches (repeated
the census command against current HEAD).
- `rg -n -F --glob '!scripts/vili-daemon.mjs' 'backend-status.json' .`
-> no matches in this repo; cross-repo `rg -n 'backend-status\.json'`
over F:/Projects only turns up Odin's
docs/transport-shortcut-inventory.md, which documents the shortcut
rather than reading the file.
Checks run: `node --check scripts/vili-daemon.mjs` -> syntax OK. No
package.json/test suite exists in this repo to run beyond that.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>