Skip to content

RFC: define macOS and Windows shared artifact tags - #24

Merged
zkochan merged 2 commits into
mainfrom
rfc-shared-artifact-macos
Aug 28, 2026
Merged

zkochan merged 2 commits into
mainfrom
rfc-shared-artifact-macos

Conversation

@zkochan

@zkochan zkochan commented Aug 27, 2026 •

Copy link
Copy Markdown
Member

Defines the macOS and Windows compatibility vocabularies for the shared side-effects cache tracked by pnpm/pnpm#13771.

  • adds additive v1 tags for Darwin product-version floors and Windows NT kernel-version floors
  • makes each artifact version an explicit minimum runtime and selects the greatest compatible floor
  • fingerprints each consumer's exact OS version without expanding an ever-growing historical tag list
  • leaves the shipped Linux/glibc tags and fingerprints unchanged; older clients safely treat the new forms as misses

Both formats retain OS release precision because pnpm publishes the builder's current runtime as a conservative floor. Windows includes the kernel build because supported Windows releases commonly share the same 10.0 major and minor version.


Written by an agent (Codex, GPT-5).

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Define macOS shared artifact compatibility tags

📝 Documentation ✨ Enhancement 🕐 10-20 Minutes

Grey Divider

AI Description

• Defines versioned macOS artifact tags using product-version compatibility floors.
• Selects the greatest compatible floor while retaining universal fallback behavior.
• Preserves existing Linux/glibc tags and fingerprints without modification.
Diagram

graph TD
  C["macOS Consumer"] --> T["Exact v2 Tag"] --> M{"Compatible floor?"}
  A["Artifact Variants"] --> M
  M -->|Greatest floor| S["Tagged Artifact"] --> R["Selected Artifact"]
  M -->|No tagged match| U["Universal Fallback"] --> R
  T -.-> P["Platform Fingerprint"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Enumerate historical macOS tags
  • ➕ Retains exact string-membership matching used by Linux/glibc tags.
  • ➖ Makes supported-tag lists and fingerprints grow indefinitely.
  • ➖ Requires complete knowledge of historical macOS minor releases.
2. Inspect Mach-O deployment targets
  • ➕ Could advertise older, more precise compatibility floors.
  • ➕ May increase artifact reuse across older macOS versions.
  • ➖ Requires inspecting every produced Mach-O file.
  • ➖ Is inappropriate when inferred only from SDK or toolchain metadata.

Recommendation: Use the proposed explicit macOS floor comparison with the builder's current product version. It keeps consumer tags and fingerprints bounded, preserves shipped v1 Linux behavior, and makes conservative compatibility claims; deployment-target inspection can be added later by a capable publisher.

Files changed (1) +9 / -1

Documentation (1) +9 / -1
0007-shared-side-effects-cache.mdSpecify macOS artifact compatibility floor semantics +9/-1

Specify macOS artifact compatibility floor semantics

• Defines the v2 Darwin tag schema, product-version normalization, minimum-runtime matching, and greatest-compatible-floor selection. It also specifies conservative organization publication, exact-tag fingerprinting, failure behavior when macOS cannot be detected, and the remaining unsupported platforms.

text/0007-shared-side-effects-cache.md

@coderabbitai

coderabbitai Bot commented Aug 27, 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: 1a91026a-a85a-4215-bb9e-deb16138a9bf

📥 Commits

Reviewing files that changed from the base of the PR and between 2703710 and 5611ae0.

📒 Files selected for processing (1)
  • text/0007-shared-side-effects-cache.md

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.

📜 Recent review details
🧰 Additional context used
🪛 LanguageTool
text/0007-shared-side-effects-cache.md

[uncategorized] ~97-~97: The operating system from Apple is written “macOS”.
Context: ...r than changing the shipped Linux tags: pnpm:v2:darwin-<architecture>-node<major>-macos<major>.<minor>, again with `architectu...

(MAC_OS)

🔇 Additional comments (1)
text/0007-shared-side-effects-cache.md (1)

97-104: LGTM!

Also applies to: 288-288


📝 Walkthrough

Walkthrough

The RFC adds a macOS v2 compatibility-tag schema. It defines version matching, publication floors, restoration behavior, and consumer fingerprinting. It also updates the remaining-work list for Windows and additional Linux libc families.

Changes

macOS compatibility boundaries

Layer / File(s) Summary
macOS v2 tag specification
text/0007-shared-side-effects-cache.md
Defines macOS product-version tags, minimum-version matching, organization-mode publication floors, unavailable-version behavior, and consumer fingerprint rules. Updates remaining work for Windows and additional Linux libc families.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to 5611a

This PR defines macOS compatibility tags in the RFC without changing shipped runtime behavior. No actionable merge-blocking risk remains beyond normal checks and review.

Poem

A rabbit tags the macOS trail

With product years and versions pale
Minimum floors keep matches right
Fingerprints change with minor bites
Windows waits beyond the veil

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title correctly identifies macOS shared artifact tags, which are the main change. The Windows reference is not covered by this pull request, so the title is only partially precise.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch rfc-shared-artifact-macos

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.

@zkochan zkochan changed the title RFC: define macOS shared artifact compatibility tags RFC: define macOS and Windows shared artifact tags Aug 28, 2026
zkochan added a commit to pnpm/pnpm that referenced this pull request Aug 28, 2026
Teach the shared-artifact protocol to recognize additive v1 Darwin and Windows tags that encode architecture, Node major, and a minimum operating-system version.

Select exact supported tags before version floors, then choose the greatest compatible floor and keep universal artifacts as the final fallback. Detect macOS product versions with the absolute system `sw_vers` path and Windows NT kernel versions with the platform APIs. Enable restoration and publishing on Darwin and Windows x64 and arm64.

Implement the same protocol, fingerprints, selection, and host-detection behavior in the TypeScript CLI and pacquet. Keep all existing Linux tags and fingerprints stable.

Related to #13771 and pnpm/rfcs#24.
@zkochan
zkochan merged commit 087ea93 into main Aug 28, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant