refactor(prepare): remove touch_outputs and update docs to reflect blake3 hashing#8535
Conversation
…ake3 hashing Prepare freshness checking now uses blake3 content hashes exclusively, making touch_outputs (which touched output mtimes) dead code. Remove the feature entirely and update docs to describe the hash-based system. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request refactors the prepare system by transitioning its freshness checking from modification times (mtime) to blake3 content hashing. This fundamental change eliminates the need for the Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
Greptile SummaryThis PR removes the Key changes:
Issue to watch: Confidence Score: 3/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[PrepareEngine::run] --> B{outputs empty?}
B -- yes --> C[NoOutputs → always stale]
B -- no --> D{any output missing?}
D -- yes --> E[OutputsMissing → stale]
D -- no --> F{sources empty?}
F -- yes --> G[NoSources → fresh]
F -- no --> H[Load PrepareState from .mise/prepare-state.toml]
H --> I{Stored hashes exist?}
I -- no --> J[first run → Stale]
I -- yes --> K[Hash source files with blake3]
K --> L{Hashes match?}
L -- yes --> M[Fresh ✓]
L -- no --> N[Stale: file changed/added/removed]
C --> O[Execute run command]
E --> O
J --> O
N --> O
O --> P[Save new hashes to state file]
P --> Q[Done]
M --> Q
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| /// Whether to update mtime of output files/dirs after a successful run (default: true) | ||
| /// This is useful when the prepare command is a no-op (e.g., `uv sync` when all is well) | ||
| /// so that the outputs appear fresh for subsequent freshness checks. | ||
| pub touch_outputs: Option<bool>, |
There was a problem hiding this comment.
Removing field with deny_unknown_fields breaks existing configs
High Severity
PrepareProviderConfig has #[serde(deny_unknown_fields)], so removing the touch_outputs field means any existing user config that includes touch_outputs = true (or false) will fail deserialization with an "unknown field" error. This silently breaks existing configurations rather than gracefully ignoring the deprecated option.
There was a problem hiding this comment.
it's experimental so we don't need to worry about breaking changes
There was a problem hiding this comment.
Code Review
This pull request refactors the 'prepare' feature by removing the touch_outputs configuration and its associated mtime-based logic. This is a good cleanup, as freshness checking is now exclusively based on blake3 content hashing. The documentation has been updated to reflect this change. The code changes are clean and consistently remove the dead code across the affected files. I have a couple of suggestions to improve the clarity and accuracy of the updated documentation.
| mise uses blake3 content hashing to determine if sources have changed since the last | ||
| successful run. Hashes are stored in `.mise/prepare-state.toml`. | ||
|
|
||
| 1. Find the most recent mtime among all source files | ||
| 2. Find the most recent mtime among all output files | ||
| 3. If any source is newer than all outputs, the provider is stale | ||
| 1. Compute blake3 hashes of all source files | ||
| 2. Compare against stored hashes from the last successful run | ||
| 3. If any file was added, removed, or changed, the provider is stale |
There was a problem hiding this comment.
The description of freshness checking is a bit simplified as it omits the check for output existence, which is a key part of the logic. For better accuracy and to avoid user confusion, I suggest clarifying that both output existence and source content hashing are used.
| mise uses blake3 content hashing to determine if sources have changed since the last | |
| successful run. Hashes are stored in `.mise/prepare-state.toml`. | |
| 1. Find the most recent mtime among all source files | |
| 2. Find the most recent mtime among all output files | |
| 3. If any source is newer than all outputs, the provider is stale | |
| 1. Compute blake3 hashes of all source files | |
| 2. Compare against stored hashes from the last successful run | |
| 3. If any file was added, removed, or changed, the provider is stale | |
| mise uses output existence and blake3 content hashing to determine if a provider is stale. | |
| Hashes of source files are stored in '.mise/prepare-state.toml' after a successful run. | |
| 1. Check if all output files/directories exist. If not, the provider is stale. | |
| 2. Compute blake3 hashes of all source files. | |
| 3. Compare against stored hashes. If any file was added, removed, or changed, the provider is stale. |
|
|
||
| This means: | ||
|
|
||
| - If you modify `package-lock.json`, `node_modules/` will be considered stale |
There was a problem hiding this comment.
This point could be rephrased for better clarity. With content hashing, the staleness is determined by changes in source files, not by a comparison with outputs. Mentioning node_modules/ might be confusing as it's an output, not part of the source hash check.
| - If you modify `package-lock.json`, `node_modules/` will be considered stale | |
| - If you modify a source file like 'package-lock.json', its content hash will change, and the provider will be considered stale. |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Hyperfine Performance
|
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.3.5 x -- echo |
17.5 ± 1.1 | 16.0 | 25.7 | 1.00 |
mise x -- echo |
17.7 ± 1.0 | 16.1 | 23.1 | 1.01 ± 0.08 |
mise env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.3.5 env |
16.9 ± 0.8 | 15.5 | 23.0 | 1.00 |
mise env |
17.5 ± 1.0 | 15.9 | 21.9 | 1.04 ± 0.08 |
mise hook-env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.3.5 hook-env |
17.3 ± 1.1 | 15.9 | 26.2 | 1.00 |
mise hook-env |
17.4 ± 0.9 | 16.1 | 22.9 | 1.01 ± 0.08 |
mise ls
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.3.5 ls |
17.5 ± 0.9 | 16.1 | 23.7 | 1.00 |
mise ls |
18.1 ± 0.8 | 16.7 | 23.7 | 1.04 ± 0.07 |
xtasks/test/perf
| Command | mise-2026.3.5 | mise | Variance |
|---|---|---|---|
| install (cached) | 112ms | 113ms | +0% |
| ls (cached) | 67ms | 68ms | -1% |
| bin-paths (cached) | 66ms | 66ms | +0% |
| task-ls (cached) | 690ms | 702ms | -1% |
### 🐛 Bug Fixes - **(activate)** reorder shims to front of PATH on re-source in fish by @jdx in [#8534](#8534) - **(backend)** strip mise shims from dependency_env PATH to prevent fork bomb by @pose in [#8475](#8475) - **(github)** resolve "latest" version correctly via GitHub API by @jdx in [#8532](#8532) - **(lock)** set env tags and clarify lockfile docs by @jdx in [#8519](#8519) - **(lock)** use separate mise.<env>.lock files instead of env tags by @jdx in [#8523](#8523) - **(task)** include args in task output prefix and truncate long prefixes by @jdx in [#8533](#8533) - **(task)** only include args in task prefix when disambiguating duplicates by @jdx in [#8536](#8536) - **(test)** pin goreleaser version in attestation e2e test by @jdx in [#8518](#8518) - **(windows)** env._.source needs to run bash.exe on Windows (fix #6513) by @pjeby in [#8520](#8520) - handle locked .exe shims on Windows during reshim by @davireis in [#8517](#8517) ### 🚜 Refactor - **(prepare)** remove touch_outputs and update docs to reflect blake3 hashing by @jdx in [#8535](#8535) ### 📚 Documentation - **(docker)** replace jdxcode/mise image with curl install, update to debian:13-slim by @jdx in [#8526](#8526) - fix "gzip: stdin is encrypted" error in shell tricks cookbook by @pjeby in [#8512](#8512) ### 📦 Registry - add tigerbeetle ([github:tigerbeetle/tigerbeetle](https://github.com/tigerbeetle/tigerbeetle)) by @risu729 in [#8514](#8514) ### New Contributors - @pjeby made their first contribution in [#8520](#8520) - @davireis made their first contribution in [#8517](#8517) - @Aurorxa made their first contribution in [#8511](#8511) ## 📦 Aqua Registry Updates #### New Packages (6) - [`betterleaks/betterleaks`](https://github.com/betterleaks/betterleaks) - [`majorcontext/moat`](https://github.com/majorcontext/moat) - [`princjef/gomarkdoc`](https://github.com/princjef/gomarkdoc) - [`remko/age-plugin-se`](https://github.com/remko/age-plugin-se) - [`sudorandom/fauxrpc`](https://github.com/sudorandom/fauxrpc) - [`swanysimon/mdlint`](https://github.com/swanysimon/mdlint) #### Updated Packages (1) - [`moonrepo/moon`](https://github.com/moonrepo/moon)


Summary
touch_outputsconfig option from prepare providers — freshness checking now uses blake3 content hashes exclusively, so touching output mtimes is dead codeTest plan
cargo checkpassestouch_outputs)🤖 Generated with Claude Code
Note
Low Risk
Mostly removal of a dead configuration path plus documentation/schema updates; runtime behavior should be unchanged since freshness no longer relies on output mtimes.
Overview
Prepare providers no longer support
touch_outputs. The config field is removed fromPrepareProviderConfig, the provider base/trait APIs, and the execution engine (including dropping the output-mtime touching helper andfiletimeusage).Docs and schema are updated to match hash-based freshness.
docs/dev-tools/prepare.mdnow describes blake3 source hashing with state persisted in.mise/prepare-state.toml, andschema/mise.jsondrops thetouch_outputsproperty fromprepare_provider.Written by Cursor Bugbot for commit 5effa4b. This will update automatically on new commits. Configure here.