Dashboard › opencode-lore › Distillation
8bbab7e4-83e1-4177-ba28-6cdce180be3e["lore_tm_v1_6ymzzLmySzMhNFJxcepefLOdSX3E7JcwMEIM3VsjaZs","lore_tm_v1_ns7S19G1mIhdZbRRAHFgrE2mCPufANawGhqdAFvFK6s","lore_tm_v1_I2Duf6qa2gpTfoFlxAaUK1bLh1Ps8dnloKzrQcHV5RQ","lore_tm_v1_G5gszxLsvAJued5WrjYIr7_FrxsqzGPjZ29m03ZR2k8","lore_tm_v1_OCOL0gkXVha1Eyv_49cJC1JwobypTzs_o37MEikIVB4","lore_tm_v1_pljTDvkYuO5PO2GQKymOGQ3sG3wj0ENr9BBhJq4oHjU","lore_tm_v1_8VOyev5OxT2zKNYzqDS-FslrE3tXgcrz98V0uej1KKc","lore_tm_v1_e5OI1FFvCdrJ4Y67IzpC4-bvJAeUtz5ko73czHn59rU","lore_tm_v1_e1qYkzOPHvJ8A7ZOJzZ5I6H6Zv3VXp90-PpQML8mKCs","lore_tm_v1_7t9HeCCgZUqTofN146uPmvntEOpmeBbjqeUsaVgsZQ8","lore_tm_v1_nsJHKoCRPHTvHEdD9HQ48k7eO7kr3PkBbKxPgnd0B7Y","lore_tm_v1_2tskJeJxL93jDAFTW7FSjCUQiXRIo_9LbxkaHDQNHao","lore_tm_v1_Fe0vD-PWD85hf6p0GMlXr12yVYv-eC1oGEU4NrmVQ6I","lore_tm_v1_hNFdq_pQQvS8pD9ygm5AiqaAQLi1gcS2Ns8ZuJzHTIQ","lore_tm_v1_fJVTEZjWjvm0DYIADaVFrsn2L4g_V9uOH8VduKz4lLc","lore_tm_v1_9n9-2jMEJEttonkwSCc7ciqHSlvlmnB5l1LBQ35FqrE"]
Date: Sep 16, 2026
packages/core/src/embedding/pool.ts admission logic: liveFreemem() reads test override or freemem(), then obtains constrainedMemoryLimit() and availableMemoryHeadroom(); if the process is constrained but headroom is unknown, it returns 0, otherwise it calls clampFreeToContainerLimit(raw, constrained, headroom).packages/core/src/embedding/pool.ts burst-growth reservation requires liveFreemem() to cover (unhealthy slot count + 1) * PER_WORKER_MEM_BUDGET_BYTES, thereby charging memory for admitted workers that have not yet become healthy.packages/core/src/embedding/pool.ts passes the pool ceiling to each LocalProvider as its memory divisor, so each worker sizes its token cap from free / ceiling; the stated goal is keeping all provisioned workers collectively within one EMBED_MEM_FRACTION share rather than each independently claiming half of free memory.tmzmtlss / commit e6d0f1ed was described as fix(core): correct embedding runtime selection and admission, based on parent pxrvwsvv / 2cbf4006 (main, feat(cch): add seeds for Claude Code up to 2.1.272 (#1780)).fix/responses-private-references had conflicts outside the candidateβs ancestry.packages/core/src/cgroup-memory.ts and packages/core/test/cgroup-memory.test.ts; modified packages/core/src/embedding/local.ts, packages/core/src/embedding/pool.ts, packages/core/src/embedding-cap.ts, packages/core/src/embedding-worker-types.ts, packages/core/src/embedding-worker.ts, packages/core/src/embedding.ts, packages/core/src/ort-native.ts, packages/core/test/embedding-cap.test.ts, packages/core/test/embedding-pool-memory.test.ts, packages/core/test/embedding-pool.test.ts, packages/core/test/embedding-worker-types.test.ts, packages/core/test/ort-native.test.ts, packages/gateway/script/bundle.ts, packages/gateway/script/ort-platform-package.ts, packages/gateway/test/bundle-exports.test.ts, and packages/gateway/test/ort-platform-package.test.ts.1818 insertions(+), 90 deletions(-) across 18 files; notable per-file additions included 205 lines in packages/core/src/cgroup-memory.ts, 297 in packages/core/test/cgroup-memory.test.ts, 256 in packages/core/src/ort-native.ts, 478 in packages/core/test/ort-native.test.ts, and 246 in packages/gateway/test/bundle-exports.test.ts./home/byk/Code/opencode-lore-embedding-runtime-mutation; its initial operation failed because the working copy was stale since operation b2ff52c0245e, with the prescribed recovery jj workspace update-stale.tsxwlvkw / b892e0385ba0 was an empty commit with no changes, parented directly on candidate tmzmtlss / e6d0f1edc850; update reported Added 2 files, modified 14 files, removed 0 files.EMBED_REPROBE_RATIO is 1.3.packages/core/src/cgroup-memory.ts implements Linux cgroup v1/v2 discovery from /proc/self/cgroup and /proc/self/mountinfo; on hybrid hosts it prefers the explicit v1 memory controller over the unified v2 hierarchy.packages/core/src/cgroup-memory.ts decodes octal procfs path escapes, rejects non-absolute paths, NULs, and .. path components, normalizes with node:path posix, and chooses the deepest directly matching mount root; namespaced interpretation is accepted only when exactly one candidate is unambiguous.readLinuxCgroupMemoryHeadroomBytes() walks from the process cgroup directory to the cgroup mount point and computes the minimum finite limit - usage across inherited boundaries. For cgroup v2 it reads memory.current, memory.high, and memory.max; for v1 it reads memory.usage_in_bytes and memory.limit_in_bytes.undefined for malformed numeric data, unreadable descendant boundaries, unsafe traversal, discovery errors, or ambiguous mounts. A special cgroup-v2 exception allows the true root mount (files.root === "/") to omit memory.current/high/max, because that root cannot itself be resource-controlled.packages/core/src/embedding/local.ts defines test overrides _setConstrainedMemoryForTest(), _setContainerFreeForTest(), and _setAvailableMemoryForTest(). constrainedMemoryLimit() uses process.constrainedMemory() and returns 0 for unknown, unsupported, unconstrained, non-finite, or non-positive values.availableMemoryHeadroom() combines Linux procfs-derived headroom with runtime information through resolveMemoryHeadroom(). Bun is treated specially because its implementation currently aliases host freemem() inside constrained cgroups; Nodeβs libuv implementation is treated as process-limit-aware. If process.availableMemory() is absent or throws, the Linux result is used.packages/core/test/embedding-pool.test.ts contains three admission regressions: 1. with pool size 2 and pool free memory 0, concurrency remains on one worker; 2. with host free memory 64 * GB, constrained limit 256 MiB, and ceiling 2, the pool must not load a second worker; 3. with host free memory 64 * GB, constrained limit 12 * GB, and available headroom 23 MiB, a warmed pool remains at one worker.packages/core/test/embedding-pool.test.ts tests unreflected-memory reservation with pool size 4, host free memory 64 * GB, constrained limit 12 * GB, and available headroom 1600 MiB: after warming and submitting three embeds, only two fake workers may exist because one admitted-but-unhealthy workerβs budget must be reserved.os.freemem() reported large host memory, the old gate spawned a second native ONNX worker, and the process exceeded memory.max, causing an OOM-killer SIGKILL.packages/core/test/embedding-pool-memory.test.ts pins two guards: each worker sizes from free / ceiling rather than full free memory, and a constrained primary worker with unknown current headroom uses the token floor.