Skip to content

Fix Go runtime version reporting#320

Open
TyceHerrman wants to merge 1 commit intomksglu:nextfrom
TyceHerrman:fix-go-version-reporting
Open

Fix Go runtime version reporting#320
TyceHerrman wants to merge 1 commit intomksglu:nextfrom
TyceHerrman:fix-go-version-reporting

Conversation

@TyceHerrman
Copy link
Copy Markdown

Motivation

getRuntimeSummary() uses a generic --version probe for runtime version reporting. Go does not support go --version; it exits with a flag error and prints help text. The supported command is go version.

That means context-mode can correctly detect Go as available, but still report its version as unknown.

Changes

  • Update the private runtime version helper to accept explicit version arguments.
  • Use go version for Go runtime summary output.
  • Keep the existing --version default for other runtimes.
  • Use execFileSync with Windows shell compatibility for safer argument handling.
  • Add mocked unit coverage to verify Go uses version and other runtimes still use --version.

Verification

  • npm test -- tests/runtime.test.ts
  • npm run typecheck
  • npm run build
  • Local sanity:
    • go --version fails with flag provided but not defined: -version
    • go version prints go version go1.26.2 darwin/arm64

@TyceHerrman TyceHerrman changed the base branch from main to next April 22, 2026 01:10
Use go version for Go runtime summaries while keeping the default --version probe for other runtimes. Add mocked coverage for the Go-specific version command.

Co-authored-by: Codex <noreply@openai.com>
@TyceHerrman TyceHerrman force-pushed the fix-go-version-reporting branch from 8612fda to af2655a Compare April 22, 2026 01:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant