Skip to content

Add CLI binary version tracking and health monitoring #17

Description

@dollfins

Description

When the Soroban Guard CLI is updated (e.g., new rules added, bug fixes), users must manually restart VS Code or reload the window for the extension to pick up the new binary. The extension caches nothing about the binary, but it also never re-checks the binary after initial activation.

Current Behavior

  • Binary is checked once during client.ts:checkBinary() (not called on activation currently)
  • No version tracking — the extension does not know which version of the CLI is installed
  • If the CLI is updated while VS Code is running, the extension will not discover new rules or fixes

Expected Behavior

Binary Version Tracking

  • On activation, retrieve and store CLI version: soroban-guard --version
  • Display version in status bar tooltip
  • Optionally check for CLI updates on a configurable interval

Binary Health Monitoring

  • If a scan fails with a "binary not found" error, re-check the binary path
  • Show a persistent warning if the binary is missing (with a "Configure" action button)
  • Allow users to trigger a binary re-check via command palette

Version Compatibility Check

  • Define a minimum supported CLI version in the extension
  • Warn users if their CLI version is below the minimum
  • Suggest upgrade path when incompatibility is detected

Implementation Notes

  • Store CLI version in a SorobanGuardState that persists across sessions
  • Use vscode.Memento (extension context.workspaceState) for persistence
  • The version check should be fast and non-blocking (timeout after 3 seconds)
  • Parse semver for compatibility comparison

Acceptance Criteria

  • CLI version is displayed in the status bar tooltip
  • Users are warned when CLI is outdated
  • Binary re-check can be triggered manually
  • Version info is persisted across sessions
  • Missing binary shows actionable notification

Complexity

Medium — requires state management, semver parsing, and status bar updates.

Points

150

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

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions