fix(github): skip versions host for non-registry attestations#10260
Conversation
📝 WalkthroughWalkthroughThis PR adds an explicit ChangesRegistry-gated attestation versions host routing
🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Greptile SummaryThis PR threads the existing registry/default-backend gate (
Confidence Score: 5/5Safe to merge — the change narrows when the versions-host cache is consulted for attestations, falling back to direct GitHub API calls; the fallback path was already proven to work. All five changed files make a small, well-scoped boolean-gate addition. The logic is consistent: every call site applies the same predicate that already governs other metadata fetches for that backend. New unit tests explicitly cover the false/true branches of the gate, and the Ruby source-equality check is tested for both the default and a custom URL. No existing behavior is removed — packages that previously used the versions host still do; custom packages now bypass it instead of hitting a potentially mismatched cache entry. No files require special attention. Important Files Changed
Reviews (1): Last reviewed commit: "fix(github): skip versions host for non-..." | Re-trigger Greptile |
Hyperfine Performance
|
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.6.0 x -- echo |
21.8 ± 1.5 | 18.8 | 26.7 | 1.00 |
mise x -- echo |
22.4 ± 2.5 | 18.9 | 50.5 | 1.03 ± 0.14 |
mise env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.6.0 env |
20.6 ± 1.8 | 17.8 | 29.0 | 1.00 |
mise env |
21.4 ± 1.8 | 18.3 | 29.4 | 1.04 ± 0.13 |
mise hook-env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.6.0 hook-env |
21.5 ± 1.7 | 18.3 | 27.9 | 1.00 |
mise hook-env |
22.0 ± 1.8 | 18.8 | 28.7 | 1.02 ± 0.12 |
mise ls
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.6.0 ls |
17.5 ± 1.6 | 14.9 | 24.3 | 1.00 |
mise ls |
18.5 ± 1.7 | 15.3 | 24.8 | 1.05 ± 0.14 |
xtasks/test/perf
| Command | mise-2026.6.0 | mise | Variance |
|---|---|---|---|
| install (cached) | 149ms | 149ms | +0% |
| ls (cached) | 67ms | 68ms | -1% |
| bin-paths (cached) | 72ms | 75ms | -4% |
| task-ls (cached) | 143ms | 141ms | +1% |
Summary
Tests
Note
Medium Risk
Changes provenance/attestation fetch paths for installs and lock-time verification; mis-gating could skip cached attestations or hit the wrong API, but behavior is narrowed with tests and known core paths preserved.
Overview
GitHub artifact attestation detect and verify now take an explicit
use_versions_hostflag instead of always routing public GitHub API traffic through mise-versions when global settings allow it.GitHub and Aqua backends pass the existing registry/default-backend gate (
backend_arg_matches_registry_backend), so customgithub:repos and non-registry Aqua packages talk to GitHub directly. Python precompiled builds still use the versions host (true). Ruby precompiled attestations use mise-versions only for the defaultjdx/rubysource; otherowner/repoprecompiled URLs skip it.use_versions_host_for_attestationsnow requires that flag and the usual offline /use_versions_hostsettings. Unit tests cover the new gate and Ruby source behavior.Reviewed by Cursor Bugbot for commit 146c0dc. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit