Skip to content

Build user mise shims without network lookups - #16174

Merged
ryanrhughes merged 2 commits into
omacom:quattrofrom
sprajs:fix/offline-user-reshim-20261021
Nov 1, 2026
Merged

ryanrhughes merged 2 commits into
omacom:quattrofrom
sprajs:fix/offline-user-reshim-20261021

Conversation

@sprajs

@sprajs sprajs commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

An offline install stalls in "Finalizing user" because both mise reshim calls in install/user/mise.sh look up the latest version of every lazy tool Omarchy declares. With no network and an empty cache, each lookup fails or times out; #16158 saw more than ten minutes of it.

Both calls now run with MISE_OFFLINE=true. Reshim builds the lazy shims and the Claude, Codex and Grok account wrappers from the declarations, so it doesn't need those lookups. The setting applies only to these two commands, so first-use installs, auto_update and mise upgrade still go online.

Fixes #16158.

Verified with real mise in isolated homes and empty caches:

  • mise 2026.10.15, behind a proxy that rejects and counts requests: the old script made 206 requests, the new one none, and both built the same 27 shims plus the three account wrappers.
  • mise 2026.10.24 with no network (unshare -rn): the old commands took 215 s, the new ones 0.04 s, and both built the same 36 shims as an online run. The shim count depends on the mise version.
  • After the offline reshim, a lazy tool (uv) still installs through its shim on first use when the network is there, and gets the same version as after an online reshim.

Tools that aren't installed yet log a "no versions found" warning during reshim. It exits 0 and still creates their lazy shims. This covers the version lookups, not a full offline ISO install.

@greptile-apps

greptile-apps Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no blocking issues were found.

Summary

Builds user mise shims without setup-time network lookups.

  • User setup rebuilds mise shims without online version lookups.

Reviews (2) · Last reviewed commit: "Merge quattro and drop the stubbed offli..." · Reviewed by Greptile

@omarchybot omarchybot added bug Something isn't working verified Omarchy Triage has verified that this issue is ready for final review ready Good to merge labels Oct 22, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed and verified at 9448721; nothing found that needs changing.

Reproduced on a disposable Omarchy worker (mise 2026.10.15), running install/user/mise.sh in an empty isolated home behind a local proxy that refuses every request. On quattro the two mise reshim calls made 636 requests (mostly mise-versions.jdx.dev and api.github.com) and took 175 seconds, even with every request refused at once rather than timing out. With this change they made none and finished in under a second, and they built the same 27 shims, claude, codex and grok included, as identical symlinks. The same run with no network at all (unshare -rn) also finished at once with all 27. Afterwards a lazy tool (uv) still installed through its shim on first use when the network was there, and then ran with no network, so the offline setting does not outlast the two commands.

test/shell.d/mise-provision-test.sh passes at this head and fails with the quattro version of mise.sh put back ("unexpected network access during provisioning"), and ./test/cli is green on the worker. This verifies the version lookups that caused #16158, not a full offline ISO install.

Second opinion: Codex Medium and muse-spark-1.3-contributor (via pi, thinking high) both reviewed the diff and found nothing to change, and both agreed that leaving the online mise reshim calls in migrations/1791112479.sh and migrations/1791382872.sh alone is right. They could read this review's working notes, so their agreement is not guaranteed to be independent.

This is now waiting on the maintainer.

@omarchybot omarchybot removed ready Good to merge verified Omarchy Triage has verified that this issue is ready for final review labels Oct 25, 2026
Quattro removed the mock-mise block in mise-provision-test.sh (omacom#16756) because it couldn't catch a real regression. The offline check added here lived in that block and only tested the stub, so the conflict resolves to quattro's file and this PR is just the install/user/mise.sh change.
@ryanrhughes
ryanrhughes merged commit 4866668 into omacom:quattro Nov 1, 2026
3 checks passed
ryanrhughes added a commit that referenced this pull request Nov 1, 2026
Co-authored-by: Ryan Hughes <ryan@heyoodle.com>
(cherry picked from commit 4866668)
@emirb emirb added this to the 4.5 milestone Nov 5, 2026
sogamoso added a commit to sogamoso/dotfiles that referenced this pull request Nov 10, 2026
A shim needs no version resolved, so the reshim after stowing was asking
the network for nothing, and stalling or warning without it. Omarchy builds
its shims with MISE_OFFLINE=true (omacom/omarchy#16174); do the same.
sogamoso added a commit to sogamoso/dotfiles that referenced this pull request Nov 11, 2026
Offline, mise still tries to resolve "latest" for every lazy tool it has
never installed and warns "no versions found" for each, twenty lines on a
fresh machine, before building the shim anyway. Omarchy's own offline
reshim (omacom/omarchy#16174) logs the same and accepts it. Errors
still print at that log level, as a failed install shows.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Offline install stalls for 10+ minutes in mise reshim on GitHub lookups, then reports failure

4 participants