Skip to content

fix(pacquet): limit settings-only workspaces to root project#12133

Merged
zkochan merged 3 commits into
pnpm:mainfrom
marvinhagemeister:pacquet-settings-only-workspace-root
Jun 16, 2026
Merged

fix(pacquet): limit settings-only workspaces to root project#12133
zkochan merged 3 commits into
pnpm:mainfrom
marvinhagemeister:pacquet-settings-only-workspace-root

Conversation

@marvinhagemeister

@marvinhagemeister marvinhagemeister commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Fixes pacquet workspace project enumeration when pnpm-workspace.yaml exists but does not define packages.

A settings-only workspace manifest like this:

allowBuilds:
  esbuild: false

should still make the project a workspace, but it should only enumerate the root importer. Pacquet was passing the missing packages field through to the lower-level workspace project finder, which uses the recursive ['.', '**'] default. That could accidentally treat vendored fixture packages as workspace projects.

This maps absent packages to ['.'] in the install path, matching pnpm’s config-reader workspacePackagePatterns default:

cliOptions['workspace-packages'] ?? workspaceManifest?.packages ?? ['.']

Summary by CodeRabbit

  • Bug Fixes

    • Workspace enumeration now respects workspace package patterns from manifests, avoiding inclusion of vendored or fixture packages during recursive operations.
  • Tests

    • Added integration and unit tests verifying root-only enumeration for settings-style workspace manifests and explicit-empty-package behavior.
  • Documentation

    • Clarified workspace manifest and pattern behavior in docs to explain the difference between omitted vs explicitly empty package lists.

Copilot AI review requested due to automatic review settings June 2, 2026 09:12
@coderabbitai

coderabbitai Bot commented Jun 2, 2026

Copy link
Copy Markdown

Review Change Stack

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: 4dadf37b-db6d-4ff2-968e-26610852c2eb

📥 Commits

Reviewing files that changed from the base of the PR and between 7277c82 and 1dbaded.

📒 Files selected for processing (8)
  • pacquet/crates/cli/src/cli_args/run/recursive.rs
  • pacquet/crates/cli/tests/run_recursive.rs
  • pacquet/crates/package-manager/src/install.rs
  • pacquet/crates/package-manager/src/install/tests.rs
  • pacquet/crates/workspace/src/lib.rs
  • pacquet/crates/workspace/src/manifest.rs
  • pacquet/crates/workspace/src/manifest/tests.rs
  • pacquet/crates/workspace/src/projects.rs
✅ Files skipped from review due to trivial changes (2)
  • pacquet/crates/workspace/src/projects.rs
  • pacquet/crates/workspace/src/manifest.rs
🚧 Files skipped from review as they are similar to previous changes (1)
  • pacquet/crates/package-manager/src/install/tests.rs
📜 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). (9)
  • GitHub Check: Compile & Lint
  • GitHub Check: Run benchmark on ubuntu-latest
  • GitHub Check: Dylint
  • GitHub Check: Lint and Test (macos-latest)
  • GitHub Check: Lint and Test (ubuntu-latest)
  • GitHub Check: Lint and Test (windows-latest)
  • GitHub Check: Run benchmark on ubuntu-latest
  • GitHub Check: Code Coverage
  • GitHub Check: Analyze (javascript)
🧰 Additional context used
📓 Path-based instructions (2)
pacquet/**/*.rs

📄 CodeRabbit inference engine (pacquet/AGENTS.md)

pacquet/**/*.rs: Log emissions are part of matching pnpm — when porting a function that fires pnpm:<channel> events through globalLogger, logger.debug(...), or streamParser.write(...), mirror the call site, payload, and ordering so @pnpm/cli.default-reporter parses pacquet's NDJSON the same way
Declare a newtype wrapper for branded string types instead of collapsing the brand into a plain String or &str in Rust
If upstream TypeScript always validates before construction of a branded string, validate in the Rust wrapper too via TryFrom<String> and/or FromStr and do not provide an infallible public constructor
If upstream TypeScript never validates a branded string, just brand for type-safety in Rust by exposing an infallible From<String> constructor
If upstream TypeScript occasionally constructs a branded string without validation, expose from_str_unchecked in Rust as an escape hatch alongside the validating constructor
Match upstream serde behavior for branded strings crossing JSON, YAML, or INI boundaries by using #[serde(try_from = "String")] for deserialization and #[serde(into = "String")] for serialization
Derive simple conversions for branded strings using #[derive(derive_more::From)] and #[derive(derive_more::Into)] instead of handwriting impl blocks; use manual impl only when conversion needs custom logic
Model TypeScript string literal unions (like 'auto' | 'always' | 'never') as Rust enums instead of newtype wrappers, since the set of valid values is closed
Treat TypeScript string template literal types (like `${string}@${string}`) the same as branded string types in Rust, using a newtype wrapper with validation
Follow the code style guide in CODE_STYLE_GUIDE.md — imports, modules, naming, ownership and borrowing, parameter type selection, trait bounds, pattern matching, pipe-trait, error handling, test layout, and cloning of Arc and Rc
Choose owned vs. borrowed parameters to minimize copies; widen to t...

Files:

  • pacquet/crates/workspace/src/lib.rs
  • pacquet/crates/workspace/src/manifest/tests.rs
  • pacquet/crates/cli/src/cli_args/run/recursive.rs
  • pacquet/crates/cli/tests/run_recursive.rs
  • pacquet/crates/package-manager/src/install.rs
pacquet/**/tests/**/*.rs

📄 CodeRabbit inference engine (pacquet/AGENTS.md)

pacquet/**/tests/**/*.rs: Prefer real fixtures over dependency-injection seams — use tempfile::TempDir, the mocked registry, or integration tests spawning the actual binary for happy paths and most error paths; use the DI seam only for filesystem error kinds, deterministic time, shared process-global state, or external-service happy paths
Follow test-logging guidance — log before non-assert_eq! assertions, dbg! complex structures, skip logging for simple scalar assert_eq!
Tests must not be tolerant of missing build/runtime environment by silently returning early when a tool isn't found — let the test panic when a required tool is absent
Prefer #[cfg_attr(target_os = "windows", ignore = "...")] (or matching #[cfg(unix)] gates) over runtime probe-and-skip helpers for platform-locked tools
Port relevant pnpm tests to Rust tests whenever they translate when porting behavior from pnpm
Use snapshot tests with insta and carefully review diffs when intentional changes alter snapshots; accept with cargo insta review only after careful review
Tests that need the mocked registry should start pnpr through pacquet-testing-utils; cargo test / cargo nextest run should not require a separate just registry-mock launch step

Files:

  • pacquet/crates/cli/tests/run_recursive.rs
🧠 Learnings (3)
📚 Learning: 2026-05-20T19:40:55.051Z
Learnt from: zkochan
Repo: pnpm/pnpm PR: 11774
File: pacquet/crates/resolving-deps-resolver/src/resolve_peers.rs:0-0
Timestamp: 2026-05-20T19:40:55.051Z
Learning: In the pacquet Rust code, ensure the semver implementation uses the `node-semver` crate (not `nodejs-semver`). `node-semver`’s public API does not include a `satisfies_with_prerelease`-style method; prerelease-tolerant matching should be implemented inline by first calling `Range::satisfies`, and when it rejects a prerelease version, retry matching against a stripped `MAJOR.MINOR.PATCH` base of the prerelease version.

Applied to files:

  • pacquet/crates/workspace/src/lib.rs
  • pacquet/crates/workspace/src/manifest/tests.rs
  • pacquet/crates/cli/src/cli_args/run/recursive.rs
  • pacquet/crates/cli/tests/run_recursive.rs
  • pacquet/crates/package-manager/src/install.rs
📚 Learning: 2026-05-22T00:08:44.646Z
Learnt from: zkochan
Repo: pnpm/pnpm PR: 11837
File: pacquet/crates/resolving-npm-resolver/src/pick_package.rs:33-51
Timestamp: 2026-05-22T00:08:44.646Z
Learning: In the pnpm/pnpm repo’s pacquet Rust crates, do not flag Unicode ellipsis characters (U+2026, `…`) in Rust doc comments (`///` / `/** */`) as a lint violation. The pacquet crate’s `dylint.toml` only enables `perfectionist::derive_ordering`, and the Dylint `unicode-ellipsis` rule is not enabled for this project—so `…` in doc comments is an intentional, repo-consistent style.

Applied to files:

  • pacquet/crates/workspace/src/lib.rs
  • pacquet/crates/workspace/src/manifest/tests.rs
  • pacquet/crates/cli/src/cli_args/run/recursive.rs
  • pacquet/crates/cli/tests/run_recursive.rs
  • pacquet/crates/package-manager/src/install.rs
📚 Learning: 2026-05-20T23:07:58.444Z
Learnt from: zkochan
Repo: pnpm/pnpm PR: 11784
File: pacquet/crates/resolving-deps-resolver/src/hoist_peers.rs:120-133
Timestamp: 2026-05-20T23:07:58.444Z
Learning: When reviewing code in this pacquet Rust port, follow the upstream pnpm compatibility rule: only match pnpm’s behavior exactly. Do not propose review changes that intentionally deviate from pnpm’s documented/observed behavior, even if pnpm appears buggy. If you identify a real bug in pnpm behavior, the review should prioritize fixing it upstream in pnpm first, and avoid implementing a pnpm-behavior workaround here unless the same fix has already landed upstream.

Applied to files:

  • pacquet/crates/workspace/src/lib.rs
  • pacquet/crates/workspace/src/manifest/tests.rs
  • pacquet/crates/cli/src/cli_args/run/recursive.rs
  • pacquet/crates/cli/tests/run_recursive.rs
  • pacquet/crates/package-manager/src/install.rs
🔇 Additional comments (7)
pacquet/crates/workspace/src/lib.rs (1)

29-32: LGTM!

pacquet/crates/workspace/src/manifest/tests.rs (3)

1-4: LGTM!


37-50: LGTM!


56-66: LGTM!

pacquet/crates/package-manager/src/install.rs (1)

1452-1454: LGTM!

pacquet/crates/cli/src/cli_args/run/recursive.rs (2)

27-30: LGTM!


85-90: LGTM!


📝 Walkthrough

Walkthrough

The PR changes callers to compute workspace package glob patterns with workspace_package_patterns(manifest) (re-exported) instead of directly using manifest.packages, clarifies rustdoc for packages/pattern fallbacks, and adds unit and integration tests that assert settings-only workspace manifests enumerate only the root package.

Changes

Workspace Project Discovery

Layer / File(s) Summary
Docs and public export updates
pacquet/crates/workspace/src/lib.rs, pacquet/crates/workspace/src/manifest.rs, pacquet/crates/workspace/src/projects.rs, pacquet/crates/workspace/src/manifest/tests.rs
Adds workspace_package_patterns to public exports and clarifies rustdoc for WorkspaceManifest.packages and FindWorkspaceProjectsOpts.patterns, distinguishing omitted vs explicitly empty packages and documenting the pnpm fallback (packages ?? ['.']).
Pattern selection in callers
pacquet/crates/package-manager/src/install.rs, pacquet/crates/cli/src/cli_args/run/recursive.rs
Call sites now derive patterns using workspace_package_patterns(&manifest) and pass Some(...) into FindWorkspaceProjectsOpts, ensuring callers apply the documented pnpm fallback semantics.
Unit & integration tests
pacquet/crates/workspace/src/manifest/tests.rs, pacquet/crates/package-manager/src/install/tests.rs, pacquet/crates/cli/tests/run_recursive.rs
Adds unit tests for workspace_package_patterns (default ["."] vs explicit empty) and integration tests verifying recursive run/load_workspace_projects enumerate only the root for settings-only pnpm-workspace.yaml (exclude vendored nested packages).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related issues

Possibly related PRs

  • pnpm/pnpm#11905: Also modified how patterns are derived for workspace discovery in install-related code.

Suggested reviewers

  • zkochan

Poem

🐰 I hopped through workspace glens today,
Patterns found the root and turned the rest away,
Docs shine bright, tests scope true,
Now vendored paths won't follow through. 🥕

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: limiting settings-only workspace manifests to enumerate only the root project instead of using recursive defaults.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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 unit tests (beta)
  • Create PR with unit tests

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

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

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Review Summary by Qodo

Limit settings-only workspaces to root project enumeration

🐞 Bug fix

Grey Divider

Walkthroughs

Description
• Maps missing packages field to root-only pattern ['.']
• Prevents vendored fixtures from being enumerated as workspace projects
• Aligns with pnpm's config-reader default behavior
• Adds test for settings-only workspace manifest handling
Diagram
flowchart LR
  A["Settings-only pnpm-workspace.yaml<br/>no packages field"] -->|Previously| B["Passed None to<br/>find_workspace_projects"]
  B -->|Used recursive default| C["Enumerated vendored<br/>fixtures as projects"]
  A -->|Now| D["Maps None to<br/>root-only pattern"]
  D -->|Matches pnpm behavior| E["Enumerates only<br/>root project"]

Loading

Grey Divider

File Changes

1. pacquet/crates/package-manager/src/install.rs 🐞 Bug fix +9/-1

Map missing packages field to root-only pattern

• Modified load_workspace_projects to map missing packages field to ['.'] pattern
• Added detailed comment explaining pnpm's config-reader default behavior
• Prevents accidental enumeration of vendored fixtures as workspace projects

pacquet/crates/package-manager/src/install.rs


2. pacquet/crates/package-manager/src/install/tests.rs 🧪 Tests +35/-2

Add test for settings-only workspace enumeration

• Added import for load_workspace_projects function
• Added fs import for file system operations
• Added new test workspace_without_packages_field_enumerates_root_only that verifies settings-only
 workspace manifests only enumerate root project
• Test creates nested vendored package structure to ensure it's not incorrectly enumerated

pacquet/crates/package-manager/src/install/tests.rs


3. pacquet/crates/workspace/src/manifest.rs 📝 Documentation +7/-6

Update workspace manifest packages field documentation

• Updated documentation for packages field in WorkspaceManifest
• Clarified that None state is handled by install path mapping to ['.']
• Explained distinction between omitted and explicitly-empty packages field
• Noted that direct callers can still use lower-level recursive defaults

pacquet/crates/workspace/src/manifest.rs


Grey Divider

Qodo Logo

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

This PR fixes pacquet workspace project enumeration during install when pnpm-workspace.yaml exists but has no packages: field, ensuring only the workspace root importer is enumerated (instead of falling back to a recursive scan that can mistakenly treat vendored fixtures as workspace projects).

Changes:

  • Clarify the tri-state semantics of WorkspaceManifest.packages and document that the install path maps an omitted packages: field to ['.'].
  • Update the install workspace project loader to map packages: NoneSome(['.']) before calling find_workspace_projects.
  • Add a regression test ensuring settings-only workspaces enumerate only the root project and ignore nested vendored package.json files.

Reviewed changes

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

File Description
pacquet/crates/workspace/src/manifest.rs Updates documentation on packages tri-state semantics and how install interprets omitted packages:.
pacquet/crates/package-manager/src/install.rs Maps settings-only workspaces to root-only patterns (['.']) when enumerating workspace projects for install.
pacquet/crates/package-manager/src/install/tests.rs Adds a regression test covering root-only enumeration for settings-only workspace manifests.

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

Comment thread pacquet/crates/package-manager/src/install.rs Outdated
@codecov-commenter

codecov-commenter commented Jun 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.08%. Comparing base (c112b61) to head (5b7697c).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12133      +/-   ##
==========================================
+ Coverage   88.03%   88.08%   +0.05%     
==========================================
  Files         309      310       +1     
  Lines       41595    41847     +252     
==========================================
+ Hits        36618    36862     +244     
- Misses       4977     4985       +8     

☔ 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.

@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Integrated-Benchmark Report (Linux)

Scenario: Isolated linker: fresh restore, cold cache + cold store

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.095 ± 0.059 2.023 2.223 1.01 ± 0.04
pacquet@main 2.071 ± 0.061 1.993 2.188 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.0946876255599998,
      "stddev": 0.05909449925187366,
      "median": 2.0854762222599996,
      "user": 2.69412834,
      "system": 3.30280396,
      "min": 2.02273372276,
      "max": 2.22346660476,
      "times": [
        2.13762206576,
        2.0753928947599998,
        2.03565969276,
        2.11600018476,
        2.0537294087599998,
        2.02273372276,
        2.06309063776,
        2.22346660476,
        2.09555954976,
        2.12362149376
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.07060200066,
      "stddev": 0.060944141597729186,
      "median": 2.07174814476,
      "user": 2.6776213399999995,
      "system": 3.29441286,
      "min": 1.9929044817600001,
      "max": 2.18830870176,
      "times": [
        2.10215225376,
        2.07665814676,
        1.9929044817600001,
        2.18830870176,
        2.06683814276,
        2.03679849676,
        2.10369083176,
        2.00018610776,
        2.01781179176,
        2.12067105176
      ]
    }
  ]
}

Scenario: Isolated linker: fresh restore, hot cache + hot store

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 704.2 ± 25.0 681.6 771.5 1.00
pacquet@main 748.9 ± 82.0 678.2 964.3 1.06 ± 0.12
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.7042388449000001,
      "stddev": 0.025009799178858146,
      "median": 0.698946724,
      "user": 0.40252576000000007,
      "system": 1.3620364600000001,
      "min": 0.681583515,
      "max": 0.7714972050000001,
      "times": [
        0.7714972050000001,
        0.711147822,
        0.7006524030000001,
        0.6977700440000001,
        0.7028395150000001,
        0.681583515,
        0.69589343,
        0.7001234040000001,
        0.6872241060000001,
        0.693657005
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.7489025696,
      "stddev": 0.08196222645718236,
      "median": 0.7209075185,
      "user": 0.40185035999999996,
      "system": 1.34982526,
      "min": 0.678239186,
      "max": 0.9643094860000001,
      "times": [
        0.765408414,
        0.7051165770000001,
        0.714991989,
        0.702027461,
        0.678239186,
        0.6995302010000001,
        0.766596245,
        0.765983089,
        0.9643094860000001,
        0.7268230480000001
      ]
    }
  ]
}

Scenario: Isolated linker: fresh install, cold cache + cold store

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.521 ± 0.078 2.441 2.722 1.02 ± 0.04
pacquet@main 2.472 ± 0.046 2.425 2.583 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.5212394063400003,
      "stddev": 0.07841769888979969,
      "median": 2.49628303424,
      "user": 3.9964573999999997,
      "system": 3.1532349399999995,
      "min": 2.44069022724,
      "max": 2.72189209724,
      "times": [
        2.53994730424,
        2.72189209724,
        2.48090717724,
        2.50351664124,
        2.4807923832400003,
        2.46975484924,
        2.44069022724,
        2.48904942724,
        2.53842239924,
        2.5474215572400003
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.4721689187400004,
      "stddev": 0.04596351033346586,
      "median": 2.47498540674,
      "user": 3.9557124999999997,
      "system": 3.12636364,
      "min": 2.42483782624,
      "max": 2.58250408024,
      "times": [
        2.47798547424,
        2.42933030524,
        2.47198533924,
        2.48980268224,
        2.58250408024,
        2.43982746524,
        2.48447621924,
        2.48224812624,
        2.4386916692400002,
        2.42483782624
      ]
    }
  ]
}

Scenario: Isolated linker: fresh install, hot cache + hot store

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 1.685 ± 0.021 1.657 1.719 1.00
pacquet@main 1.692 ± 0.021 1.662 1.720 1.00 ± 0.02
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 1.68546063486,
      "stddev": 0.0213398723569869,
      "median": 1.6892905978600001,
      "user": 1.8992098799999997,
      "system": 1.9225873,
      "min": 1.65683424536,
      "max": 1.7192684283600002,
      "times": [
        1.69170239536,
        1.70592238036,
        1.65683424536,
        1.6889908273600003,
        1.6717008323600002,
        1.68959036836,
        1.7047804613600002,
        1.65703016636,
        1.6687862433600003,
        1.7192684283600002
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 1.6922290508600004,
      "stddev": 0.0208497940332485,
      "median": 1.6947787013600002,
      "user": 1.8817086800000002,
      "system": 1.9023466,
      "min": 1.6615568843600002,
      "max": 1.7195528773600002,
      "times": [
        1.6622277273600001,
        1.6862267693600002,
        1.6765863883600003,
        1.6615568843600002,
        1.71421996536,
        1.70513204236,
        1.70333063336,
        1.7074623773600002,
        1.7195528773600002,
        1.6859948433600003
      ]
    }
  ]
}

@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branchpr/12133
Testbedpacquet
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
milliseconds (ms)
(Result Δ%)
Upper Boundary
milliseconds (ms)
(Limit %)
isolated-linker.fresh-install.cold-cache.cold-store📈 view plot
🚷 view threshold
2,521.24 ms
(+6.37%)Baseline: 2,370.16 ms
2,844.20 ms
(88.65%)
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
🚷 view threshold
1,685.46 ms
(+10.10%)Baseline: 1,530.80 ms
1,836.96 ms
(91.75%)
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
🚷 view threshold
2,094.69 ms
(+0.16%)Baseline: 2,091.34 ms
2,509.61 ms
(83.47%)
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
🚷 view threshold
704.24 ms
(+6.21%)Baseline: 663.04 ms
795.65 ms
(88.51%)
🐰 View full continuous benchmarking report in Bencher

@marvinhagemeister marvinhagemeister force-pushed the pacquet-settings-only-workspace-root branch from 7277c82 to 1dbaded Compare June 2, 2026 09:34
marvinhagemeister and others added 2 commits June 16, 2026 21:35
Address review feedback: the settings-only-workspace root limiting was
not applied at every workspace-enumeration entry point. exec_recursive
still passed the raw manifest.packages through to find_workspace_projects,
falling back to the lower-level ['.', '**'] recursive default. Route it
through workspace_package_patterns like install and run_recursive, and
cover it with an integration test.

Also fix doc-comment placement (read_workspace_manifest doc was stranded
above workspace_package_patterns; the explicit packages: [] doc was
detached from its test) and add #[must_use] to workspace_package_patterns.
Copilot AI review requested due to automatic review settings June 16, 2026 20:34
@zkochan zkochan force-pushed the pacquet-settings-only-workspace-root branch from 1dbaded to 717da92 Compare June 16, 2026 20:34

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 was unable to review this pull request because the user who requested the review has reached their quota limit.

@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Jun 16, 2026

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0)

Grey Divider


Informational

1. Benchmark test work inflation 🐞 Bug ➹ Performance
Description
slow_start_ramps_per_connection_throughput now takes the minimum of 8 samples for both flat and
ramped modes, increasing the number of end-to-end TCP transfers from 6 to 16 per test run. This will
measurably increase the integrated-benchmark test suite runtime (even though it reduces flakiness).
Code

pacquet/tasks/integrated-benchmark/src/latency_proxy/tests.rs[R180-182]

+    const SAMPLES: u32 = 8;
+    let flat = best_of(SAMPLES, false);
+    let ramped = best_of(SAMPLES, true);
Evidence
The test’s best_of loop runs timed_transfer once per sample; timed_transfer sets up TCP
listener/proxy and performs a full payload transfer. With SAMPLES = 8, this executes 16 transfers
per run (flat + ramped), increasing runtime versus the previous 3-sample version.

pacquet/tasks/integrated-benchmark/src/latency_proxy/tests.rs[136-168]
pacquet/tasks/integrated-benchmark/src/latency_proxy/tests.rs[169-186]

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 latency proxy test now runs 16 full TCP transfers (8 flat + 8 ramped). This reduces flakiness but increases test runtime.
## Issue Context
Each sample spins up a listener thread, spawns a `LatencyProxy`, and transfers 256KiB over a rate-limited link, so increasing samples multiplies real work.
## Fix Focus Areas
- pacquet/tasks/integrated-benchmark/src/latency_proxy/tests.rs[166-186]
## Suggested fix
Keep the flake resistance but reduce runtime by making sampling adaptive, e.g.:
- Stop early once a sufficiently low `flat` sample is observed and `ramped` already exceeds it by the assertion margin.
- Or gate `SAMPLES` via an env var / `cfg!(ci)` and default to a smaller number locally.

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


Grey Divider

Qodo Logo

…stalls

slow_start_ramps_per_connection_throughput compares the best-of-N flat
and ramped transfer times. The structural ramp gap is well over 100 ms,
but with only 3 samples a bursty CI runner can stall every flat sample at
once, inflating the flat minimum to within the 25 ms assertion margin and
failing the test. Raise the sample count so a near-clean flat reading is
effectively guaranteed; the minimum is already the test's noise-resistant
estimator.
@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Jun 16, 2026

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 5b7697c

@zkochan zkochan merged commit 8081aac into pnpm:main Jun 16, 2026
26 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants