Conversation
Co-authored-by: Skosh <skoshx@users.noreply.github.com>
commit: |
Contributor
|
React Doctor found no new issues. 🎉 Reviewed by React Doctor for commit |
Contributor
Interactive terminal E2ETerminal Control verified the built CLI at
|
skoshx
marked this pull request as ready for review
September 12, 2026 22:30
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
React Doctor 0.9.13's whole-scan result cache computes a repository identity using
git status --porcelain=v1 -z --untracked-files=alland the contents of dirty files (buildScanResultCacheKey→resolveRepositoryCacheIdentity→buildWorktreeFingerprint). Vite Task automatically records child-process filesystem accesses as inputs. Running Doctor inside a cached package task therefore makes unrelated repository changes invalidate that package's verdict.The outer task cache already replays the complete verdict. Doctor's per-file lint and sidecar caches remain useful when a changed package actually runs.
REACT_DOCTOR_NO_CACHEswitches all three off, so it is too broad here.Solution
Add
REACT_DOCTOR_NO_SCAN_CACHE, with the same truthy-value convention asREACT_DOCTOR_NO_CACHE, returningnullfrombuildScanResultCacheKeybeforeisGitIdentityTrustworthyor repository fingerprint collection. Preserve normal behavior when the flag is absent, and leave per-file and sidecar caches enabled.Implementation
isScanCacheDisabled()function that checks bothREACT_DOCTOR_NO_CACHE(global) andREACT_DOCTOR_NO_SCAN_CACHE(granular)buildScanResultCacheKeyto use the new granular check early, before any Git operationsTesting
REACT_DOCTOR_NO_SCAN_CACHEis setREACT_DOCTOR_NO_CACHE(global) still overridesREACT_DOCTOR_NO_SCAN_CACHE=falseParity Analysis
Parity testing is not applicable for this change because:
REACT_DOCTOR_NO_SCAN_CACHEis unset (the default), behavior is identical to beforeCloses #1804