Skip to content

OpenCode 1.18: native jev-lsp path empty diagnostics (client path; not YAML) #21

Description

@makefunstuff

Scope

OpenCode-native client path — not a jev-lsp YAML authoring / server regression.

QA verified PR #18 (f4fc792): YAML rules load and surface correctly in Neovim and VS Code. OpenCode is fine via the push-bridge (jev server). The flake is only the native OpenCode 1.18 ↔ jev-lsp diagnostics path.

Bug

OpenCode 1.18 with the native jev-lsp server often returns empty debug lsp diagnostics for a YAML rule that Neovim and VS Code both surface on the same tree / same rule.

Not this

Repro hints

  • Tree: /home/box/Code/jev-lsp @ f4fc792 (or current main after merge)
  • QA evidence: /workspace/jev-lsp-pr18-qa/
  • Compare: nvim / VS Code (pass) vs OpenCode native (flake) vs OpenCode push-bridge (pass)

Ask

Reproduce, decide fix vs document bridge-only for OpenCode, link upstream if editor-side.

Activity

  1. makefunstuff commented on Sep 21, 2026

    @makefunstuff
    OwnerAuthor

    Fixed by the official bridge path: #22 (editors/opencode/).

    Root cause, confirmed on 1.18. Three client-side behaviours, none of them a rules/YAML
    regression:

    1. It advertises workspace.diagnostics.refreshSupport: false and answers the
      workspace/diagnostic/refresh jev-lsp sends anyway with an empty OK, so the re-pull the
      server asks for never happens.
    2. It pulls textDocument/diagnostic once when a document opens, before the ambient pass has
      cached anything, and keeps that empty report for the session.
    3. The Diagnostic.report() it hands the agent after a write keeps severity === 1 only, and
      every rule finding is a Warning.

    jev-lsp's finding path is pull (PROTOCOL §3.4/§9), which is what VS Code and Neovim implement.
    Pushing ambient findings from the server would break §9, so the translation is on the client side
    and PROTOCOL.md is unchanged.

    What shipped. editors/opencode/jev-lsp-opencode-bridge.py proxies stdio JSON-RPC to a
    jev-lsp --stdio child and: answers initialize with diagnosticProvider removed (puts OpenCode
    on its push path), advertises refreshSupport: true to the server, answers each refresh and pushes
    the pull as textDocument/publishDiagnostics, remaps Warning → Error with a [jev warning] prefix
    (Error is the only severity OpenCode's transcript shows), and synthesizes the didSave OpenCode
    never sends, without which the save-triggered rules pass never runs. editors/opencode/README.md
    has the config, and the top-level README's OpenCode section no longer recommends bare
    jev-lsp --stdio.

    Evidence — bash editors/opencode/verify-bridge.sh, 0 failures, four stages, no key and no
    network (stub decide tier with its decision call stalled so the native pull lands before the
    finding exists):

    native jev-lsp --stdio bridge
    opencode debug lsp diagnostics handler.rs [] for a file the rule flags the finding, severity: 1, [jev warning]
    OpenCode-shaped probe client pulls: 1, first_pull_items: 0, refresh_requests_acked: 2, pushes: 0 provider_advertised: false, pulls: 0, pushes: 2

    Falsified deliberately: with the bridge replaced by a plain exec of the server, the bridge
    stages report 3 failure(s) and exit 1 while the native reproduction stays green. The row is now
    opencode_bridge in verify/run-suite.sh (ok in a full-table run here), and
    docs/VERIFICATION.md §1.2 records it.

    Native without the bridge remains broken by OpenCode 1.18's design and stays unsupported until
    OpenCode implements workspace/diagnostic/refresh or shows warnings to its agent; at that point
    lsp.jev.command can point straight at jev-lsp --stdio and the bridge can be deleted.

  2. makefunstuff commented on Sep 21, 2026

    @makefunstuff
    OwnerAuthor

    Follow-up from QA (OpenCode ambient TUI bar)

    After #22 @ 0e03685, QA re-checked ambient coding-session UX on OpenCode 1.18.31 with the official editors/opencode/ bridge:

    • Coding-only edit/save → green LSP · jev
    • No readable [jev warning] / diagnostic chrome in the TUI (no review prompt, no debug dump)
    • Earlier “PASS” shots were on-demand / debug lsp diagnostics JSON, not ambient file-view UX

    Evidence: /workspace/jev-lsp-pr22-qa/opencode-ambient-before.png, opencode-ambient-violation.png

    Scope split

    Not a YAML / rules regression.

  3. makefunstuff commented on Sep 21, 2026

    @makefunstuff
    OwnerAuthor

    Upstream evidence (OpenCode client, not jev-lsp):

    Matches QA ambient FAIL + nvim/VS Code proving the server. Also cited on docs PR #23.

  4. makefunstuff commented on Sep 21, 2026

    @makefunstuff
    OwnerAuthor

    Status after #24 merge (b619e9b):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions