Dashboard › opencode-lore › Distillation
4dee6c77-53b2-4fe4-ba79-bc30c5873108["lore_tm_v1_f3XhwnUhSMEanR_bfrRHEuPBWGBXtjhkfsMN-uVDvwU","lore_tm_v1_oSNdr0zbSNeuFaeMUqWXXJI0B2t0RgVRnqGZRVfYH6c"]
Date: Sep 16, 2026
isNativeOrtLoadError(msg: string) detector in both packages/core/src/embedding-worker-types.ts and packages/core/src/embedding-worker.ts. It first identifies native ONNX Runtime artifacts using onnxruntime_binding.node, libonnxruntime[_providers_*].so/.dylib/.dll, or OrtGetApiBase, then recognizes loader failures including ERR_DLOPEN_FAILED, invalid ELF/Mach-O/Win32 files, file too short, missing shared objects/images/modules, undefined or missing symbols, and dlopen.packages/core/src/ort-native.ts is fail-closed and must never interrupt WASM fallback.node_modules and never selects an arbitrary package.resolveNativeOrtBindingPath must never throw: an unresolvable native package is the expected dist-only case and must degrade to WASM fallback rather than crash embedding.realpathSync, validates the resolved binding, and returns the canonical binding only when valid; otherwise it returns null.gatewayManifest?.devDependencies?.["onnxruntime-node"].null and never throws.[0xcf, 0xfa, 0xed, 0xfe], and creates an onnxruntime-node workspace fixture at join(gatewayDir, "node_modules/onnxruntime-node").test.each(...) to verify that a selected native addon load failure requests WASM. A test fixture throws new Error("onnxruntime_binding.node: file too short"), launches a Worker, listens for its message, and exercises embedding with inputType: "query".