Fix nightly version updates when distribution sources drift#236
Fix nightly version updates when distribution sources drift#236
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes the nightly “Update Agent Versions” workflow logic so multi-distribution agents are updated based on the latest stable version shared across all publish targets, avoiding false mismatches when sources drift (e.g., GitHub releases ahead of npm dist-tags).
Changes:
- Replace per-source “latest pointer” comparisons with intersection-based resolution of the highest common stable version across distributions.
- Stop relying on npm
dist-tag latestby reading stable published versions directly from the npm registry payload. - Add regression tests for multi-source shared-version resolution and prerelease detection (e.g.,
0.1.17rc0).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
.github/workflows/update_versions.py |
Adds stable-version normalization/sorting and resolves updates via highest common stable version across distribution sources. |
.github/workflows/tests/test_update_versions.py |
Adds coverage for prerelease detection and multi-source version resolution behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| def is_prerelease(version: str) -> bool: | ||
| """Check if a version string is a pre-release (e.g., 1.0.0-beta.3).""" | ||
| return bool(re.match(r"^\d+\.\d+\.\d+-.+", version)) | ||
| """Check if a version string is not a stable numeric dotted release.""" | ||
| normalized = version.lstrip("v") | ||
| return not bool(re.fullmatch(r"\d+(?:\.\d+)*", normalized)) |
There was a problem hiding this comment.
is_prerelease() now returns True for any version that isn't strictly numeric dotted (e.g., it would also classify build metadata like 1.2.3+local or PEP 440 post-releases like 1.2.3.post1 as a “prerelease”). Since the function name implies semver-style prereleases only, this is easy to misread and can cause future callers to incorrectly filter out stable versions. Consider either renaming it to reflect “non-stable / non-numeric” semantics, or tightening the predicate to only match actual prerelease identifiers while still allowing other stable formats you want to support.
| return None, UpdateError(agent_id, f"Could not fetch npm versions for {package_name}") | ||
| source_versions["npx"] = (versions, f"https://registry.npmjs.org/{package_name}") | ||
|
|
||
| if "uvx" in distribution: |
There was a problem hiding this comment.
source_url for npm is built as https://registry.npmjs.org/{package_name} while the fetch path uses an encoded name (%40scope%2Fname). For scoped packages this can be inconsistent and may produce a non-working link in error/output. Consider using the same encoded form for source_url (or reusing the exact URL used in get_npm_versions()) so diagnostics reliably point to the queried resource.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…entprotocol#236) * Fix multi-source version resolution in update workflow * Format update workflow version resolution changes * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Add dimcode * Update dimcode 0.0.41 * docs: update protocol matrix for 2026-04-09 * Update opencode to 1.4.1 - opencode: 1.4.0 -> 1.4.1 * Update qoder to 0.1.39 - qoder: 0.1.38 -> 0.1.39 * docs: update protocol matrix for 2026-04-10 * revert fixed version for gemini (agentclientprotocol#230) * revert fixed version for gemini * revert fixed version for gemini * docs: update protocol matrix for 2026-04-11 * docs: update protocol matrix for 2026-04-12 * Update crow-cli (agentclientprotocol#232) * Update agent.json * Update quarantine.json * Update agent.json * Bump actions/create-github-app-token from 3.0.0 to 3.1.1 (agentclientprotocol#234) Bumps [actions/create-github-app-token](https://github.com/actions/create-github-app-token) from 3.0.0 to 3.1.1. - [Release notes](https://github.com/actions/create-github-app-token/releases) - [Commits](actions/create-github-app-token@f8d387b...1b10c78) --- updated-dependencies: - dependency-name: actions/create-github-app-token dependency-version: 3.1.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * docs: update protocol matrix for 2026-04-13 * Fix nightly version updates when distribution sources drift (agentclientprotocol#236) * Fix multi-source version resolution in update workflow * Format update workflow version resolution changes * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update junie/agent.json to version 1362.39.0 (agentclientprotocol#237) * Update 12 agents to latest versions - cline: 2.13.0 -> 2.14.0 - codebuddy-code: 2.81.2 -> 2.85.0 - factory-droid: 0.97.0 -> 0.99.0 - fast-agent: 0.6.12 -> 0.6.15 - github-copilot: 1.465.0 -> 1.469.0 - github-copilot-cli: 1.0.21 -> 1.0.25 - kimi: 1.30.0 -> 1.32.0 - mistral-vibe: 2.7.3 -> 2.7.4 - nova: 1.0.95 -> 1.0.96 - opencode: 1.4.1 -> 1.4.3 - qoder: 0.1.39 -> 0.1.42 - qwen-code: 0.14.2 -> 0.14.4 * Bump actions/github-script from 8 to 9 (agentclientprotocol#235) Bumps [actions/github-script](https://github.com/actions/github-script) from 8 to 9. - [Release notes](https://github.com/actions/github-script/releases) - [Commits](actions/github-script@v8...v9) --- updated-dependencies: - dependency-name: actions/github-script dependency-version: '9' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update 2 agents to latest versions - codebuddy-code: 2.85.0 -> 2.86.0 - kimi: 1.32.0 -> 1.33.0 * Update claude-acp to 0.27.0 - claude-acp: 0.26.0 -> 0.27.0 * Update gemini to 0.37.2 - gemini: 0.37.1 -> 0.37.2 * Update fast-agent to 0.6.16 - fast-agent: 0.6.15 -> 0.6.16 * Update factory-droid to 0.100.0 - factory-droid: 0.99.0 -> 0.100.0 * docs: update protocol matrix for 2026-04-14 * Update mistral-vibe to 2.7.5 - mistral-vibe: 2.7.4 -> 2.7.5 * Update corust-agent to 0.4.2 - corust-agent: 0.4.1 -> 0.4.2 * Update qoder to 0.1.43 - qoder: 0.1.42 -> 0.1.43 * Update 2 agents to latest versions - codebuddy-code: 2.86.0 -> 2.87.0 - kimi: 1.33.0 -> 1.34.0 * Update codebuddy-code to 2.88.0 - codebuddy-code: 2.87.0 -> 2.88.0 * Update github-copilot-cli to 1.0.26 - github-copilot-cli: 1.0.25 -> 1.0.26 * Update auggie to 0.24.0 - auggie: 0.23.0 -> 0.24.0 * Update gemini to 0.38.0 - gemini: 0.37.2 -> 0.38.0 * Update 3 agents to latest versions - factory-droid: 0.100.0 -> 0.101.0 - github-copilot-cli: 1.0.26 -> 1.0.27 - opencode: 1.4.3 -> 1.4.4 * Update 2 agents to latest versions - nova: 1.0.96 -> 1.0.97 - opencode: 1.4.4 -> 1.4.5 * Update github-copilot to 1.470.0 - github-copilot: 1.469.0 -> 1.470.0 * docs: update protocol matrix for 2026-04-15 * Update opencode to 1.4.6 - opencode: 1.4.5 -> 1.4.6 * Update claude-acp to 0.28.0 - claude-acp: 0.27.0 -> 0.28.0 * Update kimi to 1.35.0 - kimi: 1.34.0 -> 1.35.0 * Update qwen-code to 0.14.5 - qwen-code: 0.14.4 -> 0.14.5 * Update gemini to 0.38.1 - gemini: 0.38.0 -> 0.38.1 * Update kilo to 7.2.8 - kilo: 7.2.1 -> 7.2.8 * Update kilo to 7.2.10 - kilo: 7.2.8 -> 7.2.10 * Update github-copilot-cli to 1.0.28 - github-copilot-cli: 1.0.27 -> 1.0.28 * Update factory-droid to 0.102.0 - factory-droid: 0.101.0 -> 0.102.0 * docs: update protocol matrix for 2026-04-16 * Update mistral-vibe to 2.7.6 - mistral-vibe: 2.7.5 -> 2.7.6 * Update 2 agents to latest versions - codebuddy-code: 2.88.0 -> 2.89.0 - qoder: 0.1.43 -> 0.1.44 * Update 2 agents to latest versions - codebuddy-code: 2.89.0 -> 2.90.0 - github-copilot-cli: 1.0.28 -> 1.0.29 * Update claude-acp to 0.29.0 - claude-acp: 0.28.0 -> 0.29.0 * ci: allow workflow_dispatch to trigger S3 upload and release (agentclientprotocol#241) The upload-to-S3, artifact-upload, and GitHub-release jobs were gated on `github.event_name == 'push'`, which skipped them for manual workflow_dispatch runs. Add `workflow_dispatch` to those conditions so manual triggers on main also deploy to CDN and publish releases. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Update 2 agents to latest versions - cline: 2.14.0 -> 2.15.0 - github-copilot-cli: 1.0.29 -> 1.0.30 * Update github-copilot-cli to 1.0.31 - github-copilot-cli: 1.0.30 -> 1.0.31 * Update 2 agents to latest versions - fast-agent: 0.6.16 -> 0.6.17 - opencode: 1.4.6 -> 1.4.7 * Update goose to 1.31.0 - goose: 1.30.0 -> 1.31.0 * Update factory-droid to 0.103.0 - factory-droid: 0.102.0 -> 0.103.0 * Update github-copilot to 1.472.0 - github-copilot: 1.470.0 -> 1.472.0 * docs: update protocol matrix for 2026-04-17 * Update nova to 1.0.98 - nova: 1.0.97 -> 1.0.98 * Update claude-acp to 0.29.1 - claude-acp: 0.29.0 -> 0.29.1 * Update 4 agents to latest versions - codebuddy-code: 2.90.0 -> 2.91.0 - kimi: 1.35.0 -> 1.36.0 - opencode: 1.4.7 -> 1.4.8 - stakpak: 0.3.73 -> 0.3.74 * Update 3 agents to latest versions - claude-acp: 0.29.1 -> 0.29.2 - factory-droid: 0.103.0 -> 0.103.1 - opencode: 1.4.8 -> 1.4.9 * Update 2 agents to latest versions - gemini: 0.38.1 -> 0.38.2 - kilo: 7.2.10 -> 7.2.14 * Update opencode to 1.4.10 - opencode: 1.4.9 -> 1.4.10 * Update fast-agent to 0.6.18 - fast-agent: 0.6.17 -> 0.6.18 * Update github-copilot-cli to 1.0.32 - github-copilot-cli: 1.0.31 -> 1.0.32 * Update 2 agents to latest versions - opencode: 1.4.10 -> 1.4.11 - pi-acp: 0.0.25 -> 0.0.26 * Update 2 agents to latest versions - factory-droid: 0.103.1 -> 0.104.0 - nova: 1.0.98 -> 1.0.99 * docs: update protocol matrix for 2026-04-18 * Update fast-agent to 0.6.19 - fast-agent: 0.6.18 -> 0.6.19 * Update 2 agents to latest versions - nova: 1.0.99 -> 1.0.100 - opencode: 1.4.11 -> 1.14.17 * docs: update protocol matrix for 2026-04-19 * chore: update dimcode to 0.0.42 * chore: update dimcode to 0.0.43 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: acp-release[bot] <2373403+acp-release[bot]@users.noreply.github.com> Co-authored-by: Anna Zhdan <anna.zhdan@jetbrains.com> Co-authored-by: Thomas Wood <odell.wood@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Sergey Ignatov <ignatov@jetbrains.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Andrey Efimov <andrei.efimov@jetbrains.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Move API examples from docs into swagger.yaml - Align openapi.yaml docs with implementation
Summary
dist-tag latestas the only npm signal by reading published stable versions directly0.1.17rc0Root cause
The nightly
Update Agent Versionsworkflow was failing inApply version updatesbecausekilohad a newer GitHub release than npm'slatestdist-tag, even though the same stable version was already published on both sides. The updater compared per-source pointers instead of the latest common stable version, so it surfaced a false mismatch and exited with an error.Verification
uv run --with pytest pytest tests/test_update_versions.py -vuv run --with ruff ruff check update_versions.py tests/test_update_versions.pypython3 .github/workflows/update_versions.pyuv run --with jsonschema .github/workflows/build_registry.py --dry-run