Skip to content

fix(install): ignore validation and output settings in the install config hash - #366

Merged
arcanis merged 2 commits into
mainfrom
mael/install-config-hash
Oct 13, 2026
Merged

arcanis merged 2 commits into
mainfrom
mael/install-config-hash

Conversation

@arcanis

@arcanis arcanis commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Issue: --immutable forces enableImmutableInstalls, and the install config hash covered every setting. The command after yarn install --immutable saw a "changed configuration" and ran a full lazy install. Toggling timers or progress bars did the same.

Fix: the hash skips settings that can't change the installed tree: immutable checks, output settings, lazyInstallMode, and daemon/changeset settings. enableImmutableCache stays hashed, since it changes how the cache gets filled.

Opting out is declared in schema.json: every setting is hashed by default, and a setting can set "affectsInstall": false only if changing it can't affect the install. build.rs generates the list of opted-out settings, and install_config_hash drops those keys before hashing. The contributing docs describe the flag.

Tests: the fast-path test now uses pnpFallbackMode as its configuration change. New lazy-install test.


Note

Medium Risk
Changes when installs are considered stale via install-state hashing; misclassified affectsInstall could skip a needed reinstall or still force extra installs.

Overview
Fixes lazy installs and the up-to-date fast path treating validation-only or cosmetic config changes as a full configuration change (e.g. yarn install --immutable flipping enableImmutableInstalls, or toggling timers/progress bars).

Top-level settings can now opt out of the install config hash via "affectsInstall": false in schema.json (default remains hashed). The config code generator emits Settings::install_insensitive_setting_names(), and install_config_hash removes those keys before hashing. Several settings are marked install-insensitive (immutable checks, UI output, daemon tuning, changeset refs, lazyInstallMode, etc.). Contributor docs describe the rule.

Acceptance tests assert immutable install does not trigger a follow-up lazy install, and the “config changed” fast-path test uses pnpFallbackMode instead of a non-install-sensitive env var.

Reviewed by Cursor Bugbot for commit 80e2818. Bugbot is set up for automated code reviews on this repo. Configure here.

@netlify

netlify Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for yarn-v6 ready!

Name Link
🔨 Latest commit 80e2818
🔍 Latest deploy log https://app.netlify.com/projects/yarn-v6/deploys/6ace66be8052324a5e53f176
😎 Deploy Preview https://deploy-preview-366--yarn-v6.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

⏱️ Benchmark Results

gatsby install-full-cold

Metric Base Head Difference
Mean 4.386s 4.332s -1.25% ✅
Median 4.376s 4.324s -1.17% ✅
Min 4.304s 4.283s
Max 4.481s 4.413s
Std Dev 0.045s 0.031s
📊 Raw benchmark data (gatsby install-full-cold)

Base times: 4.397s, 4.459s, 4.421s, 4.337s, 4.333s, 4.430s, 4.342s, 4.469s, 4.393s, 4.360s, 4.481s, 4.389s, 4.304s, 4.384s, 4.373s, 4.441s, 4.364s, 4.343s, 4.403s, 4.348s, 4.434s, 4.447s, 4.336s, 4.378s, 4.330s, 4.366s, 4.413s, 4.368s, 4.372s, 4.371s

Head times: 4.317s, 4.283s, 4.320s, 4.365s, 4.413s, 4.322s, 4.394s, 4.302s, 4.327s, 4.339s, 4.354s, 4.305s, 4.292s, 4.351s, 4.355s, 4.356s, 4.339s, 4.336s, 4.313s, 4.288s, 4.289s, 4.318s, 4.346s, 4.367s, 4.335s, 4.313s, 4.312s, 4.314s, 4.361s, 4.321s


gatsby install-cache-only

Metric Base Head Difference
Mean 1.308s 1.311s +0.20% ⚠️
Median 1.307s 1.307s -0.00%
Min 1.292s 1.283s
Max 1.350s 1.464s
Std Dev 0.012s 0.031s
📊 Raw benchmark data (gatsby install-cache-only)

Base times: 1.312s, 1.307s, 1.300s, 1.293s, 1.309s, 1.303s, 1.307s, 1.308s, 1.300s, 1.305s, 1.294s, 1.350s, 1.318s, 1.317s, 1.305s, 1.297s, 1.316s, 1.306s, 1.322s, 1.313s, 1.326s, 1.311s, 1.306s, 1.317s, 1.312s, 1.293s, 1.292s, 1.296s, 1.311s, 1.305s

Head times: 1.285s, 1.314s, 1.300s, 1.297s, 1.329s, 1.307s, 1.308s, 1.292s, 1.302s, 1.313s, 1.299s, 1.309s, 1.316s, 1.310s, 1.309s, 1.341s, 1.304s, 1.288s, 1.312s, 1.464s, 1.308s, 1.299s, 1.306s, 1.301s, 1.299s, 1.310s, 1.311s, 1.283s, 1.303s, 1.303s


gatsby install-cache-and-lock (warm, with lockfile)

Metric Base Head Difference
Mean 0.367s 0.371s +1.07% ⚠️
Median 0.366s 0.368s +0.64% ⚠️
Min 0.356s 0.363s
Max 0.380s 0.402s
Std Dev 0.005s 0.008s
📊 Raw benchmark data (gatsby install-cache-and-lock (warm, with lockfile))

Base times: 0.360s, 0.372s, 0.362s, 0.365s, 0.368s, 0.365s, 0.366s, 0.369s, 0.376s, 0.372s, 0.380s, 0.363s, 0.367s, 0.365s, 0.368s, 0.367s, 0.366s, 0.363s, 0.368s, 0.359s, 0.363s, 0.366s, 0.361s, 0.356s, 0.362s, 0.364s, 0.375s, 0.367s, 0.373s, 0.373s

Head times: 0.396s, 0.374s, 0.364s, 0.366s, 0.369s, 0.370s, 0.369s, 0.372s, 0.367s, 0.366s, 0.366s, 0.367s, 0.369s, 0.375s, 0.371s, 0.372s, 0.402s, 0.377s, 0.365s, 0.367s, 0.370s, 0.363s, 0.367s, 0.365s, 0.373s, 0.368s, 0.368s, 0.365s, 0.368s, 0.366s

@cursor

cursor Bot commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: b93c9c8a-9f47-4087-a0e8-9166233f52d6)

…nfig hash

`yarn install --immutable` forces enableImmutableInstalls, and the
install config hash covered every setting. The next command saw a
"changed configuration" and ran a full lazy install.

The hash now skips settings that can't change the installed tree:
immutable-install checks, output settings (timers, progress bars),
lazyInstallMode, and daemon/changeset settings. enableImmutableCache
stays hashed, since it changes how the cache gets filled.

The fast-path test that used YARN_ENABLE_TIMERS to change the
configuration now changes pnpFallbackMode instead.
Settings now contribute to the install config hash unless they set
"affectsInstall": false in the schema, replacing the hardcoded list in
project.rs.
@arcanis
arcanis force-pushed the mael/install-config-hash branch from b234ba0 to 80e2818 Compare October 13, 2026 17:13
@cursor

cursor Bot commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: 5ae34887-6776-406e-b3ff-a8e8325c40cd)

@arcanis
arcanis merged commit e3deb50 into main Oct 13, 2026
27 checks passed
@arcanis
arcanis deleted the mael/install-config-hash branch October 13, 2026 17:42

This branch was successfully deployed

1 active deployment
test-reports — 80e2818d Deployed Oct 13, 2026 by arcanis via Reporting test results #1455
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant