Skip to content

fix: honor declared picomatch override in lockfile - #1108

Merged
groupthinking merged 1 commit into
mainfrom
fix/lockfile-honor-declared-ranges
Jul 30, 2026
Merged

fix: honor declared picomatch override in lockfile#1108
groupthinking merged 1 commit into
mainfrom
fix/lockfile-honor-declared-ranges

Conversation

@groupthinking

@groupthinking groupthinking commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Problem

The root package.json declares:

"overrides": { "picomatch": "^4.0.5" }

…but the lockfile did not honor it. picomatch resolved to 4.0.4 at the root, while three redundant nested 4.0.5 copies were carried under tinyglobby, vite and vitest.

npm ls --all flagged the root node as invalid.

Found while verifying the security work in #1100 / #1101 / #1102.

Why npm ci did not catch this

npm ci only checks that the declared ranges in the manifest match those recorded in the lockfile — and they did. The defect is in the lockfile's resolved node versions, which violate the declared override. That is only surfaced by npm ls, never by npm ci.

Worth knowing on its own: it means CI is structurally blind to this class of drift.

Change

Lockfile-only. Hoist picomatch to a single 4.0.5 node and drop the three duplicate nested copies.

No manifest files are touched.

package-lock.json | 45 +++++----------------------------
1 file changed, 3 insertions(+), 42 deletions(-)

Verification

check result
npm ci --legacy-peer-deps exit 0
npm run build:web exit 0
apps/webnpm run lint exit 0
picomatch glob-matching behaviour 4/4 cases pass
npm ls --all reports picomatch invalid no longer

Behavioural check run against the installed node — glob matching is picomatch's entire job, and vite / vitest / tinyglobby are the consumers:

version: 4.0.5
PASS  src/**/*.ts   <- src/a/b/c.ts  => true
PASS  *.js          <- a.js          => true
PASS  *.js          <- a/b.js        => false
PASS  **/{a,b}.txt  <- x/a.txt       => true

Scope

This does not fix the six pre-existing apps/web drift markers, which are a separate and larger problem:

@opentelemetry/api@1.9.0    invalid: "1.9.1"
@sentry/nextjs@10.65.0      invalid: "^10.66.0"
@stripe/stripe-js@9.9.0     invalid: "^9.10.0"
@tailwindcss/postcss@4.3.2  invalid: "^4.3.3"
autoprefixer@10.5.2         invalid: "^10.5.4"
tailwindcss@4.3.2           invalid: "^4.3.3"

Those need a full lockfile regeneration rather than a surgical edit, so they are filed separately rather than bundled in here.

Risk

Low. Lockfile-only, no manifests changed, and it brings the tree into compliance with an already-declared override rather than introducing a new constraint. 4.0.5 was already installed in three places in this same tree.

The root package.json declares `overrides.picomatch: ^4.0.5`, but the
lockfile resolved picomatch to 4.0.4 at the root while carrying three
redundant nested 4.0.5 copies under tinyglobby, vite and vitest. `npm ls`
flagged the root node as `invalid`.

Hoist picomatch to a single 4.0.5 node and drop the three duplicates, so
the installed tree matches the declared override.

Lockfile-only; no manifest changes.

Verified on this change:
- npm ci --legacy-peer-deps          exit 0
- npm run build:web                  exit 0
- apps/web npm run lint              exit 0
- picomatch glob-matching behaviour   4/4 cases pass
- `npm ls --all` no longer reports picomatch as invalid

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 30, 2026 12:26

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.

Copilot wasn't able to review any files in this pull request.

@vercel

vercel Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
v0-uvai Building Building Preview, v0 Jul 30, 2026 12:27pm

@github-actions

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Snapshot Warnings

⚠️: No snapshots were found for the head SHA ae85cd8.
Ensure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice.

OpenSSF Scorecard

PackageVersionScoreDetails
npm/picomatch 4.0.5 🟢 6.1
Details
CheckScoreReason
Code-Review🟢 3Found 7/21 approved changesets -- score normalized to 3
Maintained🟢 910 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 9
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Packaging⚠️ -1packaging workflow not detected
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Binary-Artifacts🟢 10no binaries found in the repo
Pinned-Dependencies🟢 4dependency not pinned by hash detected -- score normalized to 4
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
License🟢 10license file detected
Fuzzing⚠️ 0project is not fuzzed
Security-Policy🟢 10security policy file detected
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
SAST⚠️ 2SAST tool is not run on all commits -- score normalized to 2

Scanned Files

  • package-lock.json

@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown

Agent Completion Truth Gate: NOT_APPLICABLE

Evidence agrees.

Machine-readable verdict
{
  "details": {},
  "reasons": [],
  "verdict": "not_applicable"
}

Workflow evidence

@groupthinking
groupthinking merged commit abd9332 into main Jul 30, 2026
26 of 34 checks passed
@groupthinking
groupthinking deleted the fix/lockfile-honor-declared-ranges branch July 30, 2026 12:27
@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • [‘architecture-gap’, ‘bug’, ‘ci-cd’, ‘ci/cd’, ‘copilot-rabbit’, ‘documentation’, ‘duplicate’, ‘enhancement’, ‘frontend’, ‘github_actions’, ‘good first issue’, ‘help wanted’, ‘high-priority’, ‘invalid’, ‘javascript’, ‘ml-model’, ‘needs-triage’, ‘pipeline-critical’, ‘placeholder-code’, ‘priority:high’, ‘python’, ‘python:uv’, ‘question’, ‘styling’, ‘tests’, ‘v0’]

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository YAML (base), Repository UI (inherited), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: 88ed39f6-ea46-448d-9c8c-a6728cbfaffb

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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

@linear-code

linear-code Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

GRV-186

@groupthinking

Copy link
Copy Markdown
Owner Author

The six pre-existing apps/web drift markers noted under Scope are now tracked in #1110, with the registry evidence, the three failed remediation attempts, and the warning that npm install <pkg> -w apps/web loosens the manifest rather than fixing the tree.

@github-actions github-actions Bot mentioned this pull request Jul 31, 2026
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