GeezerVison is showing github.com — fix(muse): usage discovery no longer makes mise download Muse by SmokeTag · Pull Request #38154 · pingdotgg/t3code
Conversation
Problem
Muse history discovery (museUsageReader.directories → MuseUsageHome.initialize) starts the Muse SDK in the background with the user's unmodified environment. On Omarchy, muse is a lazy mise shim (muse = { version = "latest", lazy = true }). When Muse is not installed yet, each discovery makes mise start downloading Muse (~467 MB). The SDK startup timeout kills the process mid-download, and mise leaves an orphaned ~/.cache/mise/invocation-downloads/.tmp* directory behind. On a ~11 MB/s link this repeats on every usage refresh. One machine collected 233 partial downloads (~36 GB) in 11 days, filled its root disk, and then failed the next T3 self-update while writing the release archive.
#33448 fixed the same loop for status probes with providerProbeEnvironment (MISE_OFFLINE=1), and provider-muse/src/server/status.ts uses it, but the usage path in provider-muse/src/server/usage.ts was not covered.
Change
museUsageReader.directories wraps the environment it passes to MuseUsageHome.resolve in providerProbeEnvironment, the same helper the Muse status probe uses. With MISE_OFFLINE=1, mise fails fast for an uninstalled Muse instead of downloading it. Discovery then fails, so the existing "no directory on failed initialization" path applies. An installed Muse starts normally. Sessions and other user-started commands are unchanged, so mise still installs Muse when the user actually uses it.
Scope
Bug fix for #38151 (follow-up to #33415 / #33448). One file of production code plus its test.
Verification
- Finding the bug: on the affected machine, the 35
MuseUsageHome.initialize failures (Muse SDK initialization timed out) in server.trace.ndjson matched the .tmp* directory mtimes in invocation-downloads one-to-one. The Muse install directories were empty. Installing Muse by hand took 45 s at 11.3 MB/s, longer than the SDK startup timeout. After that the failures and new downloads stopped.
- Unit test: the existing
usage.test.ts discovery test now passes MISE_OFFLINE: "0" in the instance environment and expects the SDK to be spawned with MISE_OFFLINE: "1". Without the change in usage.ts, this test fails on MISE_OFFLINE ("0" vs "1"). With it, all 108 tests in packages/provider-muse pass (vp test run).
- Manual check: with mise 2026.11.0, running the lazy shim of an uninstalled tool (
crush) with MISE_OFFLINE=1 exits 1 immediately. Nothing is written to invocation-downloads and nothing is installed.
- Not checked: I did not run a full server build end-to-end against a throttled link.
Agent: Claude Opus 5.5 (Claude Code harness in T3 Code).
🤖 Generated with Claude Code
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Muse history discovery starts the Muse SDK in the background with the
user's environment. When `muse` is a lazy mise shim and Muse is not
installed, every discovery makes mise start downloading Muse; the SDK
startup timeout kills it and mise leaves a partial download behind.
Run discovery with providerProbeEnvironment (MISE_OFFLINE=1), as the
Muse status probe already does since pingdotgg#33448.
Fixes pingdotgg#38151
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Approvability
Verdict: Approved at 31e10d0
Macroscope's review found this PR approvable — Muse usage discovery now uses the existing offline probe environment, preventing background mise downloads. The change is limited to discovery and leaves interactive sessions and usage parsing unchanged.
You can add or adjust custom eligibility rules. Learn more.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Nov 17, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

No actionable comments were generated in the recent review.
Walkthrough
-
Muse home discovery now passes its generated environment through providerProbeEnvironment. The test checks that the initialized Muse SDK environment sets MISE_OFFLINE to "1" when the instance environment sets it to "0".
Changes: Muse usage discovery
| Layer / File(s) |
Summary |
Apply probe environment to Muse discovery packages/provider-muse/src/server/usage.ts, packages/provider-muse/src/server/usage.test.ts |
Muse home resolution wraps the generated environment with providerProbeEnvironment. The test checks that the SDK environment contains MISE_OFFLINE: "1" when the instance environment contains MISE_OFFLINE: "0". |
Estimated code review effort: 2 (Simple) | ~5 minutes
Change: Bug fix
Possibly related issues
- Issue 38151 reports that Muse usage discovery passes the plain environment to the Muse SDK, which can trigger a lazy mise shim to download Muse. This change wraps the environment with
providerProbeEnvironment; the issue also identifies other background readers that this change does not cover.
Suggested labels: bugfix
Suggested reviewers: wiktor102
Merge Risk: Minimal · up to 1d26b
-
Muse usage discovery now runs mise in offline mode, so it no longer downloads an uninstalled Muse. Installed Muse and user-started commands are unchanged. No merge-blocking risk was identified.
Pre-merge checks: 4
-
| Check name |
Status |
Explanation |
| Title check |
 |
The title names the core change: usage discovery no longer makes mise download Muse. It follows the conventional commit form and matches the change that wraps the usage environment in providerProbeEnv… |
| Description check |
 |
The description follows the template. It has Problem, Change, Scope, and Verification sections, each filled with specific content. The problem is the mise lazy-shim download loop during Muse usage dis… |
| Linked Issues check |
 |
Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check |
 |
Check skipped because no linked issues were found for this pull request. |
Full details: Title check
-
Explanation
The title names the core change: usage discovery no longer makes mise download Muse. It follows the conventional commit form and matches the change that wraps the usage environment in providerProbeEnvironment (MISE_OFFLINE=1) in usage.ts, with a matching test update.
Full details: Description check
-
Explanation
The description follows the template. It has Problem, Change, Scope, and Verification sections, each filled with specific content. The problem is the mise lazy-shim download loop during Muse usage discovery. The change wraps the environment in providerProbeEnvironment, which sets MISE_OFFLINE=1. Scope links issue #38151 as a bug fix. Verification gives a unit test result, a manual mise check, and states what was not checked. The description names the agent model in the closing line, as the template asks.
Finishing Touches
-
Generate unit tests (beta)
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info
-
Run configuration
-
Commits
-
Reviewing files that changed from the base of the PR and between 31e10d0 and 1d26b9c.
Files selected for processing: 2
-
packages/provider-muse/src/server/usage.test.ts
packages/provider-muse/src/server/usage.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
The automated pipeline stopped on this pull request and will not merge it:
the fix is written and reviewed, but proving it needs something no worker has:
- Permanent blocker: Real Muse is required and is explicitly unavailable on every worker. Could not reproduce lazy mise downloads and partial-cache accumulation on base, verify their absence on head, confirm installed Muse history discovery, or confirm user-started sessions retain installation behavior. Replay cannot demonstrate this provider-specific behavior.
It stays open for a person to finish or close.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Thanks for this. Main has the change since #38158.
Compared the complete two-file diff of #38154 with the merge: main now has the identical production change, wrapping Muse usage discovery in providerProbeEnvironment so mise cannot download Muse during scans. The only additional difference is stronger test input setting MISE_OFFLINE=0; main's helper already overrides that value to 1.
Closing as superseded.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|