{"record":{"id":"499346b568cef2db","repo":"router-for-me/CLIProxyAPI","slug":"release-tag-q-resolved-version-q-want-q","errorCode":null,"errorMessage":"release tag %q resolved version %q, want %q","messagePattern":"release tag %q resolved version %q, want %q","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/pluginstore/install.go","lineNumber":110,"sourceCode":"\toptions = normalizeInstallOptions(options)\n\tversion = normalizeVersion(version)\n\tif !validPluginVersion(version) {\n\t\treturn InstallResult{}, fmt.Errorf(\"invalid plugin version %q\", version)\n\t}\n\treleaseTag = strings.TrimSpace(releaseTag)\n\tif releaseTag == \"\" {\n\t\treleaseTag = version\n\t}\n\trelease, errRelease := c.FetchReleaseByTag(ctx, plugin, releaseTag)\n\tif errRelease != nil {\n\t\treturn InstallResult{}, errRelease\n\t}\n\treleaseVersion, errVersion := ReleaseVersion(release)\n\tif errVersion != nil {\n\t\treturn InstallResult{}, errVersion\n\t}\n\tif releaseVersion != version {\n\t\treturn InstallResult{}, fmt.Errorf(\"release tag %q resolved version %q, want %q\", releaseTag, releaseVersion, version)\n\t}\n\tplugin.Version = version\n\treturn c.installRelease(ctx, plugin, release, version, options)\n}\n\nfunc (c Client) installRelease(ctx context.Context, plugin Plugin, release Release, version string, options InstallOptions) (InstallResult, error) {\n\tarchiveAsset, checksumAsset, errAssets := SelectReleaseAssets(release, plugin.ID, plugin.Version, options.GOOS, options.GOARCH)\n\tif errAssets != nil {\n\t\treturn InstallResult{}, errAssets\n\t}\n\tarchiveData, errArchive := c.DownloadAsset(ctx, archiveAsset)\n\tif errArchive != nil {\n\t\treturn InstallResult{}, fmt.Errorf(\"download %s: %w\", archiveAsset.Name, errArchive)\n\t}\n\tchecksumData, errChecksum := c.DownloadAsset(ctx, checksumAsset)\n\tif errChecksum != nil {\n\t\treturn InstallResult{}, fmt.Errorf(\"download checksums.txt: %w\", errChecksum)\n\t}","sourceCodeStart":92,"sourceCodeEnd":128,"githubUrl":"https://github.com/router-for-me/CLIProxyAPI/blob/78f0c4079e3e6273d65d03b5549cffc898703264/internal/pluginstore/install.go#L92-L128","documentation":"InstallVersion fetched the release by tag and derived its version via ReleaseVersion, but that version differs from the version argument — the check is an exact string comparison. This pins installs to immutable version content: a tag that was moved or a tag/version mismatch (like a 'latest' tag) is rejected rather than silently installing different bits.","triggerScenarios":"InstallVersion(plugin, \"v2\", \"1.0.0\") where tag v2's release reports version 2.0.0; using a floating tag (latest/edge) whose release version differs from the version you declared; release tag renamed/re-published after you captured the version.","commonSituations":"Hardcoded version in a lockfile while the tag was re-pointed; passing a tag-derived version with different formatting (though normalizeVersion strips 'v', other differences still fail); mutable tags in CI.","solutions":["Align the version argument with what the tag actually resolves to (check the release's reported version)","Use the exact, immutable version tag for the release instead of floating tags like 'latest'","If the tag was legitimately re-published, update the pinned version in your config/lockfile"],"exampleFix":"// before\nclient.InstallVersion(ctx, plugin, \"latest\", \"1.0.0\", opts)\n\n// after\nclient.InstallVersion(ctx, plugin, \"v1.0.0\", \"1.0.0\", opts)","handlingStrategy":"validation","validationCode":"release, err := client.FetchReleaseByTag(ctx, plugin, tag)\nif err != nil { return err }\nresolved, err := pluginstore.ReleaseVersion(release)\nif err != nil { return err }\nif resolved != version {\n    return fmt.Errorf(\"tag %q moved to %s; update pin or use exact tag\", tag, resolved)\n}","typeGuard":null,"tryCatchPattern":"if err != nil && strings.Contains(err.Error(), \"resolved version\") {\n    // re-pin config to the resolved version, or pin the exact version tag\n}","preventionTips":["Pin installs to immutable version tags, not floating ones","Verify tag->version agreement before large-scale installs","Treat this error as tamper detection — do not blindly update the pin"],"tags":["version-pin","release-tag","install","go"],"backgroundTag":null,"analyzedSha":"78f0c4079e3e6273d65d03b5549cffc898703264","analyzedAt":"2026-08-15T12:26:37.444Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}