Skip to content

fix(build): desktop artifacts resolve versioned override selectors - #16383

Open
gergesh wants to merge 1 commit into
pingdotgg:mainfrom
gergesh:yoav/fix-catalog-selector
Open

gergesh wants to merge 1 commit into
pingdotgg:mainfrom
gergesh:yoav/fix-catalog-selector

Conversation

@gergesh

@gergesh gergesh commented Oct 6, 2026

Copy link
Copy Markdown

Problem

node scripts/build-desktop-artifact.ts fails on current main:

CatalogDependencyResolutionError: Unable to resolve 'catalog:' for apps/desktop dependency 'undici@^8'. Expected key 'undici@^8' in root workspace catalog.

#16211 added the override "undici@^8": "catalog:". pnpm treats a bare catalog: on an override selector as the catalog entry of the package the selector ends in, without its version range. resolveCatalogDependencies already strips parent> but kept the @^8 range, so it looked up undici@^8 and failed.

Fix

Resolve the selector's final package name without its version range, including the scoped case @scope/parent>@scope/pkg@^1. The resolver test now covers undici@^8 and a scoped versioned selector.

Verification

  • vp test run scripts/lib/resolve-catalog.test.ts passes.
  • node scripts/build-desktop-artifact.ts --platform mac --target dmg --arch arm64 now completes. The resulting app installs, launches, and its server starts.

Claude Opus 5.5 via Claude Code.

🤖 Generated with Claude Code

https://claude.ai/code/session_018Td3Q8qgzwVCT3oHEoXreJ

pingdotgg#16211 added the override "undici@^8": "catalog:". pnpm resolves a bare
catalog: on a selector to the catalog entry of the package it ends in,
without the version range, but the desktop build looked up "undici@^8"
and failed with CatalogDependencyResolutionError.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Td3Q8qgzwVCT3oHEoXreJ
@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Oct 6, 2026
@macroscopeapp

macroscopeapp Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 48c59ed

Macroscope's review found this PR approvable — This is a focused build-script bug fix that normalizes versioned override selectors and adds regression coverage. Its impact is limited to correcting desktop/CLI artifact dependency resolution, with no product-default, production infrastructure, security, or static-analysis changes.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Oct 6, 2026

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Path: .coderabbit.config.ts
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b529eddb-e29e-4338-8182-76e8d7972c50
📥 Commits

Reviewing files that changed from the base of the PR and between 8f75697 and 48c59ed.

📒 Files selected for processing (2)
  • scripts/lib/resolve-catalog.test.ts
  • scripts/lib/resolve-catalog.ts

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


📝 Walkthrough

Walkthrough

The catalog resolver now removes a version range from the final selector segment before using it as a bare catalog lookup key. Tests cover undici@^8 and a scoped parent override.

Changes

Catalog selector lookup

Layer / File(s) Summary
Extract and use the catalog key
scripts/lib/resolve-catalog.ts, scripts/lib/resolve-catalog.test.ts
The resolver extracts the package name from the final selector segment for bare catalog lookups. Tests check ranged and scoped selectors and their expected versions.

Priority: ⬇️ Low

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

Change: Bug fix

Suggested reviewers: juliusmarminge

Merge Risk: ⚪ Minimal · up to 48c59

The PR resolves the current undici@^8 workspace override. The separate undici@>8 failure predates this change, so no new merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the problem, the fix, and focused verification results. It does not include the required scope and approval information or explain why this focused fix qualifies for the no-pr… Add a "## Scope and approval" section. Link the triaged issue or maintainer approval, or explain why this is a very small, focused fix of an obvious bug that qualifies without prior approval.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the fix for desktop artifact builds that fail to resolve versioned override selectors.
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.
Full details: Description check

Explanation

The description explains the problem, the fix, and focused verification results. It does not include the required scope and approval information or explain why this focused fix qualifies for the no-prior-approval exemption.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant