{"record":{"id":"2ac9e67a70097122","repo":"can1357/oh-my-pi","slug":"availability-reason-julia-kernel-unavailable","errorCode":null,"errorMessage":"${availability.reason ?? \"Julia kernel unavailable\"}","messagePattern":"\\$\\{availability\\.reason \\?\\? \"Julia kernel unavailable\"\\}","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/coding-agent/src/eval/jl/executor.ts","lineNumber":176,"sourceCode":"\treturn executeWithKernelBase<JuliaExecutorOptions, Record<string, string | undefined>>({\n\t\tkernel,\n\t\tcode,\n\t\toptions,\n\t\trunIdPrefix: \"jl\",\n\t\terrorLogLabel: \"Julia\",\n\t\tisJulia: true,\n\t\tcancelledErrorClass: JuliaExecutionCancelledError,\n\t\tbuildKernelEnvPatch: opts => buildManagedKernelEnvPatch(opts, { sparse: true }),\n\t\tformatKernelTimeoutAnnotation,\n\t\tformatTimeoutAnnotation,\n\t\tresolveDeadlineMs: opts => opts?.deadlineMs,\n\t});\n}\n\nasync function ensureKernelAvailable(cwd: string, options: JuliaExecutorOptions): Promise<void> {\n\tconst availability = await waitForJuliaPromise(checkJuliaKernelAvailability(cwd, options.interpreter), options);\n\tif (!availability.ok) {\n\t\tthrow new Error(availability.reason ?? \"Julia kernel unavailable\");\n\t}\n}\n\nasync function ensureToolBridge(options: JuliaExecutorOptions): Promise<void> {\n\tif (!options.toolSession || options.bridge) return;\n\ttry {\n\t\toptions.bridge = await ensurePyToolBridge();\n\t} catch (err) {\n\t\tlogger.warn(\"Failed to start Julia tool bridge\", {\n\t\t\terror: err instanceof Error ? err.message : String(err),\n\t\t});\n\t}\n}\n\nconst sessionRegistry = createKernelSessionRegistry<\n\tJuliaKernel,\n\tJuliaExecutorOptions,\n\tJuliaResult,","sourceCodeStart":158,"sourceCodeEnd":194,"githubUrl":"https://github.com/can1357/oh-my-pi/blob/969062200754ea02cfac922e5ebb8c608c079e15/packages/coding-agent/src/eval/jl/executor.ts#L158-L194","documentation":"Before executing Julia code, `executeJulia` calls `ensureKernelAvailable`, which probes the environment via `checkJuliaKernelAvailability`: it enumerates Julia runtimes and runs `julia -e 'exit(0)'` against each candidate. This plain Error is thrown with the probe's failure reason (or a generic fallback) when no working Julia interpreter can be found — typically because the `julia` binary is absent from PATH or the located binaries fail to execute.","triggerScenarios":"`executeJulia(code, ...)` runs when: no Julia executable is found on PATH (or project/env-scoped locations); an explicit `options.interpreter` path is invalid; all candidate binaries fail the `exit(0)` probe (corrupt install, missing shared libs, wrong arch); or the probe was cancelled by the abort signal/deadline.","commonSituations":"Julia not installed on the machine or CI image; julia installed but not on PATH for the process env; partial/corrupt juliaup install; musl/glibc mismatch making the binary fail to launch; expired eval deadline cancelling the probe.","solutions":["Install Julia from https://julialang.org/ (or via juliaup) and ensure it is on the process PATH.","Read the thrown reason: \"Julia executable not found on PATH\" → PATH/install issue; \"No working Julia interpreter found. Tried: ...\" → the listed binaries fail, fix or remove them.","Pass a valid `interpreter` option pointing at a working `julia` binary path.","If the reason says the probe was cancelled, raise the eval timeout/deadline.","On Linux, verify the binary runs standalone (`julia -e 'exit(0)'`) to catch missing shared libraries."],"exampleFix":"// before: fails, julia not on PATH\nawait executeJulia(\"println(1)\");\n// after: point at an explicit interpreter or fix PATH\nawait executeJulia(\"println(1)\", { interpreter: \"/opt/julia/bin/julia\" });","handlingStrategy":"validation","validationCode":"import { checkJuliaKernelAvailability } from \".../eval/jl/kernel\";\nconst avail = await checkJuliaKernelAvailability(cwd, interpreter);\nif (!avail.ok) throw new Error(`Julia unavailable: ${avail.reason}`); // or skip the Julia cell","typeGuard":"function isJuliaAvailable(a: { ok: boolean; reason?: string }): a is { ok: true; juliaPath: string } {\n  return a.ok;\n}","tryCatchPattern":"try {\n  return await executeJulia(code);\n} catch (e) {\n  if (String(e).includes(\"Julia\")) return skippedResult(\"julia not installed\");\n  throw e;\n}","preventionTips":["Probe availability once at eval-suite startup and skip Julia cells when absent.","Pin Julia in CI images and add it to PATH for the runner user.","Pass an explicit interpreter path instead of relying on PATH lookup.","Verify the binary with `julia -e 'exit(0)'` in setup scripts."],"tags":["environment","julia","missing-binary"],"backgroundTag":"runtime-not-found","analyzedSha":"969062200754ea02cfac922e5ebb8c608c079e15","analyzedAt":"2026-08-31T10:29:35.737Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}