Skip to content

fix(deps.status): skip engine check when scanning workspace projects - #11592

Merged
zkochan merged 4 commits into
mainfrom
fix/check-deps-status-skip-engine-check
May 11, 2026
Merged

zkochan merged 4 commits into
mainfrom
fix/check-deps-status-skip-engine-check

Conversation

@zkochan

@zkochan zkochan commented May 11, 2026 •

Copy link
Copy Markdown
Member

Summary

  • checkDepsStatus (run by verifyDepsBeforeRun) called findWorkspaceProjects without a nodeVersion, so the engine check fell back to the system Node from PATH and emitted spurious [WARN] Unsupported engine lines before scripts ran.
  • Switched to findWorkspaceProjectsNoCheck — a status check shouldn't validate engines. Install paths still call findWorkspaceProjects with nodeVersion and continue to validate engines.

This was visible in CI when devEngines.runtime.node was set: the runner's pre-installed Node v20.20.2 (not the desired 24.6.0) was reported as current in the warning, because that's what getSystemNodeVersion() returned via PATH lookup.

Test plan

  • pnpm --filter @pnpm/deps.status test passes
  • CI green
  • Confirm warnings no longer appear in Compile & Lint job on a branch that sets devEngines.runtime

Written by an agent (Claude Code, claude-opus-4-7).

Summary by CodeRabbit

  • Bug Fixes
    • Removed spurious "Unsupported engine" warnings during workspace dependency status checks; engine/os/cpu/libc validation still runs for install paths.
  • Tests
    • Added an integration test verifying workspace start proceeds without emitting those false engine warnings.
  • Documentation
    • Documented the behavior change: status-only checks now skip per-project installability validation when scanning workspaces.

Review Change Stack

checkDepsStatus (run by verifyDepsBeforeRun) called findWorkspaceProjects
without a nodeVersion, so the engine check fell back to the system Node from
PATH and emitted spurious "Unsupported engine" warnings before scripts ran.
The actual install still does engine validation; a status check shouldn't.
@coderabbitai

coderabbitai Bot commented May 11, 2026 •

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 54eb2dab-dde5-4c55-ae5f-fef04e288ee8

📥 Commits

Reviewing files that changed from the base of the PR and between d80f2b1 and c931dbe.

📒 Files selected for processing (1)
  • pnpm/test/verifyDepsBeforeRun/engineCheck.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • pnpm/test/verifyDepsBeforeRun/engineCheck.ts
📜 Recent review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Compile & Lint

📝 Walkthrough

Walkthrough

checkDepsStatus now uses findWorkspaceProjectsNoCheck when scanning workspace manifests so engine validation is skipped during workspace discovery; install-time engine validation is unchanged.

Changes

Skip Engine Check in Workspace Scanning

Layer / File(s) Summary
Workspace Project Discovery Without Engine Check
deps/status/src/checkDepsStatus.ts
Import changed from findWorkspaceProjects to findWorkspaceProjectsNoCheck (line 35). Workspace project discovery call updated to use findWorkspaceProjectsNoCheck(rootProjectManifestDir, { patterns: workspaceManifest?.packages }), removing the sharedWorkspaceLockfile parameter (lines 356–357).
Version Bump and Behavioral Change Documentation
.changeset/check-deps-status-skip-engine-check.md
Changeset bumps @pnpm/deps.status and pnpm and documents the behavioral change: skip engine checks during workspace scanning while preserving install-time engine validation.
Integration Test
pnpm/test/verifyDepsBeforeRun/engineCheck.ts
New Jest integration test sets up a workspace with a package requiring engines.node >=99.0.0, runs pnpm install and pnpm start --config.verify-deps-before-run=install, and asserts the root start output appears and no "Unsupported engine" warnings are emitted.

🎯 2 (Simple) | ⏱️ ~8 minutes

🐰 I hopped through manifests, quiet as dawn,
No engine warnings chase me on,
The workspace runs with peaceful cheer,
Install guards still watch, but not here. 🥕

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: skipping engine validation during workspace project discovery in checkDepsStatus, which is the core fix described in the PR objectives.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/check-deps-status-skip-engine-check

Comment @coderabbitai help to get the list of available commands and usage tips.

@zkochan
zkochan marked this pull request as ready for review May 11, 2026 20:18
Copilot AI review requested due to automatic review settings May 11, 2026 20:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adjusts checkDepsStatus (used by verifyDepsBeforeRun) to avoid emitting misleading engine warnings when scanning workspace projects, by bypassing installability validation during project discovery.

Changes:

  • Replace findWorkspaceProjects() with findWorkspaceProjectsNoCheck() in the checkDepsStatus workspace scan path.
  • Add a changeset bumping @pnpm/deps.status and pnpm with rationale for the warning suppression.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
deps/status/src/checkDepsStatus.ts Uses workspace project discovery without installability checks to prevent pre-script engine warnings.
.changeset/check-deps-status-skip-engine-check.md Documents the behavior change and publishes patch releases for the affected packages.
Comments suppressed due to low confidence (1)

deps/status/src/checkDepsStatus.ts:363

  • This code path (deriving allProjects when opts.allProjects is undefined) is behaviorally changed, but there doesn't appear to be deps/status test coverage asserting that workspace project scanning no longer triggers engine/platform warnings. Adding a unit test that mocks @pnpm/workspace.projects-reader (and/or the warning logger) would prevent regressions back to findWorkspaceProjects() without a nodeVersion.
  if (!allProjects) {
    const workspaceRoot = workspaceDir ?? rootProjectManifestDir
    const workspaceManifest = await readWorkspaceManifest(workspaceRoot)
    if (workspaceManifest ?? workspaceDir) {
      const allProjects = await findWorkspaceProjectsNoCheck(rootProjectManifestDir, {
        patterns: workspaceManifest?.packages,
      })
      return checkDepsStatus({
        ...opts,
        allProjects,
      })
    }

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread deps/status/src/checkDepsStatus.ts Resolved
Copilot AI review requested due to automatic review settings May 11, 2026 20:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

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.

2 participants