Skip to content

fix(runner): compare semantic versions for capability gates - #1121

Open
wcy12378 wants to merge 1 commit into
Tencent:mainfrom
wcy12378:codex/runner-version-compatibility
Open

wcy12378 wants to merge 1 commit into
Tencent:mainfrom
wcy12378:codex/runner-version-compatibility

Conversation

@wcy12378

Copy link
Copy Markdown

Runner capability checks currently reject valid versions such as 0.8.0+internal, and the default-machine page describes unparseable versions such as dev as an older release. Custom builds consequently lose capabilities despite retaining the release's version.

Use golang.org/x/mod/semver for backend capability comparisons and mirror its precedence in the existing browser selector. Build metadata is ignored, prereleases sort below their corresponding release, and existing numeric v1/v1.2 shorthand remains accepted. Unknown or malformed versions continue to disable gated capabilities, with a distinct “cannot determine compatibility” default-selection message. Document these rules for custom deployments.

Refs #1074. This addresses the runner comparison/default-selection portion only; platform build metadata/UI, schema tracking, and cross-component protocol contracts remain separate work.

Validation:

  • go test ./internal/domain and go vet ./internal/domain passed.
  • Go and browser comparisons use 26 shared cases, including metadata, prerelease precedence, invalid versions and integers above JavaScript's exact-number range. The new regressions were observed failing before the fix.
  • node web/runner_default_rule_test.js passed; four MCP/SOP/runner view tests passed, including rendered default-button eligibility and reasons.
  • node --check web/app/runners.js, git diff --check, and the public-content checker on the materialized sparse checkout passed.
  • Real Edge at 1440px and 390px confirmed compatible metadata enables the default button, while prerelease, unknown, and offline cases remain disabled with the appropriate reasons. This used the actual application scripts/styles and mocked APIs via Playwright because the Browser plugin was unavailable.

Full platform builds, full-repository tests and a live runner deployment were not run. The new direct x/mod dependency requires Go 1.26.0; this repository already specifies Go 1.26.11. Custom protocol changes still require their own compatibility verification.

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