Repository navigation
fix(tooling): lock routine React Doctor and Knip execution - #30183
Conversation
📝 Walkthrough
Priority: ➖ Normal Merge Risk: 🔵 Low · up to
|
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
f9f66760-f3fd-4aae-8ad0-e6b317a8177c
⛔ Files ignored due to path filters: 1
config/audit-tools/pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing: 11
.github/workflows/pr.ymlconfig/audit-tools/README.mdconfig/audit-tools/package.jsonconfig/audit-tools/pnpm-workspace.yamlconfig/scripts/check-react-doctor-changed.mjsconfig/scripts/check-react-doctor-changed.test.mjsconfig/scripts/pr-preflight-gates.test.mjsconfig/scripts/run-audit-tool.mjsconfig/scripts/run-audit-tool.test.mjsconfig/scripts/verify-locked-audit-tools.mjspackage.json
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
| function command(program, args, expectedCode = 0) { | ||
| const result = runProcessSync({ program, args, cwd: fixture, timeoutMs: 60_000 }) |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win
Isolate the fixture’s Git environment.
If a caller sets GIT_DIR or GIT_WORK_TREE, Git can use that repository instead of fixture despite cwd: fixture. The smoke can then fail or run its configuration and index commands against the wrong repository. Remove Git repository-location variables from the environment passed to Git commands.
Based on learnings, Git subprocesses targeting a specific cwd must strip repository-location variables, including GIT_DIR, GIT_WORK_TREE, and GIT_INDEX_FILE.
Source: Learnings
ELI5
Running React Doctor or Knip currently downloads supporting packages that are outside our reviewed lockfile. The same commands now install and execute a separately locked copy of each tool.
What Changed
Why
Pinning only the package passed to
pnpm dlxleaves its supporting packages unresolved until execution. A separate workspace makes that entire tree reviewable without adding it to application installs or release bundles. It retains the three-day release delay, disables install scripts, and adds no dependency overrides.Linked Issue
Maintainer-requested supply-chain follow-up; no separate issue.
Visual Proof
N/A — development tooling only; no application UI or interaction changes.
Testing
On macOS, with background launch enabled:
Linux CI runs the real-tool smoke in PR preflight. Windows execution uses the existing process-host shim handling and direct Node entry points; it was not executed locally. Application build/typecheck are unchanged and covered by the normal PR workflow.
Review
The runner checks the frozen install on every invocation; it does not fall back to fetching a different executable. Failed installs and tool failures remain nonzero. The application dependency graph and its lockfile are unchanged.
Agent skill upstream boundary
Notes
The isolated dependency audit reports the existing Knip → fast-glob → micromatch → braces 3.0.3 advisory GHSA-vfj7-8cjw-p6xm. There is no published fixed version. This PR records that previously downloaded dependency rather than adding an override or changing the tool version.
No runtime, SSH, mobile or wire behavior changes.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)