Skip to content

VS Code extension finding positions can drift after backend restart #29

Description

@mesrikanthreddy

Problem

Noted as a known limitation in `vscode-extension/README.md`:

Findings are keyed by line number only — if the backend restarts mid-edit, positions may shift until the next scan.

If the backend restarts (crash, manual `kshield start` re-run, machine sleep/wake) while a file has unsaved edits since the last scan, existing diagnostic squiggles can point at the wrong line until the next save-triggered scan.

Proposed fix

Options to evaluate:

  • Re-scan automatically on backend-reconnect (status bar already detects reachability — could trigger a scan when it transitions from unreachable → reachable)
  • Track content hash per diagnostic and invalidate/gray out stale findings if the document has changed since the finding was computed, rather than leaving stale line numbers

Activity

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions