Skip to content

infs: doctor verifies inference-lsp in the toolchain dir, not the bin/ symlink the editor actually uses #253

Description

@0xGeorgii

Follow-up from the comprehensive review of PR #239 (LSP server). Line numbers reference the PR branch at review time.

Severity: major (1), minor (2), nit (3)

  1. Doctor verifies the wrong location for inference-lsp (doctor.rs:364): the check tests toolchains/<default>/inference-lsp, but the VS Code resolve chain only uses <INFERENCE_HOME>/bin/inference-lsp (resolve.ts:68) and PATH (whose managed entry is also bin/). States where the binary exists in the toolchain dir but bin/ has no lsp symlink are reachable and likely during rollout:

    • a pre-PR infs installs a toolchain archive (extraction unpacks inference-lsp; old update_symlinks links only infc); the user then upgrades infs — nothing re-runs update_symlinks;
    • new infs install of an already-installed version early-returns without update_symlinks when a default is already set (commands/install.rs).

    In both states infs doctor prints [OK] inference-lsp: Found at .../toolchains/<v>/inference-lsp while the extension fails with "inference-lsp not found (searched .../bin and PATH)". The natural remediation infs install is a no-op ("already installed"); only the non-obvious infs default <v> heals it. Fix: additionally verify paths.symlink_path(binary_with_ext) resolves; if the toolchain bundles the server but the bin/ link is missing/broken, emit a Warning telling the user to run infs default <version> (or repair the link automatically).

  2. The "also on PATH" note reports the install's own symlink (doctor.rs:339): infs puts <INFERENCE_HOME>/bin on PATH at first install, and the extension's runDoctor prepends it explicitly — so on every healthy install which("inference-lsp") resolves to the managed symlink itself and the OK line implies a duplicate copy exists. Exclude the managed bin dir from the PATH-copy note.

  3. check_inference_lsp hardcodes the binary name (doctor.rs:338 etc.) instead of iterating ToolchainPaths::OPTIONAL_MANAGED_BINARIES; a second optional managed binary would silently get no doctor coverage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcliCommand line interface relatedinfsInference Start related

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions