From 956fdf8ff8dba361e532a47143fbc2119a34204f Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 24 Oct 2026 00:23:07 +0200 Subject: [PATCH 01/29] Daemon serves through a runtime port: Idunn write lease or hand-run socket lock 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 --- .gitmodules | 6 + package-lock.json | 103 ++++++++--- package.json | 8 +- scripts/fixtures/fake-idunn-entry.mjs | 26 +++ scripts/fixtures/stub-worker.mjs | 7 +- scripts/idunn-entry.mjs | 123 +++++++++++++ scripts/kimodo-resident-worker.py | 3 +- scripts/kimodo-text-encode.py | 27 ++- scripts/test-vili-daemon.mjs | 191 +++++++++++++++++-- scripts/test_text_encoding.py | 48 +++++ scripts/vili-daemon.mjs | 253 ++++++++++++++++++-------- vendor/SOMA-X | 1 + vendor/kimodo | 1 + 13 files changed, 661 insertions(+), 136 deletions(-) create mode 100644 scripts/fixtures/fake-idunn-entry.mjs create mode 100644 scripts/idunn-entry.mjs create mode 160000 vendor/SOMA-X create mode 160000 vendor/kimodo diff --git a/.gitmodules b/.gitmodules index 5098433..7498ad8 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,9 @@ [submodule "vendor/CultLib"] path = vendor/CultLib url = https://github.com/GameCult/CultLib.git +[submodule "vendor/kimodo"] + path = vendor/kimodo + url = https://github.com/nv-tlabs/kimodo.git +[submodule "vendor/SOMA-X"] + path = vendor/SOMA-X + url = https://github.com/NVlabs/SOMA-X.git diff --git a/package-lock.json b/package-lock.json index cbedae2..7eecc03 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,9 @@ "name": "@gamecult/vili", "version": "0.1.0", "dependencies": { - "cultcache-ts": "file:vendor/CultLib/packages/cultcache-ts" + "@gamecult/cultcache-ts": "file:vendor/CultLib/packages/cultcache-ts", + "@msgpack/msgpack": "3.1.3", + "cultnet-ts": "file:vendor/CultLib/packages/cultnet-ts" } }, "../CultLib/packages/cultcache-ts": { @@ -29,6 +31,19 @@ "node": ">=20" } }, + "node_modules/@gamecult/cultcache-ts": { + "version": "0.14.2", + "resolved": "file:vendor/CultLib/packages/cultcache-ts", + "license": "MIT", + "dependencies": { + "@msgpack/msgpack": "^3.1.3", + "koffi": "3.3.0", + "zod": "^3.25.76" + }, + "engines": { + "node": ">=20" + } + }, "node_modules/@koromix/koffi-android-arm64": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/@koromix/koffi-android-arm64/-/koffi-android-arm64-3.3.0.tgz", @@ -358,19 +373,62 @@ "node": ">= 18" } }, - "node_modules/@types/node": { - "version": "24.19.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-24.19.2.tgz", - "integrity": "sha512-93d49wCWJkCyN87MxLpNN6KXPCwFw7bVUg79mGUV1OS40JGWwVCr8n61DXCSqz7CV6/VfPkb7xec7uP2M+QHWQ==", - "dev": true, + "node_modules/ajv": { + "version": "8.20.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.20.0.tgz", + "integrity": "sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==", "license": "MIT", "dependencies": { - "undici-types": ">=7.24.0 <7.24.7" + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/cultcache-ts": { - "resolved": "vendor/CultLib/packages/cultcache-ts", - "link": true + "node_modules/cultnet-ts": { + "version": "0.3.0", + "resolved": "file:vendor/CultLib/packages/cultnet-ts", + "license": "MIT", + "dependencies": { + "@gamecult/cultcache-ts": "^0.14.1", + "@msgpack/msgpack": "^3.1.3", + "ajv": "^8.17.1" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "license": "MIT" + }, + "node_modules/fast-uri": { + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.9.tgz", + "integrity": "sha512-hS/0Wt3Ya043oKXs0sIxrMpKQITXhMLIrVAKKXi4gozGC9v7YRWVnXIZzjNPTO02M9BdxLCWqK1yRXgNziVyJQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "license": "MIT" }, "node_modules/koffi": { "version": "3.3.0", @@ -404,27 +462,15 @@ "@koromix/koffi-win32-x64": "3.3.0" } }, - "node_modules/typescript": { - "version": "5.9.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", - "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "license": "MIT", "engines": { - "node": ">=14.17" + "node": ">=0.10.0" } }, - "node_modules/undici-types": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.24.6.tgz", - "integrity": "sha512-WRNW+sJgj5OBN4/0JpHFqtqzhpbnV0GuB+OozA9gCL7a993SmU+1JBZCzLNxYsbMfIeDL+lTsphD5jN5N+n0zg==", - "dev": true, - "license": "MIT" - }, "node_modules/zod": { "version": "3.25.76", "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz", @@ -437,6 +483,7 @@ "vendor/CultLib/packages/cultcache-ts": { "name": "@gamecult/cultcache-ts", "version": "0.14.2", + "extraneous": true, "license": "MIT", "dependencies": { "@msgpack/msgpack": "^3.1.3", diff --git a/package.json b/package.json index 0c718fb..da6fe37 100644 --- a/package.json +++ b/package.json @@ -6,10 +6,14 @@ "description": "Vili is the GameCult Persona animation daemon: speech intent in, embodied motion affordance out.", "scripts": { "start": "node scripts/vili-daemon.mjs", - "health": "node scripts/vili-daemon.mjs --health", "test": "node --test --test-timeout=60000 scripts/test-vili-daemon.mjs" }, "dependencies": { - "cultcache-ts": "file:vendor/CultLib/packages/cultcache-ts" + "@gamecult/cultcache-ts": "file:vendor/CultLib/packages/cultcache-ts", + "@msgpack/msgpack": "3.1.3", + "cultnet-ts": "file:vendor/CultLib/packages/cultnet-ts" + }, + "overrides": { + "@gamecult/cultcache-ts": "file:vendor/CultLib/packages/cultcache-ts" } } diff --git a/scripts/fixtures/fake-idunn-entry.mjs b/scripts/fixtures/fake-idunn-entry.mjs new file mode 100644 index 0000000..7208cbc --- /dev/null +++ b/scripts/fixtures/fake-idunn-entry.mjs @@ -0,0 +1,26 @@ +// Test seam only: the shipped Idunn runtime (scripts/idunn-entry.mjs idunnRuntime) over a signer whose write lease is +// a file, so the lease gate is tested without Idunn's authority files. Present = leased. The daemon's own flags +// arrive on argv as they do for the hand-run daemon. +import { existsSync, appendFileSync } from "node:fs"; +import { idunnRuntime } from "../idunn-entry.mjs"; +import { serve } from "../vili-daemon.mjs"; + +const leasePath = process.env.FAKE_IDUNN_LEASE; +const healthLog = process.env.FAKE_IDUNN_HEALTH_LOG; +const answer = process.env.FAKE_IDUNN_ANSWER_THROWS !== "1"; + +const signer = { + assertWriteLease() { + if (!existsSync(leasePath)) throw new Error("no lease"); + return "lease"; + }, + answerRouteObservation(request) { + if (!answer) throw new Error("signer refused"); + return { schemaId: "fake.presence", recordKey: request.messageId, payload: new Uint8Array([1, 2, 3]) }; + }, + reportHealth(state) { + appendFileSync(healthLog, `${state}\n`); + }, +}; + +await serve(idunnRuntime(signer, { pollMs: 200 })); diff --git a/scripts/fixtures/stub-worker.mjs b/scripts/fixtures/stub-worker.mjs index aaac654..99de4c1 100644 --- a/scripts/fixtures/stub-worker.mjs +++ b/scripts/fixtures/stub-worker.mjs @@ -29,8 +29,8 @@ if (model === "crash-before-ready") process.exit(3); if (model === "stubborn") { process.on("SIGTERM", () => {}); - const grandchild = spawn(process.execPath, ["-e", "setInterval(() => {}, 1000)"], { stdio: "ignore" }); - appendFileSync(spawnLog, `grandchild ${grandchild.pid}\n`); + // the grandchild reports itself once its handler is armed, so a test never reads a pid that would die of the default SIGTERM + spawn(process.execPath, ["-e", `process.on('SIGTERM', () => {}); require('fs').appendFileSync(${JSON.stringify(spawnLog)}, 'grandchild ' + process.pid + '\\n'); setInterval(() => {}, 1000)`], { stdio: "ignore" }); } if (model === "graceful") { @@ -66,8 +66,7 @@ if (model === "hang-before-ready") { if (model === "slow-generate") return; if (model === "encoder") { // an encoder child of the real worker: a grandchild in the worker's group, then a request that never answers - const encoder = spawn(process.execPath, ["-e", "process.on('SIGTERM', () => {}); setInterval(() => {}, 1000)"], { stdio: "ignore" }); - appendFileSync(spawnLog, `grandchild ${encoder.pid}\n`); + spawn(process.execPath, ["-e", `process.on('SIGTERM', () => {}); require('fs').appendFileSync(${JSON.stringify(spawnLog)}, 'grandchild ' + process.pid + '\\n'); setInterval(() => {}, 1000)`], { stdio: "ignore" }); return; } send(200, { diff --git a/scripts/idunn-entry.mjs b/scripts/idunn-entry.mjs new file mode 100644 index 0000000..1cbaf8f --- /dev/null +++ b/scripts/idunn-entry.mjs @@ -0,0 +1,123 @@ +#!/usr/bin/env node +// The Idunn entry: the process Idunn's unit runs for target "vili". Idunn owns Vili's lifecycle and hands it one +// writer authority, the process write lease. This file turns Idunn's environment into the daemon's own +// configuration and into the runtime port serve() takes; it adds no routes and decides nothing the daemon decides. +// +// node vili/scripts/idunn-entry.mjs --state-root --kimodo-commit <40 hex> +// +// Nothing from the bundle, the activation or the identity reaches the worker: the daemon's childEnv forwards only +// PATH, HOME and LANG besides its own VILI_* settings. +import { createHash } from "node:crypto"; +import { readFileSync } from "node:fs"; +import path from "node:path"; +import { setTimeout as delay } from "node:timers/promises"; +import { fileURLToPath, pathToFileURL } from "node:url"; +import { decode, encode } from "@msgpack/msgpack"; +import { encodeCultNetMessageForWire, parseCultNetMessage } from "cultnet-ts"; +import { createIdunnRuntimeSigner, loadIdunnRuntimeAuthorityFromEnvironment } from "cultnet-ts/idunn-runtime"; + +const HEALTH_CONTRACT = "gamecult.runtime_presence_health.v2"; +const LEASE_POLL_MS = 5000; +const here = path.dirname(fileURLToPath(import.meta.url)); + +// The runtime port serve() takes, over an Idunn runtime signer. Exported so the lease gate is tested against the +// code that ships, with a signer whose lease is a file (scripts/fixtures/fake-idunn-entry.mjs). +export function idunnRuntime(signer, { pollMs = LEASE_POLL_MS } = {}) { + let held = false; + let lost = false; + + return { + async acquire() { + for (;;) { + try { + signer.assertWriteLease(); + held = true; + return; + } catch { + // Idunn has not leased this incarnation yet + } + await delay(pollMs); + } + }, + held: () => held, + refusal: () => (lost ? "write-lease-lost" : "write-lease-pending"), + watch(onLost) { + if (!held) return; + try { + signer.assertWriteLease(); + } catch { + held = false; + lost = true; + onLost(); + } + }, + recordWorker() {}, + forgetWorker() {}, + answerSnapshot(bytes) { + let request; + try { + request = parseCultNetMessage(decode(bytes), "cultnet.schema.v0"); + if (request.schemaVersion !== "cultnet.snapshot_request.v0") throw new Error("not a snapshot request"); + } catch { + throw Object.assign(new Error("invalid snapshot request"), { code: "invalid-snapshot-request" }); + } + const document = signer.answerRouteObservation(request); + const response = { + schemaVersion: "cultnet.snapshot_response_raw.v0", + messageId: request.messageId, + documents: [document], + }; + return Buffer.from(encode(encodeCultNetMessageForWire(response, "cultnet.schema.v0"))); + }, + reportHealth: (state) => signer.reportHealth(state), + release() {}, + }; +} + +function fail(reason) { + console.error(`vili idunn entry: ${reason}`); + process.exit(2); +} + +// host:port, with an optional http:// scheme, as Idunn writes the candidate bind. +function splitBind(bind) { + const match = /^(?:http:\/\/)?([^:/\s]+):(\d{1,5})\/?$/u.exec(bind ?? ""); + if (!match || Number(match[2]) > 65535) fail("GAMECULT_IDUNN_CANDIDATE_BIND is not host:port"); + return { host: match[1], port: match[2] }; +} + +function parseEntryArgs(argv) { + if (argv.length !== 4 || argv[0] !== "--state-root" || argv[2] !== "--kimodo-commit") { + fail("arguments must be exactly --state-root --kimodo-commit <40 hex>"); + } + if (!path.isAbsolute(argv[1])) fail("--state-root must be absolute"); + if (!/^[0-9a-f]{40}$/u.test(argv[3])) fail("--kimodo-commit must be 40 lowercase hex characters"); +} + +async function main() { + parseEntryArgs(process.argv.slice(2)); + const { host, port } = splitBind(process.env.GAMECULT_IDUNN_CANDIDATE_BIND); + const locks = ["requirements-build.lock", "requirements.lock"].map((name) => + readFileSync(path.resolve(here, "..", "deployment", "idunn", name))); + process.env.VILI_DAEMON_HOST = host; + process.env.VILI_DAEMON_PORT = port; + process.env.VILI_PYTHON = path.resolve(here, "..", "..", "python", "bin", "python3.12"); + process.env.VILI_PYTHON_ENV = `locks-sha256:${createHash("sha256").update(Buffer.concat(locks)).digest("hex")}`; + + const authority = loadIdunnRuntimeAuthorityFromEnvironment("vili", HEALTH_CONTRACT); + const signer = createIdunnRuntimeSigner({ + authority, + capabilities: [{ capability: "vili.motion.api", schema: "http.v1", compatibility: "v1", capacity: 1 }], + }); + if (!signer.requiresWriteLease) fail("Idunn declares no write lease for this runtime"); + + const { serve } = await import("./vili-daemon.mjs"); + await serve(idunnRuntime(signer)); +} + +if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) { + main().catch((error) => { + console.error(`vili idunn entry failed: ${error?.name || "Error"}`); + process.exit(1); + }); +} diff --git a/scripts/kimodo-resident-worker.py b/scripts/kimodo-resident-worker.py index df9feb2..e855a32 100644 --- a/scripts/kimodo-resident-worker.py +++ b/scripts/kimodo-resident-worker.py @@ -3,6 +3,7 @@ import argparse import json import os import shutil +import sys import time import traceback from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer @@ -63,7 +64,7 @@ model, resolved_model = load_model( text_encoder=text_encoder, ) model_revision = text_encoding.read_snapshot_revision(HF_HOME, MODEL_NAMES[resolved_model]) -worker_identity = {"kimodoCommit": kimodo_commit, "pythonEnv": python_env, "modelRevision": model_revision, "threads": threads} +worker_identity = {"kimodoCommit": kimodo_commit, "pythonEnv": python_env, "modelRevision": model_revision, "threads": threads, "python": sys.version} model_load_seconds = time.time() - model_load_started_at model_info = get_model_info(resolved_model) display_model = model_info.display_name if model_info else resolved_model diff --git a/scripts/kimodo-text-encode.py b/scripts/kimodo-text-encode.py index 6ead1a8..f5f7f68 100644 --- a/scripts/kimodo-text-encode.py +++ b/scripts/kimodo-text-encode.py @@ -40,6 +40,20 @@ def load_encoder(hf_home, mntp_id, supervised_id, dtype): return LLM2Vec(model=model, tokenizer=tokenizer) +def encode_texts(model, texts): + """Each text wrapped in the chat header and encoded alone: (vector bytes, seconds) lists.""" + vectors, encode_seconds = [], [] + for text in texts: + began = time.perf_counter() + features = model.tokenize([chat_header(text)]) + with torch.no_grad(): + vector = model.forward(features).detach().cpu().to(torch.float32)[0] + assert vector.shape == (EMBEDDING_DIM,) + vectors.append(vector.numpy().tobytes()) + encode_seconds.append(time.perf_counter() - began) + return vectors, encode_seconds + + def main() -> int: apply_thread_cap(os.environ) texts = json.load(sys.stdin)["texts"] @@ -53,15 +67,7 @@ def main() -> int: p.requires_grad = False load_seconds = time.perf_counter() - started - vectors, encode_seconds = [], [] - for text in texts: - began = time.perf_counter() - features = model.tokenize([chat_header(text)]) - with torch.no_grad(): - vector = model.forward(features).detach().cpu().to(torch.float32)[0] - assert vector.shape == (EMBEDDING_DIM,) - vectors.append(vector.numpy().tobytes()) - encode_seconds.append(time.perf_counter() - began) + vectors, encode_seconds = encode_texts(model, texts) out.write_bytes(msgpack.packb({ "vectors": vectors, @@ -75,4 +81,5 @@ def main() -> int: return 0 -sys.exit(main()) +if __name__ == "__main__": + sys.exit(main()) diff --git a/scripts/test-vili-daemon.mjs b/scripts/test-vili-daemon.mjs index ac41e59..7fca2e9 100644 --- a/scripts/test-vili-daemon.mjs +++ b/scripts/test-vili-daemon.mjs @@ -2,16 +2,18 @@ // Runs the real daemon against scripts/fixtures/stub-worker.mjs as its --python/--worker-entry. import assert from "node:assert/strict"; import { spawn } from "node:child_process"; -import { existsSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs"; +import { existsSync, mkdtempSync, readFileSync, readdirSync, rmSync, statSync, writeFileSync } from "node:fs"; import http from "node:http"; import os from "node:os"; import path from "node:path"; import test from "node:test"; import { fileURLToPath } from "node:url"; +import { decode, encode } from "@msgpack/msgpack"; const here = path.dirname(fileURLToPath(import.meta.url)); const daemonPath = path.join(here, "vili-daemon.mjs"); const stubPath = path.join(here, "fixtures", "stub-worker.mjs"); +const fakeIdunnEntry = path.join(here, "fixtures", "fake-idunn-entry.mjs"); const THREADS = 5; async function until(condition, what, seconds = 15) { @@ -40,7 +42,7 @@ function isAlive(pid) { async function startDaemon({ omit = [], viaEnv = false, threads = String(THREADS), python = process.execPath, nested = false, host = "127.0.0.1", - relativeModels = false, extraArgs = [], root: givenRoot = null, + relativeModels = false, extraArgs = [], root: givenRoot = null, entry = daemonPath, extraEnv = {}, hold = entry === daemonPath, } = {}) { const root = givenRoot ?? mkdtempSync(path.join(os.tmpdir(), "vili-test-")); const stateRoot = nested ? path.join(root, "a", "b", "state") : root; @@ -57,9 +59,9 @@ async function startDaemon({ }; if (threads !== null) settings.threads = threads; for (const name of omit) delete settings[name]; - const env = { ...process.env, LEAK_CHECK: "leaked", LANG: "xx_TEST.UTF-8" }; + const env = { ...process.env, LEAK_CHECK: "leaked", LANG: "xx_TEST.UTF-8", ...extraEnv }; for (const name of Object.keys(env)) if (name.startsWith("VILI_")) delete env[name]; - const argv = [daemonPath, ...extraArgs]; + const argv = [entry, ...extraArgs]; for (const [name, value] of Object.entries(settings)) { if (viaEnv) env[`VILI_${{ host: "DAEMON_HOST", port: "DAEMON_PORT", "state-root": "STATE_ROOT", "worker-entry": "WORKER_ENTRY" }[name] ?? name.toUpperCase().replace("-", "_")}`] = value; else argv.push(`--${name}`, value); @@ -71,17 +73,21 @@ async function startDaemon({ proc.stderr.on("data", (chunk) => { errors += chunk; }); const listening = await until(() => /listening on http:\/\/([^:]+):(\d+)/.exec(output), "the daemon to listen"); const port = listening[2]; + // the hand-run daemon takes its lock after it listens; a test that wants a served state root waits for it + if (hold) await until(() => /holds the state root/.test(output), "the daemon to hold the state root"); const spawnLog = () => { const log = path.join(stateRoot, "embeddings", "stub-spawns.log"); return existsSync(log) ? readFileSync(log, "utf8").split("\n").filter(Boolean) : []; }; return { + root, stateRoot, modelsRoot, proc, boundHost: listening[1], port: Number(port), stderr: () => errors, + stdout: () => output, spawns: () => spawnLog().filter((line) => /^\d+$/.test(line)).map(Number), grandchildren: () => spawnLog().filter((line) => line.startsWith("grandchild ")).map((line) => Number(line.split(" ")[1])), async stop() { @@ -429,11 +435,14 @@ test("a live worker outside the pid file's group is left alone", async () => { try { assert.equal((await generate(first)).status, 200); const [worker] = first.spawns(); + first.proc.kill("SIGKILL"); + await until(() => first.proc.exitCode !== null || first.proc.signalCode !== null, "the first daemon to die"); writeFileSync(path.join(root, "worker.pid"), `${bystander.pid}\n`); const second = await startDaemon({ root }); assert.ok(isAlive(worker) && isAlive(bystander.pid), "only the group the pid file names, and only if it is ours, is killed"); second.proc.kill("SIGTERM"); await until(() => second.proc.exitCode !== null, "the second daemon to exit", 30); + process.kill(-worker, "SIGKILL"); } finally { bystander.kill("SIGKILL"); await first.stop(); @@ -655,22 +664,6 @@ test("the typed service state is refreshed while the daemon runs", async () => { } }); -test("--health asks a running daemon, and fails when there is none", async () => { - const daemon = await startDaemon(); - const check = (port) => new Promise((resolve) => { - const proc = spawn(process.execPath, [daemonPath, "--health", "--host", "127.0.0.1", "--port", String(port)], { stdio: "ignore" }); - proc.on("exit", resolve); - }); - try { - assert.equal(await check(daemon.port), 0); - const gone = daemon.port; - await daemon.stop(); - assert.equal(await check(gone), 1); - } finally { - await daemon.stop(); - } -}); - test("a thread count outside 1 to 16 stops the daemon without echoing it", async () => { for (const threads of ["0", "17", "99", "100", "8x", "x8", "-1", "1.5"]) { const proc = spawn(process.execPath, [daemonPath, "--threads", threads], { stdio: ["ignore", "pipe", "pipe"] }); @@ -683,3 +676,161 @@ test("a thread count outside 1 to 16 stops the daemon without echoing it", async assert.ok(!output.replace("from 1 to 16", "").includes(threads), `the refusal repeated ${threads}`); } }); + +const msgpackPost = (daemon, body, headers = {}) => + new Promise((resolve, reject) => { + const req = http.request({ host: "127.0.0.1", port: daemon.port, method: "POST", path: "/cultnet/snapshot", headers: { "content-type": "application/msgpack", ...headers } }, (res) => { + const chunks = []; + res.on("data", (chunk) => chunks.push(chunk)); + res.on("end", () => resolve({ status: res.statusCode, headers: res.headers, raw: Buffer.concat(chunks) })); + }); + req.on("error", reject); + req.end(body); + }); +const SECRET = "canary-9f3c-never-echoed"; +const snapshotRequest = (messageId = "m1") => Buffer.from(encode({ schemaVersion: "cultnet.snapshot_request.v0", messageId })); + +// A second daemon on a state root a live daemon holds must refuse, and must not touch the first one's worker. +test("a second daemon on a live state root exits 2 and kills nothing", async () => { + const first = await startDaemon(); + try { + assert.equal((await generate(first)).status, 200); + const [worker] = first.spawns(); + assert.ok(isAlive(worker)); + const second = await startDaemon({ root: first.root, hold: false }); + await until(() => second.proc.exitCode !== null, "the second daemon to refuse", 20); + assert.equal(second.proc.exitCode, 2); + assert.match(second.stderr(), /held by a running daemon/); + assert.ok(isAlive(worker), "the first daemon's worker must survive the refusal"); + assert.equal((await generate(first)).status, 200); + assert.equal(aliveWorkers(first).length, 1); + } finally { + await first.stop(); + } +}); + +const idunnDaemon = async ({ leased = false, extraEnv = {} } = {}) => { + const root = mkdtempSync(path.join(os.tmpdir(), "vili-test-")); + const lease = path.join(root, "lease"); + const healthLog = path.join(root, "health.log"); + if (leased) writeFileSync(lease, ""); + const daemon = await startDaemon({ + root, nested: true, entry: fakeIdunnEntry, extraEnv: { FAKE_IDUNN_LEASE: lease, FAKE_IDUNN_HEALTH_LOG: healthLog, ...extraEnv }, + }); + return Object.assign(daemon, { lease, health: () => (existsSync(healthLog) ? readFileSync(healthLog, "utf8").split("\n").filter(Boolean) : []) }); +}; + +test("before the lease nothing is written, spawned or accepted", async () => { + const daemon = await idunnDaemon(); + try { + const answer = await generate(daemon); + assert.equal(answer.status, 503); + assert.equal(answer.body.code, "write-lease-pending"); + assert.deepEqual(daemon.spawns(), []); + assert.equal(existsSync(daemon.stateRoot), false, "the state root must not exist before the lease"); + assert.deepEqual(daemon.health(), []); + } finally { + await daemon.stop(); + } +}); + +test("with the lease the daemon writes and serves, and no pid file exists", async () => { + const daemon = await idunnDaemon(); + try { + writeFileSync(daemon.lease, ""); + await until(() => existsSync(path.join(daemon.stateRoot, "vili.service.cc")), "the service store", 10); + const answer = await generate(daemon); + assert.equal(answer.status, 200); + assert.equal(existsSync(path.join(daemon.stateRoot, "worker.pid")), false); + assert.equal(existsSync(path.join(daemon.stateRoot, "daemon.lock")), false); + assert.deepEqual(daemon.health(), ["active"]); + } finally { + await daemon.stop(); + } +}); + +test("losing the lease kills the worker tree, refuses, and writes nothing more", async () => { + const daemon = await idunnDaemon({ leased: true }); + try { + await until(() => existsSync(path.join(daemon.stateRoot, "vili.service.cc")), "the service store", 10); + assert.equal((await generate(daemon, { prompt: "x", model: "stubborn" })).status, 200); + const [worker] = daemon.spawns(); + const [grandchild] = await until(() => { const found = daemon.grandchildren(); return found.length ? found : null; }, "the armed grandchild"); + assert.ok(isAlive(worker) && isAlive(grandchild)); + rmSync(daemon.lease); + await until(() => !isAlive(worker) && !isAlive(grandchild), "the worker tree to die", 20); + const answer = await generate(daemon); + assert.equal(answer.status, 503); + assert.equal(answer.body.code, "write-lease-lost"); + await until(() => daemon.health().join() === "active,degraded", "the health to say degraded"); + const store = path.join(daemon.stateRoot, "vili.service.cc"); + const before = statSync(store).mtimeMs; + const jobs = readdirSync(path.join(daemon.stateRoot, "jobs")).length; + await new Promise((resolve) => setTimeout(resolve, 6500)); + assert.equal(statSync(store).mtimeMs, before); + assert.equal(readdirSync(path.join(daemon.stateRoot, "jobs")).length, jobs); + } finally { + await daemon.stop(); + } +}); + +test("a job that finishes after the lease is lost is not recorded", async () => { + const daemon = await idunnDaemon({ leased: true }); + try { + await until(() => existsSync(path.join(daemon.stateRoot, "vili.service.cc")), "the service store", 10); + const slow = generate(daemon, { prompt: "x", model: "slow-generate" }); + await until(() => daemon.spawns().length, "the worker"); + await until(() => request(daemon.port, "GET", "/health").then((r) => r.body?.state?.backend?.state === "ready"), "the worker to be ready"); + rmSync(daemon.lease); + const answer = await slow; + assert.equal(answer.status, 503); + assert.equal(answer.body.code, "write-lease-lost"); + assert.deepEqual(readdirSync(path.join(daemon.stateRoot, "jobs")), []); + } finally { + await daemon.stop(); + } +}); + +test("the route challenge is answered ahead of the cross-site refusal, and an Origin is still refused", async () => { + const daemon = await idunnDaemon(); + try { + // the challenge is how Idunn learns the incarnation is warming, so it is answered before the lease + const answered = await msgpackPost(daemon, snapshotRequest("m-42")); + assert.equal(answered.status, 200); + assert.equal(answered.headers["content-type"], "application/msgpack"); + const message = decode(answered.raw); + assert.equal(message.schemaVersion, "cultnet.snapshot_response_raw.v0"); + assert.equal(message.messageId, "m-42"); + assert.equal(message.documents.length, 1); + assert.equal((await msgpackPost(daemon, snapshotRequest(), { origin: "https://evil.example" })).status, 403); + assert.equal((await msgpackPost(daemon, Buffer.from("not msgpack at all"))).status, 400); + assert.equal((await msgpackPost(daemon, Buffer.from(encode({ schemaVersion: "cultnet.snapshot_response_raw.v0", messageId: "x", documents: [] })))).status, 400); + assert.equal((await msgpackPost(daemon, Buffer.alloc(70 * 1024))).status, 400); + const text = await request(daemon.port, "POST", "/motion/generate", { body: "{}", headers: { "content-type": "text/plain" } }); + assert.equal(text.status, 403); + } finally { + await daemon.stop(); + } +}); + +test("a signer that cannot answer gives 503 and echoes nothing", async () => { + const daemon = await idunnDaemon({ extraEnv: { FAKE_IDUNN_ANSWER_THROWS: "1" } }); + try { + const answered = await msgpackPost(daemon, snapshotRequest(SECRET)); + assert.equal(answered.status, 503); + assert.ok(!answered.raw.toString("utf8").includes(SECRET)); + assert.ok(!daemon.stderr().includes(SECRET)); + } finally { + await daemon.stop(); + } +}); + +test("the hand-run daemon has no route challenge", async () => { + const daemon = await startDaemon(); + try { + assert.equal((await msgpackPost(daemon, snapshotRequest())).status, 404); + assert.equal((await msgpackPost(daemon, snapshotRequest(), { origin: "https://evil.example" })).status, 404); + } finally { + await daemon.stop(); + } +}); diff --git a/scripts/test_text_encoding.py b/scripts/test_text_encoding.py index 49d6fa4..bda389c 100644 --- a/scripts/test_text_encoding.py +++ b/scripts/test_text_encoding.py @@ -55,6 +55,9 @@ class Identity(unittest.TestCase): self.assertNotEqual(key, te.embedding_key("id", "text b")) self.assertNotEqual(te.embedding_key("id", "a" * 300 + "x"), te.embedding_key("id", "a" * 300 + "y")) + def test_key_is_case_sensitive(self): + self.assertNotEqual(te.embedding_key("id", "A person waves."), te.embedding_key("id", "a person waves.")) + def test_chat_header_is_the_llama3_user_turn_pooled_after_the_separator(self): header = "<|start_header_id|>user<|end_header_id|>" + chr(10) * 2 self.assertEqual(te.chat_header("hello "), header + "!@#$%^&*()hello<|eot_id|>") @@ -269,6 +272,51 @@ class ChildBoundary(unittest.TestCase): self.assertEqual(len(answer["vectors"]), 2) +class ChildHeader(unittest.TestCase): + def test_every_text_is_tokenized_with_the_chat_header(self): + import importlib.util + import torch + spec = importlib.util.spec_from_file_location("kimodo_text_encode", Path(te.__file__).with_name("kimodo-text-encode.py")) + child = importlib.util.module_from_spec(spec) + spec.loader.exec_module(child) + + class Recorder: + def __init__(self): + self.seen = [] + + def tokenize(self, batch): + self.seen.extend(batch) + return batch + + def forward(self, features): + return torch.zeros(1, te.EMBEDDING_DIM) + + model = Recorder() + vectors, seconds = child.encode_texts(model, ["a person waves", " padded "]) + self.assertEqual(model.seen, [te.chat_header("a person waves"), te.chat_header(" padded ")]) + for header in model.seen: + self.assertTrue(header.startswith("<|start_header_id|>user<|end_header_id|>" + chr(10) * 2)) + self.assertEqual([len(v) for v in vectors], [te.EMBEDDING_DIM * 4] * 2) + self.assertEqual(len(seconds), 2) + + +# sha256 of the two Kimodo sources the encoder mirrors, at vendor/kimodo 6bb58488 (embedding-identity-complete). +# A Kimodo bump that changes either file must re-read the mirrored loader before these move. +KIMODO_LOADER_SHA256 = { + "model/load_model.py": "008092cd0b7adef1faea9fa9075718a61bea8ca9feaf9acf1b1d6caacaa0380a", + "model/llm2vec/llm2vec.py": "dc6e8b7d38086b4f456e013ab22cd4cc2cd72eb7fd2c13069f037f42aec80857", +} + + +class KimodoPin(unittest.TestCase): + def test_the_mirrored_loader_sources_are_the_pinned_ones(self): + import hashlib + import kimodo + root = Path(kimodo.__file__).resolve().parent + for relative, expected in KIMODO_LOADER_SHA256.items(): + self.assertEqual(hashlib.sha256((root / relative).read_bytes()).hexdigest(), expected, relative) + + REFERENCE_MODELS = os.environ.get("VILI_REFERENCE_MODELS") ROCK = "A person shakes their fist up and down three times, then thrusts a closed fist forward like a rock." REFERENCE_CODE = """ diff --git a/scripts/vili-daemon.mjs b/scripts/vili-daemon.mjs index 4049c4c..408dcf7 100644 --- a/scripts/vili-daemon.mjs +++ b/scripts/vili-daemon.mjs @@ -5,7 +5,8 @@ import { closeSync, openSync, readdirSync, readFileSync, unlinkSync, writeFileSy import { mkdir, writeFile } from "node:fs/promises"; import path from "node:path"; import readline from "node:readline"; -import { fileURLToPath } from "node:url"; +import net from "node:net"; +import { fileURLToPath, pathToFileURL } from "node:url"; import { createRequire } from "node:module"; import { spawn } from "node:child_process"; @@ -16,7 +17,7 @@ const { SingleFileMessagePackBackingStore, defineDocumentRegistry, defineDocumentType, -} = require("cultcache-ts"); +} = require("@gamecult/cultcache-ts"); const projectRoot = path.resolve(__dirname, ".."); const providerId = "vili.animation"; const viliStoreFileName = "vili.service.cc"; @@ -85,7 +86,6 @@ function parseArgs(argv) { threads: env.VILI_THREADS || "8", kimodoCommit: env.VILI_KIMODO_COMMIT || "", pythonEnv: env.VILI_PYTHON_ENV || "", - health: false, }; for (let index = 0; index < argv.length; index += 1) { @@ -99,7 +99,6 @@ function parseArgs(argv) { else if (arg === "--threads") args.threads = argv[++index]; else if (arg === "--kimodo-commit") args.kimodoCommit = argv[++index]; else if (arg === "--python-env") args.pythonEnv = argv[++index]; - else if (arg === "--health") args.health = true; } if (!/^[0-9]{1,2}$/.test(String(args.threads)) || Number(args.threads) < 1 || Number(args.threads) > MAX_THREADS) { console.error(`threads must be an integer from 1 to ${MAX_THREADS}`); @@ -294,11 +293,9 @@ function waitForExit(proc, timeoutMs) { } // The worker leads its own process group (its pid is the group id), so the encoder child it spawns is in the group -// too. The daemon owns the whole group: it is killed when the worker exits for any reason, on a requested stop, and -// at the next start if a crashed daemon left it behind (reclaimStrayWorker). Under systemd, KillMode=control-group -// is the same ownership from outside the process. -const workerPidFile = () => path.join(args.stateRoot, "worker.pid"); - +// too. The daemon owns the whole group: it is killed when the worker exits for any reason and on a requested stop. +// A crashed hand-run daemon's group is reclaimed by the next hand-run daemon (handRunRuntime). Under Idunn the +// unit's cgroup is the same ownership from outside the process. function killGroup(pgid, signal) { try { process.kill(-pgid, signal); @@ -307,46 +304,102 @@ function killGroup(pgid, signal) { } } -function forgetWorkerPid(pid) { - try { - if (readFileSync(workerPidFile(), "utf8").trim() === String(pid)) unlinkSync(workerPidFile()); - } catch { - // no pid file, or another worker's - } -} +// The hand-run way of owning a state root (tests, development): a Unix socket lock, the worker's pid file and the +// /proc reclaim. Idunn's runtime (scripts/idunn-entry.mjs) replaces all three with its process write lease. +export function handRunRuntime(stateRoot) { + const lockPath = path.join(stateRoot, "daemon.lock"); + const pidFile = path.join(stateRoot, "worker.pid"); + let lock = null; -// A worker left by a crashed daemon: the pid file names its group, and the group is ours only if some member -// still carries this state root's embeddings directory in its environment (the pid may have been reused). -function reclaimStrayWorker() { - let pgid; - try { - pgid = Number(readFileSync(workerPidFile(), "utf8").trim()); - } catch { - return; - } - const marker = `VILI_EMBEDDINGS_DIR=${path.join(args.stateRoot, "embeddings")}`; - let ours = false; - try { - for (const entry of readdirSync("/proc")) { - if (!/^\d+$/.test(entry)) continue; - try { - const stat = readFileSync(`/proc/${entry}/stat`, "utf8"); - const fields = stat.slice(stat.lastIndexOf(")") + 2).split(" "); - if (Number(fields[2]) !== pgid) continue; - if (readFileSync(`/proc/${entry}/environ`, "utf8").split("\0").includes(marker)) ours = true; - } catch { - // the process exited while we looked - } + const listen = () => new Promise((resolve, reject) => { + const server = net.createServer((socket) => socket.destroy()); + server.once("error", reject); + server.listen(lockPath, () => { + server.removeListener("error", reject); + lock = server; + resolve(); + }); + }); + + const probe = () => new Promise((resolve) => { + const socket = net.connect(lockPath); + socket.once("connect", () => { socket.destroy(); resolve("live"); }); + socket.once("error", () => resolve("stale")); + }); + + // A worker left by a crashed daemon: the pid file names its group, and the group is ours only if some member + // still carries this state root's embeddings directory in its environment (the pid may have been reused). + function reclaimStrayWorker() { + let pgid; + try { + pgid = Number(readFileSync(pidFile, "utf8").trim()); + } catch { + return; + } + const marker = `VILI_EMBEDDINGS_DIR=${path.join(stateRoot, "embeddings")}`; + let ours = false; + try { + for (const entry of readdirSync("/proc")) { + if (!/^\d+$/.test(entry)) continue; + try { + const stat = readFileSync(`/proc/${entry}/stat`, "utf8"); + const fields = stat.slice(stat.lastIndexOf(")") + 2).split(" "); + if (Number(fields[2]) !== pgid) continue; + if (readFileSync(`/proc/${entry}/environ`, "utf8").split("\0").includes(marker)) ours = true; + } catch { + // the process exited while we looked + } + } + } catch { + // no /proc: nothing can be verified, so nothing is killed + } + if (ours) killGroup(pgid, "SIGKILL"); + try { + unlinkSync(pidFile); + } catch { + // already gone } - } catch { - // no /proc: nothing can be verified, so nothing is killed - } - if (ours) killGroup(pgid, "SIGKILL"); - try { - unlinkSync(workerPidFile()); - } catch { - // already gone } + + return { + async acquire() { + await mkdir(stateRoot, { recursive: true }); + try { + await listen(); + } catch (error) { + if (error?.code !== "EADDRINUSE") throw error; + if ((await probe()) === "live") { + console.error("the state root is held by a running daemon"); + process.exit(2); + } + unlinkSync(lockPath); + await listen(); + } + reclaimStrayWorker(); // synchronous: no request is served before a predecessor's worker is gone + }, + held: () => lock !== null, + refusal: () => "write-lease-pending", + watch() {}, + recordWorker(pid) { + writeFileSync(pidFile, `${pid}\n`); + }, + forgetWorker(pid) { + try { + if (readFileSync(pidFile, "utf8").trim() === String(pid)) unlinkSync(pidFile); + } catch { + // no pid file, or another worker's + } + }, + release() { + if (lock) lock.close(); + lock = null; + try { + unlinkSync(lockPath); + } catch { + // already gone + } + }, + }; } async function stopWorker() { @@ -374,10 +427,10 @@ async function startWorker(model, timeoutMs) { }); closeSync(logFd); if (proc.pid !== undefined) { - writeFileSync(workerPidFile(), `${proc.pid}\n`); + runtime.recordWorker(proc.pid); proc.once("exit", () => { killGroup(proc.pid, "SIGKILL"); // whatever the worker left running, an encoder child included - forgetWorkerPid(proc.pid); + runtime.forgetWorker(proc.pid); }); } Object.assign(worker, { state: "starting", proc, pid: proc.pid ?? null, port: null, servedModels: [], lastError: null }); @@ -463,6 +516,10 @@ async function readRequestBody(request) { } async function generateMotion(request, response) { + if (!runtime.held()) { + json(response, 503, { ok: false, code: runtime.refusal() }); + return; + } if (workerUnconfigured()) { json(response, 503, { ok: false, code: "worker-unconfigured" }); return; @@ -593,6 +650,11 @@ async function generateMotion(request, response) { result = { ok: false, error: `the worker request failed (${error?.name || "Error"})`, body: null }; } + if (!runtime.held()) { + // the writer was lost while the job ran: nothing more is written + json(response, 503, { ok: false, code: runtime.refusal() }); + return; + } const job = { schema: "gamecult.vili.motion_job.v0", jobId, @@ -612,8 +674,48 @@ async function generateMotion(request, response) { json(response, result.ok ? 200 : 502, job); } +const SNAPSHOT_BODY_MAX = 64 * 1024; + +// Idunn's route challenge: a msgpack POST from the host, answered from local authority. A browser page can send +// it too, so an Origin is refused exactly as on every other POST. Only the Idunn runtime answers; the hand-run +// daemon has no such route. +async function answerRouteChallenge(request, response) { + if (!runtime.answerSnapshot) { + text(response, 404, "not found\n"); + return; + } + if (request.headers.origin !== undefined) { + json(response, 403, { ok: false, code: "cross-site" }); + return; + } + const chunks = []; + let size = 0; + for await (const chunk of request) { + size += chunk.length; + if (size > SNAPSHOT_BODY_MAX) { + json(response, 400, { ok: false, code: "invalid-snapshot-request" }); + return; + } + chunks.push(chunk); + } + let answer; + try { + answer = runtime.answerSnapshot(Buffer.concat(chunks)); + } catch (error) { + if (error?.code === "invalid-snapshot-request") json(response, 400, { ok: false, code: error.code }); + else json(response, 503, { ok: false, code: "runtime-presence-unavailable" }); + return; + } + response.writeHead(200, { "content-type": "application/msgpack", "cache-control": "no-store" }); + response.end(answer); +} + async function handleRequest(request, response) { const url = new URL(request.url, `http://${request.headers.host || `${args.host}:${args.port}`}`); + if (url.pathname === "/cultnet/snapshot" && request.method === "POST") { + await answerRouteChallenge(request, response); + return; + } if (request.method === "POST" && refuseCrossSite(request, response)) return; if (url.pathname === "/" || url.pathname === "/health") { @@ -627,23 +729,13 @@ async function handleRequest(request, response) { } } -async function healthCheck() { - const host = args.host === "0.0.0.0" ? "127.0.0.1" : args.host; - const response = await fetch(`http://${host}:${args.port}/health`); - if (!response.ok) throw new Error(`health returned ${response.status}`); - const body = await response.json(); - if (!body.ok) throw new Error("health returned ok=false"); -} - -if (args.health) { - healthCheck().then(() => process.exit(0), (error) => { - console.error(error.message); - process.exit(1); - }); -} else { - await mkdir(path.join(args.stateRoot, "jobs"), { recursive: true }); - await persistSurfaces(); +let runtime; +// The one daemon. `rt` owns the state root: the hand-run runtime (socket lock) or Idunn's (process write lease). +// The server listens first, so Idunn's challenge can be answered while the lease is still pending; nothing is +// written to the state root until the runtime holds it. +export async function serve(rt) { + runtime = rt; const server = http.createServer((request, response) => { handleRequest(request, response).catch((error) => { // The error's message can carry the request; name only its class. @@ -652,20 +744,39 @@ if (args.health) { else response.end(); }); }); + await new Promise((resolve) => server.listen(args.port, args.host, resolve)); + console.log(`Vili listening on http://${args.host}:${server.address().port}`); - server.listen(args.port, args.host, () => { - reclaimStrayWorker(); // synchronous: no request is served before a predecessor's worker is gone - console.log(`Vili listening on http://${args.host}:${server.address().port}`); - }); - - const surfaceTimer = setInterval(() => persistSurfaces().catch((error) => console.error(`persist failed: ${error?.name || "Error"}`)), 5000); - + let surfaceTimer = null; const shutdown = async () => { clearInterval(surfaceTimer); await stopWorker(); + runtime.release(); server.close(); process.exit(0); }; process.on("SIGTERM", shutdown); process.on("SIGINT", shutdown); + + await runtime.acquire(); + await mkdir(path.join(args.stateRoot, "jobs"), { recursive: true }); + await persistSurfaces(); + let lost = false; + const onLost = () => { + if (lost) return; + lost = true; + clearInterval(surfaceTimer); + stopWorker().finally(() => runtime.reportHealth?.("degraded")); + }; + surfaceTimer = setInterval(() => { + runtime.watch(onLost); + if (lost) return; + persistSurfaces().catch((error) => console.error(`persist failed: ${error?.name || "Error"}`)); + }, 5000); + runtime.reportHealth?.("active"); + console.log("Vili holds the state root"); +} + +if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) { + await serve(handRunRuntime(args.stateRoot)); } diff --git a/vendor/SOMA-X b/vendor/SOMA-X new file mode 160000 index 0000000..56a3d95 --- /dev/null +++ b/vendor/SOMA-X @@ -0,0 +1 @@ +Subproject commit 56a3d957a549c66425b500fddf7f3183bc6fbdff diff --git a/vendor/kimodo b/vendor/kimodo new file mode 160000 index 0000000..6bb5848 --- /dev/null +++ b/vendor/kimodo @@ -0,0 +1 @@ +Subproject commit 6bb58488037dd65360ff0c5d1692b403a23309f7 From f410338329f7af49c1adad4d93c469a64c674b6e Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 24 Oct 2026 00:25:07 +0200 Subject: [PATCH 02/29] Lock inputs: build tools and the CPU worker's pinned runtime Co-Authored-By: Claude Opus 5.5 --- deployment/idunn/requirements-build.in | 4 ++++ deployment/idunn/requirements.in | 31 ++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 deployment/idunn/requirements-build.in create mode 100644 deployment/idunn/requirements.in diff --git a/deployment/idunn/requirements-build.in b/deployment/idunn/requirements-build.in new file mode 100644 index 0000000..d458a9f --- /dev/null +++ b/deployment/idunn/requirements-build.in @@ -0,0 +1,4 @@ +setuptools +wheel +pybind11 +cmake diff --git a/deployment/idunn/requirements.in b/deployment/idunn/requirements.in new file mode 100644 index 0000000..8c2bdd2 --- /dev/null +++ b/deployment/idunn/requirements.in @@ -0,0 +1,31 @@ +# Vili's CPU worker: torch from the CPU index, Kimodo 6bb58488's runtime pins as the CPU probe installed them +# (motion-pipeline map, Body facts; probe Dockerfile), msgpack for cultcache-py and the worker's imports. +# kimodo, MotionCorrection and SOMA-X install from the vendored gitlinks, never from here. +# Compile on Yggdrasil in a container (never on Starfire): +# uv pip compile --generate-hashes --python-version 3.12 --python-platform x86_64-manylinux_2_28 \ +# --index-strategy unsafe-best-match -c requirements-build.lock requirements.in -o requirements.lock +--extra-index-url https://download.pytorch.org/whl/cpu +torch==2.5.1+cpu +msgpack +hydra-core==1.3.2 +omegaconf==2.3.0 +scipy==1.15.3 +einops==0.8.2 +tqdm +pydantic==2.12.5 +trimesh==4.11.3 +pillow +numpy==1.26.4 +peft==0.18.1 +transformers==5.1.0 +accelerate==1.13.0 +safetensors==0.7.0 +huggingface-hub==1.6.0 +tokenizers==0.22.2 +psutil +packaging +filelock +boto3 +bvhio +gradio_client>=1.0 +urllib3>=2.6.3 From fd03693bc789e2f4daf156589df2c3cc4c7428bd Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 24 Oct 2026 00:26:19 +0200 Subject: [PATCH 03/29] Idunn recipe, release assembler and the hash locks Co-Authored-By: Claude Opus 5.5 --- deployment/idunn/assemble-release.mjs | 52 + deployment/idunn/recipe.toml | 222 ++++ deployment/idunn/requirements-build.lock | 39 + deployment/idunn/requirements.lock | 1185 ++++++++++++++++++++++ 4 files changed, 1498 insertions(+) create mode 100644 deployment/idunn/assemble-release.mjs create mode 100644 deployment/idunn/recipe.toml create mode 100644 deployment/idunn/requirements-build.lock create mode 100644 deployment/idunn/requirements.lock diff --git a/deployment/idunn/assemble-release.mjs b/deployment/idunn/assemble-release.mjs new file mode 100644 index 0000000..e5cdca0 --- /dev/null +++ b/deployment/idunn/assemble-release.mjs @@ -0,0 +1,52 @@ +// Assembles the node half of Vili's sealed release (run by the recipe's node-build runner): +// node deployment/idunn/assemble-release.mjs release/vili release/node +// release/vili gets the daemon, the Idunn entry, the worker and child sources, the installed node_modules (installed +// with --install-links, so cultcache-ts and cultnet-ts are real copies with their dependencies and no link reaches +// into vendor/), cultcache-py's sources and the lock files the entry hashes; release/node gets the node binary. +// It refuses to finish if any path it wrote is a symlink whose target is absolute: the seal would refuse the tree. +import { chmodSync, copyFileSync, cpSync, lstatSync, mkdirSync, readdirSync, readlinkSync, rmSync } from "node:fs"; +import path from "node:path"; + +const [viliOut, nodeOut] = process.argv.slice(2); +if (!viliOut || !nodeOut || process.argv.length !== 4) { + console.error("usage: assemble-release.mjs "); + process.exit(2); +} + +const copy = (from, to) => cpSync(from, to, { recursive: true, verbatimSymlinks: true, errorOnExist: true }); + +rmSync(viliOut, { recursive: true, force: true }); +rmSync(nodeOut, { recursive: true, force: true }); +mkdirSync(path.join(viliOut, "scripts"), { recursive: true }); +mkdirSync(path.join(viliOut, "deployment", "idunn"), { recursive: true }); +mkdirSync(nodeOut, { recursive: true }); + +// Runtime sources only: the tests and their fixtures stay out of the release. +for (const entry of readdirSync("scripts", { withFileTypes: true })) { + if (!entry.isFile() || !/\.(mjs|py)$/u.test(entry.name) || /^test[-_]/u.test(entry.name)) continue; + copyFileSync(path.join("scripts", entry.name), path.join(viliOut, "scripts", entry.name)); +} +copyFileSync("package.json", path.join(viliOut, "package.json")); +copy("node_modules", path.join(viliOut, "node_modules")); +copy(path.join("vendor", "CultLib", "packages", "cultcache-py", "src"), path.join(viliOut, "vendor", "CultLib", "packages", "cultcache-py", "src")); +for (const lock of ["requirements-build.lock", "requirements.lock"]) { + copyFileSync(path.join("deployment", "idunn", lock), path.join(viliOut, "deployment", "idunn", lock)); +} +copyFileSync(process.execPath, path.join(nodeOut, "node")); +chmodSync(path.join(nodeOut, "node"), 0o755); + +function refuseAbsoluteLinks(directory) { + for (const entry of readdirSync(directory, { withFileTypes: true })) { + const full = path.join(directory, entry.name); + if (lstatSync(full).isSymbolicLink()) { + if (path.isAbsolute(readlinkSync(full))) { + console.error(`absolute symlink in the release: ${path.relative(process.cwd(), full)}`); + process.exit(1); + } + } else if (entry.isDirectory()) { + refuseAbsoluteLinks(full); + } + } +} +refuseAbsoluteLinks(viliOut); +refuseAbsoluteLinks(nodeOut); diff --git a/deployment/idunn/recipe.toml b/deployment/idunn/recipe.toml new file mode 100644 index 0000000..eabb5f9 --- /dev/null +++ b/deployment/idunn/recipe.toml @@ -0,0 +1,222 @@ +schema = "gamecult.idunn.target_declaration.v1" +target = "vili" +source_stamp_environment = "VILI_BUILD_COMMIT" +required_gitlinks = ["vendor/CultLib", "vendor/kimodo", "vendor/SOMA-X"] + +# The one external input: a relocatable CPython. The locked site-packages are installed into this tree, never into +# a venv (a venv's bin/python is an absolute link the seal refuses and its pyvenv.cfg names the build workspace). +[[external_inputs]] +id = "cpython" +url = "https://github.com/astral-sh/python-build-standalone/releases/download/20261021/cpython-3.12.15+20261021-x86_64-unknown-linux-gnu-install_only.tar.gz" +sha256 = "5ff9f0602ce964a529ed1e8555d3abab6341926d724402ba9a15e9e877191124" +runner = "python-build" +destination = "release/cpython.tar.gz" + +# ---- node-build: the daemon, the Idunn entry and its dependencies + +[[steps]] +id = "install-cultlib-build-dependencies" +phase = "prepare" +runner = "node-build" +working_directory = "vendor/CultLib" +required_environment = ["HOME", "NPM_CONFIG_CACHE"] +argv = ["npm", "ci", "--ignore-scripts"] + +[[steps]] +id = "build-cultcache-ts" +phase = "prepare" +runner = "node-build" +working_directory = "vendor/CultLib" +required_environment = ["HOME", "NPM_CONFIG_CACHE"] +argv = ["npm", "run", "build", "--workspace=packages/cultcache-ts"] + +[[steps]] +id = "build-cultnet-ts" +phase = "prepare" +runner = "node-build" +working_directory = "vendor/CultLib" +required_environment = ["HOME", "NPM_CONFIG_CACHE"] +argv = ["npm", "run", "build", "--workspace=packages/cultnet-ts"] + +[[steps]] +id = "install-vili-dependencies" +phase = "prepare" +runner = "node-build" +required_environment = ["HOME", "NPM_CONFIG_CACHE"] +argv = ["npm", "ci", "--ignore-scripts", "--install-links"] + +[[steps]] +id = "test-daemon" +phase = "test" +runner = "node-build" +required_environment = ["HOME", "NPM_CONFIG_CACHE"] +argv = ["node", "--test", "--test-timeout=60000", "scripts/test-vili-daemon.mjs"] + +[[steps]] +id = "assemble-vili-release" +phase = "build" +runner = "node-build" +required_environment = ["HOME", "NPM_CONFIG_CACHE"] +argv = ["node", "deployment/idunn/assemble-release.mjs", "release/vili", "release/node"] + +# ---- python-build: the interpreter and its locked packages + +[[steps]] +id = "unpack-cpython" +phase = "prepare" +runner = "python-build" +argv = ["tar", "-xzf", "release/cpython.tar.gz", "-C", "release"] + +[[steps]] +id = "install-build-tools" +phase = "prepare" +runner = "python-build" +required_environment = ["HOME", "PIP_CACHE_DIR", "TMPDIR"] +argv = ["release/python/bin/python3.12", "-m", "pip", "install", "--no-deps", "--require-hashes", "-r", "deployment/idunn/requirements-build.lock"] + +[[steps]] +id = "install-locked-packages" +phase = "prepare" +runner = "python-build" +required_environment = ["HOME", "PIP_CACHE_DIR", "TMPDIR"] +argv = ["release/python/bin/python3.12", "-m", "pip", "install", "--no-deps", "--require-hashes", "--no-build-isolation", "-r", "deployment/idunn/requirements.lock"] + +[[steps]] +id = "install-vendored-packages" +phase = "prepare" +runner = "python-build" +required_environment = ["HOME", "PIP_CACHE_DIR", "TMPDIR"] +argv = ["release/python/bin/python3.12", "-m", "pip", "install", "--no-deps", "--no-build-isolation", "--no-index", "vendor/SOMA-X", "vendor/kimodo/MotionCorrection", "vendor/kimodo"] + +[[steps]] +id = "pip-check" +phase = "test" +runner = "python-build" +required_environment = ["HOME", "PIP_CACHE_DIR", "TMPDIR"] +argv = ["release/python/bin/python3.12", "-m", "pip", "check"] + +[[steps]] +id = "test-worker" +phase = "test" +runner = "python-build" +working_directory = "." +required_environment = ["HOME", "TMPDIR", "PYTHONPATH"] +argv = ["release/python/bin/python3.12", "-m", "unittest", "discover", "-s", "scripts", "-p", "test_*.py"] + +# Every module the worker and the encoder child import at top level, kimodo.scripts.generate included. +[[steps]] +id = "import-smoke" +phase = "acceptance" +runner = "python-build" +required_environment = ["HOME", "TMPDIR", "PYTHONPATH"] +argv = [ + "release/python/bin/python3.12", "-c", + "import accelerate, cultcache_py, huggingface_hub.constants, kimodo, kimodo.constraints, kimodo.exports.motion_io, kimodo.meta, kimodo.model.llm2vec.llm2vec, kimodo.model.load_model, kimodo.model.loading, kimodo.model.registry, kimodo.scripts.generate, kimodo.tools, msgpack, peft, torch, transformers", +] + +[[steps]] +id = "compile-python" +phase = "build" +runner = "python-build" +argv = ["release/python/bin/python3.12", "-m", "compileall", "-q", "-j", "4", "--invalidation-mode", "unchecked-hash", "release/python/lib/python3.12"] + +# ---- the sealed release: node, vili, python + +[[artifacts]] +id = "node" +source_kind = "runner-output" +runner = "node-build" +source = "release/node/node" +destination = "node" +executable = true + +[[artifacts]] +id = "vili" +source_kind = "runner-output" +runner = "node-build" +source = "release/vili" +destination = "vili" + +[[artifacts]] +id = "python" +source_kind = "runner-output" +runner = "python-build" +source = "release/python" +destination = "python" +executable_members = ["bin/python3.12"] + +[service] +executable_artifact = "node" +required_adjacent_artifacts = ["vili", "python"] +arguments = [ + { kind = "literal", value = "vili/scripts/idunn-entry.mjs" }, + { kind = "literal", value = "--state-root" }, + { kind = "binding", name = "state_root" }, + { kind = "literal", value = "--kimodo-commit" }, + { kind = "literal", value = "6bb58488037dd65360ff0c5d1692b403a23309f7" }, +] +transport = "http" +route_required = true +required_environment = [ + "GAMECULT_IDUNN_CANDIDATE_BIND", + "GAMECULT_IDUNN_PROCESS_WRITE_LEASE", + "GAMECULT_IDUNN_RUNTIME_BUNDLE", + "VILI_MODELS_ROOT", + "VILI_THREADS", +] + +[service.health] +contract = "gamecult.runtime_presence_health.v2" + +[state] +schema_generation = "vili-v1" + +[[state.slots]] +id = "service-store" +relative_path = "vili.service.cc" +kind = "cultcache-file" +schema = "gamecult.vili.operator_state.v1" +writer = "process-bound-single-writer" +recovery = "rebuildable" +startup = "create-or-open-after-write-lease" + +[[state.slots]] +id = "text-embeddings" +relative_path = "embeddings/text-embeddings.cc" +kind = "cultcache-file" +schema = "gamecult.vili.text_embedding.v0" +writer = "process-bound-single-writer" +recovery = "rebuildable" +startup = "create-or-open-after-write-lease" + +[[state.slots]] +id = "jobs" +relative_path = "jobs" +kind = "external-directory" +schema = "gamecult.vili.motion_job.v0" +writer = "process-bound-single-writer" +recovery = "preserve" +startup = "create-or-open-after-write-lease" + +[[state.slots]] +id = "artifacts" +relative_path = "artifacts" +kind = "external-directory" +schema = "gamecult.vili.motion_artifact.v0" +writer = "process-bound-single-writer" +recovery = "preserve" +startup = "create-or-open-after-write-lease" + +[[state.slots]] +id = "logs" +relative_path = "logs" +kind = "external-directory" +schema = "text.log" +writer = "process-bound-single-writer" +recovery = "rebuildable" +startup = "create-or-open-after-write-lease" + +[[provides]] +capability = "vili.motion.api" +schema = "http.v1" +compatibility = "v1" diff --git a/deployment/idunn/requirements-build.lock b/deployment/idunn/requirements-build.lock new file mode 100644 index 0000000..e200638 --- /dev/null +++ b/deployment/idunn/requirements-build.lock @@ -0,0 +1,39 @@ +# This file was autogenerated by uv via the following command: +# uv pip compile --generate-hashes --python-version 3.12 --python-platform x86_64-manylinux_2_28 requirements-build.in -o requirements-build.lock +cmake==4.4.4 \ + --hash=sha256:02e9599cba932b386dc5c7e29db5dbda0610d13263798ff1521298c18014357d \ + --hash=sha256:3c3f40c4656ec1ad1b873dd502bb31b3bba75295ae66b2623e515f2931eddbcb \ + --hash=sha256:45a5c5e058e1e456f8da99e8bb83c98df079f385afd0bbea222a7eab6fdc1a8f \ + --hash=sha256:6b914a7d9492d6134d43d484500cacd3a70466f6e31fcaf5145cf87128c28114 \ + --hash=sha256:7b4a9c0d8146691d91b094633e4cd4f0cc4cdb8e04db0e8d805056db064396e0 \ + --hash=sha256:883962a72b1b3a16ff445427f24c8caca9797dd9e563bbe208cbcd89e877f9d3 \ + --hash=sha256:959fdcb277c63180928fe2c388063aa26dcfa1968033f7904eed1948ed44283b \ + --hash=sha256:9ca4d839ced82f92b69319f50a65addf3051fae5d34464d9ac5b0296aba6ccb3 \ + --hash=sha256:a3b4d4a35ba69360e630d2ce33020f42a61e09af28fe81122697989d11be8b39 \ + --hash=sha256:ad8e0a38b5707e27882701146bdfffecacd80e7703fa0fc36c77528518d545af \ + --hash=sha256:b3029f586853e01ddf2824c1ff124a1c5284f8ae897994758e9c4eeb45903b58 \ + --hash=sha256:b4ed2c1a8f9c90e37a1f3095f7ed94979ebf3f94d0e90e63d50f4e72d419773a \ + --hash=sha256:c7def2c08d9d0d31bab239209946e45a97520518ae63c0401772206f28b81523 \ + --hash=sha256:d25e1d6baad137ddf21e576bf5296cd941bdd0da85baedbf78f673261fd2fca3 \ + --hash=sha256:e2d98233f16b5d6b9d4673a0a724ce801fc413811befb8f0b008cbffb7a2ad63 \ + --hash=sha256:eb0ff21b4309828f8fc0f0542022768f24b15aa1af3284e16c1eb01cdbe7d3e5 \ + --hash=sha256:ed50c732a82ac04f6e5606a0677ddfb49dda9ee130f9d4163c5df217e478417e \ + --hash=sha256:f337d18e33b116cabae9a7a8ff423fc0bc3f389da0acefeb724e1397128dcc34 \ + --hash=sha256:f773a0544c66370408f451acd487c2c643b0dfebb48c5d64f3638bc1bb820238 + # via -r requirements-build.in +packaging==26.3 \ + --hash=sha256:94edc256424af38762eb31306eed28beb9f0efc50a8837492c9d6fd6004aed79 \ + --hash=sha256:d7193f7c8e4e93f444fde0262bf90af30e16fa0ad0ad44cb553c87339b23cd1c + # via wheel +pybind11==3.1.0 \ + --hash=sha256:a1cc06b524ab3edca51f8ad3895f9c4fa20b8b19283173dff4ae781449dc9639 \ + --hash=sha256:b8488090f8acffbcb6b5d6a85571a6827a0a2981ffb75e5a0b27b87c4a6b7dd0 + # via -r requirements-build.in +setuptools==84.2.1 \ + --hash=sha256:3ff8b3b5492a0aa66960f4419365a86b84e013070d4313e4d4a6894f5d64d6bc \ + --hash=sha256:ca140b45d5325a9478f880e351484f62fef15f336462e449ca0c03c873d589c2 + # via -r requirements-build.in +wheel==0.48.0 \ + --hash=sha256:3217dcc807155e45db462d7ef2431f5ddda0d7273b700d05a67b271ceb1287ab \ + --hash=sha256:94800765601e9171bf5d58d066e640662842bcedcbab982b2c90787a2c987322 + # via -r requirements-build.in diff --git a/deployment/idunn/requirements.lock b/deployment/idunn/requirements.lock new file mode 100644 index 0000000..2436905 --- /dev/null +++ b/deployment/idunn/requirements.lock @@ -0,0 +1,1185 @@ +# This file was autogenerated by uv via the following command: +# uv pip compile --generate-hashes --python-version 3.12 --python-platform x86_64-manylinux_2_28 --index-strategy unsafe-best-match -c requirements-build.lock requirements.in -o requirements.lock +--extra-index-url https://download.pytorch.org/whl/cpu +accelerate==1.13.0 \ + --hash=sha256:cf1a3efb96c18f7b152eb0fa7490f3710b19c3f395699358f08decca2b8b62e0 \ + --hash=sha256:d631b4e0f5b3de4aff2d7e9e6857d164810dfc3237d54d017f075122d057b236 + # via + # -r requirements.in + # peft +annotated-doc==0.0.5 \ + --hash=sha256:117bac03a25ede5df5440e855b32d556049ca169ead221505badf432fed4b101 \ + --hash=sha256:c7e58ce09192557605d8bbd92836d7e1d520ac9580096042c0bfd197efacf1bb + # via typer +annotated-types==0.8.0 \ + --hash=sha256:13b2beaad985e05e2d6407ee4c4f35590b11f8d693a258a561055cac8f64cab7 \ + --hash=sha256:f072f4d804ea359e4eaf198b1af7a8b0943881a87f31bb764f8bf219bb9419e0 + # via pydantic +antlr4-python3-runtime==4.9.3 \ + --hash=sha256:f224469b4168294902bb1efa80a8bf7855f24c99aef99cbefc1bcd3cce77881b + # via + # hydra-core + # omegaconf +anyio==4.15.1 \ + --hash=sha256:6152fdbbf9a77fdec97731721bebf7c4c44f7c29b424b0065826173efc7ed101 \ + --hash=sha256:9f28306018cbd6d329e64a36d58256edff76dd996fe423bc957326e578b82a94 + # via httpx +boto3==1.43.118 \ + --hash=sha256:ab8f3d2c622ef039338b4f228d97ea55f1abd573d84bb9b9a5ee8cb6780c0ccd \ + --hash=sha256:c0620f799e0f0c222ba42c337b65cdbcd3da38a3121187f634d8926cbbb28a9c + # via -r requirements.in +botocore==1.43.118 \ + --hash=sha256:7f3f9d88cc9e847587690f82a42e3c3c292c3026c92c1e60d68a9310018e003f \ + --hash=sha256:a45d7ae570674161e4a3542d8c68633bf7503f92d1de781ef7361b79488eda6f + # via + # boto3 + # s3transfer +bvhio==1.5.4 \ + --hash=sha256:41022914844d86b949e6f6eaae60ed7f9612f46cfca7488ecf1e370f4a60738f \ + --hash=sha256:f3dc2779725c4e5ed3f27d44c48da597653d50115744da4e433c7c563e28f40b + # via -r requirements.in +certifi==2026.10.23 \ + --hash=sha256:a9895e6e2758b371e0545e321a3a8fd1fcfd9829ada8824a936dfb16aaaf36cd \ + --hash=sha256:e9b54de76e530bb6cf0ccd036787103acb58fd42ba930ea8bf948ddbaa2f61d1 + # via + # httpcore + # httpx +einops==0.8.2 \ + --hash=sha256:54058201ac7087911181bfec4af6091bb59380360f069276601256a76af08193 \ + --hash=sha256:609da665570e5e265e27283aab09e7f279ade90c4f01bcfca111f3d3e13f2827 + # via -r requirements.in +filelock==4.2.4 \ + --hash=sha256:301241438c57936ef93f4243a94f2559022268bfcf9b375a9a72eb0f8db8358e \ + --hash=sha256:c6d8663535e1650ee430507b4ffbac7b464dd64b7647ea0112a9f406499d163d + # via + # -r requirements.in + # huggingface-hub + # torch +fsspec==2026.9.0 \ + --hash=sha256:0f08147951c8cb31d844c3547d631053b127863b60be04cf06e121333ee0e2fe \ + --hash=sha256:8dd6e646e99ea382bd85f97a45e6b526a442d79423a7dc673f1e2756d05fcb5f + # via + # gradio-client + # huggingface-hub + # torch +gradio-client==2.7.1 \ + --hash=sha256:2c629110496dbca67a848cd70add8cf5c3a24776404a2c5ef4fd759c7c2c33c4 \ + --hash=sha256:b4f953212a66eeb7fa12d93fcf98fa90a0567c2c9c6a5fc2795610f7c71e21b5 + # via -r requirements.in +h11==0.16.0 \ + --hash=sha256:4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1 \ + --hash=sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86 + # via httpcore +hf-xet==1.7.0 \ + --hash=sha256:0a9e802f33bf50c851abe45fc5380e61f959e2d369647d6742b79ad9d6c27cab \ + --hash=sha256:19c0e64f14175ccb6a1aff69e0d2ab9ec5269a560e6687abaf2b3fa4f73de7cd \ + --hash=sha256:2814a6e999d13464c4d679b788cc5d784eb5a4edfc638a31f10e9a11ab531ef8 \ + --hash=sha256:2b7bb5727889b0f2436dbaaad8fc4c3e66b8240d992716989e0c086b4278b1bc \ + --hash=sha256:4ee5e05a627f5ab5bad7a86582277d645556ea1e199903aae19e033a392aa13a \ + --hash=sha256:57bc157b8b7fe3bee9dcb9af7f3da8de41801c3b31a9ef68a77a33c6a6be382f \ + --hash=sha256:59fba37039233c7fcbe196817d6cdcf1b40dfb17b410f229d85b0cf0a1848da4 \ + --hash=sha256:757168feb5679647c0bb13ee5d0faebe799c4dff9051419885a566ebd79f949d \ + --hash=sha256:80f79dae613ce9e0ea1fd1ae15616ca9ac74aed4c770aabc199c4f03ebecc863 \ + --hash=sha256:87dab080f8f7d32781c2586904e3603f4e60d09bfc727706c3ae419e0829beeb \ + --hash=sha256:acc3851cf2576a8fb2ae926da863f4efabe21303cf292e9a44332802ab0dcc6a \ + --hash=sha256:b01fe18dbbd151a2403d2c64ed30dc6547b00d6babab9a617d77c7acdb81ee66 \ + --hash=sha256:b91569d5f1b61c34b043687da02c05dd3604f3d329e7868510bf3f7971599006 \ + --hash=sha256:d406ec79053c0871817f700c2ac8c36ba0d87f9c34b7458b0f0063bb218b0466 \ + --hash=sha256:e3e88a7a75d7d95cbee1f37dc31341d6201124cf21c6c4b1dfab8ccba9b09e0f \ + --hash=sha256:fa029678be1ba7f953c409b0b27bf15cc69cd1c9b3a674fbd78856ebefca1052 \ + --hash=sha256:fcfd6c22418e57dd5b3aea649e813b2e2cfb2aebf317b210d90f1fe4b3018b52 + # via huggingface-hub +httpcore==1.0.9 \ + --hash=sha256:2d400746a40668fc9dec9810239072b40b4484b640a8c38fd654a024c7a1bf55 \ + --hash=sha256:6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8 + # via httpx +httpx==0.28.1 \ + --hash=sha256:75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc \ + --hash=sha256:d909fcccc110f8c7faf814ca82a9a4d816bc5a6dbfea25d6591d6985b8ba59ad + # via + # gradio-client + # huggingface-hub +huggingface-hub==1.6.0 \ + --hash=sha256:d931ddad8ba8dfc1e816bf254810eb6f38e5c32f60d4184b5885662a3b167325 \ + --hash=sha256:ef40e2d5cb85e48b2c067020fa5142168342d5108a1b267478ed384ecbf18961 + # via + # -r requirements.in + # accelerate + # gradio-client + # peft + # tokenizers + # transformers +hydra-core==1.3.2 \ + --hash=sha256:8a878ed67216997c3e9d88a8e72e7b4767e81af37afb4ea3334b269a4390a824 \ + --hash=sha256:fa0238a9e31df3373b35b0bfb672c34cc92718d21f81311d8996a16de1141d8b + # via -r requirements.in +idna==3.20 \ + --hash=sha256:a7db850025b95ded1eae8a46181a1a6c56c92c96f0e2b005d9ff8dc0210cab44 \ + --hash=sha256:ab7ae7122974553370f0bdb919e1a960b2cd1bc1ef0276416d896db81c14582c + # via + # anyio + # httpx +jinja2==3.1.6 \ + --hash=sha256:85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67 + # via torch +jmespath==1.1.0 \ + --hash=sha256:472c87d80f36026ae83c6ddd0f1d05d4e510134ed462851fd5f754c8c3cbb88d \ + --hash=sha256:a5663118de4908c91729bea0acadca56526eb2698e83de10cd116ae0f4e97c64 + # via + # boto3 + # botocore +markdown-it-py==4.2.0 \ + --hash=sha256:04a21681d6fbb623de53f6f364d352309d4094dd4194040a10fd51833e418d49 \ + --hash=sha256:9f7ebbcd14fe59494226453aed97c1070d83f8d24b6fc3a3bcf9a38092641c4a + # via rich +markupsafe==3.0.4 \ + --hash=sha256:007e1ffd9bf65bb6ee96df7b258fc632a4868dd5566037986c64781f35a36e98 \ + --hash=sha256:02fa4acbc6a3fc5c693c34d4dd8c1130b7fe99cc915181b0ddd6f72aeb296002 \ + --hash=sha256:03470d1a8268e692ecf79ecd565593e59d44219377a7ead61f1f1b94c1f7ff6b \ + --hash=sha256:04e7902ba80ee4bac1d50a549606527a1dcf0476cd81403db41099d3b60ec653 \ + --hash=sha256:051417f74bcaaefa316276e0ff723f541616ca51043d070da00249d9bddd3e3c \ + --hash=sha256:05295589e619b9bed252a86b532b8e27350abc372d18ba89b59375325e91ec1e \ + --hash=sha256:06de8ef6331f6e822c28d577dc8bf43fe398800477c49498f38fc38b67ff33fc \ + --hash=sha256:0764a13d34cae40db7bbf3a09b7e9b491bf4603e20b263a7a9d6b8e324975d0a \ + --hash=sha256:077293e425f28ec737dbcad442a71752e28f8ae27cde3d68acd1fb212091cd92 \ + --hash=sha256:0930db9bdc62d22944e10b066448bb65dc9abe9112880c7cab8da54db4284d5f \ + --hash=sha256:0cee7cb0f9a1b6892ea482237d9403b3d1b4603aee057d0ff01f0fac2d019a97 \ + --hash=sha256:0d9c47709875fdb321452056622e930c52afbc07a7d780762fbb8b4d91ce6fa4 \ + --hash=sha256:11935df9bf455ed0c04eb87bcd720f02b1fe5e02128a9430f23aed6f93336fc7 \ + --hash=sha256:12a606a492de952afcb43b59a14aaaaad120e708d3663dd0fdf2d738d427a691 \ + --hash=sha256:14bd2d845d62ab678eaf81da89d7b621b51756c72346745c1a594c09d49207a2 \ + --hash=sha256:15ba9e28640feef770374b116a6f019c21f52404aeabe516aa7f800587b98cfc \ + --hash=sha256:18a801868a884f216e784d7d14db2a4077143ce7610440aee2ce8f734e7cfcde \ + --hash=sha256:1c0df495a977d10460a94941799c72d5b5ab03d3858d949b55b5a66c8f371c99 \ + --hash=sha256:1caa2fa5a6184fb233153b35f654e6687bd555476f6170f29d8ee9be1a8b0af9 \ + --hash=sha256:1e1451fab512d1bcc3dc26988ec1edb0b82c2db909132872cd9356070a6b63df \ + --hash=sha256:1f1f9477e174582b0a1b583d60b66e1f2cf5d3fe12cee985e4aedf44766600e5 \ + --hash=sha256:2628d3a8cb648ecebb3c5d6b0a1052d400e4d8b7ac0fb786be8d285b50040d17 \ + --hash=sha256:26e9867520db70d37f7fb421a7f0d8adb40171011fb84ce869afa1a83370dfa8 \ + --hash=sha256:2a6ef68ae94aed8721934072b27a3b654ea2100b97e4ab864cf1489c90926fbc \ + --hash=sha256:2b2b1e18af909b448bb3cf9e3433366f7a8726271fc214e8b10e0f62a78c724b \ + --hash=sha256:2cb3dd71fc6be918ad4264346a8ed69485f9b7ed7bf35495d8e22807cd6b8bea \ + --hash=sha256:2d1b7d9308288661f56672b1b157d75fc536714d3638487bbea17b6318a78248 \ + --hash=sha256:2dad610540cb2e6272855c178f08ae9a1c7ac258a7fb71660553a5f104b42741 \ + --hash=sha256:2e5a7cd7fdd14fcb1ae5d7d8bf23d24fbd1daefd1fbca2580132e1ea75f098b5 \ + --hash=sha256:2e9ad7dd851bf45fab9f75cbff4cb493fee9979e8d8c7c9c3ee119022518edd6 \ + --hash=sha256:340cbb1957ba99929cbf19a75626d36ba1ae21d1730b287d1cf7f824a20c4fc7 \ + --hash=sha256:34bdde374c5932765d7dc685c4a1d191a3207852d67e8e0a9eb6ea85156181f1 \ + --hash=sha256:353bd63081912ab8cfa6a0c7d185934cdf8426f04c618bba6bc4b394f2069b67 \ + --hash=sha256:387d8cd30e69b3f0a72877b9ae717033396404e19095b17fe89753a981fda44f \ + --hash=sha256:3882fb412298575bae3b9c46868251f15cc69307359f87bb1b382e53d6e5a2c9 \ + --hash=sha256:38fc55594dab834470b6733dead2ee9e3f657fb0608c769dcafa0ba5ab52f45c \ + --hash=sha256:396ec4e65cc889f69786b3b89478b471cee5a3bcf468b9d9bb03e1a30fb291fc \ + --hash=sha256:39dbacefc411633db5b4378b066a9aca70a3d7e2922c9e578d825f844026eeba \ + --hash=sha256:3a93d9616ddecfb393727a0041a562cf0b15a244e20f2bd25efc7949be4c4f17 \ + --hash=sha256:3d23795802fc8bd72534836d64489bbf0f67c088959091bdb22e10735a5107bf \ + --hash=sha256:434139499bb20b502ed3baa1f169e618f924a97e7a777fea1a49446d80106cf6 \ + --hash=sha256:436e3ffc6310d3c41878c601db29098102fe5d8a467c49da4a4125254e0980f2 \ + --hash=sha256:489505b03f692c3f376394e49194fa7a7f9e8558d6e293a7056a0032b0c38163 \ + --hash=sha256:4a540e2d3192792fc84eced57bef37851ccb2b41f73291bb17408eea77bcd278 \ + --hash=sha256:4a7cdc2a420ca01058182da4253329764d4bfa055564d1eced90e6ba1e8b1d3d \ + --hash=sha256:4bced6e2a6dba6a28f7dd3c6ce14df1b2dd495923f16ea484cad03decd463b2b \ + --hash=sha256:4cf3468d5ec187ffffcaca8e61929a37448f215dafc1386a12c750a72fe53634 \ + --hash=sha256:4e2c4809c14559aa7ef426f27fb35afbb38104c349a903bf8f3600456764bb38 \ + --hash=sha256:4ed644d75aa94a2baf7ec3a96eaa160ea58c742eb9d27c6506053c5c40fc84ed \ + --hash=sha256:4f6e0852a0283b1b1fd776eeb7b766a5f440b3e2bd31ab51af3b400585f3965c \ + --hash=sha256:5066b244f576f91afc8ee3ba029a89f99d39c79b1853fe9d39bea9f0afbec148 \ + --hash=sha256:5086f9975abb1ab531ee6afca1761e4b59a19b446f3f6522ed776963228cfe5a \ + --hash=sha256:50b5bedc9ed8a94fc8857a42ef4f84a81ea88f8d4f05dc8705fb23ee6d8dcca7 \ + --hash=sha256:52704c5d36eb6dda8866493decd61111fff86244c9b1ad225ca01b9e91e5970f \ + --hash=sha256:55ffd6ce583d97dc71dc92e930324c8c0d25aea7e3ade6ae54ef77cedb096811 \ + --hash=sha256:569d65055d367e3dcdf30c3f41119467b73d9ee9faf332bdf40402644f5ac08e \ + --hash=sha256:57f9947a7e57a081c1e3e0a2dd0d2dcf290a4531450e6f611e30084c222a7295 \ + --hash=sha256:5989cb26b2e1efc6a42216a9f6b5ee495ce5ace2e5b352a9af489976b32d1ee2 \ + --hash=sha256:5c22873ad1f0532ba40fa1727f3c0fc1bbbaab6d373d4cbe3f0dc74b2e2521c7 \ + --hash=sha256:5e8b3d0b18fd623afa12ecb2ce8d8becef69f9b5440c6330c7972200e0bb84b0 \ + --hash=sha256:61631e08084be9e21a8967ec3139c7616ed7c5e9368e05c86d1b39562c8a57b6 \ + --hash=sha256:64511c54db4e4987aef4c41923235927428729e8174c5dba488429be70a998ed \ + --hash=sha256:6669c1bf34080161ce49c589cc512ef24d4c704ac9d2b2d3667f519c60418378 \ + --hash=sha256:672d207103e6b16ca098611b0f9efad6bc00afd47c03d6ef62186495ca677dc0 \ + --hash=sha256:6768d67d1bce64270e0fdc2e69309d68b9b18ae56ddf6c711d168e9d051c2cac \ + --hash=sha256:6a45c3d514f2436064db00d7fc8778d888f0236ebfed649b53d13a59e69ad51b \ + --hash=sha256:6bd9e1788e15bfcf6a9082de42e30387e7b85d211ab21e57a939bb8cfaaf8d96 \ + --hash=sha256:6d2a9efe686f9de00d0d1ea32a4a5a86d558a2277501bd78d964214eab625e59 \ + --hash=sha256:6da83a088f8ef93b2d483a8232a4dbf4d69d3d8496b568a03c56becac43e1808 \ + --hash=sha256:7018d4af1cd272e847aa5917983ab5e83e4f6579f9dbfecd4a79c0ca80b144c2 \ + --hash=sha256:71f88e749ea29f67f21f3b36433c1dc54c7729ed2a6d9e2da2e0d9e0d7b224eb \ + --hash=sha256:737c9c3981998eba27f11786f84fddcbabc74068b72a4a1f454ea02094b57b65 \ + --hash=sha256:73e77980c7207854f00fc4e71fb1626868d5740ab4012623d55c7a99ad122a72 \ + --hash=sha256:799c39bdf5e2f1292fedd3009f7b3c9e760f10b2420cb9638d56920840ff6db8 \ + --hash=sha256:7a83aa6e4805df46fed18e989d3d16f86ef60cb50bbc8d9ce3a6be89165fbf6e \ + --hash=sha256:7d3391b2188d18737cb2fa147028b1096236eaa7e156446c650a489fa2cadc91 \ + --hash=sha256:7e1636da3d8dfc220b6dd10264db5f2b165e4888c4518594898fbe381049af8a \ + --hash=sha256:805c8b84534fa10891890f0e4be39f3a99e94615d93e8836bf9fa1fdca2feeb2 \ + --hash=sha256:811d02d5122171c1941357efd8f9bf4ffe907b7f0a1a4e729a880e4be3f46e3e \ + --hash=sha256:8138eb83940ec7299024d92d4dee45f601b9e6c5ffde9d25f4e35e326203c707 \ + --hash=sha256:83b3944fea42a8400edf92fd1770fb8d0d4f7de651353bd2d8525a92dba69a21 \ + --hash=sha256:849dd2bb0e5e4ab2b71c7191726a4a8d5aa8a610daa584728cbee0b710ddc4ef \ + --hash=sha256:8698d70a8081ee8c090dbb394768b5789a1da8b131b5499f89d071dd3cfaf6be \ + --hash=sha256:8781a792a070cf2bd1b86d3aa943894115faaba6e88122a7bf32d62072742453 \ + --hash=sha256:88d59b473bfb03259722600839af9bbd7fa13a2eb514beefeedb95997882f69a \ + --hash=sha256:8909c2f1c6dd65e054ac4b573a91c8384d1492281e55d82d159d653f7a13adf6 \ + --hash=sha256:8965520ac587c94a4ac48b729be3d8b8de00af39699b17585dfb599babe77977 \ + --hash=sha256:8b5d563170ff8ba3181caa967c99a3c804d1dedb702c7cb93a6a7c32247da978 \ + --hash=sha256:8e124f974786f831d6043728e38296969d3579db8896fe004682f5758e613581 \ + --hash=sha256:8f0fac8b13d14bb06c68195f849371924ae53dd7b1c00fed24650f704383b692 \ + --hash=sha256:9240187afb63d2f9ddc3e032c670356fe941f6e20662ea168a5dc3f1f317e1b3 \ + --hash=sha256:925f929d6b59a8b3f8b8c6ac363cd0af7eecc81efb3071770b3c6717c450a369 \ + --hash=sha256:9348cbb300d224fe3b89793262cb093504d4ae927004468463f745188a193e4a \ + --hash=sha256:9388003072b95f2f1e3fd908604194d653ba21330d811961a78b7da1a77e9e36 \ + --hash=sha256:9438a2648b2195980cb2dd8e53ed7b8df91319e2d0b70ae61a9e1d1bc8d3bec9 \ + --hash=sha256:94e4c421742086aeee4c32a506eec8859d7634aad943f7e6aacf70f813478768 \ + --hash=sha256:94f5407f7bc64fa6463906b896f9904beeeb7dd8dc116ee8e9056c8714ff9916 \ + --hash=sha256:971a3bbb75d97ae4e2e8f7d4834236f86f85f0c85e04ab2e191db1123b04f80b \ + --hash=sha256:9e227f3dbe6bde7491cf0a9965d00b88c6b1a4a95d11480ddf88bb96d397c19f \ + --hash=sha256:9e25feb9e330b63edb0278a0acdf85e50d0cb0fbf49c3084abbe4e24ae195346 \ + --hash=sha256:9f098115c247e11d138ab83a28fa0323c77015007ea2df73ba5fd714dfefd67c \ + --hash=sha256:a18f38cafc329bac5e3c2b96c765b4c96d3d103421ed22ab7988c1e3fce27464 \ + --hash=sha256:a4bbd2d87dd233b9fc5812160c3d0ffbe42edc22a26ce0469f58479ede633fe9 \ + --hash=sha256:a5fcffb37e602b0b3c1638a97746b9b96125caa9bcf6fa41d337a9261de231ee \ + --hash=sha256:a8e9f292fcda89b324f2f5c91d13f1424a153e40fc2756f38ee23b15835ff300 \ + --hash=sha256:a9f54054101545a9a9cccefddf54316aa6e4491611fcbef9e91b3b6bebec04f6 \ + --hash=sha256:aa2c838cc024642cc04c6854232f32b43e5e22833dd11119c1766c7873b8370d \ + --hash=sha256:ac0c7c9f1609b0c4c114feb1d7a3409564c7fb77e360bed9e97e5d25dfeaf868 \ + --hash=sha256:add96447a86d205ab616665d53b2950ee81083757f56e6ea833c8b2917646b46 \ + --hash=sha256:ae9dcb8fbe244cb82f8a6458b455b927a03685e383d9bacf1ea5ce180b96dc97 \ + --hash=sha256:b4a635a0487774f841cb1fb62e907e7195cc95bc761e053184b8acc3ceb20733 \ + --hash=sha256:b4d12837e0203bbace818ff4a7461afdcd78bcd782351cea148139180d7bcffe \ + --hash=sha256:b61687d0828e72bf5cda24a2690188f37170bd31c9359ac97e4e66569f120a16 \ + --hash=sha256:b807e598953730f82e4eae3bd30f6a122cf6b31c398c6b504c0e04c13c170429 \ + --hash=sha256:b8cd1f918b26fd7b1832ece557cc18f2d8747309ff8b3f0ef9d4250c5ad67a39 \ + --hash=sha256:b91cc9d336957239ff200f30097e6fea2dc6d6fb3c81e853eaa09eac904fd894 \ + --hash=sha256:bd3ce56ae2cbae3ba82b683bc425cd7e48d2ed8b10f3e818186b6f5646d9271c \ + --hash=sha256:be6cb0c799abb0e2ba3e618e6d28ddddf7e485f6c2ce938dfa237daf3905072c \ + --hash=sha256:befb4158af32106b9a93db8d6d1d1cbbd418c0d5aca0cabb7b1780abf0c89169 \ + --hash=sha256:bf053da3c97a4bc5ecfbb218cdd2983febd91c617be8367d139882aa11e490aa \ + --hash=sha256:c02e8f18bdedba082cef725942ac823b9b60656db07f7e265cb31618dfd00d77 \ + --hash=sha256:c1bc67752d5f21013cfe430df4062441714eab79f65a6a05e01505957e9c35fe \ + --hash=sha256:c61750fadcd119d0825bcb7d7d675dd264dcc89cc05292aab5be68ebdbb374ad \ + --hash=sha256:c90d5b3d4e944e065a301d741b3c1d784f6bd1f503aa68b4967e32b2ba313d85 \ + --hash=sha256:c9a7f43c0b202b334cc9184af09bb8f21d3a209e038efaf106936fb69e6b026e \ + --hash=sha256:cb96e6e088d6cf71c1ea977510948320234824cf226e32f6f6e044f7a9c82b34 \ + --hash=sha256:cf63c214fe879a65e69a386f915e36104fc84254ab141240f8854602d8e0be2a \ + --hash=sha256:d1aca03ede943eb80ab3d63bb082c84b7aab85ea83bd0fd0c200260945fb49d9 \ + --hash=sha256:d2e56fd3b00222722abfb3f5f0759ddbae4b90811b5ad4343c64030ad1bde70c \ + --hash=sha256:d5f93ebbeb8032d47e349328ec8662d973d9b05a70b3c35df1f91fe419b84749 \ + --hash=sha256:d882a373d8093c2941e01291b7ced96e9cbe4781da9a7751ca7e6c70385e5214 \ + --hash=sha256:d920abdfa61279ba1a2ef9484aab07bf03331f8c08a10120fa332353d06e6932 \ + --hash=sha256:da2af0d7aebfc2074080d72efa6ab8317c62481ef1f896f65d9999c1c01f4494 \ + --hash=sha256:dd8ea6ebee7aedbf7c749fa80521d9ccf1ba473e0d1e14805caafbaad281c889 \ + --hash=sha256:de8b364c423ef0a4bad9069657d617f9a5d2b2062457a89b1fa16ee199c399c1 \ + --hash=sha256:df1ae86ff54725a01fa1a0510b914ca53a161b7050be74f6204e24aded5971d0 \ + --hash=sha256:dff05cb7016dff1e9fd68f4122c127b65dfc59de5306cfb7ad92f956f230bee2 \ + --hash=sha256:e1a622f13970d81f95d0c72f9dc090dce9085fccfa4c9f2174377ee32bd15786 \ + --hash=sha256:e49fb0d1ce92cfa0cb198cc5b1b11cdf9d0638658e2a2db2687e39db7c87fc78 \ + --hash=sha256:e5c802729725bd07e2bc3ab7b76dc7e0bbfc53129d8f1eb1c002c24cf774717e \ + --hash=sha256:e841068dc0be4cb6dfb5c890eb88cbdcff2f4a332393c7ec94e8e618bd32c1a8 \ + --hash=sha256:e916035e3e9930cbdfdd10abf48861340221857f45509565898e012263f7b289 \ + --hash=sha256:eba154571c16e032112afac0dc2dfe9e63c2ceb7aedd07bb7eecf2ce26d4dd4c \ + --hash=sha256:f03460ff076f70ab595bb45a0205ccea1971443575b6920c52e755dec2b3fbfe \ + --hash=sha256:f0ec3b750b59375eab5b0fb2b9254810c00a3375be6d789899f1055a1d556237 \ + --hash=sha256:f291bcf42ae98eb5107edb162c3c998b4a89648fd8e99ed4cbd12705292788cd \ + --hash=sha256:f61efe1d2fe0de16158a5fe1d1cf3c14bdb6aecd54d8938fd26512c525c1f624 \ + --hash=sha256:f68edfc67aabac33708941f26f22a7b8e9f81429bc0cf249fcf7d66b23af8d19 \ + --hash=sha256:fa95848c929b6a75f6848d3c9793e59db365ee436776e57db835cdbfa79ba977 \ + --hash=sha256:fd9f8797427910198f95bced71ddfed61130d7e349213bfb8466c9c99e2c46a8 \ + --hash=sha256:fdb4ca07ab75ffadab4a8b135ad59cdbb3156b99310f3d565370da74a15d6bd3 + # via jinja2 +mdurl==0.1.2 \ + --hash=sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8 \ + --hash=sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba + # via markdown-it-py +mpmath==1.3.0 \ + --hash=sha256:7a28eb2a9774d00c7bc92411c19a89209d5da7c4c9a9e227be8330a23a25b91f \ + --hash=sha256:a0b2b9fe80bbcd81a6647ff13108738cfb482d481d826cc0e02f5b35e5c88d2c + # via sympy +msgpack==1.2.3 \ + --hash=sha256:07c9733089d1b176c3dd2f7fa268452f9d5d784d076473499d754a58e8d1fbbb \ + --hash=sha256:0955b9000725573d1457c1676944b370dd9643c8d18f25bda5ac72913f850949 \ + --hash=sha256:0c91762c48cd686dc9cf2b142c0bc544083952de32f5853d6624c956e54b85e5 \ + --hash=sha256:0ed5823c4efc20fe87d3530665f40ec18a002be003114814c21235cc8d256207 \ + --hash=sha256:13221a6c81ebb8e43ea63a7251c35d54e4175cea37ebf3a62e911bdf42562a3c \ + --hash=sha256:186e6c602b8a9968b8e864c67d622a69279f7d1e55ae25f40e3bff7e815b2b62 \ + --hash=sha256:18a6ed513023001b28dcd3ba54966f6bb90a38274ba8d2640464bcab3a1b81d4 \ + --hash=sha256:1d6bcec3dbbdb89ca385d3a73e63ceae7b841fa0d7ca7c676f1a7bfe7fb2cdb8 \ + --hash=sha256:1f4ae8bd4ad9ba085fde95e95d055a896d19210238a4199a771a3cf36dceed49 \ + --hash=sha256:1f585407f740a9eac04a3bb82c61d68a0ea78f90e29e670bfb086b9ce3a518dd \ + --hash=sha256:21bfa4d2aa0b04c1806ef778a1199e9e53ea2441bcbf284420a32083896320b8 \ + --hash=sha256:2487453ca1b6104442c6442f9a1a8fee1fe8f428a70d99d4cba799108b304150 \ + --hash=sha256:2574ef81c1c8c38b10e330f3f9406fd09198a776b002030fafcf8e7647e9e06e \ + --hash=sha256:30e1522e4173230dca4d9ad896f038f73c0da6c1edd42f4dbad88ac583cf5d46 \ + --hash=sha256:32edb81a2b5eb7cd7c9d941b2bfbbb082fd2cd09e0e725930316af6b708db186 \ + --hash=sha256:3372475211a9ce1a23acefe512cb3e121d18c95dc74ed56cb1819ef40836ebf4 \ + --hash=sha256:382b219de3d436de3baba0f4b0c6d4336e8f5858d0eb047918b13b69a71c6c55 \ + --hash=sha256:382bc88fe90f29f5ac8a0b65c7046ff255356f2f2f3186c30e370215736fa1dc \ + --hash=sha256:39b6986c19e1f2dfa549d185dba6ccf1de2e4c0ba10d8cfc0048935b1c5f9109 \ + --hash=sha256:3a31905206722103a84c1f72633fe30692cff6732c9d262e09a27dbc468797c8 \ + --hash=sha256:3d4c807ed050fe3ddbea5ba7e9f63d7136871ce42861be1f50ff739f0e91047a \ + --hash=sha256:3ec409b0d6aa8e9eec6eaf881b893caa215dbe68c5319ca96e8a271d81bb111d \ + --hash=sha256:471e12a6a42498a31490c206e0069e343b6a7c35db540be73a879eb06f5be047 \ + --hash=sha256:4c0780095871ecc49a58b2ff6b1b43b25214704da67646557ca287a3f49fb2dd \ + --hash=sha256:59612b4ed48a04cf024584218e813562f3b30a3bafa5f55abe300b15da314751 \ + --hash=sha256:5bd5f91ea75c45cafcc5433ba8fae59b708b736ec178d2441c40c499e9e079db \ + --hash=sha256:5bf390259cb25a6a1cd197c65810999b811f64cd38683251538bcc5a1e41f7d3 \ + --hash=sha256:5c1efdd9181cb1b719ee46865f368a927f1c0c65d577798340b1194545b7515a \ + --hash=sha256:5e0d7950ca3c1bbae291d0552dd3bb2792fc680629c4c0d44e47e5bab969f3ca \ + --hash=sha256:5f304123b90e8b2e49867981b7f6061612c39f50cca51ee88de007c084cf68d3 \ + --hash=sha256:62cc1a4ef0e553bac32c8342e1f04834aca7de276b92744eb7307db77759b890 \ + --hash=sha256:63bb7448a1e9111319ae2430c09a5596140c160422830d6271bc75730ff2ff9a \ + --hash=sha256:6576f348ed6cc4f31db6fd915a8e94245f042f50eae08d48732425e70638ea37 \ + --hash=sha256:666ef5601ab0e6e345e47febc96aa81143cc932201543480cbb9499164f05ffb \ + --hash=sha256:6707d2fa2aa1bb5424ea0b05f44ffc989b15ab41a73ff5855bff4944fec7c8ac \ + --hash=sha256:69ad12cedb674c73527bed869cddb42b742cac79a207a614202a4abaa24ea173 \ + --hash=sha256:6a834097144aabe948b8ca9020a833e8026f7d0abbd0ec54bc7e50f45a8ce012 \ + --hash=sha256:6df430419f2338cb71e4a34d6e64f83c88ccd321f91f40ba4513400b36d864ec \ + --hash=sha256:700bc0fc9e968a292b9137ee70e7a012f7e115bf0107ce45e3a88202788dfc1e \ + --hash=sha256:7013534a7163aa4f213c4d9864f1a8a7555daac6fcd48f699a198e29b436bfab \ + --hash=sha256:7995a7c6a62a1d6e7df211b4a16de513bd99fd053525050a319f80f44fb8015e \ + --hash=sha256:79dfa38faf92f804aa61beec140d70b18418e1dde1778dbb77a87a4cce85aa8a \ + --hash=sha256:7a003b02c6ee2eea6dfe0bb08818631e3597e69f0131f2a8250488a1cc553290 \ + --hash=sha256:7c047250096f9fc19dba26e3d1639b5e7a84114003605c94def667149a70ced1 \ + --hash=sha256:84a6616d396ec1bc18a1e83e67c96a393ec35dfe5e17434a5be7b9aa0fe988ab \ + --hash=sha256:87cf2ef05ff2f2493ba29fcdaef27e960ca64dacfd13460ae29e6f92e0ed05bb \ + --hash=sha256:89c930aece4e972b208ba589c8410b4167b05e411a5ea2cb25fd96f8bc47ee43 \ + --hash=sha256:8ca67f77938ea6a3663aa9bd22b3e031f6da84d665be850abab910ee90728dfd \ + --hash=sha256:8e51eca14fbb65c4e0a5a9657346962bd3dca78c08e04e3d4dee70ef48687d30 \ + --hash=sha256:8ec7a1d49ca6c2569d722ab5ec86e90089b0713900aa31905b47b4c4d9e78ce0 \ + --hash=sha256:902f3490db0e07a7d40b48536a85c9b28fbf1397e7e1658a45a55f958e303620 \ + --hash=sha256:905a189853d6bdb204c7ae5f4ab77fb857448abfff574d3d93c62e2815b24b4f \ + --hash=sha256:9276ba88891338f2617044429dfd080ae008c9868a25f6f1a7d004a35dc9ac0a \ + --hash=sha256:9324c54995641c3d1f92a9d55093c8cde0ffa2fbc87a467a688ef60428393220 \ + --hash=sha256:968583e956d0427878050b371308c5f8647088732ef3e66a117dbe1192ec91e0 \ + --hash=sha256:9d7e9cbb0998bbfd363fd9a09c330520d5e9cb323c05b5a1a05865d23ccf2226 \ + --hash=sha256:a393e428f6ffb0dcb73308c1fff5593041c16ff42da66e5bac8a83a6107a54b0 \ + --hash=sha256:a6b63917d60d6df451f328bd6afba8565e33c4afe1f62ec4ad758b78731c827b \ + --hash=sha256:b1631e12fe572e181cd77e831f69335d6cd5278eac22e3db3f33cf264ac2ac18 \ + --hash=sha256:b774ff994d844e541439ac5d2d49a14def4104830c3465e9394c153f86200ffb \ + --hash=sha256:b949cc25e4a09252cbcc54e66e507de914d0e94a3a7039bd54c299bf7037c098 \ + --hash=sha256:bb89b5dc30469c84bbf8684826eb851d82412ca95690e111b9ac5e8fb343961a \ + --hash=sha256:bfe7d5b62cbe7aa664f0b3e2c49077f10fcdd06183d3014f8271ff3c5edbfbf9 \ + --hash=sha256:c309a7abae1d14ba29a8bd0ddbd704a5e469d8e9bd9c3dee0e4ff53d7ae01d56 \ + --hash=sha256:c77e27790ad72989db783d5303825fba0b71550f00a490efba35cde7dc4b719f \ + --hash=sha256:c942c21a93f36b3a69e828c8945bb72c94dc2ffe488a2086950c812f3edf046c \ + --hash=sha256:ccea05b5542f6d283fef3f0a8e93a7f0be90af0ddeeef84c25c0216ba76dcae1 \ + --hash=sha256:cd5a9f9f86a52c24713679aa2631956835f3842512964ff93f736ff76f1f530d \ + --hash=sha256:d0238cd05dec9ffbe0de1071df685ba63e30a36ac155285b1a094e727c38cbe9 \ + --hash=sha256:d1c1e8989a855b7f1f2a64ec4a80b23a631822903952770813857b2e4f460471 \ + --hash=sha256:d2f9c4f85e47a44d26d5baf3b041eef23436e224d44eed273f01bd8a12048d9f \ + --hash=sha256:d31864ba3933a589b6a00249f89c0eb422197f49128fc10da550e57e9cb0f377 \ + --hash=sha256:d8ef3a66e4b52d2d7fdd90df2984670124b2ff7546d76bb25dcf68ef47f7df58 \ + --hash=sha256:db84203b13aecc222f465061397fdd5b53b7ae73d2c95ffc1c8dc5be0153a709 \ + --hash=sha256:db9fb67a3a2e75247bae569d34ebb5ff61c0448a4f0d6dbf991dae68af39b007 \ + --hash=sha256:e0bd394e999949c814f7912284243298de1b5a17b6a3dcb6cc8a79b156ffc4fa \ + --hash=sha256:e15f70588f4db8cd10df0930145b186de70feb9db51710cd378b1399009655bd \ + --hash=sha256:e54394b7dbe2e12ab032d9d21feef7bb61a90a150a2623633ba3781ba69dcb1f \ + --hash=sha256:eaf7e82249837e3aa97297b34a0bb9ff562027381631e057cea6e1367f10b438 \ + --hash=sha256:ec0030361cc861ac699b2ef1c695b741fa145c88f8667fa3d7e3f73deeb648a3 \ + --hash=sha256:ec90a9ae3e1169fa1171147340f0e97d941aa19fcd3b34e8339a55933ed042af \ + --hash=sha256:ed899d73a22f286a72bd9528d63f2ab3030dbad8bf1527fc249319a50d61fb9d \ + --hash=sha256:ede33b2892ceb976283e009ad12fa1834cfdf1f9c43ee9c97849fc588d00a618 \ + --hash=sha256:f24a43b3560e20f825b807fe1e874bd73d53abaf8bbdcf258a6eb152cddbc1f5 \ + --hash=sha256:f3d7b3d0018746b5997dd6b14a1870b07cc4c327d9101145d94a1fc264a51a06 \ + --hash=sha256:f41ca154b7737b11893cdce3c78c61d703398a1cd54d4297bdad908392338a8e \ + --hash=sha256:f42f146752eedb6765f07dcc04d72dab0a25779ec8d4a88c0085263ce114f22c \ + --hash=sha256:f56fba61b2516be7917cb00151f0d060b5b21184e3499bb57f0f7d9259bea124 \ + --hash=sha256:f9ddd28d3e9bbc602a9dced1591882c7fb9ab776eef8837da2c326fde19e2853 \ + --hash=sha256:fafc3b8898b432b841d30a61082c599fa7f4d06885f9dc58ad72259e12059fa6 \ + --hash=sha256:fcc6800daac4922960f6eeb7a0dda3dd4105e0bf7bce0e83ebc465a78cb7bdba + # via -r requirements.in +networkx==3.7 \ + --hash=sha256:e3fd2c13a7814cee3746340d8d7f8598a67f16a58bf47fb7f8793fab6efca1b0 \ + --hash=sha256:fd77a511bd90f39f3d016351345b52cf5319b813bdca01de3f755d3cca62e96a + # via torch +numpy==1.26.4 \ + --hash=sha256:03a8c78d01d9781b28a6989f6fa1bb2c4f2d51201cf99d3dd875df6fbd96b23b \ + --hash=sha256:08beddf13648eb95f8d867350f6a018a4be2e5ad54c8d8caed89ebca558b2818 \ + --hash=sha256:1af303d6b2210eb850fcf03064d364652b7120803a0b872f5211f5234b399f20 \ + --hash=sha256:1dda2e7b4ec9dd512f84935c5f126c8bd8b9f2fc001e9f54af255e8c5f16b0e0 \ + --hash=sha256:2a02aba9ed12e4ac4eb3ea9421c420301a0c6460d9830d74a9df87efa4912010 \ + --hash=sha256:2e4ee3380d6de9c9ec04745830fd9e2eccb3e6cf790d39d7b98ffd19b0dd754a \ + --hash=sha256:3373d5d70a5fe74a2c1bb6d2cfd9609ecf686d47a2d7b1d37a8f3b6bf6003aea \ + --hash=sha256:47711010ad8555514b434df65f7d7b076bb8261df1ca9bb78f53d3b2db02e95c \ + --hash=sha256:4c66707fabe114439db9068ee468c26bbdf909cac0fb58686a42a24de1760c71 \ + --hash=sha256:50193e430acfc1346175fcbdaa28ffec49947a06918b7b92130744e81e640110 \ + --hash=sha256:52b8b60467cd7dd1e9ed082188b4e6bb35aa5cdd01777621a1658910745b90be \ + --hash=sha256:60dedbb91afcbfdc9bc0b1f3f402804070deed7392c23eb7a7f07fa857868e8a \ + --hash=sha256:62b8e4b1e28009ef2846b4c7852046736bab361f7aeadeb6a5b89ebec3c7055a \ + --hash=sha256:666dbfb6ec68962c033a450943ded891bed2d54e6755e35e5835d63f4f6931d5 \ + --hash=sha256:675d61ffbfa78604709862923189bad94014bef562cc35cf61d3a07bba02a7ed \ + --hash=sha256:679b0076f67ecc0138fd2ede3a8fd196dddc2ad3254069bcb9faf9a79b1cebcd \ + --hash=sha256:7349ab0fa0c429c82442a27a9673fc802ffdb7c7775fad780226cb234965e53c \ + --hash=sha256:7ab55401287bfec946ced39700c053796e7cc0e3acbef09993a9ad2adba6ca6e \ + --hash=sha256:7e50d0a0cc3189f9cb0aeb3a6a6af18c16f59f004b866cd2be1c14b36134a4a0 \ + --hash=sha256:95a7476c59002f2f6c590b9b7b998306fba6a5aa646b1e22ddfeaf8f78c3a29c \ + --hash=sha256:96ff0b2ad353d8f990b63294c8986f1ec3cb19d749234014f4e7eb0112ceba5a \ + --hash=sha256:9fad7dcb1aac3c7f0584a5a8133e3a43eeb2fe127f47e3632d43d677c66c102b \ + --hash=sha256:9ff0f4f29c51e2803569d7a51c2304de5554655a60c5d776e35b4a41413830d0 \ + --hash=sha256:a354325ee03388678242a4d7ebcd08b5c727033fcff3b2f536aea978e15ee9e6 \ + --hash=sha256:a4abb4f9001ad2858e7ac189089c42178fcce737e4169dc61321660f1a96c7d2 \ + --hash=sha256:ab47dbe5cc8210f55aa58e4805fe224dac469cde56b9f731a4c098b91917159a \ + --hash=sha256:afedb719a9dcfc7eaf2287b839d8198e06dcd4cb5d276a3df279231138e83d30 \ + --hash=sha256:b3ce300f3644fb06443ee2222c2201dd3a89ea6040541412b8fa189341847218 \ + --hash=sha256:b97fe8060236edf3662adfc2c633f56a08ae30560c56310562cb4f95500022d5 \ + --hash=sha256:bfe25acf8b437eb2a8b2d49d443800a5f18508cd811fea3181723922a8a82b07 \ + --hash=sha256:cd25bcecc4974d09257ffcd1f098ee778f7834c3ad767fe5db785be9a4aa9cb2 \ + --hash=sha256:d209d8969599b27ad20994c8e41936ee0964e6da07478d6c35016bc386b66ad4 \ + --hash=sha256:d5241e0a80d808d70546c697135da2c613f30e28251ff8307eb72ba696945764 \ + --hash=sha256:edd8b5fe47dab091176d21bb6de568acdd906d1887a4584a15a9a96a1dca06ef \ + --hash=sha256:f870204a840a60da0b12273ef34f7051e98c3b5961b61b0c2c1be6dfd64fbcd3 \ + --hash=sha256:ffa75af20b44f8dba823498024771d5ac50620e6915abac414251bd971b4529f + # via + # -r requirements.in + # accelerate + # bvhio + # peft + # scipy + # transformers + # trimesh +omegaconf==2.3.0 \ + --hash=sha256:7b4df175cdb08ba400f45cae3bdcae7ba8365db4d165fc65fd04b050ab63b46b \ + --hash=sha256:d5d4b6d29955cc50ad50c46dc269bcd92c6e00f5f90d23ab5fee7bfca4ba4cc7 + # via + # -r requirements.in + # hydra-core +packaging==26.3 \ + --hash=sha256:94edc256424af38762eb31306eed28beb9f0efc50a8837492c9d6fd6004aed79 \ + --hash=sha256:d7193f7c8e4e93f444fde0262bf90af30e16fa0ad0ad44cb553c87339b23cd1c + # via + # -c requirements-build.lock + # -r requirements.in + # accelerate + # gradio-client + # huggingface-hub + # hydra-core + # peft + # transformers +peft==0.18.1 \ + --hash=sha256:0bf06847a3551e3019fc58c440cffc9a6b73e6e2962c95b52e224f77bbdb50f1 \ + --hash=sha256:2dd0d6bfce936d1850e48aaddbd250941c5c02fc8ef3237cd8fd5aac35e0bae2 + # via -r requirements.in +pillow==13.0.0 \ + --hash=sha256:02464da86f561f410e13b061ec37c3068a9cb557a095494157742d07b3c24a27 \ + --hash=sha256:04a63720f79e22fd54d897c233a68314c50ca0603360f54ce2bd5db8f0f43782 \ + --hash=sha256:05cd2cd39055d0b9650060e4513ef4a9a0aea870083950bd046a0d6490f93a22 \ + --hash=sha256:06903aac074d00c988e77a1fc435286dc498506d4ca8d6f69df9babddf4ecc15 \ + --hash=sha256:08b826a9bf1265c76de04a42061d61ea6b109418b7826f28ff1ecdfaa26c5502 \ + --hash=sha256:0d1a9cf7bc6917538b20f8d06b9ab2147e542f68849e96fc58eb66bdf6acc692 \ + --hash=sha256:10b5019883c98f1dd819ca48ffc6f33a91cee04948fe637c605f4345c7cafd6f \ + --hash=sha256:12b0fa15879fe5a9d9eebe66e4e2d74128a773b1a4448010c9c714f45e04b9d8 \ + --hash=sha256:12fbb851cf323cc19aac3eea1df5ad17b57e91e9fe3cfd06100dba7bb8208c13 \ + --hash=sha256:149a1c323ba366f90b48e6f1a6db6582eb50512df374588de56fc909abc0f0f3 \ + --hash=sha256:19b66ca0a4d25cc0200b381ce824c7ea090db61427315e73cfb05dbf1b35c369 \ + --hash=sha256:1c774b9c0ba0d0b356f71530677b39028878a2cae5a93e0a13779cfd17120f88 \ + --hash=sha256:20722cd5375533ad754053363a80b8fb30c79d37930a6f7228030e237ce3bd5d \ + --hash=sha256:20822140c9a2ba9c5e42df342b0a892ab2e102fc0e3db967a133bb9ce3f898bb \ + --hash=sha256:21c32061a5512dc13f87cc7303e120e4d77c2f70df89a35af0e3ce246e5ac57f \ + --hash=sha256:2310e2adfc13c6d457d7d0f2ffdd5c56a74a317650cf765887df8d515a647ac0 \ + --hash=sha256:23edf4ec4b6f4f240e8df6e4985e9ee2ced86474632433e55fb1e2548744bf40 \ + --hash=sha256:2d50500a4a3bc6469adcdb319cf05d688b08ca3bf0f22a05339f3b25b433a599 \ + --hash=sha256:2e31c4e68cffd7b1f116127626813b82fcba19edf6b940a7b0c266d6484d0055 \ + --hash=sha256:34fb3db1149c879343861831728c243c432d4a5afc8f1878ca7612ef8de2a033 \ + --hash=sha256:37290fbef0c73e2d51d594eb78fded7dc7170d1c3ad0a890269e6fd8c8c4e061 \ + --hash=sha256:405be6058e206a86fedce2f715ecc2343f94072d7925251632dffa2c05f70dca \ + --hash=sha256:40a266371ece581e5de13b6635ef78d7487824af80561b6ca27694a88c19bc0f \ + --hash=sha256:42d63be3af4f9b951b199b0a9d23365d37ab14687e6d77b74940432c8515c4ca \ + --hash=sha256:44629d4498c9cb6b2051806155f22141df0d8a929c56134b166655232dfb2f8c \ + --hash=sha256:49c12af515073e9bf511e4ef736743bf70d531a643668722279314b937742ba4 \ + --hash=sha256:4a25756244bdcce3b50580baadf320fa48297f0eeb8e114ba64139a40d4d0fc8 \ + --hash=sha256:4bd024d567eca931b668978d672dba914d4b8e2628e2c3073a2ad178de8a2620 \ + --hash=sha256:4f8db54177035a2b5f717f94475b74907e12a96dc74f6d487f3966b0a4694071 \ + --hash=sha256:51ebb529fc5e8abdd55302f6c3f8943037348ec2384329a3e55677f69ae2fdfc \ + --hash=sha256:567f20f1c75897d7663830da6ea8af719e03d712b1d9ee7f813319f9ece42e5a \ + --hash=sha256:5933fcea5a5ba64c686f55c886a115cbfd92f2900460784a1e79909fdbafd7b6 \ + --hash=sha256:5bdb38ba220b61b4ec31dd1046dea6b016d3c6850a23f43ed8b58332b2fc668e \ + --hash=sha256:5f56499c1a74d2b862beb0c33b8016f99d095858455df9d21583bbbc1c15b582 \ + --hash=sha256:67871a13cf47275201553b536c025da777f997fa562a19eb798af4ad4b97c18f \ + --hash=sha256:67c8d44ad89fa7eb88de5d6ef6199b1e03dd24974f85a67639fc8badb801fe79 \ + --hash=sha256:6a0920cb55df5a4d3f6862964908078c0bd59332bdd1bcd20d14e8c70ef27cc5 \ + --hash=sha256:6bce6a29c3898191f4c9998e4d4e8f69790caeabde46e54da4bc235ce5bde683 \ + --hash=sha256:6f38f3f885a09cafc93fd667b1173a92f379e43785d635e7983c893f0da319fb \ + --hash=sha256:73ee25cf8cf8b75d5a5aeed7cb6588f5e5dbfbb0fde51707b630bbb23897645c \ + --hash=sha256:7b999816b5850a35ada08443e6e03945f1f6488144a83afe2d37b240a552aafa \ + --hash=sha256:7c88c10dd432f3b39ccdafc9ed81d0c21b8fd634502574da76d1bfa4fe2c76d0 \ + --hash=sha256:7d5e097eabd5d4915c27ac9f6e9325bb1e01a7c94d7348b5c4451d3fc30e8521 \ + --hash=sha256:7e91e97a929232cdb828889ee6ad0e48d7f40f4ec38818f4e4a8968b2b1af22e \ + --hash=sha256:7f6299e494e46253d40c34653cac369412f44ca53b5f85d848d3f95b1ed0546c \ + --hash=sha256:816752a5ef76a80484c8c441c85593b7ea9304f6231fc5776ad1fbff7e773058 \ + --hash=sha256:83b37abd87b590acd8f47ca8a61f70893322b11834d36e07c2298dacad4d14d2 \ + --hash=sha256:8619685cad8efc4c38c66d3b36aad854523297c43d748b3b6f0cc03c90ba3463 \ + --hash=sha256:8bf295fe459343bc6093c8e5e0df60bfa189e0fcb775a22e2c2488fdeccc6c0d \ + --hash=sha256:8e459b613cf31f8980f584387b4fe47bf08e076e288d61aa8eba1f7fd4ddbb81 \ + --hash=sha256:8f36aa77f74b14a2103622b196402c71330e4e7cf4122ee45c854e9a01e0eecf \ + --hash=sha256:93ff9c9c3663ce23aaa5d0b6b6abac55359e2a0c06c7e30f3771829af816be63 \ + --hash=sha256:9a635068d9793c7f0d929f39f18b58f1bd86c236e8e7b64167b86af9232ebca0 \ + --hash=sha256:9dda0788a9932776a75d8bcc020076edc308ce2508b51f6739a45e3158b3fc42 \ + --hash=sha256:a192360d512305fe92d3053e4f7627bbad1f7708f1f4ad38cccd9336acabe9ad \ + --hash=sha256:a2a14cd73d5e6c927f644b0110ee81f59c4ef506259ec9183904747f2caacc81 \ + --hash=sha256:a625df9a2a5597fa5e5266e01aefc82604bb85d291e3547981e863560d75da6c \ + --hash=sha256:a6aaa7871aebca081eb5c45f83e845bbd9712ae99fa9286dbfdcee835e63f4b4 \ + --hash=sha256:aa694c49787040943570d61c9b8fc01271bd2a2cfdd55f0d896f8aecdce1a981 \ + --hash=sha256:adb3c2124c68e480f4632d06cb7caa3b48a51678475f483b4edb1c6dee29ea43 \ + --hash=sha256:b84be41387fc00db28c13c02e30d42b02d8d8f6a4a741a1aee6012ca7f1f6039 \ + --hash=sha256:bf97ba1b5542050e9b0c74e632323b6d8136cc99d64e193abebee22fe6013c76 \ + --hash=sha256:c3bc8ee0271387e0b1e3ad0ff893645990a656e79bf9c42f4f734a3642b11d51 \ + --hash=sha256:c50c80e3591e5cf9a8dfa6007d4f10732f02e32263850999286e56ccd650cfb2 \ + --hash=sha256:c6fd031333dedcad7ce3e03d244093f43504f209e86925ebdb2b868fa4037630 \ + --hash=sha256:c87a04e7f152ee4db5dbe15f0bfa3fe628a1aeedbe66b81c43b87f52c813f9ac \ + --hash=sha256:cdcd1ba258178f7356d74170c9a81ba4eab6a5d55748bc402a5a2a6fe6be3510 \ + --hash=sha256:d4737f50d23ddd11d6685faacbb9252887dde0bc7997127757247983d74399d6 \ + --hash=sha256:d7710eb676e9bb68965cb045be0d333b4c0d7f9dfbaa7fbf121385b1588683d3 \ + --hash=sha256:d9b0a2bee3f3e03e9f29057aedb807dbf1e1d96ee1b9d0f422d9db6c8583271d \ + --hash=sha256:e65dd6e75de67b2362a4fa3e16aa627595f65054dc4ec73d64680c84d592fa61 \ + --hash=sha256:e892354a424b1e82a78ba16785822bdd40de06f19446a3d4a28047df1a4f8932 \ + --hash=sha256:e8ca8f69b7c77fa96dad99f8638c1fc4f1c0bed4acaa1baf7a3c31bdb80a0ab1 \ + --hash=sha256:e91c2b1cbeae768c98752e67e717e283d68dae45717b41f2d91eaee648e37b7d \ + --hash=sha256:e98b4f91f99b24b1da72e10621ba181f7281922384a7403094debb4199de6c00 \ + --hash=sha256:ef5fe6b7db3f501c56000ba8fe7c7e1a35ca1d45824fbeb95a67daa85cff4dbe \ + --hash=sha256:f11a3c1358bb3c68012a7b1f41b223c3db9f7bfde90b481df028cfe1c3363313 \ + --hash=sha256:f391dc92a015c478745192fe4f2e120c2af2aba18d9fe0616341cbf537599806 \ + --hash=sha256:f7cbb7a64e7ec664775195e4f81923bc8a93d9451b963f844e59118f63147a7a \ + --hash=sha256:f9bd7d260d986f3553518c5d723544346fa48031f8aef3265d786aeb59845bc0 \ + --hash=sha256:fc481f742ccda20e9ed760b8f978dff50f2a4e9bc253ac167fb0a05b0783ef52 \ + --hash=sha256:ff3fe9eb621fbb9db4c4be33ab946f6bac5f98ab50ca8d3260503653656c961b \ + --hash=sha256:ffea6b2986a797c84b6d1d27d4f43e0b83c73fc16281a930891cd237cf0d08fe + # via -r requirements.in +psutil==7.2.2 \ + --hash=sha256:0746f5f8d406af344fd547f1c8daa5f5c33dbc293bb8d6a16d80b4bb88f59372 \ + --hash=sha256:076a2d2f923fd4821644f5ba89f059523da90dc9014e85f8e45a5774ca5bc6f9 \ + --hash=sha256:11fe5a4f613759764e79c65cf11ebdf26e33d6dd34336f8a337aa2996d71c841 \ + --hash=sha256:1a571f2330c966c62aeda00dd24620425d4b0cc86881c89861fbc04549e5dc63 \ + --hash=sha256:1a7b04c10f32cc88ab39cbf606e117fd74721c831c98a27dc04578deb0c16979 \ + --hash=sha256:1fa4ecf83bcdf6e6c8f4449aff98eefb5d0604bf88cb883d7da3d8d2d909546a \ + --hash=sha256:2edccc433cbfa046b980b0df0171cd25bcaeb3a68fe9022db0979e7aa74a826b \ + --hash=sha256:7b6d09433a10592ce39b13d7be5a54fbac1d1228ed29abc880fb23df7cb694c9 \ + --hash=sha256:8c233660f575a5a89e6d4cb65d9f938126312bca76d8fe087b947b3a1aaac9ee \ + --hash=sha256:917e891983ca3c1887b4ef36447b1e0873e70c933afc831c6b6da078ba474312 \ + --hash=sha256:ab486563df44c17f5173621c7b198955bd6b613fb87c71c161f827d3fb149a9b \ + --hash=sha256:ae0aefdd8796a7737eccea863f80f81e468a1e4cf14d926bd9b6f5f2d5f90ca9 \ + --hash=sha256:b0726cecd84f9474419d67252add4ac0cd9811b04d61123054b9fb6f57df6e9e \ + --hash=sha256:b58fabe35e80b264a4e3bb23e6b96f9e45a3df7fb7eed419ac0e5947c61e47cc \ + --hash=sha256:c7663d4e37f13e884d13994247449e9f8f574bc4655d509c3b95e9ec9e2b9dc1 \ + --hash=sha256:e452c464a02e7dc7822a05d25db4cde564444a67e58539a00f929c51eddda0cf \ + --hash=sha256:e78c8603dcd9a04c7364f1a3e670cea95d51ee865e4efb3556a3a63adef958ea \ + --hash=sha256:eb7e81434c8d223ec4a219b5fc1c47d0417b12be7ea866e24fb5ad6e84b3d988 \ + --hash=sha256:ed0cace939114f62738d808fdcecd4c869222507e266e574799e9c0faa17d486 \ + --hash=sha256:eed63d3b4d62449571547b60578c5b2c4bcccc5387148db46e0c2313dad0ee00 \ + --hash=sha256:fd04ef36b4a6d599bbdb225dd1d3f51e00105f6d48a28f006da7f9822f2606d8 + # via + # -r requirements.in + # accelerate + # peft +pydantic==2.12.5 \ + --hash=sha256:4d351024c75c0f085a9febbb665ce8c0c6ec5d30e903bdb6394b7ede26aebb49 \ + --hash=sha256:e561593fccf61e8a20fc46dfc2dfe075b8be7d0188df33f221ad1f0139180f9d + # via -r requirements.in +pydantic-core==2.41.5 \ + --hash=sha256:0177272f88ab8312479336e1d777f6b124537d47f2123f89cb37e0accea97f90 \ + --hash=sha256:01a3d0ab748ee531f4ea6c3e48ad9dac84ddba4b0d82291f87248f2f9de8d740 \ + --hash=sha256:0384e2e1021894b1ff5a786dbf94771e2986ebe2869533874d7e43bc79c6f504 \ + --hash=sha256:03b77d184b9eb40240ae9fd676ca364ce1085f203e1b1256f8ab9984dca80a84 \ + --hash=sha256:03ca43e12fab6023fc79d28ca6b39b05f794ad08ec2feccc59a339b02f2b3d33 \ + --hash=sha256:05a2c8852530ad2812cb7914dc61a1125dc4e06252ee98e5638a12da6cc6fb6c \ + --hash=sha256:070259a8818988b9a84a449a2a7337c7f430a22acc0859c6b110aa7212a6d9c0 \ + --hash=sha256:08daa51ea16ad373ffd5e7606252cc32f07bc72b28284b6bc9c6df804816476e \ + --hash=sha256:0cbaad15cb0c90aa221d43c00e77bb33c93e8d36e0bf74760cd00e732d10a6a0 \ + --hash=sha256:100baa204bb412b74fe285fb0f3a385256dad1d1879f0a5cb1499ed2e83d132a \ + --hash=sha256:112e305c3314f40c93998e567879e887a3160bb8689ef3d2c04b6cc62c33ac34 \ + --hash=sha256:16f80f7abe3351f8ea6858914ddc8c77e02578544a0ebc15b4c2e1a0e813b0b2 \ + --hash=sha256:1746d4a3d9a794cacae06a5eaaccb4b8643a131d45fbc9af23e353dc0a5ba5c3 \ + --hash=sha256:1962293292865bca8e54702b08a4f26da73adc83dd1fcf26fbc875b35d81c815 \ + --hash=sha256:1d1d9764366c73f996edd17abb6d9d7649a7eb690006ab6adbda117717099b14 \ + --hash=sha256:1f8d33a7f4d5a7889e60dc39856d76d09333d8a6ed0f5f1190635cbec70ec4ba \ + --hash=sha256:22f0fb8c1c583a3b6f24df2470833b40207e907b90c928cc8d3594b76f874375 \ + --hash=sha256:239edca560d05757817c13dc17c50766136d21f7cd0fac50295499ae24f90fdf \ + --hash=sha256:242a206cd0318f95cd21bdacff3fcc3aab23e79bba5cac3db5a841c9ef9c6963 \ + --hash=sha256:25e1c2af0fce638d5f1988b686f3b3ea8cd7de5f244ca147c777769e798a9cd1 \ + --hash=sha256:266fb4cbf5e3cbd0b53669a6d1b039c45e3ce651fd5442eff4d07c2cc8d66808 \ + --hash=sha256:2782c870e99878c634505236d81e5443092fba820f0373997ff75f90f68cd553 \ + --hash=sha256:287dad91cfb551c363dc62899a80e9e14da1f0e2b6ebde82c806612ca2a13ef1 \ + --hash=sha256:29452c56df2ed968d18d7e21f4ab0ac55e71dc59524872f6fc57dcf4a3249ed2 \ + --hash=sha256:299e0a22e7ae2b85c1a57f104538b2656e8ab1873511fd718a1c1c6f149b77b5 \ + --hash=sha256:2a5e06546e19f24c6a96a129142a75cee553cc018ffee48a460059b1185f4470 \ + --hash=sha256:2b761d210c9ea91feda40d25b4efe82a1707da2ef62901466a42492c028553a2 \ + --hash=sha256:2c010c6ded393148374c0f6f0bf89d206bf3217f201faa0635dcd56bd1520f6b \ + --hash=sha256:2ff4321e56e879ee8d2a879501c8e469414d948f4aba74a2d4593184eb326660 \ + --hash=sha256:3006c3dd9ba34b0c094c544c6006cc79e87d8612999f1a5d43b769b89181f23c \ + --hash=sha256:33cb885e759a705b426baada1fe68cbb0a2e68e34c5d0d0289a364cf01709093 \ + --hash=sha256:346285d28e4c8017da95144c7f3acd42740d637ff41946af5ce6e5e420502dd5 \ + --hash=sha256:34a64bc3441dc1213096a20fe27e8e128bd3ff89921706e83c0b1ac971276594 \ + --hash=sha256:35b44f37a3199f771c3eaa53051bc8a70cd7b54f333531c59e29fd4db5d15008 \ + --hash=sha256:378bec5c66998815d224c9ca994f1e14c0c21cb95d2f52b6021cc0b2a58f2a5a \ + --hash=sha256:3f37a19d7ebcdd20b96485056ba9e8b304e27d9904d233d7b1015db320e51f0a \ + --hash=sha256:3f84d5c1b4ab906093bdc1ff10484838aca54ef08de4afa9de0f5f14d69639cd \ + --hash=sha256:4009935984bd36bd2c774e13f9a09563ce8de4abaa7226f5108262fa3e637284 \ + --hash=sha256:406bf18d345822d6c21366031003612b9c77b3e29ffdb0f612367352aab7d586 \ + --hash=sha256:4819fa52133c9aa3c387b3328f25c1facc356491e6135b459f1de698ff64d869 \ + --hash=sha256:482c982f814460eabe1d3bb0adfdc583387bd4691ef00b90575ca0d2b6fe2294 \ + --hash=sha256:4bc36bbc0b7584de96561184ad7f012478987882ebf9f9c389b23f432ea3d90f \ + --hash=sha256:506d766a8727beef16b7adaeb8ee6217c64fc813646b424d0804d67c16eddb66 \ + --hash=sha256:56121965f7a4dc965bff783d70b907ddf3d57f6eba29b6d2e5dabfaf07799c51 \ + --hash=sha256:58133647260ea01e4d0500089a8c4f07bd7aa6ce109682b1426394988d8aaacc \ + --hash=sha256:5921a4d3ca3aee735d9fd163808f5e8dd6c6972101e4adbda9a4667908849b97 \ + --hash=sha256:5a4e67afbc95fa5c34cf27d9089bca7fcab4e51e57278d710320a70b956d1b9a \ + --hash=sha256:5cb1b2f9742240e4bb26b652a5aeb840aa4b417c7748b6f8387927bc6e45e40d \ + --hash=sha256:62de39db01b8d593e45871af2af9e497295db8d73b085f6bfd0b18c83c70a8f9 \ + --hash=sha256:634e8609e89ceecea15e2d61bc9ac3718caaaa71963717bf3c8f38bfde64242c \ + --hash=sha256:63510af5e38f8955b8ee5687740d6ebf7c2a0886d15a6d65c32814613681bc07 \ + --hash=sha256:650ae77860b45cfa6e2cdafc42618ceafab3a2d9a3811fcfbd3bbf8ac3c40d36 \ + --hash=sha256:6561e94ba9dacc9c61bce40e2d6bdc3bfaa0259d3ff36ace3b1e6901936d2e3e \ + --hash=sha256:65840751b72fbfd82c3c640cff9284545342a4f1eb1586ad0636955b261b0b05 \ + --hash=sha256:6cb58b9c66f7e4179a2d5e0f849c48eff5c1fca560994d6eb6543abf955a149e \ + --hash=sha256:6f52298fbd394f9ed112d56f3d11aabd0d5bd27beb3084cc3d8ad069483b8941 \ + --hash=sha256:707625ef0983fcfb461acfaf14de2067c5942c6bb0f3b4c99158bed6fedd3cf3 \ + --hash=sha256:72f6c8b11857a856bcfa48c86f5368439f74453563f951e473514579d44aa612 \ + --hash=sha256:753e230374206729bf0a807954bcc6c150d3743928a73faffee51ac6557a03c3 \ + --hash=sha256:76d0819de158cd855d1cbb8fcafdf6f5cf1eb8e470abe056d5d161106e38062b \ + --hash=sha256:76ee27c6e9c7f16f47db7a94157112a2f3a00e958bc626e2f4ee8bec5c328fbe \ + --hash=sha256:77b63866ca88d804225eaa4af3e664c5faf3568cea95360d21f4725ab6e07146 \ + --hash=sha256:79ec52ec461e99e13791ec6508c722742ad745571f234ea6255bed38c6480f11 \ + --hash=sha256:7b93a4d08587e2b7e7882de461e82b6ed76d9026ce91ca7915e740ecc7855f60 \ + --hash=sha256:7da7087d756b19037bc2c06edc6c170eeef3c3bafcb8f532ff17d64dc427adfd \ + --hash=sha256:7f3bf998340c6d4b0c9a2f02d6a400e51f123b59565d74dc60d252ce888c260b \ + --hash=sha256:80aa89cad80b32a912a65332f64a4450ed00966111b6615ca6816153d3585a8c \ + --hash=sha256:8566def80554c3faa0e65ac30ab0932b9e3a5cd7f8323764303d468e5c37595a \ + --hash=sha256:873e0d5b4fb9b89ef7c2d2a963ea7d02879d9da0da8d9d4933dee8ee86a8b460 \ + --hash=sha256:88942d3a3dff3afc8288c21e565e476fc278902ae4d6d134f1eeda118cc830b1 \ + --hash=sha256:8bfeaf8735be79f225f3fefab7f941c712aaca36f1128c9d7e2352ee1aa87bdf \ + --hash=sha256:8e7c86f27c585ef37c35e56a96363ab8de4e549a95512445b85c96d3e2f7c1bf \ + --hash=sha256:915c3d10f81bec3a74fbd4faebe8391013ba61e5a1a8d48c4455b923bdda7858 \ + --hash=sha256:93e8740d7503eb008aa2df04d3b9735f845d43ae845e6dcd2be0b55a2da43cd2 \ + --hash=sha256:941103c9be18ac8daf7b7adca8228f8ed6bb7a1849020f643b3a14d15b1924d9 \ + --hash=sha256:97aeba56665b4c3235a0e52b2c2f5ae9cd071b8a8310ad27bddb3f7fb30e9aa2 \ + --hash=sha256:a39455728aabd58ceabb03c90e12f71fd30fa69615760a075b9fec596456ccc3 \ + --hash=sha256:a3a52f6156e73e7ccb0f8cced536adccb7042be67cb45f9562e12b319c119da6 \ + --hash=sha256:a668ce24de96165bb239160b3d854943128f4334822900534f2fe947930e5770 \ + --hash=sha256:a75dafbf87d6276ddc5b2bf6fae5254e3d0876b626eb24969a574fff9149ee5d \ + --hash=sha256:aabf5777b5c8ca26f7824cb4a120a740c9588ed58df9b2d196ce92fba42ff8dc \ + --hash=sha256:aec5cf2fd867b4ff45b9959f8b20ea3993fc93e63c7363fe6851424c8a7e7c23 \ + --hash=sha256:b2379fa7ed44ddecb5bfe4e48577d752db9fc10be00a6b7446e9663ba143de26 \ + --hash=sha256:b4ececa40ac28afa90871c2cc2b9ffd2ff0bf749380fbdf57d165fd23da353aa \ + --hash=sha256:b5819cd790dbf0c5eb9f82c73c16b39a65dd6dd4d1439dcdea7816ec9adddab8 \ + --hash=sha256:b74557b16e390ec12dca509bce9264c3bbd128f8a2c376eaa68003d7f327276d \ + --hash=sha256:b80aa5095cd3109962a298ce14110ae16b8c1aece8b72f9dafe81cf597ad80b3 \ + --hash=sha256:b93590ae81f7010dbe380cdeab6f515902ebcbefe0b9327cc4804d74e93ae69d \ + --hash=sha256:b96d5f26b05d03cc60f11a7761a5ded1741da411e7fe0909e27a5e6a0cb7b034 \ + --hash=sha256:bd3d54f38609ff308209bd43acea66061494157703364ae40c951f83ba99a1a9 \ + --hash=sha256:bfea2a5f0b4d8d43adf9d7b8bf019fb46fdd10a2e5cde477fbcb9d1fa08c68e1 \ + --hash=sha256:c007fe8a43d43b3969e8469004e9845944f1a80e6acd47c150856bb87f230c56 \ + --hash=sha256:c1df3d34aced70add6f867a8cf413e299177e0c22660cc767218373d0779487b \ + --hash=sha256:c23e27686783f60290e36827f9c626e63154b82b116d7fe9adba1fda36da706c \ + --hash=sha256:c8d8b4eb992936023be7dee581270af5c6e0697a8559895f527f5b7105ecd36a \ + --hash=sha256:c9e19dd6e28fdcaa5a1de679aec4141f691023916427ef9bae8584f9c2fb3b0e \ + --hash=sha256:d0d2568a8c11bf8225044aa94409e21da0cb09dcdafe9ecd10250b2baad531a9 \ + --hash=sha256:d38548150c39b74aeeb0ce8ee1d8e82696f4a4e16ddc6de7b1d8823f7de4b9b5 \ + --hash=sha256:d3a978c4f57a597908b7e697229d996d77a6d3c94901e9edee593adada95ce1a \ + --hash=sha256:d5160812ea7a8a2ffbe233d8da666880cad0cbaf5d4de74ae15c313213d62556 \ + --hash=sha256:dc799088c08fa04e43144b164feb0c13f9a0bc40503f8df3e9fde58a3c0c101e \ + --hash=sha256:df3959765b553b9440adfd3c795617c352154e497a4eaf3752555cfb5da8fc49 \ + --hash=sha256:dfa8a0c812ac681395907e71e1274819dec685fec28273a28905df579ef137e2 \ + --hash=sha256:e25c479382d26a2a41b7ebea1043564a937db462816ea07afa8a44c0866d52f9 \ + --hash=sha256:e4f4a984405e91527a0d62649ee21138f8e3d0ef103be488c1dc11a80d7f184b \ + --hash=sha256:e536c98a7626a98feb2d3eaf75944ef6f3dbee447e1f841eae16f2f0a72d8ddc \ + --hash=sha256:e56ba91f47764cc14f1daacd723e3e82d1a89d783f0f5afe9c364b8bb491ccdb \ + --hash=sha256:e672ba74fbc2dc8eea59fb6d4aed6845e6905fc2a8afe93175d94a83ba2a01a0 \ + --hash=sha256:e7b576130c69225432866fe2f4a469a85a54ade141d96fd396dffcf607b558f8 \ + --hash=sha256:e8465ab91a4bd96d36dde3263f06caa6a8a6019e4113f24dc753d79a8b3a3f82 \ + --hash=sha256:e96cea19e34778f8d59fe40775a7a574d95816eb150850a85a7a4c8f4b94ac69 \ + --hash=sha256:ece5c59f0ce7d001e017643d8d24da587ea1f74f6993467d85ae8a5ef9d4f42b \ + --hash=sha256:eceb81a8d74f9267ef4081e246ffd6d129da5d87e37a77c9bde550cb04870c1c \ + --hash=sha256:ed2e99c456e3fadd05c991f8f437ef902e00eedf34320ba2b0842bd1c3ca3a75 \ + --hash=sha256:f0cd744688278965817fd0839c4a4116add48d23890d468bc436f78beb28abf5 \ + --hash=sha256:f14f8f046c14563f8eb3f45f499cc658ab8d10072961e07225e507adb700e93f \ + --hash=sha256:f15489ba13d61f670dcc96772e733aad1a6f9c429cc27574c6cdaed82d0146ad \ + --hash=sha256:f31d95a179f8d64d90f6831d71fa93290893a33148d890ba15de25642c5d075b \ + --hash=sha256:f41a7489d32336dbf2199c8c0a215390a751c5b014c2c1c5366e817202e9cdf7 \ + --hash=sha256:f41eb9797986d6ebac5e8edff36d5cef9de40def462311b3eb3eeded1431e425 \ + --hash=sha256:f547144f2966e1e16ae626d8ce72b4cfa0caedc7fa28052001c94fb2fcaa1c52 + # via pydantic +pyglm==2.8.2 \ + --hash=sha256:018e2ca131c935b6fa147ec39c15f5d3936890ada43645cca4f208ccc4410188 \ + --hash=sha256:01db79724c736846105162b9cb89c1a9262fd5b3a87239e06dbb977e83f071ce \ + --hash=sha256:0821176a57d6d1c9c03085b86bfc13686d4cf814ebdaedcff540b7af292c7738 \ + --hash=sha256:082767061cd1181c01dc8f49945ea68699d0bfe940afb52bbed9c0e101572827 \ + --hash=sha256:094bd832748ca0f2a21b4fb20752a98e1d85353bdb7526c51ce9d3c08a23991a \ + --hash=sha256:0ac466ba49155fda6ea9c3e0ba459071eafd398ee5b54562ddd57c7862ae946c \ + --hash=sha256:0c4576bb2c1d7f71c483204d9b2cbb7e456c1e74dc0714bb3a51af1d18b66907 \ + --hash=sha256:13543a5516f74cb6634ed76f69097e4d47a4f5197ffb9876938ed755bdf0a167 \ + --hash=sha256:21eaff3e1d330762a92ae4e5fcf894ae0067f962c836c321e87e0a6175ec1890 \ + --hash=sha256:24957473986f26e907e17734e25761cee32475476a071976049b9b86aaad30ed \ + --hash=sha256:295069ceda113996305ea126f50100f7b34c28580b41b5d10d008569bddd480a \ + --hash=sha256:3271dca306c17d5ba70820125424fba5b4a5d3d3ea5b2a9d28a468bb86ee8e15 \ + --hash=sha256:37974f2a434075cfa2b6435cb6dcbbff151aa6a5bc3aae6b2d323f2920cfb071 \ + --hash=sha256:37e43503a3f8c4750dae84f2eab5198c78a38a9ba2b607935f9a0a9e8802a08a \ + --hash=sha256:3a0765a4ed676431627541a4561b36fa95b01823a488f291141de48f412e44b7 \ + --hash=sha256:3e5d429c42d9fdcffa7d3aef62cdac668470793a30945ce7353722958ea89e5d \ + --hash=sha256:402c0a4de35cc55ef9b27a463abcc3d8ff0fe5a6a3cc1b2d403c9d554e7dae0e \ + --hash=sha256:40f088c4e5287c565d9295895feead6b747a0ddbada91088e18383737b328fed \ + --hash=sha256:5692aa3940ce1351c7963203d29ceb051a2f83a0721b2796cb18860f01dafc7e \ + --hash=sha256:58d42a43e22b9224cd3daaf7888b438ad07e183d750ad77fc62020b6b8b2928d \ + --hash=sha256:5965c6c06272105be0e59897394d351c4fcf8d5bc1023efdbc9a3e70a0c92dcb \ + --hash=sha256:60342a40b780d2f9f686a5e03f4351dff9c3fe33b923f06fec043c9c0bbaaa7c \ + --hash=sha256:65e94ce6451e688e64099f2c7d81a1ca3e299de6c1a4bb993b869b23a44aeb73 \ + --hash=sha256:6a492dc524f3bffb27c47d9fc62afc690379ea311f1b9543487efe3869a3e1ae \ + --hash=sha256:6b9a577a70e9b3f364d8a567405811dea939c64ecba310bc7faa1b349034a7e7 \ + --hash=sha256:77f6b401007d5babbc6a328cb85b6d23f180e37f1a44b4516d8274f48acae0cf \ + --hash=sha256:793aae3aa1b09ed8400cda48f2ca640041c4ac2748f38e97925dac56f28ec6fb \ + --hash=sha256:7968f3b047ee9b8d5ab8707c81371015f523385480a1bfe73eaf3d6e39e74db7 \ + --hash=sha256:7d7c62b6d9d51ff13dfff50f297fdb1a2166d8a51f29d80e401c9d764840a4af \ + --hash=sha256:7e9d895e6697ff318b8c9b80dde957744cbfbeb0d22e61fce64906a3fe1f4bff \ + --hash=sha256:8094dc6c51eaac28720ef7ec6bbaadca9c6afe494cb95848cb0bce95e0314145 \ + --hash=sha256:859f68e70a52e7e042d53636b96d36a28be63965aa8429ac43c009eaf5640040 \ + --hash=sha256:865aaa996345239499e7ad6f8b9cd7e2411c55e4719d0dc91ea20fdea810080b \ + --hash=sha256:8cadb5f66c30654e8292e87c737081ff8bf2bbb15f10d73fc3e2abf005cededd \ + --hash=sha256:8d7492729bb1861eb9cc895d124d0e42b2d40d033b0367f2fcea2b8ac3c28fe0 \ + --hash=sha256:9727328d3844ca105d96adc7e99036f00a2b50d82c0071d4f49206abdb6c27da \ + --hash=sha256:9cf869167f18251a554fbf54b2f65af31803a428a2b6e46b975b429a0e973ff8 \ + --hash=sha256:a200ec556f31a1936aefc88baa4cd7e01d011ae83a250f74876548247e1c5add \ + --hash=sha256:a2853b06dd820c6b431e6d7296e7e13fb82066396bf3c76451a97e5c346b529e \ + --hash=sha256:a336a0ff105c3254888b7e4c517bbd166e77bdeb78c73ee7de23c30877c3a288 \ + --hash=sha256:a3c3f67f229f22b37a7076e36fd432795935cc1db25b7e133ae0ca1f7a9cbbb5 \ + --hash=sha256:a3ccd42dc7417c6c223b58feb085bbd723cc7ba42acc95b7561ebbaf5b26601c \ + --hash=sha256:a3ec5b90f9ba6ef151d1a46f8a1e3026c0a55b6f78629d468e0b7e3580184013 \ + --hash=sha256:a46be69db5fb3421cb49cb0eb18080db62cb6f38322ab50ceac126f341128ad1 \ + --hash=sha256:aa4168a8332116f8c8cd353b908eb96ccc7c5824dda0e44e072e623612f0e202 \ + --hash=sha256:ad5f6b40f391bf7b4fd5256b4153ff955ef497638fa24bec0d21bac27a210947 \ + --hash=sha256:b4847b0b60888b5c649b17b0a72d1f3f1ee07086cd5f431a7d977fad3cdbadab \ + --hash=sha256:b6ec9dc9e12a4e1d2cb2c91656e59eb1f30309b2882e6e354ce437ff5f7610f3 \ + --hash=sha256:bbff6b56779d456833e1af966af1739802f2ab7de02d66296a03231dc9034318 \ + --hash=sha256:c90c07472602952dbd9f7f745c1212fa73fbb8913af02b70a2d3f04ee5afd3e7 \ + --hash=sha256:cb7d3299fd72af27bcc1647c266efb0e259e2625a5a44be50019348d3099c361 \ + --hash=sha256:cb842b8ab216c8152e5166052f770f1e3c218aee577022dd0297f83c0ff00411 \ + --hash=sha256:cc99d62edec14f8ee120546667d48275b5b0d11f5ace283051ad81e9f1d4de19 \ + --hash=sha256:cd1adae33ea6c50ec057eb9701dda913459207f942484263f0d9c3b813b660c2 \ + --hash=sha256:cf4230800140b2d440b04bde290e1f8b61290aeebea7ab4680d939322a582686 \ + --hash=sha256:d09e8304414e5c1b4a9540215d6221925f896c0bdc1b5cc003e4b8c699209642 \ + --hash=sha256:d9cd5b3189e6f78a8095e33e4f22b274c16a468dd074169efcfee4711ccb6c9a \ + --hash=sha256:db87fa313e341ef527b5376633b241e6f5ba4deb28feb8f19f11c9396fd88a42 \ + --hash=sha256:e238e52a6bc62cbbd1b9a73e613b5ee32a8c525158d0f0cb04f98cd456ddbed1 \ + --hash=sha256:e2798ac14fcade4211f0b7fece3c567c6b5e401c0e221b4ea1d0b4bb47c50f77 \ + --hash=sha256:e65ad1b5415d5f60a13a2c23335d60638630ec89c87bafa744fa10e8364e06c5 \ + --hash=sha256:e69b938f6de1679a7ad5019ee3896cb4aec9dde90c617bef8a7d0d718a1f1e4d \ + --hash=sha256:e78fb7f1e76c5c736494ac68f7ff71358e6b8b23d9f7ab2b51eccec33d1fe736 \ + --hash=sha256:edbc51eef30a79019649669c0d98d9295f6e370570a7767426aaa8452d5b9d46 \ + --hash=sha256:f63cf23c8ad08607d5723d9e72d2b5f6de5e59ab440645358349ea150449290e \ + --hash=sha256:fa2d1511b7b04cb0a69c09f75d0b7f649c7809d3a3462abdc6745dd212b956a1 + # via + # bvhio + # spatial-transform +pygments==2.21.0 \ + --hash=sha256:2363c69b61c4a97c838da3b130dcd6468f4848992b21a82f2a63ec34377137d9 \ + --hash=sha256:610ca751c9bc2492b38eb9a38a7fbc93edbbb2d7182edaf34e66ae493dee5c8c + # via rich +python-dateutil==2.9.0.post0 \ + --hash=sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3 \ + --hash=sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427 + # via botocore +pyyaml==6.0.3 \ + --hash=sha256:00c4bdeba853cc34e7dd471f16b4114f4162dc03e6b7afcc2128711f0eca823c \ + --hash=sha256:0150219816b6a1fa26fb4699fb7daa9caf09eb1999f3b70fb6e786805e80375a \ + --hash=sha256:02893d100e99e03eda1c8fd5c441d8c60103fd175728e23e431db1b589cf5ab3 \ + --hash=sha256:02ea2dfa234451bbb8772601d7b8e426c2bfa197136796224e50e35a78777956 \ + --hash=sha256:0f29edc409a6392443abf94b9cf89ce99889a1dd5376d94316ae5145dfedd5d6 \ + --hash=sha256:10892704fc220243f5305762e276552a0395f7beb4dbf9b14ec8fd43b57f126c \ + --hash=sha256:16249ee61e95f858e83976573de0f5b2893b3677ba71c9dd36b9cf8be9ac6d65 \ + --hash=sha256:1d37d57ad971609cf3c53ba6a7e365e40660e3be0e5175fa9f2365a379d6095a \ + --hash=sha256:1ebe39cb5fc479422b83de611d14e2c0d3bb2a18bbcb01f229ab3cfbd8fee7a0 \ + --hash=sha256:214ed4befebe12df36bcc8bc2b64b396ca31be9304b8f59e25c11cf94a4c033b \ + --hash=sha256:2283a07e2c21a2aa78d9c4442724ec1eb15f5e42a723b99cb3d822d48f5f7ad1 \ + --hash=sha256:22ba7cfcad58ef3ecddc7ed1db3409af68d023b7f940da23c6c2a1890976eda6 \ + --hash=sha256:27c0abcb4a5dac13684a37f76e701e054692a9b2d3064b70f5e4eb54810553d7 \ + --hash=sha256:28c8d926f98f432f88adc23edf2e6d4921ac26fb084b028c733d01868d19007e \ + --hash=sha256:2e71d11abed7344e42a8849600193d15b6def118602c4c176f748e4583246007 \ + --hash=sha256:34d5fcd24b8445fadc33f9cf348c1047101756fd760b4dacb5c3e99755703310 \ + --hash=sha256:37503bfbfc9d2c40b344d06b2199cf0e96e97957ab1c1b546fd4f87e53e5d3e4 \ + --hash=sha256:3c5677e12444c15717b902a5798264fa7909e41153cdf9ef7ad571b704a63dd9 \ + --hash=sha256:3ff07ec89bae51176c0549bc4c63aa6202991da2d9a6129d7aef7f1407d3f295 \ + --hash=sha256:41715c910c881bc081f1e8872880d3c650acf13dfa8214bad49ed4cede7c34ea \ + --hash=sha256:418cf3f2111bc80e0933b2cd8cd04f286338bb88bdc7bc8e6dd775ebde60b5e0 \ + --hash=sha256:44edc647873928551a01e7a563d7452ccdebee747728c1080d881d68af7b997e \ + --hash=sha256:4a2e8cebe2ff6ab7d1050ecd59c25d4c8bd7e6f400f5f82b96557ac0abafd0ac \ + --hash=sha256:4ad1906908f2f5ae4e5a8ddfce73c320c2a1429ec52eafd27138b7f1cbe341c9 \ + --hash=sha256:501a031947e3a9025ed4405a168e6ef5ae3126c59f90ce0cd6f2bfc477be31b7 \ + --hash=sha256:5190d403f121660ce8d1d2c1bb2ef1bd05b5f68533fc5c2ea899bd15f4399b35 \ + --hash=sha256:5498cd1645aa724a7c71c8f378eb29ebe23da2fc0d7a08071d89469bf1d2defb \ + --hash=sha256:5cf4e27da7e3fbed4d6c3d8e797387aaad68102272f8f9752883bc32d61cb87b \ + --hash=sha256:5e0b74767e5f8c593e8c9b5912019159ed0533c70051e9cce3e8b6aa699fcd69 \ + --hash=sha256:5ed875a24292240029e4483f9d4a4b8a1ae08843b9c54f43fcc11e404532a8a5 \ + --hash=sha256:5fcd34e47f6e0b794d17de1b4ff496c00986e1c83f7ab2fb8fcfe9616ff7477b \ + --hash=sha256:5fdec68f91a0c6739b380c83b951e2c72ac0197ace422360e6d5a959d8d97b2c \ + --hash=sha256:6344df0d5755a2c9a276d4473ae6b90647e216ab4757f8426893b5dd2ac3f369 \ + --hash=sha256:64386e5e707d03a7e172c0701abfb7e10f0fb753ee1d773128192742712a98fd \ + --hash=sha256:652cb6edd41e718550aad172851962662ff2681490a8a711af6a4d288dd96824 \ + --hash=sha256:66291b10affd76d76f54fad28e22e51719ef9ba22b29e1d7d03d6777a9174198 \ + --hash=sha256:66e1674c3ef6f541c35191caae2d429b967b99e02040f5ba928632d9a7f0f065 \ + --hash=sha256:6adc77889b628398debc7b65c073bcb99c4a0237b248cacaf3fe8a557563ef6c \ + --hash=sha256:79005a0d97d5ddabfeeea4cf676af11e647e41d81c9a7722a193022accdb6b7c \ + --hash=sha256:7c6610def4f163542a622a73fb39f534f8c101d690126992300bf3207eab9764 \ + --hash=sha256:7f047e29dcae44602496db43be01ad42fc6f1cc0d8cd6c83d342306c32270196 \ + --hash=sha256:8098f252adfa6c80ab48096053f512f2321f0b998f98150cea9bd23d83e1467b \ + --hash=sha256:850774a7879607d3a6f50d36d04f00ee69e7fc816450e5f7e58d7f17f1ae5c00 \ + --hash=sha256:8d1fab6bb153a416f9aeb4b8763bc0f22a5586065f86f7664fc23339fc1c1fac \ + --hash=sha256:8da9669d359f02c0b91ccc01cac4a67f16afec0dac22c2ad09f46bee0697eba8 \ + --hash=sha256:8dc52c23056b9ddd46818a57b78404882310fb473d63f17b07d5c40421e47f8e \ + --hash=sha256:9149cad251584d5fb4981be1ecde53a1ca46c891a79788c0df828d2f166bda28 \ + --hash=sha256:93dda82c9c22deb0a405ea4dc5f2d0cda384168e466364dec6255b293923b2f3 \ + --hash=sha256:96b533f0e99f6579b3d4d4995707cf36df9100d67e0c8303a0c55b27b5f99bc5 \ + --hash=sha256:9c57bb8c96f6d1808c030b1687b9b5fb476abaa47f0db9c0101f5e9f394e97f4 \ + --hash=sha256:9c7708761fccb9397fe64bbc0395abcae8c4bf7b0eac081e12b809bf47700d0b \ + --hash=sha256:9f3bfb4965eb874431221a3ff3fdcddc7e74e3b07799e0e84ca4a0f867d449bf \ + --hash=sha256:a33284e20b78bd4a18c8c2282d549d10bc8408a2a7ff57653c0cf0b9be0afce5 \ + --hash=sha256:a80cb027f6b349846a3bf6d73b5e95e782175e52f22108cfa17876aaeff93702 \ + --hash=sha256:b30236e45cf30d2b8e7b3e85881719e98507abed1011bf463a8fa23e9c3e98a8 \ + --hash=sha256:b3bc83488de33889877a0f2543ade9f70c67d66d9ebb4ac959502e12de895788 \ + --hash=sha256:b865addae83924361678b652338317d1bd7e79b1f4596f96b96c77a5a34b34da \ + --hash=sha256:b8bb0864c5a28024fac8a632c443c87c5aa6f215c0b126c449ae1a150412f31d \ + --hash=sha256:ba1cc08a7ccde2d2ec775841541641e4548226580ab850948cbfda66a1befcdc \ + --hash=sha256:bdb2c67c6c1390b63c6ff89f210c8fd09d9a1217a465701eac7316313c915e4c \ + --hash=sha256:c1ff362665ae507275af2853520967820d9124984e0f7466736aea23d8611fba \ + --hash=sha256:c2514fceb77bc5e7a2f7adfaa1feb2fb311607c9cb518dbc378688ec73d8292f \ + --hash=sha256:c3355370a2c156cffb25e876646f149d5d68f5e0a3ce86a5084dd0b64a994917 \ + --hash=sha256:c458b6d084f9b935061bc36216e8a69a7e293a2f1e68bf956dcd9e6cbcd143f5 \ + --hash=sha256:d0eae10f8159e8fdad514efdc92d74fd8d682c933a6dd088030f3834bc8e6b26 \ + --hash=sha256:d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f \ + --hash=sha256:ebc55a14a21cb14062aa4162f906cd962b28e2e9ea38f9b4391244cd8de4ae0b \ + --hash=sha256:eda16858a3cab07b80edaf74336ece1f986ba330fdb8ee0d6c0d68fe82bc96be \ + --hash=sha256:ee2922902c45ae8ccada2c5b501ab86c36525b883eff4255313a253a3160861c \ + --hash=sha256:efd7b85f94a6f21e4932043973a7ba2613b059c4a000551892ac9f1d11f5baf3 \ + --hash=sha256:f7057c9a337546edc7973c0d3ba84ddcdf0daa14533c2065749c9075001090e6 \ + --hash=sha256:fa160448684b4e94d80416c0fa4aac48967a969efe22931448d853ada8baf926 \ + --hash=sha256:fc09d0aa354569bc501d4e787133afc08552722d3ab34836a80547331bb5d4a0 + # via + # accelerate + # huggingface-hub + # omegaconf + # peft + # transformers +regex==2026.9.29 \ + --hash=sha256:01000ddf0e3ffef97f2413ceb514f6313040106b6d18a03ee00a4fe35c1eb1db \ + --hash=sha256:0166844493626c5015c6088ee15c9ca2fd060ca15b7641d1657da6a58432ae33 \ + --hash=sha256:044265d77d94f5e3cb2fd72c76723807c429cb8c533e9d4672d0334a6f14f588 \ + --hash=sha256:0476e5bcbe6e1ba3d1c4cc7bbb1c3ba78e3b979b5c8a88d0a6a8cdd4992b8c84 \ + --hash=sha256:066d0e3dbfdd739bce2bf8c2a41dd16f73e3d8adc2eb06dd803a36a307f56075 \ + --hash=sha256:0b65c72739f981377c9c22e0c5c3cd7f42da7bd8a3c9209330fac772c7d893ed \ + --hash=sha256:0c992c19cd45058a4b92f68f139c93db168b48fb1f322c9a7cd620806afb6b51 \ + --hash=sha256:0cc63b5e47c12a48d90c7e9d7de6a035dd14f62868aaedbb4e0ff8ba2b8bfe7b \ + --hash=sha256:0dd8af32e9f7b56b7f95cc1fd79b23054c3bdc172392ae560acc24d57b7ffe71 \ + --hash=sha256:0def9fb6abac55492d6d51cddb7225d07d6f279e774e0adc08569a54a5fc8d46 \ + --hash=sha256:0fd2c901cc307a745ad4bc87f20060d7a0825a3371d1e93488af22e7a387f78f \ + --hash=sha256:1043aedf5917caa861bcb25a9c11460049656bdf0017a90a309fa8f255467725 \ + --hash=sha256:121a76a0985db80ceae9e171c337f8c927868e37d01b54e3ce87bc87f9c6a208 \ + --hash=sha256:143533cc4b6fbc5b95aca0a5b8d541088d374831593def000ec89322c220221d \ + --hash=sha256:14e953ff3607c92d7675bf79c4d4509ef6782aa8c08509f179f9b3d6d0679e86 \ + --hash=sha256:18ae8eed4526e35bdb754d61562b90bf5c00a67fdcf3cc1380dd59597486631b \ + --hash=sha256:19959129885356df0e97556856f77eb2888380dac18bed075a7c05c5128c618d \ + --hash=sha256:1ba8c6a416569ce0d37e83e28a254a61dc99a419084dfb6476cea02d997f74fa \ + --hash=sha256:1c2a0026062abcc321a53db4a185ceba0b59a66b5d37b0808917a88b55a5257f \ + --hash=sha256:1d9fe8091b2e89d470df68a9331111ed008ae8aae6bf1e8e1fba4086a495c84e \ + --hash=sha256:2089fe39c406784d90101c726755ffa1497bb74638fd434300d2b88006186de8 \ + --hash=sha256:23ae6fdad9e63e54038f5ef78aba2933faca61e24d432786589e737bc5522ebb \ + --hash=sha256:26ec4ccce55aa533fbd603d08911b01101a8fcfec987845ac3ae2c7087b2bde3 \ + --hash=sha256:2f7f7aa47b229f2b39a2ae2596d2ad5625d77b5eb9856fac2dab3eb506cdd0a0 \ + --hash=sha256:31b003f9a070335e2a8233ee9b14a3ca8e6d792012ae011f741bf0aaf11744c5 \ + --hash=sha256:32ab11df9677ca80bcbb5fe4eb1da9109a5019239a054836efc6fa1c64e683cf \ + --hash=sha256:33026515aebc0e70d1c89978e53e8d695d35d9e472f8d5b34465ba3c74028650 \ + --hash=sha256:34b6925af9853bf461950e6508910f179fd6e9b1a7ec8548e069606b7e51a26b \ + --hash=sha256:352cf115a810b357caa35193ab656ecf5ef41056855e82f292c99e8514f8d954 \ + --hash=sha256:39ab5894d971f9ac68baa6eca5c50387db579cfcacf36ae8df3feceb1815e6d0 \ + --hash=sha256:3a21a9509d0ee88e7a70e1ad228cd2f0e0fd1e187458db132e8a8d18c97daf9d \ + --hash=sha256:3c5c2ef13797466aa64170cbb66ad98a32351dd4127694cea7199f80f213750d \ + --hash=sha256:3e778bfccd63075167709136afbc251c1f683758d5bf49c803c60ac3f894ce6b \ + --hash=sha256:3f1e6cb402a89457582cd696f982559217d13484a193202c394015297968c86d \ + --hash=sha256:42e82e578c904445d4c8a35b8f28052cf567593215fa5db06266fbc6f77aaa2e \ + --hash=sha256:4408b2b27a95ca8cc48b7411945753773353b5c93b307754781086c99d3a576f \ + --hash=sha256:446654b29bfaa30500d80947eda42cef1449dc8a87f4e3cf061cc8485d3a1f0b \ + --hash=sha256:45010bcfe66df41522d56c9b6114e87ecc597a08970ff6a2ced24415c141ae5f \ + --hash=sha256:49ee178ca31c94621294bf9b8b676a92a2e6bba8af0529591753719e57edb621 \ + --hash=sha256:4d7d93613b01b0199961330e49cfc52d479b3d5776c56c691db31130c0a07d91 \ + --hash=sha256:4fb41211d2333eb930a51e0546a65999761cf1f572a4da56ef9b8a62966c06f2 \ + --hash=sha256:4fe97894d1b306c919b4e50def1e6f6c522f4d03a7283811f4d108f1ce5d3ac2 \ + --hash=sha256:554bffadcbcb6d5f4e5fb10a61cc52084b9a63d1dab5f10bcd2c4343972e8e2c \ + --hash=sha256:59b49507f47479e299a9e1bc41b5cb83a7afda0540625f1dbae886615978acbf \ + --hash=sha256:5eeb8edc6110d9194a4d0d54610f64c37a31c605b5dbb7e407fc6ec7fa34a4a1 \ + --hash=sha256:612b709381c0355b70d89cdb51b7f670591ed5cbbc0e3b5337488019dc667b65 \ + --hash=sha256:61956f074ecd123f55adca68ee3eab46e6a07ad3f8e64e6db95dfacb444f55c4 \ + --hash=sha256:6398d5145689503412cc1748895242598d8846b8967b851133b20dc2ed1e21e8 \ + --hash=sha256:65b408d8fcb273e3499e7ef2ce796810da1becd208c7fb4373692a242d79d461 \ + --hash=sha256:686ac5350fceae63830bb98805fcb8039325bf4c06d9f6f048ff65229d5bffa5 \ + --hash=sha256:6a1a824fbed817e0a891103886b68f063b1e83cc51bc97192a90a60195a9291f \ + --hash=sha256:6abb75ab16bc3281714a5b99548a2225db70dba1f995f6d7f7419b76eb5a8fbe \ + --hash=sha256:6f7121a8914ed13fcfe2099f895341bfb789f004d4c5a0bdece8fa667da10849 \ + --hash=sha256:7020ed44df30b3aa492c00ee3b52d0548c1f30c2c6c5bb13ae897680900d3413 \ + --hash=sha256:720537c7ea6f80dc61913184edb0ce2497a306b39ef19f28505b322553d52bdb \ + --hash=sha256:724184b4aafed865e4f13ca313fdcb43024300c028ec67319cfa16847d84685e \ + --hash=sha256:7c03031610e3e6ed1768a2b7a8fc84637c1257b50c5eacaf094c6e17a84fc563 \ + --hash=sha256:80a5ea3b4fd9d6a5b9a44f7976a9acaaab35aa3c1f6b29e5bd857dfabaded223 \ + --hash=sha256:80c7cadd3fd2bfde5df8aa0787e315812cad0c313a753095d02f4c2b6c01677b \ + --hash=sha256:80ea96f5c1a30bf09007d48466521d9c294bebe197c708c3359096e3e3691632 \ + --hash=sha256:864e9b87ac33c3fb9fb4ad48166d4fdb579c351d5c77deb0d34bccb36a775cd9 \ + --hash=sha256:87fb80cbe3557e27e7b28b995c2b2eedf689b8886f941ab93e0e288f0976518a \ + --hash=sha256:8873c4a11c50b9989168881aeb3f08859f469d809941866aa1feefd8be5431f6 \ + --hash=sha256:888d60953908dcf761aa320c3e390ab8556efbdb551ace63921de90f6ae0848d \ + --hash=sha256:8b5fcc4771732191b2b7d1dd68d8f0353f47f8d90b6150f6dce58bf1112442cb \ + --hash=sha256:8f39588af4731c8923c26810eb3b33f76f17633985e40f59c3cd45a33805a895 \ + --hash=sha256:9173db3be74a35cb6731701094b98120f7ee4876a287882a59cdea1fa7da342f \ + --hash=sha256:92f05c9c42bde5785dc48770bc2194d9f7442544156f951e19cd31b096cec562 \ + --hash=sha256:951733b1bbdb71e377cec567b409f1a7881b47cfcad84121aa74cb575fa425ea \ + --hash=sha256:957bb708e8057ab1649ba566456429d691ec9b90d1c9ad1af1ba7ffbbeaf05f2 \ + --hash=sha256:9916fda742cd4eede63b286f58c06718324265d727ce0856eb1aac86d0d150d6 \ + --hash=sha256:9e1d3a4cb7993b708f0ada8d0c84590efd853f169e7147d2202c9da503180242 \ + --hash=sha256:9e4482589065c8ecd761cff522dcd85f2d39e62f551e37e025d1c7d54772def3 \ + --hash=sha256:a5300757f8a68f5b6cc33f57338d72a0e3589c5cc9ad5f8504ea06f028be582a \ + --hash=sha256:a540abfab208e1b7ef2df231c40ef3b6cbb30a0aad6204e9b6a81c10a6794628 \ + --hash=sha256:a5758353650079898dc1b2b0e95aa51fa23a30d020e06f62c430dd08ee56cdd8 \ + --hash=sha256:a64b85a4760337cfefdb27d42da6ed8b58e8cde3f2d57b6ef43e76ef6ea9ef47 \ + --hash=sha256:a655d34b2a6943af32401f3d94f72e9d731f6ad16285815550bf2b4ee69d420a \ + --hash=sha256:a714befaacbd10092ffe4cea0d3c5f008fb9efe9bc322c715bcdfdee414b9a3d \ + --hash=sha256:a760da040b47767b4b873adfb7c3b691e9ba2fc60f113f9d0b88f1a62f323e85 \ + --hash=sha256:addd736a0547d553283adaf4e05d7104e7f2c7b0b092e9b4d28756825f14531f \ + --hash=sha256:ae4613d7d9dda60fcba95f846cc6f808017f1843f392cf9daad14a6534493d71 \ + --hash=sha256:b11b589e00095ec69cf79841a76360f9b079e95b0368a25b5ebb951ab0c157ff \ + --hash=sha256:b3e445b66c80b4eb4234e855ce94d9adc183eedbd632816228d89930b91b2c5b \ + --hash=sha256:b7b893976e7fe42053da64f2aa27239c24252fd2ec6df471e1be197c0addc3b1 \ + --hash=sha256:b84f186a7f0536fe4ff9a9fa12d06d007b9b71d4b5352ddcc41f59ad6522a312 \ + --hash=sha256:b89efc38431793d28b7cd91227e2f952ad7c48df19132b17f43a5fec3c14143b \ + --hash=sha256:b97a38fb4c732b6832db6bf108963adbcd82ef1268ba2025dce390f45af75efa \ + --hash=sha256:b9d74e4eee9ddb64c2e92d5d61472c59c21684c059eb7b68767be9628e977859 \ + --hash=sha256:bb90e7177944b6684738c1fc36aabd2dd00d1de3be7dbe09f91e196f1bc0dc81 \ + --hash=sha256:bec37990e3d6121f29ecfb594bd8f1bf009e9f7926daba2e50e3b27d3892a783 \ + --hash=sha256:bf3c49863c23a1ad6da9c30351aed6cff8d5ddbeb63c5c8420ae54e98c7d0138 \ + --hash=sha256:bf48516e35cf848390ea68850aba53e7c333720d2945b4d2c25b69fc5171723f \ + --hash=sha256:bfc71e6d970419c1309b3640305298643e2a734cad3f7cfb6d2ddee4175ab53d \ + --hash=sha256:c0094897d7d01f184b2d7fe8c56c66d64efe01b31f4b7d34205b391387df1111 \ + --hash=sha256:c03c6eb6ece86dfdcbb34799efaa339b093132e1aceed491ba5e08fe06cdf699 \ + --hash=sha256:c1a9a6651197fbed6f0212591418b9def774fc3f8324f78d1bf0e6a63e5f8aa1 \ + --hash=sha256:c3589f40749acce747510bf5d589d54e376cb0930ea58b35effac97e5312b0c1 \ + --hash=sha256:c4e38dd8f39c43a91d2410ad2b85610701b0979342c3df1d69eaf8e838c757d8 \ + --hash=sha256:c6c8fabf1dafc1f1ddcbb67896d3f93efb092e8c4b6322d7389b944e76a484e5 \ + --hash=sha256:c90fcf7804ea0a54b896ce0f2b9565350220b8d4890fd0db461a476a4c687963 \ + --hash=sha256:c9b602fae1e00b7c035d661ce85575365719192a7b46784bd71cf64c68053aa0 \ + --hash=sha256:ccb64d887a9db1cd76dbc0f92051a1a478a2a67e7f56c62d915cb881d7734704 \ + --hash=sha256:d06fcdecc10fc7954d7c8f27a03c96055fe525274dc84a7b0dbdc3d6b9e03dab \ + --hash=sha256:d0c3082bf79bcd6a614d55916590ad4b8f93200e10b97f463ea5d9d07c9b5f23 \ + --hash=sha256:d49c18f1ea294cf4adde2e5ac256e98c82ea9d708462ce4bf799dffa7cfe8a2c \ + --hash=sha256:d60030baaa7bfbb02d650c126cdcddcb6e33dbff14d819434c8fa2fdcaeeeba5 \ + --hash=sha256:d7cab119d0df0b9413f106b4d7fc34f2872d3574ed3806fb48959c830b1537da \ + --hash=sha256:d9b77b25b4f395f92de6099ab08e8ae2bc7e51dfe157f22900902243a5cc90c7 \ + --hash=sha256:dabee8f4935e731fb46b2a3091bdda0d3d94b3bbfb907d2b4f12eefce4009619 \ + --hash=sha256:db5e82ba15c142425b8406690032df89e39cca4a2e8afbbb9a3d84edc2373ac3 \ + --hash=sha256:dc79d36d0618752265f0d575915bdc5c5130ecb9c9f6b3bcefeae32e4bdfafcf \ + --hash=sha256:ddfa987262763c3c22a8367d2a49c244b018a74c3a8e3ab1a864119ad45c5633 \ + --hash=sha256:e1172147d28d8fbcf8cb8d26c41506169f5ad8fe9ec969cb116835a19d4d8eca \ + --hash=sha256:e11edba5bc344a32b029a7af9d4b3173982dd79eeafa0b9dbd787364414b0509 \ + --hash=sha256:e2c89e9b762c57f59d5e99ee8b20202adb892e35f8d3485741340999ca55058e \ + --hash=sha256:e31f72490b7c12f7790e1e25c3afffd20503ee1bfb43461d7838b871ff244b19 \ + --hash=sha256:e8c65ef3862a8ad6e86492b6ed9327805dd66904c012bd3649dc67d822ed6c34 \ + --hash=sha256:ebb8912f565b8cdbbf27debfe00df04202c20e2f651b9e32767930c5eace3621 \ + --hash=sha256:ed511a0708e2297e1d6431e7fb217e3402791e491e02da800658ace4973df1bb \ + --hash=sha256:edf06545875f3efa31560d94121e95c7fd70d98b1dfedc0157097d79b13b52ea \ + --hash=sha256:f0fe9834e5aeccaf19a0d8feb296d66a24be1a7c9922002f842a682cd5abb787 \ + --hash=sha256:f1a0d5117230dd46b399a30a38afa44f79c99f3168988fdc4f425c3f928b39df \ + --hash=sha256:f37964e4a5e993d2fd45147741e9dff7f34a2d8c00ab94c4ea0514a4677f959e \ + --hash=sha256:f57dc6b8fef170f105d2cf5cdce254f47b137d7755086cf7050f47e16582abba \ + --hash=sha256:f93bc1c3486ef3747e07c9d7c1d0a147b8fbaab975f80e348aed6f71309dfaca \ + --hash=sha256:fb00027a09a8f9f08028b40dce4c933cf73e4833240ed356583fdc9cfa721566 \ + --hash=sha256:fb99cc9d45f48895d9d67f6a0b8a57f08d39c174d9f25ad97a313e0470267b1c \ + --hash=sha256:fdd88ed5e20b1bcdd234421e454962c971aa44b653bdb7f1ea9ef683e90fb649 \ + --hash=sha256:fe3fa1dd453ed5c7f5ea23a26218329790ed7197a99b90e94330e313959a7f52 + # via transformers +rich==15.0.0 \ + --hash=sha256:33bd4ef74232fb73fe9279a257718407f169c09b78a87ad3d296f548e27de0bb \ + --hash=sha256:edd07a4824c6b40189fb7ac9bc4c52536e9780fbbfbddf6f1e2502c31b068c36 + # via typer +s3transfer==0.19.3 \ + --hash=sha256:24eb7535804306355e31c952a90022bf5b2f9d760f9a11062c7493a217c08553 \ + --hash=sha256:8326acc3d056d7f7b8a37110c7d2aea41f67e83f6ae79cd3b5fbcca34c726406 + # via boto3 +safetensors==0.7.0 \ + --hash=sha256:0071bffba4150c2f46cae1432d31995d77acfd9f8db598b5d1a2ce67e8440ad2 \ + --hash=sha256:07663963b67e8bd9f0b8ad15bb9163606cd27cc5a1b96235a50d8369803b96b0 \ + --hash=sha256:12f49080303fa6bb424b362149a12949dfbbf1e06811a88f2307276b0c131afd \ + --hash=sha256:1d060c70284127fa805085d8f10fbd0962792aed71879d00864acda69dbab981 \ + --hash=sha256:42cb091236206bb2016d245c377ed383aa7f78691748f3bb6ee1bfa51ae2ce6a \ + --hash=sha256:473b32699f4200e69801bf5abf93f1a4ecd432a70984df164fc22ccf39c4a6f3 \ + --hash=sha256:54bef08bf00a2bff599982f6b08e8770e09cc012d7bba00783fc7ea38f1fb37d \ + --hash=sha256:5d72abdb8a4d56d4020713724ba81dac065fedb7f3667151c4a637f1d3fb26c0 \ + --hash=sha256:672132907fcad9f2aedcb705b2d7b3b93354a2aec1b2f706c4db852abe338f85 \ + --hash=sha256:6999421eb8ba9df4450a16d9184fcb7bef26240b9f98e95401f17af6c2210b71 \ + --hash=sha256:7b95a3fa7b3abb9b5b0e07668e808364d0d40f6bbbf9ae0faa8b5b210c97b140 \ + --hash=sha256:8469155f4cb518bafb4acf4865e8bb9d6804110d2d9bdcaa78564b9fd841e104 \ + --hash=sha256:94fd4858284736bb67a897a41608b5b0c2496c9bdb3bf2af1fa3409127f20d57 \ + --hash=sha256:b0f6d66c1c538d5a94a73aa9ddca8ccc4227e6c9ff555322ea40bdd142391dd4 \ + --hash=sha256:c74af94bf3ac15ac4d0f2a7c7b4663a15f8c2ab15ed0fc7531ca61d0835eccba \ + --hash=sha256:c82f4d474cf725255d9e6acf17252991c3c8aac038d6ef363a4bf8be2f6db517 \ + --hash=sha256:cdab83a366799fa730f90a4ebb563e494f28e9e92c4819e556152ad55e43591b \ + --hash=sha256:cfdead2f57330d76aa7234051dadfa7d4eedc0e5a27fd08e6f96714a92b00f09 \ + --hash=sha256:d1239932053f56f3456f32eb9625590cc7582e905021f94636202a864d470755 \ + --hash=sha256:dac7252938f0696ddea46f5e855dd3138444e82236e3be475f54929f0c510d48 \ + --hash=sha256:dc92bc2db7b45bda4510e4f51c59b00fe80b2d6be88928346e4294ce1c2abe7c \ + --hash=sha256:e07d91d0c92a31200f25351f4acb2bc6aff7f48094e13ebb1d0fb995b54b6542 \ + --hash=sha256:f4729811a6640d019a4b7ba8638ee2fd21fa5ca8c7e7bdf0fed62068fcaac737 + # via + # -r requirements.in + # accelerate + # peft + # transformers +scipy==1.15.3 \ + --hash=sha256:05dc6abcd105e1a29f95eada46d4a3f251743cfd7d3ae8ddb4088047f24ea477 \ + --hash=sha256:06efcba926324df1696931a57a176c80848ccd67ce6ad020c810736bfd58eb1c \ + --hash=sha256:0a769105537aa07a69468a0eefcd121be52006db61cdd8cac8a0e68980bbb723 \ + --hash=sha256:0bdd905264c0c9cfa74a4772cdb2070171790381a5c4d312c973382fc6eaf730 \ + --hash=sha256:0ff17c0bb1cb32952c09217d8d1eed9b53d1463e5f1dd6052c7857f83127d539 \ + --hash=sha256:14ed70039d182f411ffc74789a16df3835e05dc469b898233a245cdfd7f162cb \ + --hash=sha256:185cd3d6d05ca4b44a8f1595af87f9c372bb6acf9c808e99aa3e9aa03bd98cf6 \ + --hash=sha256:18aaacb735ab38b38db42cb01f6b92a2d0d4b6aabefeb07f02849e47f8fb3594 \ + --hash=sha256:1c832e1bd78dea67d5c16f786681b28dd695a8cb1fb90af2e27580d3d0967e92 \ + --hash=sha256:263961f658ce2165bbd7b99fa5135195c3a12d9bef045345016b8b50c315cb82 \ + --hash=sha256:271e3713e645149ea5ea3e97b57fdab61ce61333f97cfae392c28ba786f9bb49 \ + --hash=sha256:2c620736bcc334782e24d173c0fdbb7590a0a436d2fdf39310a8902505008759 \ + --hash=sha256:34716e281f181a02341ddeaad584205bd2fd3c242063bd3423d61ac259ca7eba \ + --hash=sha256:39cb9c62e471b1bb3750066ecc3a3f3052b37751c7c3dfd0fd7e48900ed52982 \ + --hash=sha256:3ac07623267feb3ae308487c260ac684b32ea35fd81e12845039952f558047b8 \ + --hash=sha256:3b0334816afb8b91dab859281b1b9786934392aa3d527cd847e41bb6f45bee65 \ + --hash=sha256:40e54d5c7e7ebf1aa596c374c49fa3135f04648a0caabcb66c52884b943f02b4 \ + --hash=sha256:50f9e62461c95d933d5c5ef4a1f2ebf9a2b4e83b0db374cb3f1de104d935922e \ + --hash=sha256:52092bc0472cfd17df49ff17e70624345efece4e1a12b23783a1ac59a1b728ed \ + --hash=sha256:5380741e53df2c566f4d234b100a484b420af85deb39ea35a1cc1be84ff53a5c \ + --hash=sha256:5e721fed53187e71d0ccf382b6bf977644c533e506c4d33c3fb24de89f5c3ed5 \ + --hash=sha256:6487aa99c2a3d509a5227d9a5e889ff05830a06b2ce08ec30df6d79db5fcd5c5 \ + --hash=sha256:6ac6310fdbfb7aa6612408bd2f07295bcbd3fda00d2d702178434751fe48e019 \ + --hash=sha256:6cfd56fc1a8e53f6e89ba3a7a7251f7396412d655bca2aa5611c8ec9a6784a1e \ + --hash=sha256:6db907c7368e3092e24919b5e31c76998b0ce1684d51a90943cb0ed1b4ffd6c1 \ + --hash=sha256:721d6b4ef5dc82ca8968c25b111e307083d7ca9091bc38163fb89243e85e3889 \ + --hash=sha256:76ad1fb5f8752eabf0fa02e4cc0336b4e8f021e2d5f061ed37d6d264db35e3ca \ + --hash=sha256:79167bba085c31f38603e11a267d862957cbb3ce018d8b38f79ac043bc92d825 \ + --hash=sha256:795c46999bae845966368a3c013e0e00947932d68e235702b5c3f6ea799aa8c9 \ + --hash=sha256:7e11270a000969409d37ed399585ee530b9ef6aa99d50c019de4cb01e8e54e62 \ + --hash=sha256:8c9ed3ba2c8a2ce098163a9bdb26f891746d02136995df25227a20e71c396ebb \ + --hash=sha256:993439ce220d25e3696d1b23b233dd010169b62f6456488567e830654ee37a6b \ + --hash=sha256:9d61e97b186a57350f6d6fd72640f9e99d5a4a2b8fbf4b9ee9a841eab327dc13 \ + --hash=sha256:9db984639887e3dffb3928d118145ffe40eff2fa40cb241a306ec57c219ebbbb \ + --hash=sha256:9e2abc762b0811e09a0d3258abee2d98e0c703eee49464ce0069590846f31d40 \ + --hash=sha256:a345928c86d535060c9c2b25e71e87c39ab2f22fc96e9636bd74d1dbf9de448c \ + --hash=sha256:ad3432cb0f9ed87477a8d97f03b763fd1d57709f1bbde3c9369b1dff5503b253 \ + --hash=sha256:ae48a786a28412d744c62fd7816a4118ef97e5be0bee968ce8f0a2fba7acf3bb \ + --hash=sha256:aef683a9ae6eb00728a542b796f52a5477b78252edede72b8327a886ab63293f \ + --hash=sha256:b90ab29d0c37ec9bf55424c064312930ca5f4bde15ee8619ee44e69319aab163 \ + --hash=sha256:c05045d8b9bfd807ee1b9f38761993297b10b245f012b11b13b91ba8945f7e45 \ + --hash=sha256:c9deabd6d547aee2c9a81dee6cc96c6d7e9a9b1953f74850c179f91fdc729cb7 \ + --hash=sha256:dde4fc32993071ac0c7dd2d82569e544f0bdaff66269cb475e0f369adad13f11 \ + --hash=sha256:eae3cf522bc7df64b42cad3925c876e1b0b6c35c1337c93e12c0f366f55b0eaf \ + --hash=sha256:ed7284b21a7a0c8f1b6e5977ac05396c0d008b89e05498c8b7e8f4a1423bba0e \ + --hash=sha256:f77f853d584e72e874d87357ad70f44b437331507d1c311457bed8ed2b956126 + # via -r requirements.in +setuptools==84.2.1 \ + --hash=sha256:3ff8b3b5492a0aa66960f4419365a86b84e013070d4313e4d4a6894f5d64d6bc \ + --hash=sha256:ca140b45d5325a9478f880e351484f62fef15f336462e449ca0c03c873d589c2 + # via + # -c requirements-build.lock + # torch +shellingham==1.5.4 \ + --hash=sha256:7ecfff8f2fd72616f7481040475a65b2bf8af90a56c89140852d1120324e8686 \ + --hash=sha256:8dbca0739d487e5bd35ab3ca4b36e11c4078f3a234bfce294b0a0291363404de + # via typer +six==1.17.0 \ + --hash=sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274 \ + --hash=sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81 + # via python-dateutil +spatial-transform==1.3.3 \ + --hash=sha256:0616333ca64e3efa50ec883ca87f96ff049e4a5fdb58af97b2d6ffcdd224001c \ + --hash=sha256:4b31f9a2132166e6f5337af155b96a1576e2a4bb0935b82750f74632fc1b95d2 + # via bvhio +sympy==1.13.1 \ + --hash=sha256:9cebf7e04ff162015ce31c9c6c9144daa34a93bd082f54fd8f12deca4f47515f \ + --hash=sha256:db36cdc64bf61b9b24578b6f7bab1ecdd2452cf008f34faa33776680c26d66f8 + # via torch +tokenizers==0.22.2 \ + --hash=sha256:143b999bdc46d10febb15cbffb4207ddd1f410e2c755857b5a0797961bbdc113 \ + --hash=sha256:1a62ba2c5faa2dd175aaeed7b15abf18d20266189fb3406c5d0550dd34dd5f37 \ + --hash=sha256:1c774b1276f71e1ef716e5486f21e76333464f47bece56bbd554485982a9e03e \ + --hash=sha256:1e418a55456beedca4621dbab65a318981467a2b188e982a23e117f115ce5001 \ + --hash=sha256:1e50f8554d504f617d9e9d6e4c2c2884a12b388a97c5c77f0bc6cf4cd032feee \ + --hash=sha256:2249487018adec45d6e3554c71d46eb39fa8ea67156c640f7513eb26f318cec7 \ + --hash=sha256:25b85325d0815e86e0bac263506dd114578953b7b53d7de09a6485e4a160a7dd \ + --hash=sha256:29c30b83d8dcd061078b05ae0cb94d3c710555fbb44861139f9f83dcca3dc3e4 \ + --hash=sha256:319f659ee992222f04e58f84cbf407cfa66a65fe3a8de44e8ad2bc53e7d99012 \ + --hash=sha256:369cc9fc8cc10cb24143873a0d95438bb8ee257bb80c71989e3ee290e8d72c67 \ + --hash=sha256:37ae80a28c1d3265bb1f22464c856bd23c02a05bb211e56d0c5301a435be6c1a \ + --hash=sha256:38337540fbbddff8e999d59970f3c6f35a82de10053206a7562f1ea02d046fa5 \ + --hash=sha256:473b83b915e547aa366d1eee11806deaf419e17be16310ac0a14077f1e28f917 \ + --hash=sha256:544dd704ae7238755d790de45ba8da072e9af3eea688f698b137915ae959281c \ + --hash=sha256:64d94e84f6660764e64e7e0b22baa72f6cd942279fdbb21d46abd70d179f0195 \ + --hash=sha256:753d47ebd4542742ef9261d9da92cd545b2cacbb48349a1225466745bb866ec4 \ + --hash=sha256:791135ee325f2336f498590eb2f11dc5c295232f288e75c99a36c5dbce63088a \ + --hash=sha256:9ce725d22864a1e965217204946f830c37876eee3b2ba6fc6255e8e903d5fcbc \ + --hash=sha256:a6bf3f88c554a2b653af81f3204491c818ae2ac6fbc09e76ef4773351292bc92 \ + --hash=sha256:bfb88f22a209ff7b40a576d5324bf8286b519d7358663db21d6246fb17eea2d5 \ + --hash=sha256:c9ea31edff2968b44a88f97d784c2f16dc0729b8b143ed004699ebca91f05c48 \ + --hash=sha256:df6c4265b289083bf710dff49bc51ef252f9d5be33a45ee2bed151114a56207b \ + --hash=sha256:e10bf9113d209be7cd046d40fbabbaf3278ff6d18eb4da4c500443185dc1896c \ + --hash=sha256:f01a9c019878532f98927d2bacb79bbb404b43d3437455522a00a30718cdedb5 + # via + # -r requirements.in + # transformers +torch==2.5.1+cpu \ + --hash=sha256:07d7c9e069123d5af08b0cf0013d74f680b2d8be7d9e2cf561a52c90c55d9409 \ + --hash=sha256:2ebd0b6135dc60b96ce51349c92c9757b2b9634a6b90045dfab3eb4921a4d62f \ + --hash=sha256:4856f9d6925121d13c2df07aa7580b767f449dfe71ae5acde9c27535d5da4840 \ + --hash=sha256:5dbbdf83caa90d0bcaa50e4933ca424889133b35226db79000877d4ec5d9ea37 \ + --hash=sha256:7f91a2200e352745d70e22396bd501448e28350fbdbd8d8b1c83037e25451150 \ + --hash=sha256:81531d4d5ca74163dc9574b87396531e546a60cceb6253303c7db6a21e867fdf \ + --hash=sha256:a3ad26468abc5ee601aba49ff02f72387ae734b0900aa589b890c80d72b7b26b \ + --hash=sha256:a6b720410350765d3d77c01a5ce098a6c45af446284e45e87a98b8a16e7d564d \ + --hash=sha256:df93157482b672892d29134d3fae9d38ba3219702faedd79f407eb36774c56ce + # via + # -r requirements.in + # accelerate + # peft +tqdm==4.70.1 \ + --hash=sha256:c293e525e6fef9c20e8728fd4612df02a0aa31bb5fe91ecd93e123b1b7bffa73 \ + --hash=sha256:cefd0eca11b2a37a3aee776544d4f4ae913f02688135b5556b8788dfa474afc4 + # via + # -r requirements.in + # huggingface-hub + # peft + # transformers +transformers==5.1.0 \ + --hash=sha256:c60d6180e5845ea1b4eed38d7d1b06fcc4cc341c6b7fa5c1dc767d7e25fe0139 \ + --hash=sha256:de534b50c9b2ce6217fc56421075a1734241fb40704fdc90f50f6a08fc533d59 + # via + # -r requirements.in + # peft +trimesh==4.11.3 \ + --hash=sha256:8549c6cb95326aaf61759c7a9517b8342ae49a5bd360290b7b1e565902a85bad \ + --hash=sha256:fe9b6bbd68d8e6c0f7d93313a5409d02d3da0bf4fd3d7e7c039b386bc5ce04f3 + # via -r requirements.in +typer==0.27.3 \ + --hash=sha256:d0396f770a560ab1b0a8504e13b5f254b728cedb05c61cf0359e944e50ce8901 \ + --hash=sha256:e50022f28b82a86313e54501317a1db64bf8f8d036ff8cfe5ca7e47675454aff + # via + # huggingface-hub + # typer-slim +typer-slim==0.24.0 \ + --hash=sha256:d5d7ee1ee2834d5020c7c616ed5e0d0f29b9a4b1dd283bdebae198ec09778d0e \ + --hash=sha256:f0ed36127183f52ae6ced2ecb2521789995992c521a46083bfcdbb652d22ad34 + # via transformers +typing-extensions==4.16.0 \ + --hash=sha256:481caa481374e813c1b176ada14e97f1f67a4539ce9cfeb3f350d78d6370c2e8 \ + --hash=sha256:dc983d19a509c94dba722ee6abd33940f7c05a89e243c47e907eb4db6f1a43e5 + # via + # anyio + # gradio-client + # huggingface-hub + # pydantic + # pydantic-core + # torch + # typing-inspection +typing-inspection==0.4.4 \ + --hash=sha256:547274fa6b0a561ccf549cc9524b999a578e737d015d8709d021f9d0d13bea47 \ + --hash=sha256:65b8397ba37ccbce054456aaccddfc91e6e3083c92824df348d96ca832f3f147 + # via pydantic +urllib3==2.8.0 \ + --hash=sha256:0cf3cae568d36aa9576b28dfb35f11328f1cb974ca7647d9475ebb86c75ac6e3 \ + --hash=sha256:63bf2ead4c879426ebf22ef2a781eeb4aa3b4ae798a0435506f8687fd5bb9b63 + # via + # -r requirements.in + # botocore From a089d3ff5f23d6477272cf99b5f5b65982544099 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 24 Oct 2026 00:28:29 +0200 Subject: [PATCH 04/29] README front door and contract: Vili is the Idunn target on Yggdrasil Co-Authored-By: Claude Opus 5.5 --- README.md | 24 +++++++++++++++--------- docs/verse-service-contract.md | 9 ++++++--- 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index aa0b66e..d9b3cbd 100644 --- a/README.md +++ b/README.md @@ -4,16 +4,16 @@ Vili is the GameCult Persona animation daemon. It owns the bridge from Persona performance intent to body-motion generation. Its backend is Kimodo, run by Vili's own daemon as a CPU-only Python process tree on -Linux. Admission to Idunn on Yggdrasil is the next cut; until then nothing -supervises Vili. +Linux. On Yggdrasil it is the Idunn target `vili`, at `http://10.77.0.1:8824` over +WireGuard. ## Front Door - **Value:** a supervised path from a text prompt to generated body motion. The daemon spawns one resident Kimodo worker, caps its threads, and returns motion artifacts (`motion.npz`, optional BVH) for a job. - **Problem:** Personas and games need generated motion, but cold per-request model loads cost minutes. One daemon owns job identity, worker lifecycle, the thread budget and artifact references, so callers touch no model state. -- **Entry points:** `scripts/vili-daemon.mjs` (the daemon; `npm start`, `npm run health`, `npm test`), `scripts/kimodo-resident-worker.py` (the worker it spawns), `scripts/kimodo-text-encode.py` (the one-shot encoder child), `POST /motion/generate` (see Motion Generation), `docs/verse-service-contract.md` and `docs/motion-pipeline-target.md`. -- **Live:** the process tree below, run by hand: `POST /motion/generate`, `GET /health`, `GET /operator-state`, and the CultCache service store. It produces `motion.npz` and optional BVH on the SOMA skeleton; there is no FBX export. -- **Planned:** admission to Idunn on Yggdrasil with a locked virtual environment, then FBX export and a text-prompt-to-Unity-clip path with no hand steps (`docs/motion-pipeline-target.md`). +- **Entry points:** `scripts/vili-daemon.mjs` (the daemon; `npm start`, `npm test`), `scripts/idunn-entry.mjs` (the process Idunn runs), `deployment/idunn/recipe.toml` (the sealed release), `gamecult-ops` `runbooks/vili-idunn.md` (provisioning and deploy), `scripts/kimodo-resident-worker.py` (the worker it spawns), `scripts/kimodo-text-encode.py` (the one-shot encoder child), `POST /motion/generate` (see Motion Generation), `docs/verse-service-contract.md` and `docs/motion-pipeline-target.md`. +- **Live:** the process tree below, run by hand for development and tests, and as the Idunn target `vili` on Yggdrasil once its first `idunn up` lands: `POST /motion/generate`, `GET /health`, `GET /operator-state`, and the CultCache service store. It produces `motion.npz` and optional BVH on the SOMA skeleton; there is no FBX export. +- **Planned:** FBX export and a text-prompt-to-Unity-clip path with no hand steps (`docs/motion-pipeline-target.md`). ## Authority @@ -37,8 +37,8 @@ vili-daemon.mjs job intake, worker lifecycle, thread cap, nice 10 kimodo-text-encode.py one child per request with cache misses, on CPU ``` -Setup: `git submodule update --init`; in `vendor/CultLib`, `npm ci --ignore-scripts` and -`npm run build --workspace=packages/cultcache-ts`; then `npm ci` here. The worker +Setup: `git submodule update --init` (CultLib, Kimodo, SOMA-X); in `vendor/CultLib`, `npm ci --ignore-scripts` and +`npm run build --workspace=packages/cultcache-ts` and `--workspace=packages/cultnet-ts`; then `npm ci --install-links` here. The worker needs a Python environment with Kimodo's pins and Kimodo itself importable, and a Hugging Face cache (`/hub`) holding the Llama 3 base, both LLM2Vec adapters and the Kimodo checkpoint. Everything runs offline. @@ -59,7 +59,13 @@ The daemon starts the worker on the first job, on a port the worker binds itself and reports in its ready line, and respawns it after an exit. The worker runs at nice 10 with `torch` limited to `--threads` (also `OMP_NUM_THREADS` and `MKL_NUM_THREADS`), so a shared host keeps its other services. Its log is -`/logs/worker.log`. The daemon owns the whole worker process group: it is killed when the worker exits for any reason, on SIGTERM or SIGINT, and at start-up if a crashed daemon left one (`/worker.pid`). A service unit should also own the tree (systemd `KillMode=control-group`). +`/logs/worker.log`. The daemon owns the whole worker process group: it is killed when the worker exits for any reason, on SIGTERM or SIGINT, and, for a hand-run daemon, at start-up if a crashed predecessor left one (`/worker.pid`). Under Idunn the unit's cgroup owns the tree. + +A hand-run daemon holds its state root through a Unix socket lock, `/daemon.lock`: a second daemon on a live root prints that it is held and exits 2, killing nothing; a lock whose owner died is stale and is taken over. + +### On Yggdrasil + +Idunn runs `node vili/scripts/idunn-entry.mjs --state-root --kimodo-commit ` from a sealed release of three trees: `node`, `vili` (the daemon, worker, child, `node_modules`, cultcache-py) and `python` (python-build-standalone CPython 3.12 with the hash-locked packages, Kimodo, MotionCorrection and SOMA-X installed into it; no venv). The weights are the read-only cache `/srv/vili/models`; state is `/var/lib/gamecult/vili`. Idunn's process write lease is the one writer authority: until the daemon holds it, `POST /motion/generate` answers `503 write-lease-pending` and nothing is written; if the lease is lost the worker tree is killed and it answers `503 write-lease-lost`. Idunn proves readiness with its own `POST /cultnet/snapshot` challenge, answered with a signed runtime presence (an `Origin` is still refused). `POST /motion/generate` refuses any POST that carries an `Origin` or is not `application/json` with `403 cross-site`; no route answers a preflight. @@ -68,7 +74,7 @@ Vili writes daemon-owned state to `.vili/vili.service.cc`: operator state, the command boundary and the transport profile. Jobs are `.vili/jobs/.json`, artifacts `.vili/artifacts//`. -Routes: `GET /health`, `GET /operator-state`, `POST /motion/generate`. +Routes: `GET /health`, `GET /operator-state`, `POST /motion/generate`; under Idunn also `POST /cultnet/snapshot`, Idunn's route challenge. ## Motion Generation diff --git a/docs/verse-service-contract.md b/docs/verse-service-contract.md index fb5edb9..d6171f2 100644 --- a/docs/verse-service-contract.md +++ b/docs/verse-service-contract.md @@ -17,13 +17,16 @@ for Odin and Idunn. The request fields and the runtime flags are in `README.md` ## Witnesses -- `.vili/vili.service.cc`: the daemon-owned CultCache store for operator state, +- `.vili/vili.service.cc` (`/var/lib/gamecult/vili/vili.service.cc` under Idunn): the daemon-owned CultCache store for operator state, the command boundary and the transport profile. - `.vili/jobs/{jobId}.json`: accepted animation job records. - `.vili/artifacts/{jobId}/`: generated motion outputs when generation succeeds. - `.vili/embeddings/text-embeddings.cc`: the worker's text-embedding cache. -- `.vili/worker.pid`: the process group of the running worker, so a restarted - daemon can find and kill a worker its crashed predecessor left behind. +- `.vili/worker.pid`: the hand-run daemon's only: the process group of the running + worker, so a restarted hand-run daemon can find and kill a worker its crashed + predecessor left behind. Under Idunn it is never written; the unit's cgroup owns the tree. +- `.vili/daemon.lock` (hand-run) and Idunn's process write lease (Yggdrasil): the + writer authority for the state root. No state is written before the lease is held. - `.vili/logs/worker.log`: the worker's stdout and stderr. ## Command Boundary From 39dd5a9977837bc80b55a1b117cd6eba0d2da919 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 24 Oct 2026 00:33:43 +0200 Subject: [PATCH 05/29] Recipe: drop pip check; --no-deps leaves kimodo's UI and SOMA-X's CUDA dependencies uninstalled by design The import smoke is the proof the environment serves the worker. Co-Authored-By: Claude Opus 5.5 --- deployment/idunn/recipe.toml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/deployment/idunn/recipe.toml b/deployment/idunn/recipe.toml index eabb5f9..ddd6607 100644 --- a/deployment/idunn/recipe.toml +++ b/deployment/idunn/recipe.toml @@ -88,13 +88,6 @@ runner = "python-build" required_environment = ["HOME", "PIP_CACHE_DIR", "TMPDIR"] argv = ["release/python/bin/python3.12", "-m", "pip", "install", "--no-deps", "--no-build-isolation", "--no-index", "vendor/SOMA-X", "vendor/kimodo/MotionCorrection", "vendor/kimodo"] -[[steps]] -id = "pip-check" -phase = "test" -runner = "python-build" -required_environment = ["HOME", "PIP_CACHE_DIR", "TMPDIR"] -argv = ["release/python/bin/python3.12", "-m", "pip", "check"] - [[steps]] id = "test-worker" phase = "test" From 3b9c6c7525e4bd7f401133b1e39001a752d90544 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 24 Oct 2026 00:40:33 +0200 Subject: [PATCH 06/29] Recipe: steps name python3.12, a program name; Idunn refuses a program with a path The binding's python-build PATH puts the release tree's bin first. Co-Authored-By: Claude Opus 5.5 --- deployment/idunn/recipe.toml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/deployment/idunn/recipe.toml b/deployment/idunn/recipe.toml index ddd6607..eb83a4a 100644 --- a/deployment/idunn/recipe.toml +++ b/deployment/idunn/recipe.toml @@ -72,21 +72,21 @@ id = "install-build-tools" phase = "prepare" runner = "python-build" required_environment = ["HOME", "PIP_CACHE_DIR", "TMPDIR"] -argv = ["release/python/bin/python3.12", "-m", "pip", "install", "--no-deps", "--require-hashes", "-r", "deployment/idunn/requirements-build.lock"] +argv = ["python3.12", "-m", "pip", "install", "--no-deps", "--require-hashes", "-r", "deployment/idunn/requirements-build.lock"] [[steps]] id = "install-locked-packages" phase = "prepare" runner = "python-build" required_environment = ["HOME", "PIP_CACHE_DIR", "TMPDIR"] -argv = ["release/python/bin/python3.12", "-m", "pip", "install", "--no-deps", "--require-hashes", "--no-build-isolation", "-r", "deployment/idunn/requirements.lock"] +argv = ["python3.12", "-m", "pip", "install", "--no-deps", "--require-hashes", "--no-build-isolation", "-r", "deployment/idunn/requirements.lock"] [[steps]] id = "install-vendored-packages" phase = "prepare" runner = "python-build" required_environment = ["HOME", "PIP_CACHE_DIR", "TMPDIR"] -argv = ["release/python/bin/python3.12", "-m", "pip", "install", "--no-deps", "--no-build-isolation", "--no-index", "vendor/SOMA-X", "vendor/kimodo/MotionCorrection", "vendor/kimodo"] +argv = ["python3.12", "-m", "pip", "install", "--no-deps", "--no-build-isolation", "--no-index", "vendor/SOMA-X", "vendor/kimodo/MotionCorrection", "vendor/kimodo"] [[steps]] id = "test-worker" @@ -94,7 +94,7 @@ phase = "test" runner = "python-build" working_directory = "." required_environment = ["HOME", "TMPDIR", "PYTHONPATH"] -argv = ["release/python/bin/python3.12", "-m", "unittest", "discover", "-s", "scripts", "-p", "test_*.py"] +argv = ["python3.12", "-m", "unittest", "discover", "-s", "scripts", "-p", "test_*.py"] # Every module the worker and the encoder child import at top level, kimodo.scripts.generate included. [[steps]] @@ -103,7 +103,7 @@ phase = "acceptance" runner = "python-build" required_environment = ["HOME", "TMPDIR", "PYTHONPATH"] argv = [ - "release/python/bin/python3.12", "-c", + "python3.12", "-c", "import accelerate, cultcache_py, huggingface_hub.constants, kimodo, kimodo.constraints, kimodo.exports.motion_io, kimodo.meta, kimodo.model.llm2vec.llm2vec, kimodo.model.load_model, kimodo.model.loading, kimodo.model.registry, kimodo.scripts.generate, kimodo.tools, msgpack, peft, torch, transformers", ] @@ -111,7 +111,7 @@ argv = [ id = "compile-python" phase = "build" runner = "python-build" -argv = ["release/python/bin/python3.12", "-m", "compileall", "-q", "-j", "4", "--invalidation-mode", "unchecked-hash", "release/python/lib/python3.12"] +argv = ["python3.12", "-m", "compileall", "-q", "-j", "4", "--invalidation-mode", "unchecked-hash", "release/python/lib/python3.12"] # ---- the sealed release: node, vili, python From 33614b87b1bb5af512755314c4e19a9ae1c5a28b Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 24 Oct 2026 00:44:27 +0200 Subject: [PATCH 07/29] Recipe comment: say what the seal refuses without naming the forbidden tool Co-Authored-By: Claude Opus 5.5 --- deployment/idunn/recipe.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deployment/idunn/recipe.toml b/deployment/idunn/recipe.toml index eb83a4a..a79041e 100644 --- a/deployment/idunn/recipe.toml +++ b/deployment/idunn/recipe.toml @@ -3,8 +3,8 @@ target = "vili" source_stamp_environment = "VILI_BUILD_COMMIT" required_gitlinks = ["vendor/CultLib", "vendor/kimodo", "vendor/SOMA-X"] -# The one external input: a relocatable CPython. The locked site-packages are installed into this tree, never into -# a venv (a venv's bin/python is an absolute link the seal refuses and its pyvenv.cfg names the build workspace). +# The one external input: a relocatable CPython. The locked site-packages are installed into this tree itself: a copied +# environment would carry an absolute interpreter link and a recorded build path, and the seal refuses both. [[external_inputs]] id = "cpython" url = "https://github.com/astral-sh/python-build-standalone/releases/download/20261021/cpython-3.12.15+20261021-x86_64-unknown-linux-gnu-install_only.tar.gz" From 235321ed8697bc0e4108c07bee9bbbb3f1ca22c8 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 24 Oct 2026 00:45:01 +0200 Subject: [PATCH 08/29] Entry: derive the daemon's environment in one exported function, and test its argument contract Co-Authored-By: Claude Opus 5.5 --- scripts/idunn-entry.mjs | 22 +++++++++----- scripts/test-vili-daemon.mjs | 57 +++++++++++++++++++++++++++++++++++- 2 files changed, 71 insertions(+), 8 deletions(-) diff --git a/scripts/idunn-entry.mjs b/scripts/idunn-entry.mjs index 1cbaf8f..257dd5b 100644 --- a/scripts/idunn-entry.mjs +++ b/scripts/idunn-entry.mjs @@ -94,15 +94,23 @@ function parseEntryArgs(argv) { if (!/^[0-9a-f]{40}$/u.test(argv[3])) fail("--kimodo-commit must be 40 lowercase hex characters"); } +// What the daemon reads from its environment, derived from Idunn's bind and the sealed release's own layout: +// the interpreter sits beside the vili tree, and the environment's identity is the hash of the two lock files. +export function daemonEnvironment(bind, entryDir) { + const { host, port } = splitBind(bind); + const locks = ["requirements-build.lock", "requirements.lock"].map((name) => + readFileSync(path.resolve(entryDir, "..", "deployment", "idunn", name))); + return { + VILI_DAEMON_HOST: host, + VILI_DAEMON_PORT: port, + VILI_PYTHON: path.resolve(entryDir, "..", "..", "python", "bin", "python3.12"), + VILI_PYTHON_ENV: `locks-sha256:${createHash("sha256").update(Buffer.concat(locks)).digest("hex")}`, + }; +} + async function main() { parseEntryArgs(process.argv.slice(2)); - const { host, port } = splitBind(process.env.GAMECULT_IDUNN_CANDIDATE_BIND); - const locks = ["requirements-build.lock", "requirements.lock"].map((name) => - readFileSync(path.resolve(here, "..", "deployment", "idunn", name))); - process.env.VILI_DAEMON_HOST = host; - process.env.VILI_DAEMON_PORT = port; - process.env.VILI_PYTHON = path.resolve(here, "..", "..", "python", "bin", "python3.12"); - process.env.VILI_PYTHON_ENV = `locks-sha256:${createHash("sha256").update(Buffer.concat(locks)).digest("hex")}`; + Object.assign(process.env, daemonEnvironment(process.env.GAMECULT_IDUNN_CANDIDATE_BIND, here)); const authority = loadIdunnRuntimeAuthorityFromEnvironment("vili", HEALTH_CONTRACT); const signer = createIdunnRuntimeSigner({ diff --git a/scripts/test-vili-daemon.mjs b/scripts/test-vili-daemon.mjs index 7fca2e9..1e64857 100644 --- a/scripts/test-vili-daemon.mjs +++ b/scripts/test-vili-daemon.mjs @@ -2,7 +2,7 @@ // Runs the real daemon against scripts/fixtures/stub-worker.mjs as its --python/--worker-entry. import assert from "node:assert/strict"; import { spawn } from "node:child_process"; -import { existsSync, mkdtempSync, readFileSync, readdirSync, rmSync, statSync, writeFileSync } from "node:fs"; +import { existsSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, rmSync, statSync, writeFileSync } from "node:fs"; import http from "node:http"; import os from "node:os"; import path from "node:path"; @@ -834,3 +834,58 @@ test("the hand-run daemon has no route challenge", async () => { await daemon.stop(); } }); + +// ---- the Idunn entry's own rules: its argument contract, and what it derives for the daemon + +const entryPath = path.join(here, "idunn-entry.mjs"); +const runEntry = (args, env = {}) => new Promise((resolve) => { + const proc = spawn(process.execPath, [entryPath, ...args], { env: { PATH: process.env.PATH, ...env }, stdio: ["ignore", "pipe", "pipe"] }); + let output = ""; + proc.stdout.on("data", (chunk) => { output += chunk; }); + proc.stderr.on("data", (chunk) => { output += chunk; }); + proc.on("exit", (code) => resolve({ code, output })); +}); + +test("the entry takes exactly --state-root --kimodo-commit <40 hex>, and echoes none of a bad value", async () => { + const commit = "6bb58488037dd65360ff0c5d1692b403a23309f7"; + const good = ["--state-root", "/var/lib/gamecult/vili", "--kimodo-commit", commit]; + const bads = [ + [], + [...good, "--extra", "x"], + ["--kimodo-commit", commit, "--state-root", "/var/lib/gamecult/vili"], + ["--state-root", "canary-relative-path", "--kimodo-commit", commit], + ["--state-root", "/var/lib/gamecult/vili", "--kimodo-commit", "canary-not-a-commit"], + ["--state-root", "/var/lib/gamecult/vili", "--kimodo-commit", commit.toUpperCase()], + ]; + for (const args of bads) { + const answer = await runEntry(args, { GAMECULT_IDUNN_CANDIDATE_BIND: "127.0.0.1:18861" }); + assert.equal(answer.code, 2, JSON.stringify(args)); + assert.ok(!answer.output.includes("canary"), `the refusal repeated a value of ${JSON.stringify(args)}`); + } + const bind = await runEntry(good, { GAMECULT_IDUNN_CANDIDATE_BIND: "canary-not-a-bind" }); + assert.equal(bind.code, 2); + assert.match(bind.output, /CANDIDATE_BIND is not host:port/); + assert.ok(!bind.output.includes("canary")); +}); + +test("the entry derives the daemon's host, port, interpreter and environment identity from the release", async () => { + const { createHash } = await import("node:crypto"); + const { daemonEnvironment } = await import("./idunn-entry.mjs"); + const release = mkdtempSync(path.join(os.tmpdir(), "vili-entry-")); + try { + mkdirSync(path.join(release, "vili", "scripts"), { recursive: true }); + mkdirSync(path.join(release, "vili", "deployment", "idunn"), { recursive: true }); + writeFileSync(path.join(release, "vili", "deployment", "idunn", "requirements-build.lock"), "build lock bytes\n"); + writeFileSync(path.join(release, "vili", "deployment", "idunn", "requirements.lock"), "runtime lock bytes\n"); + const entryDir = path.join(release, "vili", "scripts"); + for (const bind of ["127.0.0.1:18861", "http://127.0.0.1:18861"]) { + const derived = daemonEnvironment(bind, entryDir); + assert.equal(derived.VILI_DAEMON_HOST, "127.0.0.1"); + assert.equal(derived.VILI_DAEMON_PORT, "18861"); + assert.equal(derived.VILI_PYTHON, path.join(release, "python", "bin", "python3.12")); + assert.equal(derived.VILI_PYTHON_ENV, `locks-sha256:${createHash("sha256").update("build lock bytes\nruntime lock bytes\n").digest("hex")}`); + } + } finally { + rmSync(release, { recursive: true, force: true }); + } +}); From 6a80b3b4b82f4ab4af18e1e4807f0a216a3941b4 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 24 Oct 2026 00:46:41 +0200 Subject: [PATCH 09/29] Test: the child refuses a vector of the wrong width Co-Authored-By: Claude Opus 5.5 --- scripts/test_text_encoding.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/scripts/test_text_encoding.py b/scripts/test_text_encoding.py index bda389c..a24cbe4 100644 --- a/scripts/test_text_encoding.py +++ b/scripts/test_text_encoding.py @@ -299,6 +299,23 @@ class ChildHeader(unittest.TestCase): self.assertEqual([len(v) for v in vectors], [te.EMBEDDING_DIM * 4] * 2) self.assertEqual(len(seconds), 2) + def test_a_vector_of_the_wrong_width_is_refused(self): + import importlib.util + import torch + spec = importlib.util.spec_from_file_location("kimodo_text_encode", Path(te.__file__).with_name("kimodo-text-encode.py")) + child = importlib.util.module_from_spec(spec) + spec.loader.exec_module(child) + + class Narrow: + def tokenize(self, batch): + return batch + + def forward(self, features): + return torch.zeros(1, te.EMBEDDING_DIM - 1) + + with self.assertRaises(AssertionError): + child.encode_texts(Narrow(), ["a person waves"]) + # sha256 of the two Kimodo sources the encoder mirrors, at vendor/kimodo 6bb58488 (embedding-identity-complete). # A Kimodo bump that changes either file must re-read the mirrored loader before these move. From 4fd3f60c883691d1f542954d28c9166a55e6fb5d Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 24 Oct 2026 01:33:22 +0200 Subject: [PATCH 10/29] Test: a second daemon that fails to refuse is killed, not left holding the test run open Co-Authored-By: Claude Opus 5.5 --- scripts/test-vili-daemon.mjs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/test-vili-daemon.mjs b/scripts/test-vili-daemon.mjs index 1e64857..bbc8ff3 100644 --- a/scripts/test-vili-daemon.mjs +++ b/scripts/test-vili-daemon.mjs @@ -693,11 +693,12 @@ const snapshotRequest = (messageId = "m1") => Buffer.from(encode({ schemaVersion // A second daemon on a state root a live daemon holds must refuse, and must not touch the first one's worker. test("a second daemon on a live state root exits 2 and kills nothing", async () => { const first = await startDaemon(); + let second = null; try { assert.equal((await generate(first)).status, 200); const [worker] = first.spawns(); assert.ok(isAlive(worker)); - const second = await startDaemon({ root: first.root, hold: false }); + second = await startDaemon({ root: first.root, hold: false }); await until(() => second.proc.exitCode !== null, "the second daemon to refuse", 20); assert.equal(second.proc.exitCode, 2); assert.match(second.stderr(), /held by a running daemon/); @@ -705,6 +706,7 @@ test("a second daemon on a live state root exits 2 and kills nothing", async () assert.equal((await generate(first)).status, 200); assert.equal(aliveWorkers(first).length, 1); } finally { + if (second && second.proc.exitCode === null && second.proc.signalCode === null) second.proc.kill("SIGKILL"); // a daemon that failed to refuse must not outlive the test await first.stop(); } }); From 17e84c65dad4bf70c8a70bd63117526d307e2fd0 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 24 Oct 2026 03:01:17 +0200 Subject: [PATCH 11/29] Tests first: crashed-lock race, in-flight fence, SIGTERM stop, foreign reclaim, port range Red at 4fd3f60 for stale-lock-takeover-race, fence-admits-in-flight-request and bind-port-65536-accepted; green guards for reclaim-root-unpinned and the SIGTERM property. The daemon's stop() no longer leaves a daemon holding the run open. Co-Authored-By: Claude Opus 5.5 --- scripts/test-vili-daemon.mjs | 169 +++++++++++++++++++++++++++++++++-- 1 file changed, 160 insertions(+), 9 deletions(-) diff --git a/scripts/test-vili-daemon.mjs b/scripts/test-vili-daemon.mjs index bbc8ff3..e409d72 100644 --- a/scripts/test-vili-daemon.mjs +++ b/scripts/test-vili-daemon.mjs @@ -4,6 +4,7 @@ import assert from "node:assert/strict"; import { spawn } from "node:child_process"; import { existsSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, rmSync, statSync, writeFileSync } from "node:fs"; import http from "node:http"; +import net from "node:net"; import os from "node:os"; import path from "node:path"; import test from "node:test"; @@ -91,11 +92,16 @@ async function startDaemon({ spawns: () => spawnLog().filter((line) => /^\d+$/.test(line)).map(Number), grandchildren: () => spawnLog().filter((line) => line.startsWith("grandchild ")).map((line) => Number(line.split(" ")[1])), async stop() { - if (proc.exitCode === null && proc.signalCode === null) { - proc.kill("SIGTERM"); - await until(() => proc.exitCode !== null || proc.signalCode !== null, "the daemon to exit", 30); + try { + if (proc.exitCode === null && proc.signalCode === null) { + proc.kill("SIGTERM"); + await until(() => proc.exitCode !== null || proc.signalCode !== null, "the daemon to exit", 30); + } + } finally { + // a daemon that did not stop on SIGTERM must not outlive the test and hold the run open + if (proc.exitCode === null && proc.signalCode === null) proc.kill("SIGKILL"); + rmSync(root, { recursive: true, force: true }); } - rmSync(root, { recursive: true, force: true }); }, }; } @@ -449,6 +455,27 @@ test("a live worker outside the pid file's group is left alone", async () => { } }); +// The marker that proves a group is ours is this state root's own embeddings directory. A live worker of another +// state root, named by a stale pid file, carries another root's marker and is left alone. +test("a pid file naming another state root's live worker kills nothing", async () => { + const other = await startDaemon(); + const root = mkdtempSync(path.join(os.tmpdir(), "vili-test-")); + try { + assert.equal((await generate(other)).status, 200); + const [foreign] = other.spawns(); + writeFileSync(path.join(root, "worker.pid"), `${foreign}\n`); + const daemon = await startDaemon({ root }); + try { + assert.ok(isAlive(foreign), "a worker carrying another root's marker must survive the reclaim"); + assert.equal(existsSync(path.join(root, "worker.pid")), false, "the stale pid file is still forgotten"); + } finally { + await daemon.stop(); + } + } finally { + await other.stop(); + } +}); + test("a pid file naming a process group that is not the worker's kills nothing", async () => { const root = mkdtempSync(path.join(os.tmpdir(), "vili-test-")); const bystander = spawn(process.execPath, ["-e", "setInterval(() => {}, 1000)"], { detached: true, stdio: "ignore" }); @@ -711,6 +738,34 @@ test("a second daemon on a live state root exits 2 and kills nothing", async () } }); +// Two daemons start together over the lock a crashed daemon left. Exactly one owns the root, every time: the +// other exits 2, and one generate leaves one worker on the root. +for (let trial = 1; trial <= 40; trial += 1) { + test(`two daemons racing a crashed daemon's lock leave one owner and one worker (trial ${trial})`, async () => { + const root = mkdtempSync(path.join(os.tmpdir(), "vili-test-")); + const crashed = await startDaemon({ root }); + crashed.proc.kill("SIGKILL"); + await until(() => crashed.proc.exitCode !== null || crashed.proc.signalCode !== null, "the first daemon to die"); + const racers = await Promise.all([startDaemon({ root, hold: false }), startDaemon({ root, hold: false })]); + try { + await until(() => racers.every((racer) => racer.proc.exitCode !== null || /holds the state root/.test(racer.stdout())), "both racers to decide", 20); + await new Promise((resolve) => setTimeout(resolve, 300)); + const owners = racers.filter((racer) => racer.proc.exitCode === null); + assert.equal(owners.length, 1, "exactly one daemon stays up"); + assert.match(owners[0].stdout(), /holds the state root/); + const loser = racers.find((racer) => racer !== owners[0]); + assert.equal(loser.proc.exitCode, 2); + assert.match(loser.stderr(), /held by a running daemon/); + for (const racer of owners) assert.equal((await generate(racer)).status, 200); + assert.equal(aliveWorkers(owners[0]).length, 1, "one worker on the root"); + } finally { + for (const racer of racers) if (racer.proc.exitCode === null && racer.proc.signalCode === null) racer.proc.kill("SIGKILL"); + for (const pid of racers[0].spawns()) { try { process.kill(-pid, "SIGKILL"); } catch { /* gone */ } } + rmSync(root, { recursive: true, force: true }); + } + }); +} + const idunnDaemon = async ({ leased = false, extraEnv = {} } = {}) => { const root = mkdtempSync(path.join(os.tmpdir(), "vili-test-")); const lease = path.join(root, "lease"); @@ -776,15 +831,107 @@ test("losing the lease kills the worker tree, refuses, and writes nothing more", } }); +// A generate whose headers are in and whose body is still arriving when the lease goes. The lease is gone, so +// nothing is created and nothing is spawned when the body completes, whether the daemon has noticed the loss yet +// (its 5 s tick) or not. +for (const noticed of [false, true]) { + test(`a request in flight when the lease is lost writes and spawns nothing (loss ${noticed ? "noticed" : "not yet noticed"})`, async () => { + const daemon = await idunnDaemon({ leased: true }); + try { + await until(() => existsSync(path.join(daemon.stateRoot, "vili.service.cc")), "the service store", 10); + const body = JSON.stringify({ prompt: "x", duration: 2 }); + const socket = net.connect(daemon.port, "127.0.0.1"); + let raw = ""; + socket.on("data", (chunk) => { raw += chunk; }); + const closed = new Promise((resolve) => socket.on("close", resolve)); + socket.write(`POST /motion/generate HTTP/1.1\r\nhost: vili\r\ncontent-type: application/json\r\ncontent-length: ${body.length}\r\nconnection: close\r\n\r\n${body.slice(0, 5)}`); + await new Promise((resolve) => setTimeout(resolve, 200)); + rmSync(daemon.lease); + if (noticed) await until(() => daemon.health().join() === "active,degraded", "the daemon to notice the loss", 15); + socket.write(body.slice(5)); + await Promise.race([closed, new Promise((resolve) => setTimeout(resolve, 15000))]); + socket.destroy(); + assert.match(raw, /^HTTP\/1\.1 503 /); + assert.match(raw, /write-lease-lost/); + assert.deepEqual(daemon.spawns(), [], "no worker is spawned after the loss"); + const artifacts = path.join(daemon.stateRoot, "artifacts"); + assert.deepEqual(existsSync(artifacts) ? readdirSync(artifacts) : [], [], "no artifact directory is created"); + assert.deepEqual(readdirSync(path.join(daemon.stateRoot, "jobs")), []); + } finally { + await daemon.stop(); + } + }); +} + +test("a request arriving right after the lease is lost writes and spawns nothing", async () => { + const daemon = await idunnDaemon({ leased: true }); + try { + await until(() => existsSync(path.join(daemon.stateRoot, "vili.service.cc")), "the service store", 10); + rmSync(daemon.lease); + const answer = await generate(daemon); + assert.equal(answer.status, 503); + assert.equal(answer.body.code, "write-lease-lost"); + assert.deepEqual(daemon.spawns(), []); + const artifacts = path.join(daemon.stateRoot, "artifacts"); + assert.deepEqual(existsSync(artifacts) ? readdirSync(artifacts) : [], []); + assert.deepEqual(readdirSync(path.join(daemon.stateRoot, "jobs")), []); + } finally { + await daemon.stop(); + } +}); + +test("a worker respawned under the lease is killed when the lease is lost", async () => { + const daemon = await idunnDaemon({ leased: true }); + try { + await until(() => existsSync(path.join(daemon.stateRoot, "vili.service.cc")), "the service store", 10); + assert.equal((await generate(daemon)).status, 200); + const [first] = daemon.spawns(); + process.kill(-first, "SIGKILL"); + await until(async () => (await backendOf(daemon)).state === "stopped", "the daemon to see the worker gone"); + assert.equal((await generate(daemon)).status, 200); + const second = daemon.spawns().find((pid) => pid !== first); + assert.ok(second && isAlive(second)); + rmSync(daemon.lease); + await until(() => !isAlive(second), "the respawned worker to die", 20); + } finally { + await daemon.stop(); + } +}); + +// Idunn stops an incumbent (SIGTERM to the unit) before it revokes the lease. What Vili owns in that sequence: the +// worker tree is dead when the process ends, it exits 0, and nothing is written from the signal on. +test("on SIGTERM the daemon stops its worker tree, writes nothing more, and exits 0", async () => { + const daemon = await idunnDaemon({ leased: true }); + try { + await until(() => existsSync(path.join(daemon.stateRoot, "vili.service.cc")), "the service store", 10); + assert.equal((await generate(daemon, { prompt: "x", model: "stubborn" })).status, 200); + const [worker] = daemon.spawns(); + const [grandchild] = await until(() => { const found = daemon.grandchildren(); return found.length ? found : null; }, "the armed grandchild"); + const store = path.join(daemon.stateRoot, "vili.service.cc"); + const before = statSync(store).mtimeMs; + const jobs = readdirSync(path.join(daemon.stateRoot, "jobs")); + daemon.proc.kill("SIGTERM"); + await until(() => daemon.proc.exitCode !== null || daemon.proc.signalCode !== null, "the daemon to exit", 30); + assert.equal(daemon.proc.exitCode, 0); + assert.ok(!isAlive(worker) && !isAlive(grandchild), "the worker tree is dead when the daemon is gone"); + assert.equal(statSync(store).mtimeMs, before, "the 5 s surface tick must not write during the stop"); + assert.deepEqual(readdirSync(path.join(daemon.stateRoot, "jobs")), jobs); + assert.ok(existsSync(daemon.lease), "the daemon never touches the lease Idunn revokes"); + } finally { + await daemon.stop(); + } +}); + test("a job that finishes after the lease is lost is not recorded", async () => { const daemon = await idunnDaemon({ leased: true }); try { await until(() => existsSync(path.join(daemon.stateRoot, "vili.service.cc")), "the service store", 10); const slow = generate(daemon, { prompt: "x", model: "slow-generate" }); + slow.catch(() => {}); // a failing assertion below must not leave this request pending await until(() => daemon.spawns().length, "the worker"); await until(() => request(daemon.port, "GET", "/health").then((r) => r.body?.state?.backend?.state === "ready"), "the worker to be ready"); rmSync(daemon.lease); - const answer = await slow; + const answer = await Promise.race([slow, new Promise((resolve) => setTimeout(() => resolve({ status: "no answer in 30 s" }), 30000))]); assert.equal(answer.status, 503); assert.equal(answer.body.code, "write-lease-lost"); assert.deepEqual(readdirSync(path.join(daemon.stateRoot, "jobs")), []); @@ -864,10 +1011,13 @@ test("the entry takes exactly --state-root --kimodo-commit <40 hex>, assert.equal(answer.code, 2, JSON.stringify(args)); assert.ok(!answer.output.includes("canary"), `the refusal repeated a value of ${JSON.stringify(args)}`); } - const bind = await runEntry(good, { GAMECULT_IDUNN_CANDIDATE_BIND: "canary-not-a-bind" }); - assert.equal(bind.code, 2); - assert.match(bind.output, /CANDIDATE_BIND is not host:port/); - assert.ok(!bind.output.includes("canary")); + for (const badBind of ["canary-not-a-bind", "127.0.0.1:65536", "127.0.0.1:99999", "127.0.0.1:123456", "127.0.0.1:"]) { + const bind = await runEntry(good, { GAMECULT_IDUNN_CANDIDATE_BIND: badBind }); + assert.equal(bind.code, 2, badBind); + assert.match(bind.output, /CANDIDATE_BIND is not host:port/); + assert.ok(!bind.output.includes("canary")); + assert.ok(!bind.output.includes("65536") && !bind.output.includes("99999")); + } }); test("the entry derives the daemon's host, port, interpreter and environment identity from the release", async () => { @@ -880,6 +1030,7 @@ test("the entry derives the daemon's host, port, interpreter and environment ide writeFileSync(path.join(release, "vili", "deployment", "idunn", "requirements-build.lock"), "build lock bytes\n"); writeFileSync(path.join(release, "vili", "deployment", "idunn", "requirements.lock"), "runtime lock bytes\n"); const entryDir = path.join(release, "vili", "scripts"); + assert.equal(daemonEnvironment("127.0.0.1:65535", entryDir).VILI_DAEMON_PORT, "65535", "the top of the port range is accepted"); for (const bind of ["127.0.0.1:18861", "http://127.0.0.1:18861"]) { const derived = daemonEnvironment(bind, entryDir); assert.equal(derived.VILI_DAEMON_HOST, "127.0.0.1"); From a1579efbbcb3df107983a2d56ba803b6633479a1 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 24 Oct 2026 03:04:31 +0200 Subject: [PATCH 12/29] One owner by one bind, one gate at every write: the abstract-socket lock and guard() 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 --- scripts/idunn-entry.mjs | 29 ++++++++++------ scripts/vili-daemon.mjs | 77 ++++++++++++++++++++++++----------------- 2 files changed, 65 insertions(+), 41 deletions(-) diff --git a/scripts/idunn-entry.mjs b/scripts/idunn-entry.mjs index 257dd5b..01018ce 100644 --- a/scripts/idunn-entry.mjs +++ b/scripts/idunn-entry.mjs @@ -25,6 +25,21 @@ const here = path.dirname(fileURLToPath(import.meta.url)); export function idunnRuntime(signer, { pollMs = LEASE_POLL_MS } = {}) { let held = false; let lost = false; + let onLost = () => {}; + + // The lease is read at the moment of every question, not once per tick: a loss is seen by the first gate to ask. + const check = () => { + if (!held) return false; + try { + signer.assertWriteLease(); + return true; + } catch { + held = false; + lost = true; + onLost(); + return false; + } + }; return { async acquire() { @@ -39,17 +54,11 @@ export function idunnRuntime(signer, { pollMs = LEASE_POLL_MS } = {}) { await delay(pollMs); } }, - held: () => held, + held: check, refusal: () => (lost ? "write-lease-lost" : "write-lease-pending"), - watch(onLost) { - if (!held) return; - try { - signer.assertWriteLease(); - } catch { - held = false; - lost = true; - onLost(); - } + watch(handler) { + onLost = handler; + check(); }, recordWorker() {}, forgetWorker() {}, diff --git a/scripts/vili-daemon.mjs b/scripts/vili-daemon.mjs index 408dcf7..2bd7576 100644 --- a/scripts/vili-daemon.mjs +++ b/scripts/vili-daemon.mjs @@ -1,7 +1,8 @@ #!/usr/bin/env node import http from "node:http"; import os from "node:os"; -import { closeSync, openSync, readdirSync, readFileSync, unlinkSync, writeFileSync, writeSync } from "node:fs"; +import { createHash } from "node:crypto"; +import { closeSync, openSync, readdirSync, readFileSync, realpathSync, unlinkSync, writeFileSync, writeSync } from "node:fs"; import { mkdir, writeFile } from "node:fs/promises"; import path from "node:path"; import readline from "node:readline"; @@ -244,13 +245,17 @@ function transportProfile() { } async function persistSurfaces() { + guard(); await mkdir(args.stateRoot, { recursive: true }); const cache = CultCache.builder() .withRegistry(viliDocumentRegistry) .withGenericStore(new SingleFileMessagePackBackingStore(path.join(args.stateRoot, viliStoreFileName))) .build(); + guard(); await cache.put(operatorStateDefinition, "vili", operatorState()); + guard(); await cache.put(commandBoundaryDefinition, "vili", commandBoundary()); + guard(); await cache.put(transportProfileDefinition, "vili", transportProfile()); } @@ -307,26 +312,23 @@ function killGroup(pgid, signal) { // The hand-run way of owning a state root (tests, development): a Unix socket lock, the worker's pid file and the // /proc reclaim. Idunn's runtime (scripts/idunn-entry.mjs) replaces all three with its process write lease. export function handRunRuntime(stateRoot) { - const lockPath = path.join(stateRoot, "daemon.lock"); const pidFile = path.join(stateRoot, "worker.pid"); let lock = null; + // The lock is a listening socket in Linux's abstract namespace, named by the state root's real path. A bind is + // atomic and exclusive and the kernel drops it with its owner, so there is no lock file, no stale lock to probe + // or take over, and no takeover to race: a bind either succeeds (this daemon owns the root) or it does not. const listen = () => new Promise((resolve, reject) => { + const name = createHash("sha256").update(realpathSync(stateRoot)).digest("hex"); const server = net.createServer((socket) => socket.destroy()); server.once("error", reject); - server.listen(lockPath, () => { + server.listen(`\0vili-state-root:${name}`, () => { server.removeListener("error", reject); lock = server; resolve(); }); }); - const probe = () => new Promise((resolve) => { - const socket = net.connect(lockPath); - socket.once("connect", () => { socket.destroy(); resolve("live"); }); - socket.once("error", () => resolve("stale")); - }); - // A worker left by a crashed daemon: the pid file names its group, and the group is ours only if some member // still carries this state root's embeddings directory in its environment (the pid may have been reused). function reclaimStrayWorker() { @@ -368,12 +370,8 @@ export function handRunRuntime(stateRoot) { await listen(); } catch (error) { if (error?.code !== "EADDRINUSE") throw error; - if ((await probe()) === "live") { - console.error("the state root is held by a running daemon"); - process.exit(2); - } - unlinkSync(lockPath); - await listen(); + console.error("the state root is held by a running daemon"); + process.exit(2); } reclaimStrayWorker(); // synchronous: no request is served before a predecessor's worker is gone }, @@ -393,11 +391,6 @@ export function handRunRuntime(stateRoot) { release() { if (lock) lock.close(); lock = null; - try { - unlinkSync(lockPath); - } catch { - // already gone - } }, }; } @@ -413,8 +406,11 @@ async function stopWorker() { } async function startWorker(model, timeoutMs) { + guard(); await mkdir(path.join(args.stateRoot, "logs"), { recursive: true }); + guard(); await mkdir(path.join(args.stateRoot, "embeddings"), { recursive: true }); + guard(); // synchronous with the log open and the spawn below: no await between them const logFd = openSync(path.join(args.stateRoot, "logs", "worker.log"), "a"); const argv = [args.workerEntry, "--host", "127.0.0.1", "--port", "0"]; if (model) argv.push("--model", model); @@ -471,7 +467,7 @@ async function startWorker(model, timeoutMs) { } catch { // not JSON: an ordinary log line } - writeSync(sink, `${line}\n`); + if (runtime.held()) writeSync(sink, `${line}\n`); }); lines.on("close", () => closeSync(sink)); }), @@ -516,10 +512,16 @@ async function readRequestBody(request) { } async function generateMotion(request, response) { - if (!runtime.held()) { + try { + await generate(request, response); + } catch (error) { + if (!(error instanceof LeaseLost)) throw error; json(response, 503, { ok: false, code: runtime.refusal() }); - return; } +} + +async function generate(request, response) { + guard(); if (workerUnconfigured()) { json(response, 503, { ok: false, code: "worker-unconfigured" }); return; @@ -549,6 +551,7 @@ async function generateMotion(request, response) { const jobId = `vili-${Date.now()}`; const artifactDir = path.join(args.stateRoot, "artifacts", jobId); + guard(); await mkdir(artifactDir, { recursive: true }); const duration = firstDefined(body.durationSeconds, body.duration, 4); const bodyMeta = typeof body.meta === "object" && body.meta ? body.meta : {}; @@ -585,6 +588,7 @@ async function generateMotion(request, response) { return undefined; })(); if (body.constraints !== undefined && typeof body.constraints !== "string") { + guard(); await writeFile(path.join(artifactDir, "constraints.json"), JSON.stringify(body.constraints, null, 2)); } const requestRecord = { @@ -608,6 +612,7 @@ async function generateMotion(request, response) { saveExampleDir: boolValue(firstDefined(body.saveExampleDir, body.save_example_dir)), inputFolder: firstDefined(body.inputFolder, body.input_folder), }; + guard(); await writeFile(path.join(artifactDir, "meta.json"), JSON.stringify(meta, null, 2)); let result; @@ -637,6 +642,7 @@ async function generateMotion(request, response) { saveExampleDir: boolValue(firstDefined(body.saveExampleDir, body.save_example_dir)), output: path.join(artifactDir, "motion"), }; + guard(); await writeFile(path.join(artifactDir, "request.json"), JSON.stringify(workerRequest, null, 2)); const answer = await fetch(`http://127.0.0.1:${worker.port}/generate`, { method: "POST", @@ -647,14 +653,11 @@ async function generateMotion(request, response) { const workerBody = await answer.json(); result = { ok: answer.ok && workerBody?.ok !== false, error: answer.ok ? null : `the worker answered ${answer.status}`, body: workerBody }; } catch (error) { + if (error instanceof LeaseLost) throw error; result = { ok: false, error: `the worker request failed (${error?.name || "Error"})`, body: null }; } - if (!runtime.held()) { - // the writer was lost while the job ran: nothing more is written - json(response, 503, { ok: false, code: runtime.refusal() }); - return; - } + guard(); // the writer may have been lost while the job ran const job = { schema: "gamecult.vili.motion_job.v0", jobId, @@ -731,6 +734,14 @@ async function handleRequest(request, response) { let runtime; +class LeaseLost extends Error {} + +// The one write gate. Every write to the state root and every spawn calls it, immediately before it happens (not once +// per request), so a request admitted before the lease went still stops at its next write. +function guard() { + if (!runtime.held()) throw new LeaseLost("the writer was lost"); +} + // The one daemon. `rt` owns the state root: the hand-run runtime (socket lock) or Idunn's (process write lease). // The server listens first, so Idunn's challenge can be answered while the lease is still pending; nothing is // written to the state root until the runtime holds it. @@ -759,8 +770,6 @@ export async function serve(rt) { process.on("SIGINT", shutdown); await runtime.acquire(); - await mkdir(path.join(args.stateRoot, "jobs"), { recursive: true }); - await persistSurfaces(); let lost = false; const onLost = () => { if (lost) return; @@ -768,10 +777,16 @@ export async function serve(rt) { clearInterval(surfaceTimer); stopWorker().finally(() => runtime.reportHealth?.("degraded")); }; + runtime.watch(onLost); // held() reports a loss through this the moment any gate sees it + guard(); + await mkdir(path.join(args.stateRoot, "jobs"), { recursive: true }); + await persistSurfaces(); surfaceTimer = setInterval(() => { runtime.watch(onLost); if (lost) return; - persistSurfaces().catch((error) => console.error(`persist failed: ${error?.name || "Error"}`)); + persistSurfaces().catch((error) => { + if (!(error instanceof LeaseLost)) console.error(`persist failed: ${error?.name || "Error"}`); + }); }, 5000); runtime.reportHealth?.("active"); console.log("Vili holds the state root"); From d35f8e408b7eca0ea11b36a9fa8abda7c3f07529 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 24 Oct 2026 03:04:31 +0200 Subject: [PATCH 13/29] README front door: the Idunn endpoint is planned, not live, and no runbook is named The lock is no longer a file; the contract says so. Co-Authored-By: Claude Opus 5.5 --- README.md | 11 +++++------ docs/verse-service-contract.md | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index d9b3cbd..b6b8076 100644 --- a/README.md +++ b/README.md @@ -4,16 +4,15 @@ Vili is the GameCult Persona animation daemon. It owns the bridge from Persona performance intent to body-motion generation. Its backend is Kimodo, run by Vili's own daemon as a CPU-only Python process tree on -Linux. On Yggdrasil it is the Idunn target `vili`, at `http://10.77.0.1:8824` over -WireGuard. +Linux. It is built to run on Yggdrasil as an Idunn target (planned, not live; see Front Door). ## Front Door - **Value:** a supervised path from a text prompt to generated body motion. The daemon spawns one resident Kimodo worker, caps its threads, and returns motion artifacts (`motion.npz`, optional BVH) for a job. - **Problem:** Personas and games need generated motion, but cold per-request model loads cost minutes. One daemon owns job identity, worker lifecycle, the thread budget and artifact references, so callers touch no model state. -- **Entry points:** `scripts/vili-daemon.mjs` (the daemon; `npm start`, `npm test`), `scripts/idunn-entry.mjs` (the process Idunn runs), `deployment/idunn/recipe.toml` (the sealed release), `gamecult-ops` `runbooks/vili-idunn.md` (provisioning and deploy), `scripts/kimodo-resident-worker.py` (the worker it spawns), `scripts/kimodo-text-encode.py` (the one-shot encoder child), `POST /motion/generate` (see Motion Generation), `docs/verse-service-contract.md` and `docs/motion-pipeline-target.md`. -- **Live:** the process tree below, run by hand for development and tests, and as the Idunn target `vili` on Yggdrasil once its first `idunn up` lands: `POST /motion/generate`, `GET /health`, `GET /operator-state`, and the CultCache service store. It produces `motion.npz` and optional BVH on the SOMA skeleton; there is no FBX export. -- **Planned:** FBX export and a text-prompt-to-Unity-clip path with no hand steps (`docs/motion-pipeline-target.md`). +- **Entry points:** `scripts/vili-daemon.mjs` (the daemon; `npm start`, `npm test`), `scripts/idunn-entry.mjs` (the process Idunn runs), `deployment/idunn/recipe.toml` (the sealed release), `scripts/kimodo-resident-worker.py` (the worker it spawns), `scripts/kimodo-text-encode.py` (the one-shot encoder child), `POST /motion/generate` (see Motion Generation), `docs/verse-service-contract.md` and `docs/motion-pipeline-target.md`. +- **Live:** the process tree below, run by hand for development and tests: `POST /motion/generate`, `GET /health`, `GET /operator-state`, and the CultCache service store. It produces `motion.npz` and optional BVH on the SOMA skeleton; there is no FBX export. +- **Planned:** the Idunn target `vili` on Yggdrasil at `http://10.77.0.1:8824` over WireGuard, with its provisioning runbook in `gamecult-ops`; neither exists until the first `idunn up` lands. FBX export and a text-prompt-to-Unity-clip path with no hand steps (`docs/motion-pipeline-target.md`). ## Authority @@ -61,7 +60,7 @@ nice 10 with `torch` limited to `--threads` (also `OMP_NUM_THREADS` and `MKL_NUM_THREADS`), so a shared host keeps its other services. Its log is `/logs/worker.log`. The daemon owns the whole worker process group: it is killed when the worker exits for any reason, on SIGTERM or SIGINT, and, for a hand-run daemon, at start-up if a crashed predecessor left one (`/worker.pid`). Under Idunn the unit's cgroup owns the tree. -A hand-run daemon holds its state root through a Unix socket lock, `/daemon.lock`: a second daemon on a live root prints that it is held and exits 2, killing nothing; a lock whose owner died is stale and is taken over. +A hand-run daemon holds its state root through a listening socket in Linux's abstract namespace, named by the root's real path: the bind is the atomic claim, so a second daemon on a live root prints that it is held and exits 2, killing nothing, and a dead daemon's claim is gone with it (there is no lock file). Two daemons in separate network namespaces do not exclude each other. ### On Yggdrasil diff --git a/docs/verse-service-contract.md b/docs/verse-service-contract.md index d6171f2..e71effa 100644 --- a/docs/verse-service-contract.md +++ b/docs/verse-service-contract.md @@ -25,7 +25,7 @@ for Odin and Idunn. The request fields and the runtime flags are in `README.md` - `.vili/worker.pid`: the hand-run daemon's only: the process group of the running worker, so a restarted hand-run daemon can find and kill a worker its crashed predecessor left behind. Under Idunn it is never written; the unit's cgroup owns the tree. -- `.vili/daemon.lock` (hand-run) and Idunn's process write lease (Yggdrasil): the +- The hand-run daemon's abstract-socket lock (named by the state root's real path, no file) and Idunn's process write lease (Yggdrasil): the writer authority for the state root. No state is written before the lease is held. - `.vili/logs/worker.log`: the worker's stdout and stderr. From f69e24eeff776c19cfadfd8f9e72d11b3eb61e49 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 24 Oct 2026 03:06:18 +0200 Subject: [PATCH 14/29] Test: the spawn is gated at the spawn, not by the request's earlier checks The fake Idunn signer can lose the lease once a job's meta.json exists, which pins the guards in startWorker (no logs or embeddings directory, no worker). Co-Authored-By: Claude Opus 5.5 --- scripts/fixtures/fake-idunn-entry.mjs | 9 ++++++++- scripts/test-vili-daemon.mjs | 25 +++++++++++++++++++++++-- 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/scripts/fixtures/fake-idunn-entry.mjs b/scripts/fixtures/fake-idunn-entry.mjs index 7208cbc..2f26650 100644 --- a/scripts/fixtures/fake-idunn-entry.mjs +++ b/scripts/fixtures/fake-idunn-entry.mjs @@ -1,17 +1,24 @@ // Test seam only: the shipped Idunn runtime (scripts/idunn-entry.mjs idunnRuntime) over a signer whose write lease is // a file, so the lease gate is tested without Idunn's authority files. Present = leased. The daemon's own flags // arrive on argv as they do for the hand-run daemon. -import { existsSync, appendFileSync } from "node:fs"; +import { existsSync, appendFileSync, readdirSync } from "node:fs"; +import path from "node:path"; import { idunnRuntime } from "../idunn-entry.mjs"; import { serve } from "../vili-daemon.mjs"; const leasePath = process.env.FAKE_IDUNN_LEASE; const healthLog = process.env.FAKE_IDUNN_HEALTH_LOG; const answer = process.env.FAKE_IDUNN_ANSWER_THROWS !== "1"; +// An artifacts directory: the lease is gone from the moment a job there has written its meta.json, so a test can +// lose it between a job's first write and the spawn of its worker. +const loseAfterMeta = process.env.FAKE_IDUNN_LOSE_AFTER_META; const signer = { assertWriteLease() { if (!existsSync(leasePath)) throw new Error("no lease"); + if (loseAfterMeta && existsSync(loseAfterMeta) && readdirSync(loseAfterMeta).some((job) => existsSync(path.join(loseAfterMeta, job, "meta.json")))) { + throw new Error("lease lost"); + } return "lease"; }, answerRouteObservation(request) { diff --git a/scripts/test-vili-daemon.mjs b/scripts/test-vili-daemon.mjs index e409d72..0f3b836 100644 --- a/scripts/test-vili-daemon.mjs +++ b/scripts/test-vili-daemon.mjs @@ -766,13 +766,16 @@ for (let trial = 1; trial <= 40; trial += 1) { }); } -const idunnDaemon = async ({ leased = false, extraEnv = {} } = {}) => { +const idunnDaemon = async ({ leased = false, extraEnv = {}, loseAfterMeta = false } = {}) => { const root = mkdtempSync(path.join(os.tmpdir(), "vili-test-")); const lease = path.join(root, "lease"); const healthLog = path.join(root, "health.log"); if (leased) writeFileSync(lease, ""); const daemon = await startDaemon({ - root, nested: true, entry: fakeIdunnEntry, extraEnv: { FAKE_IDUNN_LEASE: lease, FAKE_IDUNN_HEALTH_LOG: healthLog, ...extraEnv }, + root, nested: true, entry: fakeIdunnEntry, extraEnv: { + FAKE_IDUNN_LEASE: lease, FAKE_IDUNN_HEALTH_LOG: healthLog, ...extraEnv, + ...(loseAfterMeta ? { FAKE_IDUNN_LOSE_AFTER_META: path.join(root, "a", "b", "state", "artifacts") } : {}), + }, }); return Object.assign(daemon, { lease, health: () => (existsSync(healthLog) ? readFileSync(healthLog, "utf8").split("\n").filter(Boolean) : []) }); }; @@ -863,6 +866,24 @@ for (const noticed of [false, true]) { }); } +// The lease goes after the job wrote its meta.json and before its worker would start: the spawn is gated at the +// spawn, not by the request's earlier checks. +test("a worker is not started, and its directories are not made, once the lease is gone", async () => { + const daemon = await idunnDaemon({ leased: true, loseAfterMeta: true }); + try { + await until(() => existsSync(path.join(daemon.stateRoot, "vili.service.cc")), "the service store", 10); + const answer = await generate(daemon); + assert.equal(answer.status, 503); + assert.equal(answer.body.code, "write-lease-lost"); + assert.deepEqual(daemon.spawns(), []); + assert.equal(existsSync(path.join(daemon.stateRoot, "logs")), false); + assert.equal(existsSync(path.join(daemon.stateRoot, "embeddings")), false); + assert.deepEqual(readdirSync(path.join(daemon.stateRoot, "jobs")), []); + } finally { + await daemon.stop(); + } +}); + test("a request arriving right after the lease is lost writes and spawns nothing", async () => { const daemon = await idunnDaemon({ leased: true }); try { From 302e97b72db973af74f65286fbf5c99968b44930 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 24 Oct 2026 03:11:21 +0200 Subject: [PATCH 15/29] A lease lost while the state root is opening is a fence, not a crash The startup persist now sits behind the same gate as every other write; its LeaseLost ended serve() as an unhandled rejection. onLost has already run, so serve returns without reporting active. Co-Authored-By: Claude Opus 5.5 --- scripts/vili-daemon.mjs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/scripts/vili-daemon.mjs b/scripts/vili-daemon.mjs index 2bd7576..7e2ba16 100644 --- a/scripts/vili-daemon.mjs +++ b/scripts/vili-daemon.mjs @@ -778,9 +778,14 @@ export async function serve(rt) { stopWorker().finally(() => runtime.reportHealth?.("degraded")); }; runtime.watch(onLost); // held() reports a loss through this the moment any gate sees it - guard(); - await mkdir(path.join(args.stateRoot, "jobs"), { recursive: true }); - await persistSurfaces(); + try { + guard(); + await mkdir(path.join(args.stateRoot, "jobs"), { recursive: true }); + await persistSurfaces(); + } catch (error) { + if (error instanceof LeaseLost) return; // lost while opening the state root: onLost has run, and nothing is active + throw error; + } surfaceTimer = setInterval(() => { runtime.watch(onLost); if (lost) return; @@ -788,6 +793,7 @@ export async function serve(rt) { if (!(error instanceof LeaseLost)) console.error(`persist failed: ${error?.name || "Error"}`); }); }, 5000); + if (lost) return; runtime.reportHealth?.("active"); console.log("Vili holds the state root"); } From f3646e0dfda169b98886c7aeaca80a8a37f86fc7 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 24 Oct 2026 03:33:28 +0200 Subject: [PATCH 16/29] Tests: the lease lost between any two writes of one request, and during the first persist The fake Idunn signer takes the lease the moment a named path exists under the state root. Each gate in generate and startWorker now has a case that only that gate stops, and a lease lost while the state root opens leaves the daemon up. Co-Authored-By: Claude Opus 5.5 --- scripts/fixtures/fake-idunn-entry.mjs | 18 ++++++--- scripts/test-vili-daemon.mjs | 54 +++++++++++++++++++++------ 2 files changed, 55 insertions(+), 17 deletions(-) diff --git a/scripts/fixtures/fake-idunn-entry.mjs b/scripts/fixtures/fake-idunn-entry.mjs index 2f26650..8e0a8e4 100644 --- a/scripts/fixtures/fake-idunn-entry.mjs +++ b/scripts/fixtures/fake-idunn-entry.mjs @@ -9,16 +9,22 @@ import { serve } from "../vili-daemon.mjs"; const leasePath = process.env.FAKE_IDUNN_LEASE; const healthLog = process.env.FAKE_IDUNN_HEALTH_LOG; const answer = process.env.FAKE_IDUNN_ANSWER_THROWS !== "1"; -// An artifacts directory: the lease is gone from the moment a job there has written its meta.json, so a test can -// lose it between a job's first write and the spawn of its worker. -const loseAfterMeta = process.env.FAKE_IDUNN_LOSE_AFTER_META; +// The lease is gone from the moment a path exists under the state root (one "*" segment matches any entry), so a +// test can lose it between two writes of one request. +const stateRoot = process.env.FAKE_IDUNN_STATE_ROOT; +const loseWhenExists = process.env.FAKE_IDUNN_LOSE_WHEN_EXISTS; + +function exists(parts, base) { + if (!parts.length) return true; + const [head, ...rest] = parts; + if (head !== "*") return existsSync(path.join(base, head)) && exists(rest, path.join(base, head)); + return existsSync(base) && readdirSync(base).some((entry) => exists(rest, path.join(base, entry))); +} const signer = { assertWriteLease() { if (!existsSync(leasePath)) throw new Error("no lease"); - if (loseAfterMeta && existsSync(loseAfterMeta) && readdirSync(loseAfterMeta).some((job) => existsSync(path.join(loseAfterMeta, job, "meta.json")))) { - throw new Error("lease lost"); - } + if (loseWhenExists && exists(loseWhenExists.split("/"), stateRoot)) throw new Error("lease lost"); return "lease"; }, answerRouteObservation(request) { diff --git a/scripts/test-vili-daemon.mjs b/scripts/test-vili-daemon.mjs index 0f3b836..c096165 100644 --- a/scripts/test-vili-daemon.mjs +++ b/scripts/test-vili-daemon.mjs @@ -766,7 +766,7 @@ for (let trial = 1; trial <= 40; trial += 1) { }); } -const idunnDaemon = async ({ leased = false, extraEnv = {}, loseAfterMeta = false } = {}) => { +const idunnDaemon = async ({ leased = false, extraEnv = {}, loseWhenExists = null } = {}) => { const root = mkdtempSync(path.join(os.tmpdir(), "vili-test-")); const lease = path.join(root, "lease"); const healthLog = path.join(root, "health.log"); @@ -774,7 +774,7 @@ const idunnDaemon = async ({ leased = false, extraEnv = {}, loseAfterMeta = fals const daemon = await startDaemon({ root, nested: true, entry: fakeIdunnEntry, extraEnv: { FAKE_IDUNN_LEASE: lease, FAKE_IDUNN_HEALTH_LOG: healthLog, ...extraEnv, - ...(loseAfterMeta ? { FAKE_IDUNN_LOSE_AFTER_META: path.join(root, "a", "b", "state", "artifacts") } : {}), + ...(loseWhenExists ? { FAKE_IDUNN_STATE_ROOT: path.join(root, "a", "b", "state"), FAKE_IDUNN_LOSE_WHEN_EXISTS: loseWhenExists } : {}), }, }); return Object.assign(daemon, { lease, health: () => (existsSync(healthLog) ? readFileSync(healthLog, "utf8").split("\n").filter(Boolean) : []) }); @@ -866,19 +866,51 @@ for (const noticed of [false, true]) { }); } -// The lease goes after the job wrote its meta.json and before its worker would start: the spawn is gated at the -// spawn, not by the request's earlier checks. -test("a worker is not started, and its directories are not made, once the lease is gone", async () => { - const daemon = await idunnDaemon({ leased: true, loseAfterMeta: true }); +// The lease goes between two writes of one request. Each case names the path whose appearance takes the lease, and +// what must not exist afterwards: every write and the spawn are gated where they happen, not by the request's +// earlier checks. +const losses = [ + { when: "artifacts/*", absent: ["artifacts/*/meta.json", "logs", "embeddings"] }, + { when: "artifacts/*/meta.json", absent: ["logs", "embeddings"] }, + { when: "logs", absent: ["embeddings"] }, + { when: "embeddings", absent: ["logs/worker.log"] }, + { when: "embeddings/stub-spawns.log", absent: ["artifacts/*/request.json", "jobs/*"] }, +]; +for (const { when, absent } of losses) { + test(`a request is stopped at its next write when the lease goes at ${when}`, async () => { + const daemon = await idunnDaemon({ leased: true, loseWhenExists: when }); + try { + await until(() => existsSync(path.join(daemon.stateRoot, "vili.service.cc")), "the service store", 10); + const answer = await generate(daemon); + assert.equal(answer.status, 503); + assert.equal(answer.body.code, "write-lease-lost"); + for (const gone of absent) { + const parts = gone.split("/"); + const found = (base, rest) => (rest.length === 0 ? existsSync(base) + : rest[0] === "*" ? existsSync(base) && readdirSync(base).some((entry) => found(path.join(base, entry), rest.slice(1))) + : found(path.join(base, rest[0]), rest.slice(1))); + assert.equal(found(daemon.stateRoot, parts), false, `${gone} must not exist`); + } + if (when === "embeddings") assert.deepEqual(daemon.spawns(), []); + } finally { + await daemon.stop(); + } + }); +} + +// The lease goes while the first persist is under way: the daemon survives it, stays degraded, and the rest of the +// startup writes are not made. +test("a lease lost while the state root is opened leaves the daemon up, degraded and writing nothing more", async () => { + const daemon = await idunnDaemon({ leased: true, loseWhenExists: "vili.service.cc" }); try { - await until(() => existsSync(path.join(daemon.stateRoot, "vili.service.cc")), "the service store", 10); + await until(() => daemon.health().includes("degraded") || daemon.proc.exitCode !== null, "the loss to be seen", 15); + assert.equal(daemon.proc.exitCode, null, "the daemon must not die of it"); + assert.deepEqual(daemon.health(), ["degraded"]); + const store = readFileSync(path.join(daemon.stateRoot, "vili.service.cc")); + assert.ok(store.includes("operator_state") && !store.includes("command_boundary"), "the second document is not written"); const answer = await generate(daemon); assert.equal(answer.status, 503); assert.equal(answer.body.code, "write-lease-lost"); - assert.deepEqual(daemon.spawns(), []); - assert.equal(existsSync(path.join(daemon.stateRoot, "logs")), false); - assert.equal(existsSync(path.join(daemon.stateRoot, "embeddings")), false); - assert.deepEqual(readdirSync(path.join(daemon.stateRoot, "jobs")), []); } finally { await daemon.stop(); } From b4a4e770cf9ed8cb9967ff29ee37ebba317acdd2 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 24 Oct 2026 03:57:06 +0200 Subject: [PATCH 17/29] Test: the request.json write is gated, with the lease lost the moment the worker is healthy The stub marks its first healthy answer; the stdout line it prints before ready had been taking the lease through the log-sink gate first. Co-Authored-By: Claude Opus 5.5 --- scripts/fixtures/stub-worker.mjs | 3 ++- scripts/test-vili-daemon.mjs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/fixtures/stub-worker.mjs b/scripts/fixtures/stub-worker.mjs index 99de4c1..1943789 100644 --- a/scripts/fixtures/stub-worker.mjs +++ b/scripts/fixtures/stub-worker.mjs @@ -6,7 +6,7 @@ import http from "node:http"; import os from "node:os"; import path from "node:path"; import { spawn } from "node:child_process"; -import { appendFileSync } from "node:fs"; +import { appendFileSync, writeFileSync } from "node:fs"; const argv = process.argv.slice(2); const flag = (name) => { @@ -56,6 +56,7 @@ if (model === "hang-before-ready") { if (request.method === "GET" && request.url === "/health") { healthCalls += 1; if (model === "sick" || model === "die-after-ready" || (model === "slow-health" && healthCalls <= 2)) return send(200, { ok: false }); + writeFileSync(path.join(process.env.VILI_EMBEDDINGS_DIR, "stub-healthy"), ""); // a test can act the moment the worker is healthy send(200, { ok: true, model: model || "stub-model", displayModel: model || "Stub Model", pid: process.pid, requests }); } else if (request.method === "POST" && request.url === "/generate") { requests += 1; diff --git a/scripts/test-vili-daemon.mjs b/scripts/test-vili-daemon.mjs index c096165..fa539c5 100644 --- a/scripts/test-vili-daemon.mjs +++ b/scripts/test-vili-daemon.mjs @@ -874,7 +874,7 @@ const losses = [ { when: "artifacts/*/meta.json", absent: ["logs", "embeddings"] }, { when: "logs", absent: ["embeddings"] }, { when: "embeddings", absent: ["logs/worker.log"] }, - { when: "embeddings/stub-spawns.log", absent: ["artifacts/*/request.json", "jobs/*"] }, + { when: "embeddings/stub-healthy", absent: ["artifacts/*/request.json", "jobs/*"] }, ]; for (const { when, absent } of losses) { test(`a request is stopped at its next write when the lease goes at ${when}`, async () => { From 658de07927988248613068526f4d850b02312e3c Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 24 Oct 2026 03:57:19 +0200 Subject: [PATCH 18/29] Test: the daemon's copy of a worker's stdout is gated like every other write Co-Authored-By: Claude Opus 5.5 --- scripts/test-vili-daemon.mjs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/scripts/test-vili-daemon.mjs b/scripts/test-vili-daemon.mjs index fa539c5..b9195f9 100644 --- a/scripts/test-vili-daemon.mjs +++ b/scripts/test-vili-daemon.mjs @@ -898,6 +898,21 @@ for (const { when, absent } of losses) { }); } +// The daemon's own copy of a worker's stdout into worker.log is a write like any other. +test("a worker's output line is not logged once the lease is gone", async () => { + const daemon = await idunnDaemon({ leased: true, loseWhenExists: "embeddings/stub-spawns.log" }); + try { + await until(() => existsSync(path.join(daemon.stateRoot, "vili.service.cc")), "the service store", 10); + const answer = await generate(daemon); + assert.equal(answer.status, 503); + assert.equal(answer.body.code, "write-lease-lost"); + const log = readFileSync(path.join(daemon.stateRoot, "logs", "worker.log"), "utf8"); + assert.ok(!log.includes("stub-stdout-line"), "the daemon must not copy the worker's stdout after the loss"); + } finally { + await daemon.stop(); + } +}); + // The lease goes while the first persist is under way: the daemon survives it, stays degraded, and the rest of the // startup writes are not made. test("a lease lost while the state root is opened leaves the daemon up, degraded and writing nothing more", async () => { From 1c412908e7ef7ad7fd19adfd3c6d6282131c7261 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 24 Oct 2026 05:15:43 +0200 Subject: [PATCH 19/29] Tests first: loss noticed while a worker is awaited, SIGTERM gates writes and spawns, one root identity, leaderless group, every output line gated Red at 658de07 for the lease-loss bound, SIGTERM and spelling tests; the leaderless-group and later-line tests pin behaviour that already holds, for mutants. Co-Authored-By: Claude Opus 5.5 --- scripts/fixtures/stub-worker.mjs | 11 ++- scripts/test-vili-daemon.mjs | 140 ++++++++++++++++++++++++++++++- 2 files changed, 148 insertions(+), 3 deletions(-) diff --git a/scripts/fixtures/stub-worker.mjs b/scripts/fixtures/stub-worker.mjs index 1943789..0b5e6ae 100644 --- a/scripts/fixtures/stub-worker.mjs +++ b/scripts/fixtures/stub-worker.mjs @@ -1,7 +1,7 @@ // Stands in for kimodo-resident-worker.py in the daemon's tests. It binds port 0, prints the ready line the // daemon waits for, and answers /health and /generate with what the daemon gave it. The --model value picks a // misbehaviour: crash-before-ready, hang-before-ready, sick, slow-health, stubborn, fail-generate, -// refuse-generate, drop-generate, slow-generate, encoder (a grandchild, then no answer), graceful (exits 0.5 s after SIGTERM), die-after-ready. Any other value is just the model the worker serves. +// refuse-generate, drop-generate, slow-generate, writer (appends to .writes every 50 ms and never answers), slow-to-stop (no answer; exits 1.5 s after SIGTERM), chatty (prints a line the moment it is healthy), encoder (a grandchild, then no answer), graceful (exits 0.5 s after SIGTERM), die-after-ready. Any other value is just the model the worker serves. import http from "node:http"; import os from "node:os"; import path from "node:path"; @@ -33,6 +33,8 @@ if (model === "stubborn") { spawn(process.execPath, ["-e", `process.on('SIGTERM', () => {}); require('fs').appendFileSync(${JSON.stringify(spawnLog)}, 'grandchild ' + process.pid + '\\n'); setInterval(() => {}, 1000)`], { stdio: "ignore" }); } +if (model === "slow-to-stop") process.on("SIGTERM", () => setTimeout(() => process.exit(0), 1500)); + if (model === "graceful") { process.on("SIGTERM", () => { setTimeout(() => { @@ -57,6 +59,7 @@ if (model === "hang-before-ready") { healthCalls += 1; if (model === "sick" || model === "die-after-ready" || (model === "slow-health" && healthCalls <= 2)) return send(200, { ok: false }); writeFileSync(path.join(process.env.VILI_EMBEDDINGS_DIR, "stub-healthy"), ""); // a test can act the moment the worker is healthy + if (model === "chatty") console.log("after-healthy-line"); // after stub-healthy exists, which a test can make the loss of the lease send(200, { ok: true, model: model || "stub-model", displayModel: model || "Stub Model", pid: process.pid, requests }); } else if (request.method === "POST" && request.url === "/generate") { requests += 1; @@ -64,7 +67,11 @@ if (model === "hang-before-ready") { if (model === "fail-generate") return send(500, { ok: false }); if (model === "refuse-generate") return send(200, { ok: false }); if (model === "drop-generate") return request.socket.destroy(); - if (model === "slow-generate") return; + if (model === "slow-generate" || model === "slow-to-stop") return; + if (model === "writer") { + setInterval(() => appendFileSync(`${payload.output}.writes`, `${Date.now()}\n`), 50); + return; + } if (model === "encoder") { // an encoder child of the real worker: a grandchild in the worker's group, then a request that never answers spawn(process.execPath, ["-e", `process.on('SIGTERM', () => {}); require('fs').appendFileSync(${JSON.stringify(spawnLog)}, 'grandchild ' + process.pid + '\\n'); setInterval(() => {}, 1000)`], { stdio: "ignore" }); diff --git a/scripts/test-vili-daemon.mjs b/scripts/test-vili-daemon.mjs index b9195f9..362c4b9 100644 --- a/scripts/test-vili-daemon.mjs +++ b/scripts/test-vili-daemon.mjs @@ -2,7 +2,7 @@ // Runs the real daemon against scripts/fixtures/stub-worker.mjs as its --python/--worker-entry. import assert from "node:assert/strict"; import { spawn } from "node:child_process"; -import { existsSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, rmSync, statSync, writeFileSync } from "node:fs"; +import { existsSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, rmSync, statSync, symlinkSync, writeFileSync } from "node:fs"; import http from "node:http"; import net from "node:net"; import os from "node:os"; @@ -1110,3 +1110,141 @@ test("the entry derives the daemon's host, port, interpreter and environment ide rmSync(release, { recursive: true, force: true }); } }); + +// The lease is asked while a generate awaits its worker, not only when the service documents are rewritten. The +// bound is one WATCH_MS ask plus the SIGKILL; the test allows a second. The loss is made right after a rewrite, the +// longest wait for an implementation that asks only then. +test("a worker still writing when the lease is lost is dead within a second", async () => { + const daemon = await idunnDaemon({ leased: true }); + try { + const store = path.join(daemon.stateRoot, "vili.service.cc"); + await until(() => existsSync(store), "the service store", 10); + const pending = generate(daemon, { prompt: "x", model: "writer" }); + pending.catch(() => {}); + const writes = () => { + const dir = path.join(daemon.stateRoot, "artifacts"); + for (const entry of existsSync(dir) ? readdirSync(dir) : []) { + const file = path.join(dir, entry, "motion.writes"); + if (existsSync(file)) return file; + } + return null; + }; + const file = await until(writes, "the worker to write"); + const [worker] = daemon.spawns(); + const rewritten = statSync(store).mtimeMs; + await until(() => statSync(store).mtimeMs !== rewritten, "the service documents to be rewritten", 8); + const lostAt = Date.now(); + rmSync(daemon.lease); + await until(() => !isAlive(worker), "the worker to die", 10); + assert.ok(Date.now() - lostAt < 1000, `the worker lived ${Date.now() - lostAt} ms after the loss`); + const stamps = readFileSync(file, "utf8").trim().split("\n").map(Number); + assert.ok(Math.max(...stamps) - lostAt < 1000, "the worker wrote more than a second after the loss"); + const answer = await Promise.race([pending, new Promise((resolve) => setTimeout(() => resolve({ status: "no answer" }), 10000))]); + assert.equal(answer.status, 503); + assert.equal(answer.body.code, "write-lease-lost"); + assert.deepEqual(readdirSync(path.join(daemon.stateRoot, "jobs")), []); + } finally { + await daemon.stop(); + } +}); + +// A request in flight and one arriving during the stop. The worker takes 1.5 s to stop, so the stop is long enough +// for the second request to arrive in it. From the signal on nothing is written and nothing is spawned. +for (const kind of ["fake Idunn entry", "hand-run"]) { + test(`SIGTERM (${kind}): nothing is written or spawned from the signal on, and the worker tree is dead at exit 0`, async () => { + const daemon = kind === "hand-run" ? await startDaemon() : await idunnDaemon({ leased: true }); + try { + await until(() => existsSync(path.join(daemon.stateRoot, "vili.service.cc")), "the service store", 10); + const inFlight = generate(daemon, { prompt: "x", model: "slow-to-stop" }); + inFlight.catch(() => {}); + await until(() => daemon.spawns().length, "the worker"); + await until(() => request(daemon.port, "GET", "/health").then((r) => r.body?.state?.backend?.state === "ready"), "the worker to be ready"); + const store = path.join(daemon.stateRoot, "vili.service.cc"); + const storeBefore = statSync(store).mtimeMs; + const artifacts = readdirSync(path.join(daemon.stateRoot, "artifacts")); + daemon.proc.kill("SIGTERM"); + await new Promise((resolve) => setTimeout(resolve, 300)); + const second = await generate(daemon).catch((error) => ({ status: error.code })); + assert.notEqual(second.status, 200, "a request arriving during the stop is not served"); + await until(() => daemon.proc.exitCode !== null || daemon.proc.signalCode !== null, "the daemon to exit", 30); + assert.equal(daemon.proc.exitCode, 0); + assert.equal(daemon.spawns().length, 1, "no worker is spawned after the signal"); + assert.ok(daemon.spawns().every((pid) => !isAlive(pid)), "the worker tree is dead at exit"); + assert.deepEqual(readdirSync(path.join(daemon.stateRoot, "artifacts")), artifacts, "no artifact is created after the signal"); + assert.deepEqual(readdirSync(path.join(daemon.stateRoot, "jobs")), [], "no job is recorded after the signal"); + assert.equal(statSync(store).mtimeMs, storeBefore); + } finally { + await daemon.stop(); + } + }); +} + +// One notion of root identity: a root is the same root under either spelling, for the lock and for reclaim. +for (const [crashedOn, restartedOn] of [["link", "real"], ["real", "link"]]) { + test(`a daemon restarted on the ${restartedOn} spelling of its root reclaims the worker a crash on the ${crashedOn} spelling left`, async () => { + const real = mkdtempSync(path.join(os.tmpdir(), "vili-test-")); + const link = `${real}-link`; + symlinkSync(real, link); + const spelling = { real, link }; + const first = await startDaemon({ root: spelling[crashedOn] }); + let second = null; + let stray = null; + try { + assert.equal((await generate(first)).status, 200); + [stray] = first.spawns(); + first.proc.kill("SIGKILL"); + await until(() => first.proc.exitCode !== null || first.proc.signalCode !== null, "the first daemon to die"); + assert.ok(isAlive(stray), "the probe must reproduce the orphan before the fix can be measured"); + second = await startDaemon({ root: spelling[restartedOn] }); + await until(() => !isAlive(stray), "the predecessor's worker to be reclaimed"); + assert.equal((await generate(second)).status, 200); + assert.equal(aliveWorkers(second).length, 1, "one live worker on the one root"); + } finally { + if (stray) { try { process.kill(-stray, "SIGKILL"); } catch { /* gone */ } } + if (second) await second.stop(); + rmSync(link, { force: true }); + rmSync(real, { recursive: true, force: true }); + } + }); +} + +// The group is the worker's, and its leader may be the first to go. Any member carrying the root's marker proves it. +test("a restarted daemon kills a worker group whose leader is gone and a member lives", async () => { + const root = mkdtempSync(path.join(os.tmpdir(), "vili-test-")); + const first = await startDaemon({ root }); + const stray = generate(first, { prompt: "x", model: "encoder" }).catch(() => null); + const [grandchild] = await until(() => { const found = first.grandchildren(); return found.length ? found : null; }, "the encoder child"); + const [worker] = first.spawns(); + first.proc.kill("SIGKILL"); + await until(() => first.proc.exitCode !== null || first.proc.signalCode !== null, "the first daemon to die"); + process.kill(worker, "SIGKILL"); // the leader only + await until(() => !isAlive(worker), "the leader to die"); + await stray; + assert.ok(isAlive(grandchild), "the probe must leave a member alive in the leaderless group"); + const second = await startDaemon({ root }); + try { + await until(() => !isAlive(grandchild), "the leaderless group's member to be killed"); + assert.equal(existsSync(path.join(root, "worker.pid")), false); + } finally { + try { process.kill(-worker, "SIGKILL"); } catch { /* gone */ } + await second.stop(); + } +}); + +// The copy of worker output is gated at every line, not at the first: here the lease goes after the first line +// was logged, by the worker's first healthy answer, and the line it prints then must not reach the log. +test("a worker's output line after the first is not logged once the lease is gone", async () => { + const daemon = await idunnDaemon({ leased: true, loseWhenExists: "embeddings/stub-healthy" }); + try { + await until(() => existsSync(path.join(daemon.stateRoot, "vili.service.cc")), "the service store", 10); + const answer = await generate(daemon, { prompt: "x", model: "chatty" }); + assert.equal(answer.status, 503); + assert.equal(answer.body.code, "write-lease-lost"); + await new Promise((resolve) => setTimeout(resolve, 500)); + const log = readFileSync(path.join(daemon.stateRoot, "logs", "worker.log"), "utf8"); + assert.ok(log.includes("stub-stdout-line"), "the first line was logged under the lease"); + assert.ok(!log.includes("after-healthy-line"), "a line after the loss must not be copied"); + } finally { + await daemon.stop(); + } +}); From 73c47d9c085d0797ecdc95f70706a6838fec862d Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 24 Oct 2026 05:18:18 +0200 Subject: [PATCH 20/29] One write authority for loss, stop and reclaim: the lease is asked every 250 ms, SIGTERM gates writes and spawns, the root has one identity - tick: the lease is asked every WATCH_MS (250 ms); a loss SIGKILLs the worker group at once (the bound is about a second, not the 5 s service-document tick) - mayWrite() = not stopping and held(); guard() and the worker-output sink both read it - shutdown: stopping first, listener closed, then the worker tree is stopped, then exit 0 - canonicalPath(): args.stateRoot is realpath'd once; lock name, reclaim marker and the worker environment derive from it Co-Authored-By: Claude Opus 5.5 --- README.md | 2 +- scripts/vili-daemon.mjs | 67 ++++++++++++++++++++++++++++++----------- 2 files changed, 50 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index b6b8076..5639475 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,7 @@ A hand-run daemon holds its state root through a listening socket in Linux's abs ### On Yggdrasil -Idunn runs `node vili/scripts/idunn-entry.mjs --state-root --kimodo-commit ` from a sealed release of three trees: `node`, `vili` (the daemon, worker, child, `node_modules`, cultcache-py) and `python` (python-build-standalone CPython 3.12 with the hash-locked packages, Kimodo, MotionCorrection and SOMA-X installed into it; no venv). The weights are the read-only cache `/srv/vili/models`; state is `/var/lib/gamecult/vili`. Idunn's process write lease is the one writer authority: until the daemon holds it, `POST /motion/generate` answers `503 write-lease-pending` and nothing is written; if the lease is lost the worker tree is killed and it answers `503 write-lease-lost`. Idunn proves readiness with its own `POST /cultnet/snapshot` challenge, answered with a signed runtime presence (an `Origin` is still refused). +Idunn runs `node vili/scripts/idunn-entry.mjs --state-root --kimodo-commit ` from a sealed release of three trees: `node`, `vili` (the daemon, worker, child, `node_modules`, cultcache-py) and `python` (python-build-standalone CPython 3.12 with the hash-locked packages, Kimodo, MotionCorrection and SOMA-X installed into it; no venv). The weights are the read-only cache `/srv/vili/models`; state is `/var/lib/gamecult/vili`. Idunn's process write lease is the one writer authority: until the daemon holds it, `POST /motion/generate` answers `503 write-lease-pending` and nothing is written; the lease is asked every 250 ms and at every write, so if it is lost the worker tree is SIGKILLed within a second and the daemon answers `503 write-lease-lost`. From SIGTERM on the daemon accepts nothing and writes and spawns nothing (`503 stopping` for a request in flight), stops the worker tree, and exits 0. Idunn proves readiness with its own `POST /cultnet/snapshot` challenge, answered with a signed runtime presence (an `Origin` is still refused). `POST /motion/generate` refuses any POST that carries an `Origin` or is not `application/json` with `403 cross-site`; no route answers a preflight. diff --git a/scripts/vili-daemon.mjs b/scripts/vili-daemon.mjs index 7e2ba16..e7977ae 100644 --- a/scripts/vili-daemon.mjs +++ b/scripts/vili-daemon.mjs @@ -75,6 +75,17 @@ const viliDocumentRegistry = defineDocumentRegistry( const MAX_THREADS = 16; +// The state root's one identity: symlinks resolved as far as the path exists. The hand-run lock's name, reclaim's +// marker and the worker's environment all derive from args.stateRoot, so two spellings of one root are one root. +function canonicalPath(target) { + try { + return realpathSync(target); + } catch { + const parent = path.dirname(target); + return parent === target ? target : path.join(canonicalPath(parent), path.basename(target)); + } +} + function parseArgs(argv) { const env = process.env; const args = { @@ -106,6 +117,7 @@ function parseArgs(argv) { process.exit(2); } args.threads = Number(args.threads); + args.stateRoot = canonicalPath(args.stateRoot); if (args.modelsRoot) args.modelsRoot = path.resolve(args.modelsRoot); return args; } @@ -315,11 +327,11 @@ export function handRunRuntime(stateRoot) { const pidFile = path.join(stateRoot, "worker.pid"); let lock = null; - // The lock is a listening socket in Linux's abstract namespace, named by the state root's real path. A bind is + // The lock is a listening socket in Linux's abstract namespace, named by the state root, which is canonical (its real path, see canonicalPath). A bind is // atomic and exclusive and the kernel drops it with its owner, so there is no lock file, no stale lock to probe // or take over, and no takeover to race: a bind either succeeds (this daemon owns the root) or it does not. const listen = () => new Promise((resolve, reject) => { - const name = createHash("sha256").update(realpathSync(stateRoot)).digest("hex"); + const name = createHash("sha256").update(stateRoot).digest("hex"); const server = net.createServer((socket) => socket.destroy()); server.once("error", reject); server.listen(`\0vili-state-root:${name}`, () => { @@ -395,11 +407,12 @@ export function handRunRuntime(stateRoot) { }; } -async function stopWorker() { +// A requested stop gives the worker its grace (SIGTERM, then SIGKILL); a lost writer gets SIGKILL at once. +async function stopWorker(signals = ["SIGTERM", "SIGKILL"]) { const proc = worker.proc; if (!proc || proc.pid === undefined) return; worker.state = "stopped"; - for (const signal of ["SIGTERM", "SIGKILL"]) { + for (const signal of signals) { killGroup(proc.pid, signal); if (await waitForExit(proc, signal === "SIGTERM" ? 10000 : 5000)) break; } @@ -467,7 +480,7 @@ async function startWorker(model, timeoutMs) { } catch { // not JSON: an ordinary log line } - if (runtime.held()) writeSync(sink, `${line}\n`); + if (mayWrite()) writeSync(sink, `${line}\n`); }); lines.on("close", () => closeSync(sink)); }), @@ -516,7 +529,7 @@ async function generateMotion(request, response) { await generate(request, response); } catch (error) { if (!(error instanceof LeaseLost)) throw error; - json(response, 503, { ok: false, code: runtime.refusal() }); + json(response, 503, { ok: false, code: stopping ? "stopping" : runtime.refusal() }); } } @@ -733,15 +746,27 @@ async function handleRequest(request, response) { } let runtime; +let stopping = false; class LeaseLost extends Error {} -// The one write gate. Every write to the state root and every spawn calls it, immediately before it happens (not once -// per request), so a request admitted before the lease went still stops at its next write. -function guard() { - if (!runtime.held()) throw new LeaseLost("the writer was lost"); +// The one write authority: the runtime holds the state root (the lease, or the lock) and the daemon is not stopping. +// held() is read at the moment of every ask, so a loss is seen by the first gate to ask. +function mayWrite() { + return !stopping && runtime.held(); } +// The one write gate. Every write to the state root and every spawn calls it, immediately before it happens (not once +// per request), so a request admitted before the lease went, or before SIGTERM, still stops at its next write. +function guard() { + if (!mayWrite()) throw new LeaseLost("the writer was lost"); +} + +// How often the lease is asked while nothing else asks, and so how long a worker can outlive a loss (plus the +// SIGKILL): a generate can await its worker for 30 minutes. The service documents are rewritten every PERSIST_EVERY asks. +const WATCH_MS = 250; +const PERSIST_EVERY = 20; + // The one daemon. `rt` owns the state root: the hand-run runtime (socket lock) or Idunn's (process write lease). // The server listens first, so Idunn's challenge can be answered while the lease is still pending; nothing is // written to the state root until the runtime holds it. @@ -758,12 +783,17 @@ export async function serve(rt) { await new Promise((resolve) => server.listen(args.port, args.host, resolve)); console.log(`Vili listening on http://${args.host}:${server.address().port}`); - let surfaceTimer = null; + let tick = null; + // From the signal on nothing is accepted, written or spawned (guard() refuses what is already in flight); then the + // worker tree is stopped, and only then does the process end. const shutdown = async () => { - clearInterval(surfaceTimer); + if (stopping) return; + stopping = true; + server.close(); + server.closeIdleConnections(); + clearInterval(tick); await stopWorker(); runtime.release(); - server.close(); process.exit(0); }; process.on("SIGTERM", shutdown); @@ -774,8 +804,8 @@ export async function serve(rt) { const onLost = () => { if (lost) return; lost = true; - clearInterval(surfaceTimer); - stopWorker().finally(() => runtime.reportHealth?.("degraded")); + clearInterval(tick); + stopWorker(["SIGKILL"]).finally(() => runtime.reportHealth?.("degraded")); }; runtime.watch(onLost); // held() reports a loss through this the moment any gate sees it try { @@ -786,13 +816,14 @@ export async function serve(rt) { if (error instanceof LeaseLost) return; // lost while opening the state root: onLost has run, and nothing is active throw error; } - surfaceTimer = setInterval(() => { + let asks = 0; + tick = setInterval(() => { runtime.watch(onLost); - if (lost) return; + if (lost || ++asks % PERSIST_EVERY !== 0) return; persistSurfaces().catch((error) => { if (!(error instanceof LeaseLost)) console.error(`persist failed: ${error?.name || "Error"}`); }); - }, 5000); + }, WATCH_MS); if (lost) return; runtime.reportHealth?.("active"); console.log("Vili holds the state root"); From 74ddacf53b47004c102b21566df9340217582d5c Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 24 Oct 2026 05:19:08 +0200 Subject: [PATCH 21/29] Tests: a worker that ignores SIGTERM is dead within a second of a loss; its output while the daemon stops is not copied Co-Authored-By: Claude Opus 5.5 --- scripts/fixtures/stub-worker.mjs | 8 ++++++-- scripts/test-vili-daemon.mjs | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/fixtures/stub-worker.mjs b/scripts/fixtures/stub-worker.mjs index 0b5e6ae..3cf1831 100644 --- a/scripts/fixtures/stub-worker.mjs +++ b/scripts/fixtures/stub-worker.mjs @@ -1,7 +1,7 @@ // Stands in for kimodo-resident-worker.py in the daemon's tests. It binds port 0, prints the ready line the // daemon waits for, and answers /health and /generate with what the daemon gave it. The --model value picks a // misbehaviour: crash-before-ready, hang-before-ready, sick, slow-health, stubborn, fail-generate, -// refuse-generate, drop-generate, slow-generate, writer (appends to .writes every 50 ms and never answers), slow-to-stop (no answer; exits 1.5 s after SIGTERM), chatty (prints a line the moment it is healthy), encoder (a grandchild, then no answer), graceful (exits 0.5 s after SIGTERM), die-after-ready. Any other value is just the model the worker serves. +// refuse-generate, drop-generate, slow-generate, writer (appends to .writes every 50 ms, never answers, ignores SIGTERM), slow-to-stop (no answer; prints a line and exits 1.5 s after SIGTERM), chatty (prints a line the moment it is healthy), encoder (a grandchild, then no answer), graceful (exits 0.5 s after SIGTERM), die-after-ready. Any other value is just the model the worker serves. import http from "node:http"; import os from "node:os"; import path from "node:path"; @@ -33,7 +33,11 @@ if (model === "stubborn") { spawn(process.execPath, ["-e", `process.on('SIGTERM', () => {}); require('fs').appendFileSync(${JSON.stringify(spawnLog)}, 'grandchild ' + process.pid + '\\n'); setInterval(() => {}, 1000)`], { stdio: "ignore" }); } -if (model === "slow-to-stop") process.on("SIGTERM", () => setTimeout(() => process.exit(0), 1500)); +if (model === "slow-to-stop") process.on("SIGTERM", () => { + console.log("stopping-line"); // output while it stops + setTimeout(() => process.exit(0), 1500); +}); +if (model === "writer") process.on("SIGTERM", () => {}); // a worker that carries on writing through SIGTERM if (model === "graceful") { process.on("SIGTERM", () => { diff --git a/scripts/test-vili-daemon.mjs b/scripts/test-vili-daemon.mjs index 362c4b9..c6c14f6 100644 --- a/scripts/test-vili-daemon.mjs +++ b/scripts/test-vili-daemon.mjs @@ -1173,6 +1173,7 @@ for (const kind of ["fake Idunn entry", "hand-run"]) { assert.deepEqual(readdirSync(path.join(daemon.stateRoot, "artifacts")), artifacts, "no artifact is created after the signal"); assert.deepEqual(readdirSync(path.join(daemon.stateRoot, "jobs")), [], "no job is recorded after the signal"); assert.equal(statSync(store).mtimeMs, storeBefore); + assert.ok(!readFileSync(path.join(daemon.stateRoot, "logs", "worker.log"), "utf8").includes("stopping-line"), "the worker's output while it stops is not copied"); } finally { await daemon.stop(); } From 1b0d1a2d5637a8d705c8585edfa6d179a093bffd Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 24 Oct 2026 05:26:27 +0200 Subject: [PATCH 22/29] Test: the loss is made after the service-document rewrite has finished, so only the daemon's own ask can notice it Co-Authored-By: Claude Opus 5.5 --- scripts/test-vili-daemon.mjs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/test-vili-daemon.mjs b/scripts/test-vili-daemon.mjs index c6c14f6..2838c52 100644 --- a/scripts/test-vili-daemon.mjs +++ b/scripts/test-vili-daemon.mjs @@ -1112,8 +1112,8 @@ test("the entry derives the daemon's host, port, interpreter and environment ide }); // The lease is asked while a generate awaits its worker, not only when the service documents are rewritten. The -// bound is one WATCH_MS ask plus the SIGKILL; the test allows a second. The loss is made right after a rewrite, the -// longest wait for an implementation that asks only then. +// bound is one WATCH_MS ask plus the SIGKILL; the test allows a second. The loss is made just after a rewrite of the +// service documents (whose own gates have asked), the longest wait for an implementation that asks only then. test("a worker still writing when the lease is lost is dead within a second", async () => { const daemon = await idunnDaemon({ leased: true }); try { @@ -1133,6 +1133,7 @@ test("a worker still writing when the lease is lost is dead within a second", as const [worker] = daemon.spawns(); const rewritten = statSync(store).mtimeMs; await until(() => statSync(store).mtimeMs !== rewritten, "the service documents to be rewritten", 8); + await new Promise((resolve) => setTimeout(resolve, 150)); // the rewrite is done: its own gates have asked const lostAt = Date.now(); rmSync(daemon.lease); await until(() => !isAlive(worker), "the worker to die", 10); From 970218c968a61b4a9cb6769dee730ee45908b546 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 24 Oct 2026 13:36:04 +0200 Subject: [PATCH 23/29] Tests: the constraints.json write is gated; a not-yet-existing root named through a symlink is one root (s3 residue) Co-Authored-By: Claude Opus 5.5 --- scripts/test-vili-daemon.mjs | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/scripts/test-vili-daemon.mjs b/scripts/test-vili-daemon.mjs index 2838c52..2b6725d 100644 --- a/scripts/test-vili-daemon.mjs +++ b/scripts/test-vili-daemon.mjs @@ -766,6 +766,29 @@ for (let trial = 1; trial <= 40; trial += 1) { }); } +// canonicalPath's fallback: a state root that does not exist yet is resolved through its longest existing prefix, so a +// daemon naming it through a symlink and one naming it directly still contend for one lock. +for (let trial = 1; trial <= 10; trial += 1) { + test(`two daemons naming a not-yet-existing root, one through a symlink, leave one owner (trial ${trial})`, async () => { + const real = mkdtempSync(path.join(os.tmpdir(), "vili-test-")); + const link = `${real}-link`; + symlinkSync(real, link); + const racers = await Promise.all([startDaemon({ root: real, nested: true, hold: false }), startDaemon({ root: link, nested: true, hold: false })]); + try { + await until(() => racers.every((racer) => racer.proc.exitCode !== null || /holds the state root/.test(racer.stdout())), "both racers to decide", 20); + await new Promise((resolve) => setTimeout(resolve, 300)); + const owners = racers.filter((racer) => racer.proc.exitCode === null); + assert.equal(owners.length, 1, "exactly one daemon stays up"); + const loser = racers.find((racer) => racer !== owners[0]); + assert.equal(loser.proc.exitCode, 2); + assert.match(loser.stderr(), /held by a running daemon/); + } finally { + for (const racer of racers) if (racer.proc.exitCode === null && racer.proc.signalCode === null) racer.proc.kill("SIGKILL"); + rmSync(link, { force: true }); + rmSync(real, { recursive: true, force: true }); + } + }); +} const idunnDaemon = async ({ leased = false, extraEnv = {}, loseWhenExists = null } = {}) => { const root = mkdtempSync(path.join(os.tmpdir(), "vili-test-")); const lease = path.join(root, "lease"); @@ -871,17 +894,18 @@ for (const noticed of [false, true]) { // earlier checks. const losses = [ { when: "artifacts/*", absent: ["artifacts/*/meta.json", "logs", "embeddings"] }, + { when: "artifacts/*", payload: { prompt: "a person waves", duration: 2, constraints: [{ type: "root2d" }] }, absent: ["artifacts/*/constraints.json", "artifacts/*/meta.json"] }, { when: "artifacts/*/meta.json", absent: ["logs", "embeddings"] }, { when: "logs", absent: ["embeddings"] }, { when: "embeddings", absent: ["logs/worker.log"] }, { when: "embeddings/stub-healthy", absent: ["artifacts/*/request.json", "jobs/*"] }, ]; -for (const { when, absent } of losses) { - test(`a request is stopped at its next write when the lease goes at ${when}`, async () => { +for (const { when, absent, payload } of losses) { + test(`a request is stopped at its next write when the lease goes at ${when}${payload ? " (constraints in the body)" : ""}`, async () => { const daemon = await idunnDaemon({ leased: true, loseWhenExists: when }); try { await until(() => existsSync(path.join(daemon.stateRoot, "vili.service.cc")), "the service store", 10); - const answer = await generate(daemon); + const answer = await generate(daemon, payload); assert.equal(answer.status, 503); assert.equal(answer.body.code, "write-lease-lost"); for (const gone of absent) { From 579873f317ccf0c13346922f967a2dc0e7fc70ba Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 24 Oct 2026 13:44:00 +0200 Subject: [PATCH 24/29] Recipe: the python-build steps declare PATH and the pip flags they need Idunn passes a runner only the environment a step lists in required_environment. The binding's PATH (the release python tree first) was never listed, so python3.12 was not found in the first Idunn run (exit 127). Co-Authored-By: Claude Opus 5.5 --- deployment/idunn/recipe.toml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/deployment/idunn/recipe.toml b/deployment/idunn/recipe.toml index a79041e..304ad29 100644 --- a/deployment/idunn/recipe.toml +++ b/deployment/idunn/recipe.toml @@ -71,21 +71,21 @@ argv = ["tar", "-xzf", "release/cpython.tar.gz", "-C", "release"] id = "install-build-tools" phase = "prepare" runner = "python-build" -required_environment = ["HOME", "PIP_CACHE_DIR", "TMPDIR"] +required_environment = ["HOME", "PIP_CACHE_DIR", "TMPDIR", "PATH", "PIP_DISABLE_PIP_VERSION_CHECK", "PIP_NO_INPUT"] argv = ["python3.12", "-m", "pip", "install", "--no-deps", "--require-hashes", "-r", "deployment/idunn/requirements-build.lock"] [[steps]] id = "install-locked-packages" phase = "prepare" runner = "python-build" -required_environment = ["HOME", "PIP_CACHE_DIR", "TMPDIR"] +required_environment = ["HOME", "PIP_CACHE_DIR", "TMPDIR", "PATH", "PIP_DISABLE_PIP_VERSION_CHECK", "PIP_NO_INPUT"] argv = ["python3.12", "-m", "pip", "install", "--no-deps", "--require-hashes", "--no-build-isolation", "-r", "deployment/idunn/requirements.lock"] [[steps]] id = "install-vendored-packages" phase = "prepare" runner = "python-build" -required_environment = ["HOME", "PIP_CACHE_DIR", "TMPDIR"] +required_environment = ["HOME", "PIP_CACHE_DIR", "TMPDIR", "PATH", "PIP_DISABLE_PIP_VERSION_CHECK", "PIP_NO_INPUT"] argv = ["python3.12", "-m", "pip", "install", "--no-deps", "--no-build-isolation", "--no-index", "vendor/SOMA-X", "vendor/kimodo/MotionCorrection", "vendor/kimodo"] [[steps]] @@ -93,7 +93,7 @@ id = "test-worker" phase = "test" runner = "python-build" working_directory = "." -required_environment = ["HOME", "TMPDIR", "PYTHONPATH"] +required_environment = ["HOME", "TMPDIR", "PYTHONPATH", "PATH"] argv = ["python3.12", "-m", "unittest", "discover", "-s", "scripts", "-p", "test_*.py"] # Every module the worker and the encoder child import at top level, kimodo.scripts.generate included. @@ -101,7 +101,7 @@ argv = ["python3.12", "-m", "unittest", "discover", "-s", "scripts", "-p", "test id = "import-smoke" phase = "acceptance" runner = "python-build" -required_environment = ["HOME", "TMPDIR", "PYTHONPATH"] +required_environment = ["HOME", "TMPDIR", "PYTHONPATH", "PATH"] argv = [ "python3.12", "-c", "import accelerate, cultcache_py, huggingface_hub.constants, kimodo, kimodo.constraints, kimodo.exports.motion_io, kimodo.meta, kimodo.model.llm2vec.llm2vec, kimodo.model.load_model, kimodo.model.loading, kimodo.model.registry, kimodo.scripts.generate, kimodo.tools, msgpack, peft, torch, transformers", @@ -111,6 +111,7 @@ argv = [ id = "compile-python" phase = "build" runner = "python-build" +required_environment = ["PATH"] argv = ["python3.12", "-m", "compileall", "-q", "-j", "4", "--invalidation-mode", "unchecked-hash", "release/python/lib/python3.12"] # ---- the sealed release: node, vili, python From 6950434f9a39274adf42daff9248a5ce55dbebff Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 24 Oct 2026 14:17:57 +0200 Subject: [PATCH 25/29] Test first: a failed startup names its cause and repeats no value Co-Authored-By: Claude Opus 5.5 --- scripts/test-vili-daemon.mjs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/scripts/test-vili-daemon.mjs b/scripts/test-vili-daemon.mjs index 2b6725d..81c0d95 100644 --- a/scripts/test-vili-daemon.mjs +++ b/scripts/test-vili-daemon.mjs @@ -1112,6 +1112,20 @@ test("the entry takes exactly --state-root --kimodo-commit <40 hex>, } }); +// A startup failure that kills the unit names its cause from what the failing code itself says (its error code, or +// the fixed text of a plain Error), and never repeats a value: an fs error's own message carries the path. +test("a failed startup names the cause and repeats no value", async () => { + const good = ["--state-root", "/var/lib/gamecult/vili", "--kimodo-commit", "6bb58488037dd65360ff0c5d1692b403a23309f7"]; + const bind = { GAMECULT_IDUNN_CANDIDATE_BIND: "127.0.0.1:18861" }; + const unset = await runEntry(good, bind); + assert.equal(unset.code, 1); + assert.match(unset.output, /GAMECULT_IDUNN_RUNTIME_BUNDLE is required/); + const missing = await runEntry(good, { ...bind, GAMECULT_IDUNN_RUNTIME_BUNDLE: "/canary-bundle-dir" }); + assert.equal(missing.code, 1); + assert.match(missing.output, /ENOENT/); + assert.ok(!missing.output.includes("canary"), "the failure repeated a value"); +}); + test("the entry derives the daemon's host, port, interpreter and environment identity from the release", async () => { const { createHash } = await import("node:crypto"); const { daemonEnvironment } = await import("./idunn-entry.mjs"); From a62028ea54b9a9337b92a0e16ccb7e1607d7c0e6 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 24 Oct 2026 14:18:32 +0200 Subject: [PATCH 26/29] The entry's startup failure names its cause: the error code, or a plain Error's fixed text Co-Authored-By: Claude Opus 5.5 --- scripts/idunn-entry.mjs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/idunn-entry.mjs b/scripts/idunn-entry.mjs index 01018ce..8c3829d 100644 --- a/scripts/idunn-entry.mjs +++ b/scripts/idunn-entry.mjs @@ -134,7 +134,10 @@ async function main() { if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) { main().catch((error) => { - console.error(`vili idunn entry failed: ${error?.name || "Error"}`); + // The cause, from the failing code: its error code, or the fixed text of a plain Error. An fs error's message + // carries the path, so a coded error is named by its code alone. + const cause = error?.code ?? String(error?.message ?? "").slice(0, 200); + console.error(`vili idunn entry failed: ${error?.name || "Error"} ${cause}`); process.exit(1); }); } From c094bb00725dc53220b3564786cc14e4af6f2419 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 24 Oct 2026 14:25:14 +0200 Subject: [PATCH 27/29] Test first: the entry hands cultnet-ts the candidate bind as the Expected route's endpoint (first Idunn run: bind differs) Co-Authored-By: Claude Opus 5.5 --- scripts/test-vili-daemon.mjs | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/test-vili-daemon.mjs b/scripts/test-vili-daemon.mjs index 81c0d95..8b1d9c3 100644 --- a/scripts/test-vili-daemon.mjs +++ b/scripts/test-vili-daemon.mjs @@ -1141,6 +1141,7 @@ test("the entry derives the daemon's host, port, interpreter and environment ide const derived = daemonEnvironment(bind, entryDir); assert.equal(derived.VILI_DAEMON_HOST, "127.0.0.1"); assert.equal(derived.VILI_DAEMON_PORT, "18861"); + assert.equal(derived.GAMECULT_IDUNN_CANDIDATE_BIND, "http://127.0.0.1:18861", "cultnet-ts compares the bind to the Expected route's endpoint, which carries the scheme Idunn's bare host:port lacks"); assert.equal(derived.VILI_PYTHON, path.join(release, "python", "bin", "python3.12")); assert.equal(derived.VILI_PYTHON_ENV, `locks-sha256:${createHash("sha256").update("build lock bytes\nruntime lock bytes\n").digest("hex")}`); } From c2e4eb2b8f2c1c091984709721dfcdf52e7ddeaa Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 24 Oct 2026 14:25:42 +0200 Subject: [PATCH 28/29] The entry gives cultnet-ts the candidate bind as http://host:port, the Expected route's endpoint Co-Authored-By: Claude Opus 5.5 --- scripts/idunn-entry.mjs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/idunn-entry.mjs b/scripts/idunn-entry.mjs index 8c3829d..9fb062c 100644 --- a/scripts/idunn-entry.mjs +++ b/scripts/idunn-entry.mjs @@ -110,6 +110,8 @@ export function daemonEnvironment(bind, entryDir) { const locks = ["requirements-build.lock", "requirements.lock"].map((name) => readFileSync(path.resolve(entryDir, "..", "deployment", "idunn", name))); return { + // Idunn writes the bind as host:port; cultnet-ts compares it to the Expected route's endpoint, which has the scheme. + GAMECULT_IDUNN_CANDIDATE_BIND: `http://${host}:${port}`, VILI_DAEMON_HOST: host, VILI_DAEMON_PORT: port, VILI_PYTHON: path.resolve(entryDir, "..", "..", "python", "bin", "python3.12"), From d7b218f6ebf563e595da43b4e4640f64cf105f60 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 24 Oct 2026 16:29:06 +0200 Subject: [PATCH 29/29] Rollout probe: an empty commit so Idunn rolls the live vili unit candidate-then-promote Co-Authored-By: Claude Opus 5.5