Skip to content

Fix Go runtime version reporting#320

Merged
mksglu merged 1 commit intomksglu:nextfrom
TyceHerrman:fix-go-version-reporting
Apr 25, 2026
Merged

Fix Go runtime version reporting#320
mksglu merged 1 commit intomksglu:nextfrom
TyceHerrman:fix-go-version-reporting

Conversation

@TyceHerrman
Copy link
Copy Markdown
Contributor

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
@mksglu mksglu merged commit 0573794 into mksglu:next Apr 25, 2026
@mksglu
Copy link
Copy Markdown
Owner

mksglu commented Apr 25, 2026

Resolved the server.bundle.mjs conflict and merged to next. Thanks for the Go version fix!

@TyceHerrman TyceHerrman deleted the fix-go-version-reporting branch April 25, 2026 15:55
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.

2 participants