Repository navigation
fix(npm): find the installed digest for a tarball URL at latest in hook-env - #15643
Conversation
hook-env resolves offline, and npm's latest_installed_channel_version always returned None, so a tarball URL at latest resolved to the literal latest and was reported as missing on every prompt. Every installed version of a tarball URL is a digest of that URL, so return the latest installed one. Fixes #15629 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> AI-Assisted: Tool: Claude Code; model: unavailable; version: 2.1.321 Entire-Checkpoint: 01M7899SBQV4QB9KX5W38BCDCQ
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 9 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
[Medium impact] The PR appears safe to merge; no new blocking issues were found. SummaryFixes offline selection of installed npm tarball digests for
AI-assisted — Tool: Greptile; model: llmproxy/gpt-6.1-sol; version: unavailable. Reviews (4) · Last reviewed commit: "fix(npm): scan the install directory ins..." · Reviewed by Greptile |
Digests have no order, and the latest link and version sort do not record which one was installed last. Choose by install directory mtime and test it with a digest that sorts below an older one. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> AI-Assisted: Tool: Claude Code; model: unavailable; version: 2.1.321 Entire-Checkpoint: 01M78A187F8KZWG2WPZVGCQFEG
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit ebf1d07. Configure here.
Use touch -t in the e2e so it runs on macOS, and key the incomplete-install check by the installation an identity-layout link names. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> AI-Assisted: Tool: Claude Code; model: unavailable; version: 2.1.321 Entire-Checkpoint: 01M78ACAGV6BYHMNT23NGMBFZE
…ll tools Shared and system installs were skipped, and the e2e now checks the active entry with ls --current. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> AI-Assisted: Tool: Claude Code; model: unavailable; version: 2.1.321 Entire-Checkpoint: 01M78AN19X5THP9X9AM1GJJDG4
… (#1754) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [ghcr.io/jdx/mise](https://github.com/jdx/mise) | patch | `2026.11.7` → `2026.11.8` | --- ### Release Notes <details> <summary>jdx/mise (ghcr.io/jdx/mise)</summary> ### [`v2026.11.8`](https://github.com/jdx/mise/blob/HEAD/CHANGELOG.md#2026118---2026-11-13) [Compare Source](jdx/mise@v2026.11.7...v2026.11.8) ##### 🚀 Features - **(bootstrap)** plan repositories and hooks in bootstrap plan by [@​jdx](https://github.com/jdx) in [#​15653](jdx/mise#15653) - **(bootstrap)** load package manager plugins from system plugin directories by [@​jdx](https://github.com/jdx) in [#​15620](jdx/mise#15620) - **(bootstrap)** add bootstrap settings plugins by [@​jdx](https://github.com/jdx) in [#​15621](jdx/mise#15621) - **(bootstrap)** move macOS preferences to \[bootstrap.settings.macos] by [@​jdx](https://github.com/jdx) in [#​15622](jdx/mise#15622) - **(config)** support block edits in bootstrap files by [@​jdx](https://github.com/jdx) in [#​15650](jdx/mise#15650) - **(dotfiles)** warn when a copy target was edited since mise wrote it by [@​jdx](https://github.com/jdx) in [#​15600](jdx/mise#15600) - **(github)** add versions_host_exclude to keep repos off mise-versions by [@​jdx](https://github.com/jdx) in [#​15666](jdx/mise#15666) - **(shim)** expose the call's arguments as argv in wrapper templates by [@​jdx](https://github.com/jdx) in [#​15655](jdx/mise#15655) - **(task)** infer root package.json scripts for npm and Bun workspaces by [@​jdx](https://github.com/jdx) in [#​15616](jdx/mise#15616) ##### 🐛 Bug Fixes - **(activate)** skip resolving WSL Windows drive entries on PATH by [@​jdx](https://github.com/jdx) in [#​15665](jdx/mise#15665) - **(backend)** reuse Ruby's bundled gems when installing gem: tools by [@​jdx](https://github.com/jdx) in [#​15644](jdx/mise#15644) - **(bootstrap)** keep the brew rack lock out of the Cellar so uninstalled formulae disappear by [@​jdx](https://github.com/jdx) in [#​15597](jdx/mise#15597) - **(bootstrap)** refuse to archive a home directory or oversized source in bootstrap remote by [@​jdx](https://github.com/jdx) in [#​15607](jdx/mise#15607) - **(bootstrap)** build brew formulae from source in a clean environment by [@​jdx](https://github.com/jdx) in [#​15613](jdx/mise#15613) - **(completions)** complete the next task after `:::` by [@​jdx](https://github.com/jdx) in [#​15614](jdx/mise#15614) - **(config)** let project tool_alias override global aliases by [@​jdx](https://github.com/jdx) in [#​15615](jdx/mise#15615) - **(config)** write \_.file for Load .env in the interactive editor by [@​jdx](https://github.com/jdx) in [#​15640](jdx/mise#15640) - **(config)** resolve tool_alias names in minimum_release_age_excludes by [@​jdx](https://github.com/jdx) in [#​15638](jdx/mise#15638) - **(doctor)** stop warning about the backend a packageManager checksum forces by [@​jdx](https://github.com/jdx) in [#​15604](jdx/mise#15604) - **(env)** ignore unrelated file churn in config directories on the hook-env fast path by [@​jdx](https://github.com/jdx) in [#​15667](jdx/mise#15667) - **(http)** hard link shared raw files on Windows instead of copying by [@​jdx](https://github.com/jdx) in [#​15647](jdx/mise#15647) - **(lock)** send the forge token when fetching a private release's checksum file by [@​jdx](https://github.com/jdx) in [#​15637](jdx/mise#15637) - **(lock)** error on tool arguments that match no configured tool by [@​jdx](https://github.com/jdx) in [#​15649](jdx/mise#15649) - **(node)** resolve symlinks in the npm shim by [@​jdx](https://github.com/jdx) in [#​15664](jdx/mise#15664) - **(npm)** find the installed digest for a tarball URL at latest in hook-env by [@​jdx](https://github.com/jdx) in [#​15643](jdx/mise#15643) - **(pipx)** run an installed github git source with no releases offline by [@​jdx](https://github.com/jdx) in [#​15602](jdx/mise#15602) - **(pypi)** lock the graph for the configured python and keep an existing graph on failure by [@​jdx](https://github.com/jdx) in [#​15657](jdx/mise#15657) - **(sandbox)** allow `./` relative paths on macOS by [@​jdx](https://github.com/jdx) in [#​15599](jdx/mise#15599) - **(spm)** record artifact bundle URLs and checksums in mise.lock by [@​jdx](https://github.com/jdx) in [#​15646](jdx/mise#15646) - **(task)** complete bare root task names in a monorepo by [@​jdx](https://github.com/jdx) in [#​15598](jdx/mise#15598) - **(task)** recognise --MISE and --USAGE comments in Lua file tasks by [@​jdx](https://github.com/jdx) in [#​15659](jdx/mise#15659) - **(task)** list a task pattern's cache entries in one pass by [@​jdx](https://github.com/jdx) in [#​15671](jdx/mise#15671) - **(uninstall)** remove the alias links of the last uninstalled version by [@​jdx](https://github.com/jdx) in [#​15605](jdx/mise#15605) - **(vfox)** verify the lockfile checksum in locked mode by [@​jdx](https://github.com/jdx) in [#​15648](jdx/mise#15648) ##### 🚜 Refactor - **(system)** resolve bootstrap packages once for status by [@​jdx](https://github.com/jdx) in [#​15641](jdx/mise#15641) ##### 📚 Documentation - **(config)** clarify global_config_file does not hide \~/.config/mise from projects under home by [@​jdx](https://github.com/jdx) in [#​15639](jdx/mise#15639) - only accept bug reports from real use by [@​jdx](https://github.com/jdx) in [e9bf531](jdx/mise@e9bf531) ##### 📦 Registry - drop archived asdf plugin backends by [@​jdx](https://github.com/jdx) in [#​15642](jdx/mise#15642) ##### Chore - **(ci)** run cargo-deny advisories only when dependencies change by [@​jdx](https://github.com/jdx) in [#​15601](jdx/mise#15601) ##### Ci - email when the docs build fails on the default branch by [@​jdx](https://github.com/jdx) in [#​15652](jdx/mise#15652) ##### 📦 Aqua Registry Updates ##### New Packages (2) - [`cfgaudit/cfgaudit`](https://github.com/cfgaudit/cfgaudit) - [`connectrpc/protoc-gen-connect-openapi`](https://github.com/connectrpc/protoc-gen-connect-openapi) ##### Updated Packages (8) - [`dependabot/cli`](https://github.com/dependabot/cli) - [`entireio/git-sync`](https://github.com/entireio/git-sync) - [`git-bug/git-bug`](https://github.com/git-bug/git-bug) - [`github/gh-ost`](https://github.com/github/gh-ost) - [`helmfile/helmfile`](https://github.com/helmfile/helmfile) - `kiro.dev/kiro-cli` - [`matthart1983/netwatch`](https://github.com/matthart1983/netwatch) - [`modem-dev/hunk`](https://github.com/modem-dev/hunk) </details> --- ### Configuration 📅 **Schedule**: (in timezone Europe/Berlin) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4yMzkuMSIsInVwZGF0ZWRJblZlciI6IjQ0LjIzOS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZS9jb250YWluZXIiLCJ0eXBlL3BhdGNoIl19--> Reviewed-on: https://git.xcd.dev/gabrielcosi/home-ops/pulls/1754

A tool installed from a tarball URL, such as a pkg.pr.new preview, with
version = "latest"installed and ran fine, butmise hook-envreported it as missing on every prompt:hook-envresolves offline. For a tarball URL,latestis a rolling channel, and the npm backend's offline lookup of the installed channel version always returnedNone. Resolution then returned the literallatest, which matches no installed directory. Now the backend returns the latest installed digest for a tarball URL, sohook-envactivates the install and prints nothing. Every installed version of a tarball URL is a digest of that URL, so no unrelated release can be picked up. Git-sourced npm tools are unchanged.The new e2e test seeds an installed digest with a
latestlink and checks thathook-envputs it onPATH; the old release does not. It does not reproduce themissingwarning itself, which this setup never printed.Fixes #15629
🤖 Generated with Claude Code
AI-assisted — Tool: Claude Code; model: anthropic/claude-sonnet-5-5; version: claude-code_2-1-321_agent.
Note
Medium Risk
Changes offline channel resolution for npm tarball installs, which affects
hook-envand listing behavior but is scoped to tarball specs with existing install-directory heuristics.Overview
Offline
hook-envfor npm tarball URLs no longer treatsversion = "latest"as an uninstalled literal string when a digest is already on disk.For tarball specs,
latest_installed_channel_versionnow scans the tool’s install directory, skips incomplete installs and thelatestsymlink entry, and returns the digest folder with the most recent modification time—so digests are not chosen by sort order. Git/npm git-sourced tools still follow the previousNonepath.An e2e backend test seeds a fake tarball install (with a
latestlink), assertsmise hook-envactivates it without amissingwarning, and checks that a newer install wins even when its digest sorts below an older one underMISE_OFFLINE=1 mise ls.Reviewed by Cursor Bugbot for commit 031ee5d. Bugbot is set up for automated code reviews on this repo. Configure here.