Dashboard › opencode-lore › Distillation
b9a98160-dc8c-4a6c-abeb-9b34c6c7b313["lore_tm_v1_hadDEy3f7MwRoH3xQW9X_Tj5FonlVQiBehBkJqjcpBs","lore_tm_v1_16iEKlkG89DxyNvoQDdF-98bCiGae6MaVs2Yw4fAxNM","lore_tm_v1_O7VXUSP3hEj4aABEEvu3Jc2eG3tvKocqgPYd7rEoCII","lore_tm_v1_sJ_F5NjtIoaHRxtvSmz9ybmnDDxxQIAxZB0eGmk9Jyg","lore_tm_v1_FXm1dohevYdBn57WybwKSUEuYLdSFlgdNaX1glmM3b4","lore_tm_v1_bK0dUCLZqF2fnyzFKaI8icc5zODkiER4X5jv2pntDZM","lore_tm_v1_rKAuTBWRzle7OYVYRd8QrpbcBOe4vAyKaA7Gy-chyTQ","lore_tm_v1_so-5MtoVXA14euJUoyX0V2jF5C70-NW2qKF_m1xhjRQ","lore_tm_v1_cza2tZU8T8OCUiPs_0fzLMvzKlT5FqpjqAk8I8CyRP4","lore_tm_v1_z2KRtFsb8ghdt688sP9CpC3epw4Q82Uw3mo_WRm1iD0","lore_tm_v1_zuFVI1HTQ7tNwQp5msU5HqlZP_YsW_pObBd0nIUiFvE","lore_tm_v1_BW2Yrrkl0gGUWZWbhCDC0rPW8KJDWF5UkHHaqB1KeBQ"]
Date: Sep 16, 2026
/home/byk/Code/opencode-lore-embedding-runtime rebuilt the missing or stale gateway dist/ bundle with pnpm --filter @loreai/gateway run bundle; result: 3 test files passed, 117 tests passed, duration 32.14s./proc/self/cgroup and /proc/self/mountinfo must be reread because membership can change during process lifetime.files.root === "/" may omit memory.current, memory.high, and memory.max.packages/core/src/cgroup-memory.ts defines resolveLinuxCgroupMemoryFiles(cgroupContent, mountInfoContent) and readLinuxCgroupMemoryHeadroomBytes(readText = readTextFile). Discovery prefers an explicit cgroup v1 memory-controller membership over v2 on hybrid hosts, chooses the deepest directly matching mount root, accepts a namespaced interpretation only when exactly one candidate exists, and returns null when discovery is ambiguous or invalid.packages/core/src/cgroup-memory.ts decodes procfs octal path escapes, rejects non-absolute paths, NUL bytes, and .. components, then normalizes with posix.normalize. Headroom calculation walks from the process cgroup directory toward the mount point and takes the minimum finite limit - usage, clamped at 0; v2 uses memory.current with memory.high and memory.max, while v1 uses memory.usage_in_bytes with memory.limit_in_bytes. Invalid, missing, unsafe-integer, or unreadable required values fail closed with undefined.node_modules and never selects an arbitrary ancestor’s potentially ABI-incompatible ONNX Runtime.resolveNativeOrtBindingPath never throws: an unresolvable native package is the expected dist-only case and must degrade to WASM rather than crash embedding.packages/core/src/ort-native.ts supports exactly 5 generated native targets: linux-x64, linux-arm64, darwin-arm64, win32-x64, and win32-arm64. Linux native execution requires a detectable glibc runtime version of at least 2.27; unknown or malformed Linux libc information returns null for WASM fallback.validNativeBinding() in packages/core/src/ort-native.ts canonicalizes the package and binding paths, requires the binding to remain within the package directory and be a regular file, and validates its first 4 bytes: ELF 7f 45 4c 46 on Linux, supported Mach-O magic on Darwin, or MZ on Windows. Every filesystem or close failure returns null.resolveNativeOrtBindingPath() requires gateway name @loreai/gateway, matching gateway/package/declared versions, matching loreOrtNodeVersion, and exact one-element os and cpu arrays. Workspace onnxruntime-node admission requires an exactly matching declared and installed version, a canonical bin inside the package, and exactly one directory matching /^napi-v\d+$/; all mismatches return null.nativeIntraOpThreads(parallelism = availableParallelism(), logicalCpus = cpus().length) returns the floored available parallelism, with a minimum of 1, only when it is less than the logical CPU count; otherwise it returns undefined to preserve ONNX Runtime’s default. Rationale: prevent a CPU-quota-limited container, such as 1 vCPU on a 32-core host, from spawning roughly 32 native intra-op threads and incurring excess memory arenas and context-switching, without raising thread count on unconstrained hyper-threaded hosts.in_progress, high priority; 2. “Finish cgroup headroom parsing and admission wiring” — pending, high; 3. “Reserve unreflected worker memory during pool growth” — pending, high; 4. “Run fail-first and mutation proofs for every critical guard” — pending, high; 5. “Run complete repository validation and freeze exact candidate” — pending, high; 6. “Obtain independent correctness and security reviews” — pending, high; 7. “Commit completed Jujutsu change and report findings” — pending, medium..jj/ exists, mutations must use jj, not git; interactive flags such as -i and --interactive must not be used; description/commit operations must pass -m "msg"; mutations must be verified with jj st and jj log; stable change IDs are preferred over commit IDs./home/byk/Code/opencode-lore-embedding-runtime/CONTRIBUTING.md was not found.packages/core/src/embedding/pool.ts admission logic exposes the audit targets: the first worker is spawned without calling liveFreemem(); later growth requires a healthy busy slot, total active plus retired workers below ceiling, and live free memory of at least (unhealthy active slots + 1) * PER_WORKER_MEM_BUDGET_BYTES. liveFreemem() returns 0 when a constrained memory limit exists but cgroup headroom is unavailable.EmbeddingPool sizing in packages/core/src/embedding/pool.ts uses testEmbedPoolSize as a deterministic override capped by EMBED_POOL_ABS_MAX; under NODE_ENV === "test" it uses configuredEmbedPoolSize() ?? 1, likewise capped; production uses configuredEmbedPoolSize() ?? DEFAULT_MAX_EMBED_POOL, capped by EMBED_POOL_ABS_MAX.EmbeddingPool.spawnSlot() passes the entire pool ceiling to LocalProvider as the memory divisor, intending every worker to size its token cap from free / ceiling. Retirement removes the slot, preserves healthy sibling service after transient-init exhaustion, tracks shutdown through OwnedRetirements<LocalProvider>, suppresses shutdown rejection, and redispatches after retirement settles.