Skip to content

test(cli): observe the read set of a pnpm v11 full install too - #17705

Merged
zkochan merged 1 commit into
mainfrom
repeat-install-read-set-v11
Nov 4, 2026
Merged

zkochan merged 1 commit into
mainfrom
repeat-install-read-set-v11

Conversation

@zkochan

@zkochan zkochan commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Summary

Step 4 of pnpm/tasks#254: the repeat-install read-set contract now covers pnpm v11 as well.

Steps 1 and 3 already cover v11. Its check lives in its own package (pnpm11/deps/status), and the oracle's generated edit axes run through the v11 and mixed drivers in the convergence job. This PR extends the step 2 contract, the read-set test from #17694, to v11.

  • With PNPM_V11_BUNDLE set, the test runs every fixture through the v11 bundle too. Every file a v11 full install opens in the workspace outside node_modules must be in v11's workspace state or classified, and every Input kind must be observed through v11.
  • The convergence job, which sets PNPM_V11_BUNDLE, now runs repeat_install_read_set::. Its path filter gains the test file and repeat_install_oracle/**, where Input lives.

What v11 reads beyond v12, and how the test treats it:

  • Manifests. v11 records them by digest in validation.manifests, not in manifest_files. The test reads both records.
  • Project directories. v11 lists the workspace root and each project's directory while it discovers projects. An open of a recorded project's directory counts as project discovery.
  • node_modules directories. These are install output, which the test already left out of scope.
  • A workspace project's command file (packages/b/cli.js). v11 reads its shebang to decide whether to repair it, and repairs only files under node_modules. It is listed as a read that is no input, for v11 only.

No v11 gap turned up: every input file a v11 full install reads is one v11's state records.

Verification:

  • The test passes with v12 alone and with v11 too.
  • With v11's sharedInputPaths patched in the bundle to drop patch files, the v11 run reports patches/[email protected] as unrecorded.

Squash Commit Body

The read-set test runs each fixture through pnpm v11 as well when
`PNPM_V11_BUNDLE` names its bundle, and the convergence job runs it
that way. Every file a v11 full install opens in the workspace outside
`node_modules` must be one v11's workspace state records or one the test
classifies, and every kind of input must be observed through v11 too.

v11 records project manifests by digest in `validation.manifests`, so
the test reads those records as well as `manifest_files`. v11 lists the
project directories while it discovers the projects, which the test
counts as project discovery. It also opens a workspace project's command
to read its shebang. That file is no input: v11 repairs only files under
`node_modules`.

Closes pnpm/tasks#254.

Checklist

  • Added or updated tests.

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

🤖 Generated with Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Summary by CodeRabbit

  • Tests
    • Expanded repeat-install checks to cover the local CLI and pnpm v11 when available. The checks now verify that install reads are limited to recorded or recognized files and that expected input types are observed.
    • Changes to the relevant install checks now trigger the convergence job, which also runs the expanded verification alongside its existing test suites.

The read-set test runs each fixture through pnpm v11 as well when
`PNPM_V11_BUNDLE` names its bundle, and the convergence job runs it
that way. Every file a v11 full install opens in the workspace outside
`node_modules` must be one v11's workspace state records or one the test
classifies, and every kind of input must be observed through v11 too.

v11 records project manifests by digest in `validation.manifests`, so
the test reads those records as well as `manifest_files`. v11 lists the
project directories while it discovers the projects, which the test
counts as project discovery. It also opens a workspace project's command
to read its shebang. That file is no input: v11 repairs only files under
`node_modules`.

Part of pnpm/tasks#254.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The repeat-install read-set test now checks recorded and classified file opens for the local CLI and, when available, bundled pnpm v11. The convergence workflow now selects and runs this test.

Changes: Repeat-install read-set coverage

Layer / File(s) Summary
Workspace input classification
pnpm/crates/cli/tests/suite/repeat_install_read_set.rs
The test records project directories and manifest paths as inputs. It defines version-specific exceptions for paths that do not require workspace-state records.
Install observation across CLIs
pnpm/crates/cli/tests/suite/repeat_install_read_set.rs
The test observes full-install file opens with the local CLI and, when its bundle is available, pnpm v11. It excludes opens under node_modules.
Read-set assertions and convergence integration
pnpm/crates/cli/tests/suite/repeat_install_read_set.rs, .github/workflows/pacquet-ci.yml
The test checks for unclassified opens, unobserved input kinds, and applicable classified paths. The convergence workflow includes the test in its path filter and v11/v12 test command.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Other

Possibly related PRs

  • pnpm/pnpm#17694: Introduces the read-set test and open-recording utility that this change extends.
  • pnpm/pnpm#17183: Adds the v11/v12 test harness and repeat-install oracle infrastructure used by this change.
  • pnpm/pnpm#17637: Updates workspace validation records and manifest data used by the read-set checks.

Suggested labels: product: pacquet

Suggested reviewers: efedurmaz16

Merge Risk: Minimal · up to 65cdd

The convergence job runs the read-set test with v11 enabled. No actionable merge risk remains after normal checks.

Finishing Touches
Generate docstrings
  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share
Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between f9271d3 and 65cddd0.

Files selected for processing: 2
  • .github/workflows/pacquet-ci.yml
  • pnpm/crates/cli/tests/suite/repeat_install_read_set.rs

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Micro-Benchmark Results

Linux

group                                            main                                    pr
-----                                            ----                                    --
lockfile/parse_pnpm_lock                         1.00     16.0±0.96ms    23.3 MB/sec     1.01     16.2±0.86ms    23.1 MB/sec
packument/parse                                  1.02     48.1±4.85µs  1378.9 MB/sec     1.00     47.3±3.26µs  1401.9 MB/sec
tarball/download_dependency                      1.11  1083.1±175.25µs     3.9 MB/sec    1.00  975.6±136.04µs     4.3 MB/sec
tarball_batch/cold_store_many_medium_tarballs    1.03   237.1±10.03ms 67.5 KElem/sec     1.00    231.2±4.82ms 69.2 KElem/sec
version_pick/repeated_ranges_file                1.03      5.5±0.23ms  5.7 KElem/sec     1.00      5.3±0.23ms  5.9 KElem/sec
version_pick/repeated_ranges_raw                 1.07      5.5±0.21ms  5.7 KElem/sec     1.00      5.1±0.22ms  6.1 KElem/sec
version_pick/wildcard_lowest                     1.07     45.3±3.57µs 21.6 KElem/sec     1.00     42.3±2.75µs 23.1 KElem/sec
workspace_resolution/hoist_heavy                 1.07   302.4±20.12ms        ? ?/sec     1.00   282.2±19.82ms        ? ?/sec
workspace_sort/chained_projects                  1.28     16.6±2.20ms        ? ?/sec     1.00     13.0±0.60ms        ? ?/sec

@zkochan
zkochan marked this pull request as ready for review November 4, 2026 22:17
@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Test pnpm v11 full-install read sets alongside v12

🧪 Tests ⚙️ Configuration changes 🕐 20-40 Minutes

Grey Divider

AI Description

• Run every read-set fixture through pnpm v11 when its bundle is available.
• Recognize v11 manifest records, project discovery, and its non-input command-file read.
• Run the expanded contract in convergence CI when relevant test or oracle files change.
Diagram

graph TD
  CI["Convergence CI"] --> Fixtures["Read-set fixtures"] --> CLIs["v12 and v11"] --> Opens["Observed opens"] --> Checks["Input assertions"]
  CLIs --> State[("Workspace state")] --> Checks
Loading
High-Level Assessment

Reusing the existing fixtures and inotify-based contract for both versions keeps their coverage directly comparable. A separate v11 test would duplicate the contract without improving its checks.

Files changed (2) +135 / -34

Tests (1) +130 / -31
repeat_install_read_set.rsApply the full-install read-set contract to pnpm v11 +130/-31

Apply the full-install read-set contract to pnpm v11

• Runs each fixture against v12 and optionally v11, checking unrecorded reads and every Input kind for each CLI. Accounts for v11 digest-based manifest records and project-directory discovery, excludes node_modules output, and classifies v11's command-file shebang read as a non-input.

pnpm/crates/cli/tests/suite/repeat_install_read_set.rs

Other (1) +5 / -3
pacquet-ci.ymlInclude the read-set test in v11 convergence CI +5/-3

Include the read-set test in v11 convergence CI

• Adds the read-set test and oracle directory to the convergence path filter, and runs the read-set test with PNPM_V11_BUNDLE in the convergence job.

.github/workflows/pacquet-ci.yml

@greptile-apps

greptile-apps Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge.

Reviews (1) · Last reviewed commit: "test(cli): observe the read set of a pnp..." · Reviewed by Greptile

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (2) 📘 Rule violations (0) 📎 Requirement gaps (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Remediation recommended

1. Loaded runners can time out the new test 🐞 Bug ☼ Reliability
Description
The convergence job selects repeat_install_read_set without adding it to nextest's longer timeout
override. With both CLI versions enabled, its six fixtures execute 24 installs under the default
five-period, 300-second limit, so a sufficiently slow runner terminates the test before the
convergence job's own deadline.
Code

.github/workflows/pacquet-ci.yml[540]

+            pnpm test:rust -p pnpm-cli --run-ignored all -E 'test(/^peer_convergence::/) or test(/^repeat_install_oracle::/) or test(/^repeat_install_read_set::/) or test(/^pnpm_compatibility::/) or test(/^injected_freshness_matrix::/) or test(/^version::switches_up_to_a_newer_pnpm/) or test(/^version::v11_switches_up/)'
Relevance

●●● Strong

PR #17183 accepted the same fix: extending the nextest timeout override to new convergence tests. No
rejections found.

PR-#17183

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The workflow enables v11 and selects the test; the test loops over six fixtures with two installs
per CLI, while the nextest override excludes its name. The past convergence timeout fix addressed
the same omission pattern.

.github/workflows/pacquet-ci.yml[537-540]
pnpm/crates/cli/tests/suite/repeat_install_read_set.rs[65-139]
pnpm/crates/cli/tests/suite/repeat_install_read_set.rs[347-350]
pnpm/crates/cli/tests/suite/repeat_install_read_set.rs[366-378]
pnpm/crates/cli/tests/suite/repeat_install_read_set.rs[402-405]
.config/nextest.toml[12-20]
PR-#17183

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The newly selected v11/v12 read-set test retains nextest's shorter default timeout despite running 24 installs.
## Fix Focus Areas
- .github/workflows/pacquet-ci.yml[537-540]
- .config/nextest.toml[14-20]
## Recommended Fix
Include `repeat_install_read_set::` in the existing longer-running harness override, retaining its termination policy. Verify the period against a bundle-backed run on the convergence runner.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Dismiss ↗ | View ↗


2. Extra manifests hide untracked reads 🐞 Bug ≡ Correctness
Description
recorded_manifests treats every supported manifest filename as recorded for each v11 digest,
although that digest represents the one manifest selected for the project. If a fixture contains two
manifest formats and a full install reads the unselected file, the test accepts that read as
recorded instead of exposing the new read dependency.
Code

pnpm/crates/cli/tests/suite/repeat_install_read_set.rs[R290-293]

+        .flat_map(|importer| {
+            PROJECT_MANIFEST_BASENAMES
+                .iter()
+                .map(move |name| root.join(importer).join(name))
Relevance

●● Moderate

Semantic test-precision claim with no close accepted or rejected precedent for manifest-digest
recording; evidence is only loosely related.

PR-#17183
PR-#17672

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The new expansion produces three paths per digest, while v11 stops at the first manifest it can
read. A digest keyed by project therefore cannot establish that a later filename was recorded.

pnpm/crates/cli/tests/suite/repeat_install_read_set.rs[284-296]
pnpm11/workspace/project-manifest-reader/src/manifestExactReader.ts[52-61]
pnpm/crates/workspace-state/src/lib.rs[102-106]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The v11 digest fallback classifies all supported manifest filenames as recorded, including files the manifest selector did not read.
## Fix Focus Areas
- pnpm/crates/cli/tests/suite/repeat_install_read_set.rs[284-296]
- pnpm11/workspace/project-manifest-reader/src/manifestExactReader.ts[52-61]
## Recommended Fix
For each digest-backed project, determine the manifest selected by the same filename precedence as v11 and add only that path. Keep the existing exact `manifest_files` records for versions that provide them.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Dismiss ↗ | View ↗


Grey Divider

Context sources
✅ Compliance rules (platform): 60 rules
✅ Cross-repo context — repo relationships
✅ REVIEW.md
Review mode: Auto: ⚖️ Balanced: Test-only change, but 12 hunks of logic that could silently mask read-set gaps.

Grey Divider

Tip of the day
💡 Did you know, you can commit Qodo's fix in one click with committable suggestions (GitHub & GitLab)

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@qodo-code-review

Copy link
Copy Markdown

PR Code Suggestions ✨

Warning

/improve is deprecated. Use /agentic_review instead (removal date not yet scheduled).

No code suggestions found for the PR.

@github-actions github-actions Bot added the reviewed: coderabbit CodeRabbit submitted an approving review label Nov 4, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.94%. Comparing base (f9271d3) to head (65cddd0).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #17705   +/-   ##
=======================================
  Coverage   92.93%   92.94%           
=======================================
  Files        2099     2099           
  Lines      270801   270801           
=======================================
+ Hits       251670   251685   +15     
+ Misses      19131    19116   -15     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@zkochan
zkochan merged commit 55414df into main Nov 4, 2026
62 of 65 checks passed
@zkochan
zkochan deleted the repeat-install-read-set-v11 branch November 4, 2026 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product: pacquet reviewed: coderabbit CodeRabbit submitted an approving review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants