Skip to content

refactor: match where a combinator's fallback is itself a branch - #16686

Merged
zkochan merged 7 commits into
mainfrom
claude/serene-wozniak-2by24t
Oct 7, 2026
Merged

zkochan merged 7 commits into
mainfrom
claude/serene-wozniak-2by24t

Conversation

@KSXGitHub

@KSXGitHub KSXGitHub commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Five sites where the fallback argument of an Option/Result combinator contains a branch of its own, plus a reduced subset of a wider sweep that is kept at the reviewer's request.

The five argued sites

In each case the branch becomes a sibling arm of a match, so the value is read before the fallback and the nesting goes away.

Two of them also stop doing work that was never needed: map_or and unwrap_or evaluate their default unconditionally, so a branching default was being computed even when the option was Some. This is the wart clippy::or_fun_call exists for.

  • napi/native_reporter.rs — a two-way Duration default built on every call; now two guard arms.
  • cli/pre_command/pin.rs — a five-arm match evaluated even when pm_on_fail is set; now one match over both, with a redundant arm pair collapsed. PmOnFail is Copy, so the configured value is returned by value rather than cloned.
  • cli/pre_command/input/reporter_flags.rs and cli/audit/render.rs — an if/match inside an unwrap_or_else closure; now guard arms. The audit one also stops cloning an Option wrapper to return the String inside it.
  • pnpr/resolver/wire/tarball_router.rs — map_or_else inside another map_or_else's closure, so the failure arm preceded the success arm twice. An early return keeps the package name from being parsed when the basename is already present.

Each is a pure refactor. Laziness is preserved everywhere, including the tarball case, where a single flat match over a tuple would have changed the work done.

The narrowed sweep

An earlier revision also converted the default-first map_or_else calls that this selector finds:

rg -U -e '\.map_or_else\(\s*\n\s*\|\|' -g '*.rs' pnpm/crates pnpr/crates pnpm/tasks

That matches on where rustfmt put a line break. Those calls nest nothing, evaluate nothing early and invert no logic, so the selector measured a formatting habit rather than finding a defect, and its 41 hits were a survey rather than a work list.

Twelve files are back at their base state, on four tests where any single one disqualifies a site:

  1. The rewrite has to invent a name whose only job is to be matched one line later — which moves a level out of the expression into the enclosing block instead of removing it.
  2. The first closure diverges, so there is no default value to put second; unwrap_or_else and expect already read as "this must be Some".
  3. The call sits in a macro's value position, where a match block is not a value, so the field ends up lines away from what fills it.
  4. It is test code, read only when it fails, where churn costs review and git blame and returns nothing.

No file under tests/ is modified by this branch, and four of the seven invented bindings are gone. The selector now reports 12, against 41 at the base commit.

The conversions in the files that remain were each reviewed individually and kept because they read better than what they replaced, not because they fix a defect. That is a style call for pnpm to confirm or revert, and each is a self-contained single-site change, so any subset can be dropped without touching the five above.

Not included: the other map_or / map_or_else call sites in these crates — 226 and 119 respectively, by grep on the current head. Those were not examined individually, so this PR makes no claim about them. A meaningful share are map_or(false, …) predicates whose better destination is is_some_and rather than a match, which clippy::unnecessary_map_or already reports at warn. Worth a separate pass; pnpm/tasks is the place for it.

Review round

Seven findings on b849bd5. One was applied: the reporter_flags.rs match-statement suggestion.

The other six asked for .map(…).unwrap_or_else(…). That form cannot be used in this workspace: Cargo.toml sets pedantic = { level = "warn", priority = -1 } under [workspace.lints.clippy], so clippy::map_unwrap_or fires and -D warnings makes it an error. Clippy's own suggested fix is map_or_else(fallback, value), the default-first spelling this PR removes. I implemented all six and confirmed each one fails the gate; tests are not exempt (that exemption belongs to perfectionist, not clippy), and a diverging panic! fallback is not either. Those threads are left open for a decision between an #[allow] per site and relaxing the lint. Five of the six sites revert to base here regardless, so the match they objected to is gone from them.

One fragility worth recording: the rewrites in this PR pass clippy only because clippy::option_if_let_else is nursery rather than pedantic. That lint is described as "reimplementation of Option::map_or" and rewrites a match back into one. If it ever joined pedantic, this PR's style and the original would both be unlintable.

Verification

Run locally against this head:

  • node pnpm/scripts/rustfmt.mjs --all -- --check — no diff
  • cargo clippy --locked --workspace --all-targets -- --deny warnings — exit 0
  • RUSTFLAGS="-D warnings" cargo dylint --all -- --all-targets --workspace — exit 0, so overly_long_method_chain and the rest of perfectionist pass
  • cargo nextest run over the nine affected crates — 8233 of 8256 passed, 23 failed, 17 skipped

All 23 failures are environmental, each traced to a specific missing prerequisite rather than assumed pre-existing:

Count Cause
10 Need a non-root user; they assert on chmod 0o555 paths that uid 0 bypasses (dlx ×4, cache ×2, task_run_state, version_flag_reports_a_pin_it_cannot_record, frozen_store_installs_against_a_read_only_global_virtual_store, and one pnpm-config case)
8 cas_linker needs Node.js ^24.18.0 || >=26.2.0; the sandbox has 22.22.0
4 pnpm_compatibility needs the TypeScript v11 bundle built
1 pnpr compiler_cache needs sccache on PATH

The pnpm-config failure was checked specifically, because config/src/defaults.rs is one of the files this PR changes. It fails identically with that file reverted to its base content, and the changed hunk is inside the "windows" arm of match env::consts::OS, which is unreachable on Linux. CI's Windows job is what actually exercises that arm.

Not run locally: the stricter rustdoc that pre-push:rust uses, RUSTDOCFLAGS="-D warnings" cargo doc --all-features --document-private-items. No doc comments are touched, but it is unverified here and left to CI.

Squash Commit Body

Five sites where the fallback argument of an Option or Result combinator
contained a branch of its own. In each, the branch becomes a sibling arm of a
match, so the value is read before the fallback and the nesting goes away.

Two of them also stop doing work that was never needed. map_or and unwrap_or
evaluate their default unconditionally, so a branching default was computed
even when the option was Some:

- napi/native_reporter.rs built a two-way Duration default on every call.
- cli/pre_command/pin.rs ran a five-arm match even when pm_on_fail was set.
  Its two arms that produced the same value are now one, and PmOnFail is Copy,
  so the configured value is returned by value rather than cloned.

The other three removed nesting only:

- cli/pre_command/input/reporter_flags.rs and cli/audit/render.rs each held an
  if or a match inside an unwrap_or_else closure. The audit one also stopped
  cloning an Option wrapper to return the String inside it.
- pnpr/resolver/wire/tarball_router.rs nested map_or_else inside another
  map_or_else's closure, so the failure arm preceded the success arm twice. An
  early return keeps the package name from being parsed when the basename is
  already present. A single flat match over a tuple would have changed the work
  done, so the remaining laziness is deliberate.

An earlier revision of this branch also converted every default-first
map_or_else call found by matching on a newline between the call and its first
closure. That selector keys on where rustfmt put a line break, not on anything
the code does: those calls nest nothing, evaluate nothing early and invert no
logic, so its 41 hits were a survey rather than a work list.

Twelve files are back at their base state, on four conditions where any single
one disqualifies a site:

- The rewrite has to invent a name whose only job is to be matched one line
  later, which moves a level out of the expression into the enclosing block
  instead of removing it.
- The first closure diverges, so there is no default value to put second.
  unwrap_or_else and expect already read as "this must be Some".
- The call sits in a macro's value position, where a match block is not a
  value, so the field ends up lines away from what fills it.
- It is test code, read only when it fails, where churn costs review and git
  blame and returns nothing.

No file under tests/ is modified. The conversions in the files that remain were
reviewed individually and kept for reading better than what they replaced,
rather than because they fix a defect.

Laziness is held wherever it existed and no public signature changes, so the
observable behaviour is unchanged.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RNxMkLRG8CRDPwe5vcd28n

Checklist

  • New features are implemented only in the Rust pnpm v12 CLI. Bug fixes
    are implemented in every affected version.
  • Added a changeset (pnpm changeset) if this PR changes any published
    package. Keep it short and written for pnpm users — it becomes a release note.
  • Added or updated tests.
  • Updated the documentation if needed.

On the two unchecked items:

  • No changeset. This touches published packages (pacquet, @pnpm/napi, @pnpm/pnpr), but nothing a user can observe changes, so there is no release note to write. The two most recent refactor(...) commits on main carry none either.
  • No new tests. The change is behaviour-preserving by construction; it is the existing suite over the affected crates that demonstrates that, and it is reported above.

The template's first item is removed: this PR references no issue.


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

🤖 Generated with Claude Code

https://claude.ai/code/session_01RNxMkLRG8CRDPwe5vcd28n

claude added 5 commits October 7, 2026 06:35
…efault

`map_or` evaluates its default argument whether or not the option holds a
value, so both `Duration` constructors ran on every renderer build even when
`throttleProgress` was set. A `match` builds only the arm it takes, the nested
`if`/`else` flattens into a guard arm, and the chosen value now reads ahead of
its fallback.

Left alone in this file: the `map_or_else` in `renderer_width`. It belongs to
the default-first `map_or_else` sweep, not to this eager-default shape, so it
is converted in that commit instead.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RNxMkLRG8CRDPwe5vcd28n
`unwrap_or` evaluates its argument unconditionally, so the inner match over
`packageManager.onFail` ran even when `pmOnFail` was configured and decided the
result. Matching on both values at once keeps the configured setting first and
reaches the manifest only when there is no setting.

The inner match also had two arms with the same body, `Some("download") | None`
and `Some(_)`, which collapse into the single catch-all the enum's default
already needs. `PmOnFail` is `Copy`, so the configured value is returned by
value rather than cloned.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RNxMkLRG8CRDPwe5vcd28n
Two `unwrap_or_else` calls wrapped a whole branch in their closure, so the
fallback came before the value it falls back to and the branch sat one level
down inside an argument. As sibling match arms the value leads and the branch
becomes a guard or a second arm.

In the audit renderer this also drops the clone of the `Option` wrapper: only
the `String` that is actually returned is cloned now.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RNxMkLRG8CRDPwe5vcd28n
`tarball_filename` nested one `map_or_else` inside another's closure, so both
levels put their failure arm ahead of their success arm and the reader met two
fallbacks before either value. An early return for the basename, then a `match`
on the parsed name, reads top to bottom.

The early return keeps the laziness the nesting provided: the package name is
still parsed only when the URL carries no basename. Folding both into one match
over a tuple would parse it every time, so it is deliberately not done that
way.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RNxMkLRG8CRDPwe5vcd28n
Across the Rust crates, 41 `map_or_else` calls were written with the default
closure on its own line, so the fallback appeared before the value it stands in
for and both arms were closures rather than arms. A `match` puts the value
first, drops the closures, and lets the fallback read as the sibling it is.

A few sites needed more than the mechanical swap:

- Where the scrutinee was itself a chain, the chain is bound to a local first
  so the match reads against a name.
- `renderer_width`, `lockfile_path`, and the reporter-flag scan carried an
  `if`/`else` inside the default closure; those branches are now guard arms.
- `project_anchor_importers` and `update_actions_root` nested one option test
  inside another, so they match over a tuple of both.
- `selected_prune_importer_ids` took its outer option with `?` instead of
  wrapping the body in a `map` closure.
- The `json!` argument in `read_archive_by_custom_fetcher` is bound to a local,
  because a match block inside the macro's value position would be read as an
  object.

Laziness is unchanged everywhere: no arm's work is done unless that arm is
taken.

Not converted: single-line `map_or` and `map_or_else` calls that already read
cleanly, the `unwrap_or` and `unwrap_or_default` calls whose default is a
literal or `Default::default()`, and `is_some_and`, which is the idiomatic
spelling of that test.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RNxMkLRG8CRDPwe5vcd28n
@coderabbitai

coderabbitai Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: Repository: pnpm/pnpm/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 13b894d5-e155-43ef-98e7-1ba933579891
📥 Commits

Reviewing files that changed from the base of the PR and between b849bd5 and 51dc866.

📒 Files selected for processing (1)
  • pnpm/crates/cli/src/cli_args/pre_command/input/reporter_flags.rs
 ___________________________________________
< GPU-powered code review. It's the future. >
 -------------------------------------------
  \
   \   \
        \ /\
        ( )
      .( o ).

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: pnpm/pnpm/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a6bbd393-8184-47ba-8a08-9b0cc33c56a1
📥 Commits

Reviewing files that changed from the base of the PR and between 3da5bd3 and b849bd5.

📒 Files selected for processing (38)
  • pnpm/crates/cli/src/cargo_manifest.rs
  • pnpm/crates/cli/src/cli_args/audit/render.rs
  • pnpm/crates/cli/src/cli_args/cache.rs
  • pnpm/crates/cli/src/cli_args/install/pnpr_request.rs
  • pnpm/crates/cli/src/cli_args/install/pnpr_resolution.rs
  • pnpm/crates/cli/src/cli_args/pipeline/cache.rs
  • pnpm/crates/cli/src/cli_args/pre_command/input/argv_scan.rs
  • pnpm/crates/cli/src/cli_args/pre_command/input/reporter_flags.rs
  • pnpm/crates/cli/src/cli_args/pre_command/pin.rs
  • pnpm/crates/cli/src/cli_args/store/status.rs
  • pnpm/crates/cli/src/cli_args/update/execution.rs
  • pnpm/crates/cli/src/fatal_error.rs
  • pnpm/crates/cli/tests/suite/catalog.rs
  • pnpm/crates/cli/tests/suite/licenses.rs
  • pnpm/crates/cmd-shim/src/link_bins/executable.rs
  • pnpm/crates/cmd-shim/src/link_bins/prepared.rs
  • pnpm/crates/config/src/defaults.rs
  • pnpm/crates/deps-inspection/src/build/loaded_state.rs
  • pnpm/crates/lockfile/src/freshness/manifest.rs
  • pnpm/crates/napi/src/lockfile.rs
  • pnpm/crates/napi/src/native_reporter.rs
  • pnpm/crates/package-manager/src/install/apply_materialization.rs
  • pnpm/crates/package-manager/src/install/apply_materialization/selection.rs
  • pnpm/crates/package-manager/src/install/prepare_modules_state/purge.rs
  • pnpm/crates/package-manager/src/install/run/auto_dedupe.rs
  • pnpm/crates/package-manager/src/install/run/manifests.rs
  • pnpm/crates/package-manager/src/install_with_fresh_lockfile/plan.rs
  • pnpm/crates/package-manager/src/install_with_fresh_lockfile/resolve.rs
  • pnpm/crates/package-manager/src/overrides.rs
  • pnpm/crates/package-manager/src/prefetching_resolver/archive_read.rs
  • pnpm/crates/package-manager/src/tarball_prefetch.rs
  • pnpm/crates/package-manager/src/update/prepare.rs
  • pnpm/crates/resolving-npm-resolver/src/lookup_context.rs
  • pnpm/crates/workspace-task-scheduler/src/graph.rs
  • pnpm/tasks/integrated-benchmark/src/work_env.rs
  • pnpr/crates/pnpr/src/resolver/wire/tarball_router.rs
  • pnpr/crates/pnpr/src/server/cargo.rs
  • pnpr/crates/search/src/lib.rs

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


📝 Walkthrough

Walkthrough

The PR rewrites optional-value selection across pnpm and pnpr Rust code with explicit matches and early returns. It also constructs package metadata separately before adding it to fetcher options. The summaries report existing fallback outcomes as retained.

Changes

Optional-value branch refactors

Layer / File(s) Summary
CLI and configuration branches
pnpm/crates/cli/src/..., pnpm/crates/config/src/defaults.rs, pnpm/crates/deps-inspection/src/build/loaded_state.rs, pnpm/crates/lockfile/src/freshness/manifest.rs, pnpm/crates/napi/src/...
CLI, configuration, lockfile, and reporter branches now use explicit matches for existing selections and fallback values.
Install, materialization, and hook branches
pnpm/crates/package-manager/src/install/..., pnpm/crates/package-manager/src/install_with_fresh_lockfile/..., pnpm/crates/package-manager/src/overrides.rs, pnpm/crates/package-manager/src/prefetching_resolver/archive_read.rs, pnpm/crates/package-manager/src/tarball_prefetch.rs, pnpm/crates/package-manager/src/update/prepare.rs
Install and materialization branches use explicit matches to select lockfiles, importer IDs, paths, overrides, and hook behavior. Fetcher options now use a separately constructed package metadata value.
Resolution and supporting branches
pnpm/crates/cmd-shim/src/link_bins/..., pnpm/crates/resolving-npm-resolver/src/lookup_context.rs, pnpm/crates/workspace-task-scheduler/src/graph.rs, pnpm/tasks/integrated-benchmark/src/work_env.rs, pnpr/crates/pnpr/src/..., pnpr/crates/search/src/lib.rs
Command linking, lookup context, task scheduling, benchmark registry selection, and pnpr routing and search branches use explicit matches or early returns.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Refactor

Possibly related PRs

  • pnpm/pnpm#14825: Adds a maximum nesting-depth lint and recommends guard clauses and matches, which is related to this PR’s conversion of nested combinator branches to explicit matches.

Suggested labels: product: pacquet, product: pnpr

Suggested reviewers: zkochan

Merge Risk: ⚪ Minimal · up to b849b

No merge-blocking issue is identified; the refactor appears ready to merge 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
  • Autopilot · 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

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

@KSXGitHub KSXGitHub changed the title refactor: flatten inverted Option combinators into match refactor: flatten inverted Option combinators into match Oct 7, 2026
@codecov-commenter

codecov-commenter commented Oct 7, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 82.06897% with 26 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.36%. Comparing base (a5a0178) to head (51dc866).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
pnpr/crates/pnpr/src/server/cargo.rs 28.57% 5 Missing ⚠️
pnpm/crates/napi/src/native_reporter.rs 66.66% 4 Missing ⚠️
...pr/crates/pnpr/src/resolver/wire/tarball_router.rs 33.33% 4 Missing ⚠️
...pm/crates/cli/src/cli_args/install/pnpr_request.rs 66.66% 2 Missing ⚠️
pnpm/crates/config/src/defaults.rs 33.33% 2 Missing ⚠️
...manager/src/install_with_fresh_lockfile/resolve.rs 66.66% 2 Missing ⚠️
...crates/cli/src/cli_args/install/pnpr_resolution.rs 66.66% 1 Missing ⚠️
...es/cli/src/cli_args/pre_command/input/argv_scan.rs 66.66% 1 Missing ⚠️
pnpm/crates/cli/src/cli_args/store/status.rs 66.66% 1 Missing ⚠️
pnpm/crates/cmd-shim/src/link_bins/executable.rs 66.66% 1 Missing ⚠️
... and 3 more
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #16686   +/-   ##
=======================================
  Coverage   92.36%   92.36%           
=======================================
  Files        1593     1593           
  Lines      210328   210323    -5     
=======================================
- Hits       194268   194266    -2     
+ Misses      16060    16057    -3     

☔ 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 Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Micro-Benchmark Results

Linux

group                                            main                                   pr
-----                                            ----                                   --
lockfile/parse_pnpm_lock                         1.07     12.5±0.69ms    30.0 MB/sec    1.00     11.6±0.16ms    32.2 MB/sec
packument/parse                                  1.00     42.1±2.25µs  1574.5 MB/sec    1.02     43.1±0.74µs  1537.5 MB/sec
tarball/download_dependency                      1.06      4.2±0.43ms  1043.3 KB/sec    1.00      3.9±0.50ms  1111.0 KB/sec
tarball_batch/cold_store_many_medium_tarballs    1.13    218.4±8.39ms 73.2 KElem/sec    1.00    193.6±9.34ms 82.7 KElem/sec
version_pick/repeated_ranges_file                1.05      4.6±0.16ms  6.8 KElem/sec    1.00      4.4±0.07ms  7.1 KElem/sec
version_pick/repeated_ranges_raw                 1.20      5.1±0.61ms  6.1 KElem/sec    1.00      4.2±0.11ms  7.4 KElem/sec
workspace_resolution/hoist_heavy                 1.30   337.8±64.05ms        ? ?/sec    1.00   259.8±21.05ms        ? ?/sec
workspace_sort/chained_projects                  2.42     31.8±8.52ms        ? ?/sec    1.00     13.1±1.17ms        ? ?/sec

@github-actions github-actions Bot added the reviewed: coderabbit CodeRabbit submitted an approving review label Oct 7, 2026
@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Same-run regression check

HEAD and main are measured on the same runner. The tolerance is 5% of the main median or 2 ms, whichever is larger. A regression requires both the median slowdown and the gap between the fastest retained HEAD sample and slowest retained main sample to exceed this tolerance, after trimming up to 10% from each tail. Suspected regressions are rerun once with target order reversed and only fail if reproduced. This conservative noise guard is not a statistical confidence interval.

Inconclusive rows do not fail the check. They remain visible for performance review. Bencher retains absolute minimum timings for historical tracking; historical alerts do not gate this PR. Sequential measurements can still be affected by runner drift.

Scenario Engine main median HEAD median Change Tolerance Result
isolated-fresh-restore-cold-cache-cold-store pacquet 2371.40 ms 2480.68 ms 4.6% 118.57 ms Within tolerance
isolated-fresh-restore-cold-cache-cold-store pnpr 1409.06 ms 1425.69 ms 1.2% 70.45 ms Within tolerance
isolated-fresh-restore-hot-cache-hot-store pacquet 327.46 ms 239.61 ms -26.8% 16.37 ms Within tolerance
isolated-fresh-restore-hot-cache-hot-store pnpr 274.79 ms 276.65 ms 0.7% 13.74 ms Within tolerance
isolated-repeat-install-hot-cache-hot-store pacquet 10.90 ms 11.42 ms 4.8% 2.00 ms Within tolerance
isolated-repeat-install-hot-cache-hot-store pnpr 11.56 ms 11.52 ms -0.3% 2.00 ms Within tolerance
isolated-repeat-install-cold-cache-hot-store pacquet 10.03 ms 9.68 ms -3.5% 2.00 ms Within tolerance
isolated-repeat-install-cold-cache-hot-store pnpr 9.56 ms 9.74 ms 1.9% 2.00 ms Within tolerance
isolated-fresh-install-cold-cache-cold-store pacquet 2692.57 ms 2678.01 ms -0.5% 134.63 ms Within tolerance
isolated-fresh-install-cold-cache-cold-store pnpr 1599.29 ms 1614.94 ms 1.0% 79.96 ms Within tolerance
isolated-fresh-install-hot-cache-hot-store pacquet 585.00 ms 729.49 ms 24.7% 29.25 ms Inconclusive (overlapping samples)
isolated-fresh-install-hot-cache-hot-store pnpr 363.77 ms 355.90 ms -2.2% 18.19 ms Within tolerance
isolated-fresh-install-cold-cache-hot-store pacquet 1719.28 ms 1659.00 ms -3.5% 85.96 ms Within tolerance
isolated-fresh-install-cold-cache-hot-store pnpr 354.85 ms 349.84 ms -1.4% 17.74 ms Within tolerance
isolated-fresh-resolve-hot-cache-offline pacquet 243.85 ms 264.52 ms 8.5% 12.19 ms Inconclusive (overlapping samples)
isolated-fresh-resolve-hot-cache-offline pnpr 96.35 ms 96.42 ms 0.1% 4.82 ms Within tolerance
isolated-peer-heavy-resolve-hot-cache-offline pacquet 290.13 ms 284.61 ms -1.9% 14.51 ms Within tolerance
isolated-linked-workspace-resolve-hot-cache-offline pacquet 300.54 ms 229.44 ms -23.7% 15.03 ms Within tolerance
isolated-fresh-restore-cold-cache-cold-store-cold-pnpr pacquet 4491.47 ms 4440.06 ms -1.1% 224.57 ms Within tolerance
isolated-fresh-restore-cold-cache-cold-store-cold-pnpr pnpr 3631.31 ms 3643.24 ms 0.3% 181.57 ms Within tolerance
gvs-fresh-restore-hot-cache-hot-store pacquet 154.89 ms 152.87 ms -1.3% 7.74 ms Within tolerance
gvs-fresh-restore-hot-cache-hot-store pnpr 148.77 ms 174.92 ms 17.6% 7.44 ms Inconclusive (overlapping samples)

Integrated-Benchmark Report (Linux)

Commit: 51dc866d8ee0

Regular scenarios report direct and pnpr installs. The peer-heavy resolver scenario compares current Rust, main Rust, and TypeScript pnpm; the linked-workspace scenario compares current Rust against main Rust. Bencher consumes pacquet@HEAD and pnpr@HEAD.

The tables below show mean ± σ. Bencher tracks absolute minimum latency; PR regression checks compare HEAD and main samples from the same runner. Historical timing alerts do not gate PRs.

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.491 ± 0.137 2.313 2.710 1.72 ± 0.18
pacquet@main 2.450 ± 0.150 2.294 2.668 1.70 ± 0.18
pnpr@HEAD 1.445 ± 0.129 1.303 1.650 1.00
pnpr@main 1.457 ± 0.158 1.314 1.762 1.01 ± 0.14
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.49100647732,
      "stddev": 0.13713347265695194,
      "median": 2.48068216532,
      "user": 1.6172762999999997,
      "system": 1.6746125999999997,
      "min": 2.31326491932,
      "max": 2.7103204133200003
    },
    {
      "command": "pacquet@main",
      "mean": 2.44961727342,
      "stddev": 0.14950402208525423,
      "median": 2.3713987433200003,
      "user": 1.6027286999999997,
      "system": 1.5249932000000002,
      "min": 2.29353079432,
      "max": 2.66766831632
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.44462022952,
      "stddev": 0.12857720598484698,
      "median": 1.42568678632,
      "user": 1.2670006999999999,
      "system": 1.2993594000000002,
      "min": 1.30264913732,
      "max": 1.6499068053200001
    },
    {
      "command": "pnpr@main",
      "mean": 1.45742092832,
      "stddev": 0.15778273995392122,
      "median": 1.40906357732,
      "user": 1.3948268,
      "system": 1.4555108999999997,
      "min": 1.31376308632,
      "max": 1.76158540132
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 237.9 ± 9.4 215.9 251.7 1.00
pacquet@main 305.8 ± 62.8 227.8 381.4 1.29 ± 0.27
pnpr@HEAD 278.8 ± 16.8 259.1 302.9 1.17 ± 0.08
pnpr@main 285.4 ± 37.5 240.9 360.2 1.20 ± 0.16
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.23786372509999998,
      "stddev": 0.009447732639834281,
      "median": 0.23960793230000002,
      "user": 0.26449858000000004,
      "system": 0.56869218,
      "min": 0.2158816543,
      "max": 0.2516934483
    },
    {
      "command": "pacquet@main",
      "mean": 0.30575256069999995,
      "stddev": 0.06276365332843277,
      "median": 0.3274553673,
      "user": 0.36047288,
      "system": 0.69809728,
      "min": 0.2278066323,
      "max": 0.38144051630000003
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.27881420300000004,
      "stddev": 0.016807056848771134,
      "median": 0.2766462363,
      "user": 0.31272158,
      "system": 0.61635858,
      "min": 0.2591021643,
      "max": 0.30288726130000004
    },
    {
      "command": "pnpr@main",
      "mean": 0.28536443510000004,
      "stddev": 0.03754794877538022,
      "median": 0.27478997980000003,
      "user": 0.32330087999999996,
      "system": 0.60091428,
      "min": 0.24092894830000003,
      "max": 0.3601790253
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 11.5 ± 1.2 9.2 15.5 1.03 ± 0.15
pacquet@main 11.2 ± 1.2 8.5 16.8 1.00
pnpr@HEAD 11.7 ± 1.4 8.9 15.5 1.04 ± 0.17
pnpr@main 11.7 ± 1.2 9.3 16.7 1.05 ± 0.16
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.011464647261298698,
      "stddev": 0.001166941328511187,
      "median": 0.011421758560000002,
      "user": 0.006488352294372293,
      "system": 0.006226717402597403,
      "min": 0.009243438560000001,
      "max": 0.01549123856
    },
    {
      "command": "pacquet@main",
      "mean": 0.011172954602735045,
      "stddev": 0.0012171502285113125,
      "median": 0.01090075356,
      "user": 0.005913069743589742,
      "system": 0.006501152307692307,
      "min": 0.00854862856,
      "max": 0.016800999559999998
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.011657263997499995,
      "stddev": 0.0013576254306379972,
      "median": 0.01152438956,
      "user": 0.0062475034375,
      "system": 0.006796624687499998,
      "min": 0.008855968560000002,
      "max": 0.015499948560000002
    },
    {
      "command": "pnpr@main",
      "mean": 0.011692556582123894,
      "stddev": 0.0012057887140972568,
      "median": 0.011557726060000002,
      "user": 0.006634143716814155,
      "system": 0.006450482300884955,
      "min": 0.00932898956,
      "max": 0.01672549856
    }
  ]
}

Scenario: Isolated linker: repeat install, cold cache + hot store

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 9.7 ± 0.8 7.9 11.9 1.00
pacquet@main 10.1 ± 0.9 8.5 13.9 1.04 ± 0.13
pnpr@HEAD 10.4 ± 2.3 7.4 18.5 1.07 ± 0.25
pnpr@main 10.5 ± 2.5 7.9 19.3 1.08 ± 0.27
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.00972328574844037,
      "stddev": 0.0007716939813362509,
      "median": 0.00967778712,
      "user": 0.006056297522935784,
      "system": 0.004483743211009175,
      "min": 0.007895137120000001,
      "max": 0.01186864412
    },
    {
      "command": "pacquet@main",
      "mean": 0.010129772530377354,
      "stddev": 0.0009205958329661252,
      "median": 0.01002583462,
      "user": 0.005397681037735848,
      "system": 0.005659528962264151,
      "min": 0.00848854012,
      "max": 0.013892201120000001
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.010446986132145751,
      "stddev": 0.0022570253849984157,
      "median": 0.009740360120000001,
      "user": 0.006119296599190285,
      "system": 0.005168261052631575,
      "min": 0.007397632120000001,
      "max": 0.018506941120000002
    },
    {
      "command": "pnpr@main",
      "mean": 0.010483254709843749,
      "stddev": 0.0025090564673970125,
      "median": 0.009557721620000001,
      "user": 0.006279451093749998,
      "system": 0.005085121171874998,
      "min": 0.00788554912,
      "max": 0.019332611120000003
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.691 ± 0.121 2.549 2.933 1.67 ± 0.15
pacquet@main 2.684 ± 0.053 2.582 2.756 1.67 ± 0.13
pnpr@HEAD 1.610 ± 0.120 1.460 1.792 1.00
pnpr@main 1.631 ± 0.115 1.471 1.873 1.01 ± 0.10
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.6908664325599996,
      "stddev": 0.1207034814365407,
      "median": 2.67800584936,
      "user": 2.41844576,
      "system": 1.87816698,
      "min": 2.54921316036,
      "max": 2.93292892436
    },
    {
      "command": "pacquet@main",
      "mean": 2.6836701007599997,
      "stddev": 0.053128743681709924,
      "median": 2.69257177386,
      "user": 2.42486606,
      "system": 1.8676004800000001,
      "min": 2.58219684436,
      "max": 2.7556315373599998
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.6095060990599996,
      "stddev": 0.12004488231025434,
      "median": 1.6149440423599999,
      "user": 1.56119486,
      "system": 1.55291368,
      "min": 1.4599687693599999,
      "max": 1.79188428336
    },
    {
      "command": "pnpr@main",
      "mean": 1.63063132296,
      "stddev": 0.11451136450648307,
      "median": 1.59928825986,
      "user": 1.54203736,
      "system": 1.5530158799999998,
      "min": 1.4706027653599998,
      "max": 1.87342608736
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 712.2 ± 130.3 566.0 886.3 1.99 ± 0.37
pacquet@main 580.7 ± 23.1 548.8 614.8 1.62 ± 0.07
pnpr@HEAD 357.5 ± 6.1 347.9 366.5 1.00
pnpr@main 365.5 ± 16.1 337.1 386.1 1.02 ± 0.05
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.7121767859400001,
      "stddev": 0.13028325830136464,
      "median": 0.7294876597400001,
      "user": 1.04152494,
      "system": 1.25458968,
      "min": 0.56601074924,
      "max": 0.8863113242400001
    },
    {
      "command": "pacquet@main",
      "mean": 0.5806715976400001,
      "stddev": 0.02309597125921881,
      "median": 0.5850031812400001,
      "user": 0.8088052400000001,
      "system": 1.0557551799999998,
      "min": 0.5487601012400001,
      "max": 0.61476164324
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.35745800934,
      "stddev": 0.006063394943430232,
      "median": 0.35589815674,
      "user": 0.33653314,
      "system": 0.7742754800000001,
      "min": 0.34791360324,
      "max": 0.36650886224
    },
    {
      "command": "pnpr@main",
      "mean": 0.36548160164,
      "stddev": 0.016071955797736157,
      "median": 0.36377181024,
      "user": 0.36762083999999995,
      "system": 0.77878658,
      "min": 0.33714464824,
      "max": 0.38612949524
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 1.673 ± 0.072 1.594 1.837 4.84 ± 0.40
pacquet@main 1.721 ± 0.062 1.642 1.827 4.98 ± 0.40
pnpr@HEAD 0.345 ± 0.025 0.305 0.388 1.00
pnpr@main 0.352 ± 0.028 0.304 0.388 1.02 ± 0.11
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 1.67292786374,
      "stddev": 0.07155745204726886,
      "median": 1.6590007719400002,
      "user": 1.0431306,
      "system": 1.00804152,
      "min": 1.5937824359400001,
      "max": 1.83746775794
    },
    {
      "command": "pacquet@main",
      "mean": 1.7211535905400002,
      "stddev": 0.06163032787065593,
      "median": 1.7192816434400002,
      "user": 1.1979827,
      "system": 1.0416436199999999,
      "min": 1.6422958129400003,
      "max": 1.82719919394
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.34533286253999995,
      "stddev": 0.024757027471709166,
      "median": 0.34983525744,
      "user": 0.3196844,
      "system": 0.6702439200000001,
      "min": 0.30528282494000003,
      "max": 0.38832328294
    },
    {
      "command": "pnpr@main",
      "mean": 0.35170540464,
      "stddev": 0.027540296424328356,
      "median": 0.35485486944,
      "user": 0.34123729999999997,
      "system": 0.67875602,
      "min": 0.30368343594,
      "max": 0.38756309794000005
    }
  ]
}

Scenario: Isolated linker: fresh resolve, hot cache, offline

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 253.5 ± 22.3 205.0 274.2 2.64 ± 0.24
pacquet@main 244.5 ± 18.0 217.1 271.6 2.54 ± 0.20
pnpr@HEAD 96.4 ± 3.6 91.0 104.6 1.00 ± 0.05
pnpr@main 96.1 ± 2.7 89.6 100.4 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.25351213862727273,
      "stddev": 0.02230302344244113,
      "median": 0.2645159939,
      "user": 0.2406716290909091,
      "system": 0.09173407636363637,
      "min": 0.2050498509,
      "max": 0.27423135090000006
    },
    {
      "command": "pacquet@main",
      "mean": 0.24454665250000002,
      "stddev": 0.018026256859207807,
      "median": 0.2438519744,
      "user": 0.23056201999999998,
      "system": 0.08473094,
      "min": 0.21710556890000002,
      "max": 0.2716433139
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.09644029764193551,
      "stddev": 0.0036149557374942506,
      "median": 0.09642058590000001,
      "user": 0.03448359096774193,
      "system": 0.017011569032258065,
      "min": 0.0910104439,
      "max": 0.10464584190000001
    },
    {
      "command": "pnpr@main",
      "mean": 0.09609270227931033,
      "stddev": 0.0027131097376168396,
      "median": 0.0963504749,
      "user": 0.039611788965517244,
      "system": 0.013481493793103448,
      "min": 0.0896124559,
      "max": 0.10036957190000001
    }
  ]
}

Scenario: Isolated linker: peer-heavy resolve, hot cache, offline

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 288.0 ± 20.6 263.3 328.3 1.00
pacquet@main 289.1 ± 19.5 255.5 317.3 1.00 ± 0.10
pnpm@HEAD 4509.8 ± 111.5 4365.8 4703.7 15.66 ± 1.18
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.28804434430222225,
      "stddev": 0.020565245493821455,
      "median": 0.28460635008,
      "user": 0.3005267555555555,
      "system": 0.06809686,
      "min": 0.26326941508,
      "max": 0.32825722208
    },
    {
      "command": "pacquet@main",
      "mean": 0.2890650854133333,
      "stddev": 0.019539100157769277,
      "median": 0.29013308608,
      "user": 0.30679108888888884,
      "system": 0.06398430444444445,
      "min": 0.25547578108,
      "max": 0.31733755908
    },
    {
      "command": "pnpm@HEAD",
      "mean": 4.509833009635555,
      "stddev": 0.11145734742560601,
      "median": 4.5103122120800005,
      "user": 6.996419644444444,
      "system": 0.4601397488888888,
      "min": 4.365785279080001,
      "max": 4.703663807080001
    }
  ]
}

Scenario: Isolated linker: linked-workspace resolve, hot cache, offline

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 229.7 ± 7.9 220.3 244.9 1.00
pacquet@main 292.8 ± 56.0 219.7 385.6 1.27 ± 0.25
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.22966346287333336,
      "stddev": 0.007856637007252412,
      "median": 0.22943895904000003,
      "user": 0.18762307,
      "system": 0.0844026,
      "min": 0.22026467904000002,
      "max": 0.24493335804000002
    },
    {
      "command": "pacquet@main",
      "mean": 0.2927942138092307,
      "stddev": 0.05602793556939292,
      "median": 0.30054074304,
      "user": 0.23760170461538457,
      "system": 0.11020256153846154,
      "min": 0.21970896304,
      "max": 0.38561192704
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 4.481 ± 0.116 4.366 4.688 1.24 ± 0.05
pacquet@main 4.510 ± 0.115 4.362 4.710 1.25 ± 0.05
pnpr@HEAD 3.701 ± 0.233 3.484 4.308 1.02 ± 0.07
pnpr@main 3.619 ± 0.118 3.435 3.831 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 4.4812079339,
      "stddev": 0.1156052079669101,
      "median": 4.4400602783,
      "user": 1.6295722199999996,
      "system": 1.5854153800000002,
      "min": 4.3662111242999995,
      "max": 4.6876631323
    },
    {
      "command": "pacquet@main",
      "mean": 4.5100424684,
      "stddev": 0.11459069303355668,
      "median": 4.491473793299999,
      "user": 1.5081669199999996,
      "system": 1.4584331799999999,
      "min": 4.3615167483,
      "max": 4.7097631162999996
    },
    {
      "command": "pnpr@HEAD",
      "mean": 3.7007083976000006,
      "stddev": 0.2330454152146913,
      "median": 3.6432445208,
      "user": 1.8026383199999998,
      "system": 1.7229300799999998,
      "min": 3.4838225313000004,
      "max": 4.3084841383
    },
    {
      "command": "pnpr@main",
      "mean": 3.618734766,
      "stddev": 0.11797652105192409,
      "median": 3.6313147538,
      "user": 1.6510962200000001,
      "system": 1.51555848,
      "min": 3.4351086973,
      "max": 3.8309685483
    }
  ]
}

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

Same install as the isolated fresh-restore hot/hot scenario, into the shared virtual store, the layout pnpm 12 installs into by default. Scenarios run on separate machines, so compare main and branch within each table.

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 158.9 ± 15.0 141.9 198.8 1.05 ± 0.12
pacquet@main 154.0 ± 7.8 135.8 172.2 1.02 ± 0.09
pnpr@HEAD 166.8 ± 18.2 139.3 192.9 1.11 ± 0.14
pnpr@main 150.6 ± 10.0 136.1 174.6 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.15885745841058824,
      "stddev": 0.015034574714050234,
      "median": 0.15287322094,
      "user": 0.1994143552941177,
      "system": 0.14329597058823532,
      "min": 0.14192622894,
      "max": 0.19884690794
    },
    {
      "command": "pacquet@main",
      "mean": 0.15403424778210528,
      "stddev": 0.007849559844949498,
      "median": 0.15489287694,
      "user": 0.19449296210526312,
      "system": 0.14726165789473683,
      "min": 0.13579238193999998,
      "max": 0.17219936993999999
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.16677365774,
      "stddev": 0.01823994672927464,
      "median": 0.17492460094,
      "user": 0.20277451999999999,
      "system": 0.13752949999999997,
      "min": 0.13932310694,
      "max": 0.19292307494
    },
    {
      "command": "pnpr@main",
      "mean": 0.15058230077333337,
      "stddev": 0.00999099529531467,
      "median": 0.14877480444,
      "user": 0.17045345333333334,
      "system": 0.13299394444444446,
      "min": 0.13610601094,
      "max": 0.17458030394
    }
  ]
}

@KSXGitHub KSXGitHub left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Some comments/reviews.

Comment thread pnpm/crates/cli/tests/suite/licenses.rs Resolved
Comment thread pnpm/crates/cli/tests/suite/catalog.rs Resolved
Comment thread pnpm/crates/cli/src/cargo_manifest.rs Resolved
Comment thread pnpm/crates/cli/src/cli_args/cache.rs Resolved
claude added 2 commits October 7, 2026 09:21
… reached

The default-first `map_or_else` sites were selected by a regex matching on
where rustfmt put a line break. Those calls nest nothing, evaluate nothing
early, and invert no logic, so the selector measured a formatting habit
rather than finding a defect. Its output was a survey, not a work list.

Four conditions disqualify such a site, each of which the sweep had already
failed somewhere:

- The rewrite has to invent a name whose only job is to be matched on one
  line later. That moves a level out of the expression and into the
  enclosing block instead of removing it.
- The first closure diverges, so there is no default value to put second.
  `unwrap_or_else` and `expect` already read as "this must be Some".
- The call sits in a macro's value position, where a match block does not
  parse as a value, so the field ends up lines away from what fills it.
- It is test code, read only when it fails, where churn costs review and
  blame and returns nothing.

Twelve files go back to their base state on those grounds, including both
`tests/suite` helpers, which were also the two diverging sites, and four of
the seven invented bindings. No file under `tests/` is modified by this
branch any more.

The conversions that remain were each reviewed on their own merits and kept
at the reviewer's request for reading better than what they replaced,
independently of the sweep that found them.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RNxMkLRG8CRDPwe5vcd28n
Review preference: the match reads as a statement whose arms each advance
the cursor, rather than as an expression whose value is added to it.

The arms evaluate to `()`, so the match is a statement and takes no
trailing semicolon; `clippy::unnecessary_semicolon` rejects one.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RNxMkLRG8CRDPwe5vcd28n
@KSXGitHub KSXGitHub changed the title refactor: flatten inverted Option combinators into match refactor: match where a combinator's fallback is itself a branch Oct 7, 2026

This comment was marked as resolved.

@KSXGitHub
KSXGitHub marked this pull request as ready for review October 7, 2026 14:54
@KSXGitHub
KSXGitHub requested a review from zkochan as a code owner October 7, 2026 14:54
Copilot AI balanced review requested due to automatic review settings October 7, 2026 14:54

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.

@greptile-apps greptile-apps Bot 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.

Your trial has ended. Reactivate Greptile to resume code reviews.

@KSXGitHub
KSXGitHub marked this pull request as draft October 7, 2026 14:58
@zkochan
zkochan marked this pull request as ready for review October 7, 2026 14:59

@greptile-apps greptile-apps Bot 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.

Your trial has ended. Reactivate Greptile to resume code reviews.

@zkochan
zkochan merged commit 2319483 into main Oct 7, 2026
57 of 58 checks passed
@zkochan
zkochan deleted the claude/serene-wozniak-2by24t branch October 7, 2026 15:01
KSXGitHub pushed a commit that referenced this pull request Oct 7, 2026
Fourteen commits. The two refactors in them, #16686 and
#16700, touch no file this branch changes, so their shapes come
through untouched.

#16694 reaches `default-reporter`'s lifecycle rendering, where
this branch replaced `Frame::emit`'s `fixed: bool`. Both sides add a name
to the same `use super::` list; the merge keeps `printable_script_line`
beside `BlockPlacement`, and each side's call sites stand.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01QYTBQo8HY7xD2iz6hjo1CW
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.

5 participants