Repository navigation
revert: "fix(resolver): settle contested children under the owner's o… - #13833
Conversation
PR Summary by QodoRevert overlay-based handling of contested child resolution
AI Description
Diagram
High-Level Assessment
Files changed (6)
|
Confidence Score: 3/5This PR should not merge until contested children remain deterministic across differing preferred-version overlays and the pacquet release metadata is restored. The restored context comparison can reuse children selected under another occurrence's overlay, making dependency versions and lockfiles completion-order dependent, and the user-visible resolver change has no replacement changeset. Files Needing Attention: pnpm/crates/resolving-deps-resolver/src/resolve_dependency_tree/workspace_ctx.rs, pnpm/crates/resolving-deps-resolver/src/resolve_dependency_tree/walk.rs, pnpm/crates/resolving-deps-resolver/src/tests.rs, .changeset/deterministic-contested-children.md
|
| pub(super) fn produces_same_children_as(&self, other: &Self) -> bool { | ||
| self.peer_shadowed == other.peer_shadowed | ||
| && self.prior_key == other.prior_key | ||
| && self.update_active == other.update_active | ||
| && self.overlay_view == other.overlay_view | ||
| } |
There was a problem hiding this comment.
Overlay context no longer settles children
When the same package is reached concurrently through parents with different preferred-version overlays, produces_same_children_as treats those occurrences as equivalent and the later owner reuses children selected under the first occurrence's overlay, causing children_by_id and pnpm-lock.yaml to depend on completion order.
Knowledge Base Used: Resolving and Fetching Dependency Specifiers
| /// Two contexts produce the same children. | ||
| /// | ||
| /// The preferred-versions overlay is deliberately not part of the | ||
| /// test. `children_by_id` records one child list per package id, | ||
| /// and every occurrence that does not own the children already | ||
| /// expands from it whatever its own overlay says — the overlay | ||
| /// only ever decides which occurrence's versions get *recorded*. | ||
| /// Requiring identical overlays here would mean requiring identical | ||
| /// parents, which the occurrences that race never have. |
There was a problem hiding this comment.
Narrative replaces overlay regression coverage
This comment asserts that excluding overlays from recorded-child matching is correct, while the same diff removes the focused test that exercised differing overlay selections; the non-obvious concurrency invariant is therefore documented as a claim rather than protected by executable coverage.
Context Used: Comments and docs in code are suspicious. Is test ... (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Micro-Benchmark ResultsLinux |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #13833 +/- ##
==========================================
- Coverage 88.23% 88.23% -0.01%
==========================================
Files 625 625
Lines 102839 102801 -38
==========================================
- Hits 90742 90707 -35
+ Misses 12097 12094 -3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Code Review by Qodo
1. Pacquet resolver change not synced
|
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.