Skip to content

fix(release): generate GitHub notes from pending changelog - #13064

Merged
zkochan merged 5 commits into
mainfrom
fix-release-description
Jul 16, 2026
Merged

zkochan merged 5 commits into
mainfrom
fix-release-description

Conversation

@zkochan

@zkochan zkochan commented Jul 16, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Generate TypeScript pnpm GitHub release notes only from the pending registry-mode changelog section for the exact version being released.
  • If release-note generation fails or produces an empty file, use a diagnostic body linked to the workflow run and continue publishing the artifacts and release page.
  • Keep the GitHub release as a draft until its persisted body exactly matches RELEASE.md, then publish it with a body-preserving API update.

Squash Commit Body

The native release flow parks registry-mode changelog sections under
`.changeset/changelogs`, so use that as the only source for generated release
notes instead of the stale committed `CHANGELOG.md`.

Release-note metadata must not block publishing valid artifacts. If generation
fails, write a diagnostic release body with a link to the workflow run. Create
the GitHub release as a draft, compare its persisted body exactly with the
generated or diagnostic file, and publish it without resending the body.

Checklist

  • Added or updated tests.

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


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.

Summary by CodeRabbit

  • New Features
    • Release notes are generated from pending changelog entries and automatically set as the GitHub release description.
    • Releases are created as drafts first, then published only after the generated description is verified for consistency.
  • Bug Fixes
    • Release-note generation now clearly errors when changelog/version entries are missing, and falls back to a safe description if generation fails.
  • Tests
    • Added automated coverage for successful release-note generation and the main missing-changelog/missing-entry failure paths.

Copilot AI review requested due to automatic review settings July 16, 2026 00:36

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.

@coderabbitai

coderabbitai Bot commented Jul 16, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: af620a6a-dc2e-4e9d-a04a-9b2cdae57ea7

📥 Commits

Reviewing files that changed from the base of the PR and between 08146d2 and baed9bc.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml, !pnpm-lock.yaml
📒 Files selected for processing (5)
  • .github/workflows/release.yml
  • pnpm11/__utils__/get-release-text/package.json
  • pnpm11/__utils__/get-release-text/src/main.ts
  • pnpm11/__utils__/get-release-text/test/main.ts
  • pnpm11/__utils__/get-release-text/tsconfig.json
🚧 Files skipped from review as they are similar to previous changes (5)
  • pnpm11/utils/get-release-text/tsconfig.json
  • pnpm11/utils/get-release-text/package.json
  • pnpm11/utils/get-release-text/test/main.ts
  • .github/workflows/release.yml
  • pnpm11/utils/get-release-text/src/main.ts

📝 Walkthrough

Walkthrough

The release utility now reads pending changelogs to generate RELEASE.md, exposes reusable helpers, validates missing versions, adds tests and project wiring, and updates release automation to verify a draft release description before publishing it.

Changes

Release description flow

Layer / File(s) Summary
Release text generation
pnpm11/__utils__/get-release-text/src/main.ts
The utility exports writeReleaseText and getChangelogEntry, reads pending changelog content, writes RELEASE.md atomically, and throws when required changelog data is missing.
Release text tests and project wiring
pnpm11/__utils__/get-release-text/package.json, pnpm11/__utils__/get-release-text/tsconfig.json, pnpm11/__utils__/get-release-text/test/*
Jest commands, TypeScript references, and temporary-workspace tests validate generated content and missing-changelog errors.
Release workflow verification
.github/workflows/release.yml
The workflow generates a non-empty RELEASE.md with a fallback, creates a draft release, verifies its body through the GitHub Releases API, and publishes it after exact-content validation.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested labels: product: pnpm@11

Suggested reviewers: copilot

Sequence Diagram(s)

sequenceDiagram
  participant ReleaseJob
  participant ReleaseTextUtility
  participant RELEASEmd
  participant GitHubReleasesAPI
  ReleaseJob->>ReleaseTextUtility: run make-release-description
  ReleaseTextUtility->>RELEASEmd: write generated description
  ReleaseJob->>GitHubReleasesAPI: create draft release using RELEASE.md
  ReleaseJob->>GitHubReleasesAPI: fetch release body by created ID
  GitHubReleasesAPI-->>ReleaseJob: return description for validation
  ReleaseJob->>GitHubReleasesAPI: publish verified release
Loading
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-release-description

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.

Copilot AI review requested due to automatic review settings July 16, 2026 00:38

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-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Fix release notes generation to use pending changelog and fail on empties

🐞 Bug fix 🧪 Tests ⚙️ Configuration changes 🕐 20-40 Minutes

Grey Divider

AI Description

• Generate release notes from the pending .changeset/changelogs entry for the released version.
• Fail when the released version has no changelog entry; avoid publishing stale notes.
• Assert RELEASE.md and the created GitHub draft body are non-empty.
Diagram

graph TD
  A["Release workflow"] --> B["make-release-description"] --> C["@pnpm/get-release-text"] --> D["@pnpm/releasing.versioning"] --> E["RELEASE.md"] --> F["action-gh-release"] --> G["GitHub Releases API"] --> H["Verify body non-empty"]
  I["pnpm CHANGELOG.md"] --> C
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Require pending changelog only (remove committed CHANGELOG fallback)
  • ➕ Prevents any chance of publishing stale committed notes in registry-mode
  • ➕ Simplifies behavior: one source of truth for release notes
  • ➖ May break non-registry workflows that legitimately rely on committed CHANGELOG.md
  • ➖ Would require a clear migration and explicit gating by changelog storage mode
2. Validate only in generator (drop GitHub API verification step)
  • ➕ Keeps validation close to generation logic
  • ➕ Avoids dependence on release step output IDs and gh api
  • ➖ Misses action-side failures where body_path is not applied or ends up empty
  • ➖ Less end-to-end confidence in what GitHub actually stores
3. Switch to `gh release create` for drafting and verification
  • ➕ Single tool (gh) for create + verify; potentially simpler pipeline
  • ➕ Less reliance on third-party action behavior
  • ➖ Higher change risk in a release-critical workflow
  • ➖ May reintroduce edge cases already handled by action-gh-release

Recommendation: The PR’s approach is appropriate: prefer the parked pending changelog when available, hard-fail on missing version entries, and add workflow-level assertions to catch both generation and publication failures. Keeping the committed CHANGELOG fallback maintains compatibility for non-registry modes while still preventing silent empty or mismatched notes.

Files changed (7) +117 / -15

Bug fix (1) +21 / -11
main.tsPrefer pending changelog and throw if released version entry is missing +21/-11

Prefer pending changelog and throw if released version entry is missing

• Refactors into 'writeReleaseText()' and exports 'getChangelogEntry()' for testing. Reads the pending '.changeset/changelogs' section first (fallback to 'CHANGELOG.md'), and now throws when the target version heading is absent.

pnpm11/utils/get-release-text/src/main.ts

Tests (1) +37 / -0
main.tsTest pending-changelog selection and missing-version error +37/-0

Test pending-changelog selection and missing-version error

• Adds a temp-workspace test ensuring the pending changelog entry is used over a stale committed changelog. Adds a test asserting 'getChangelogEntry()' throws when the released version isn’t present.

pnpm11/utils/get-release-text/test/main.ts

Other (5) +59 / -4
release.ymlAssert non-empty release notes before and after draft creation +12/-1

Assert non-empty release notes before and after draft creation

• Runs 'pn make-release-description' and fails if 'RELEASE.md' is empty. Adds a post-step that fetches the created draft release via 'gh api' and asserts the stored body length is > 0.

.github/workflows/release.yml

pnpm-lock.yamlAdd workspace deps for pending-changelog reading and Jest testing +12/-0

Add workspace deps for pending-changelog reading and Jest testing

• Adds '@pnpm/releasing.versioning' as a dependency of the release-text utility. Brings in Jest globals/config and cross-env to support running ESM-compatible tests.

pnpm-lock.yaml

package.jsonAdd compile/test scripts and Jest preset; depend on releasing.versioning +12/-2

Add compile/test scripts and Jest preset; depend on releasing.versioning

• Adds 'compile' and 'test' scripts and configures Jest via '@pnpm/jest-config'. Declares '@pnpm/releasing.versioning' dependency and adds dev deps needed for Jest + ESM execution.

pnpm11/utils/get-release-text/package.json

tsconfig.jsonAdd TS build config for tests +18/-0

Add TS build config for tests

• Introduces a test tsconfig that emits compiled output into a dedicated directory and references the package project for 'tsgo --build'.

pnpm11/utils/get-release-text/test/tsconfig.json

tsconfig.jsonReference releasing/versioning TS project +5/-1

Reference releasing/versioning TS project

• Adds a TypeScript project reference to 'pnpm11/releasing/versioning' to align workspace builds with the new dependency.

pnpm11/utils/get-release-text/tsconfig.json

@qodo-code-review

qodo-code-review Bot commented Jul 16, 2026 •

Copy link
Copy Markdown

PR Code Suggestions ✨

Latest suggestions up to 2650a9e

Warning

/improve is deprecated. Use /agentic_review instead (removal date not yet scheduled).

CategorySuggestion                                                                                                                                    Impact
Possible issue
✅ Verify releases before publishing
Suggestion Impact:The workflow now sets draft: true, renames the verification step, performs a stricter comparison of the draft body against RELEASE.md, and publishes the verified release using a gh api PATCH request with draft=false.

code diff:

       - name: Release
         id: github-release
         # `gh release create` could replace this, but the release pipeline is
         # sensitive and softprops/action-gh-release is widely battle-tested.
         uses: softprops/action-gh-release@718ea10b132b3b2eba29c1007bb80653f286566b # v3.0.0 # zizmor: ignore[superfluous-actions]
         with:
+          draft: true
           files: dist/*
           body_path: RELEASE.md
-      - name: Verify published release description
+      - name: Verify and publish release
         env:
           GH_TOKEN: ${{ github.token }}
           RELEASE_ID: ${{ steps.github-release.outputs.id }}
         run: |
           test -n "$RELEASE_ID"
-          body_length=$(gh api "repos/${GITHUB_REPOSITORY}/releases/${RELEASE_ID}" --jq '.body | length')
-          test "$body_length" -gt 0
+          release_json=$(mktemp)
+          gh api "repos/${GITHUB_REPOSITORY}/releases/${RELEASE_ID}" > "$release_json"
+          RELEASE_JSON="$release_json" node <<'NODE'
+          const fs = require('node:fs')
+          const actual = JSON.parse(fs.readFileSync(process.env.RELEASE_JSON, 'utf8')).body
+          const expected = fs.readFileSync('RELEASE.md', 'utf8')
+          if (actual !== expected) throw new Error('GitHub draft release body does not match RELEASE.md')
+          NODE
+          gh api --method PATCH "repos/${GITHUB_REPOSITORY}/releases/${RELEASE_ID}" -F draft=false > /dev/null

Re-add draft: true to the release creation step and manually publish the release
via a gh api call only after the description has been successfully verified.

.github/workflows/release.yml [335-350]

 - name: Release
   id: github-release
   uses: softprops/action-gh-release@718ea10b132b3b2eba29c1007bb80653f286566b
   with:
+    draft: true
     files: dist/*
     body_path: RELEASE.md
-- name: Verify published release description
+- name: Verify and publish release
   env:
     GH_TOKEN: ${{ github.token }}
     RELEASE_ID: ${{ steps.github-release.outputs.id }}
   run: |
     test -n "$RELEASE_ID"
     body_length=$(gh api "repos/${GITHUB_REPOSITORY}/releases/${RELEASE_ID}" --jq '.body | length')
     test "$body_length" -gt 0
+    gh api --method PATCH "repos/${GITHUB_REPOSITORY}/releases/${RELEASE_ID}" -F draft=false

[Suggestion processed]

Suggestion importance[1-10]: 9

__

Why: The suggestion accurately points out a logical flaw in the CI/CD pipeline introduced by the PR, where a potentially broken release would already be public by the time the verification fails, and offers a clean fix using gh api to publish only upon success.

High
  • More

Previous suggestions

Suggestions up to commit 2650a9e
CategorySuggestion                                                                                                                                    Impact
High-level
Release description checks always pass

Move the empty release description validation inside the TypeScript script
instead of checking file size in the shell. The current shell checks are
bypassed by the hardcoded sponsors footer appended to the markdown output.

Examples:

.github/workflows/release.yml [332-334]
        run: |
          pn make-release-description
          test -s RELEASE.md
pnpm11/__utils__/get-release-text/src/main.ts [87-90]
  return {
    content: `${unified().use(remarkStringify).stringify(ast)}

<!-- sponsors -->

Solution Walkthrough:

Before:

# .github/workflows/release.yml
run: |
  pn make-release-description
  test -s RELEASE.md

// pnpm11/__utils__/get-release-text/src/main.ts
return {
  content: `${unified().use(remarkStringify).stringify(ast)}

<!-- sponsors -->
...`
}

After:

# .github/workflows/release.yml
run: |
  pn make-release-description

// pnpm11/__utils__/get-release-text/src/main.ts
const extractedContent = unified().use(remarkStringify).stringify(ast);
if (!extractedContent.trim()) {
  throw new Error(`Changelog entry for pnpm ${version} is empty`);
}

return {
  content: `${extractedContent}
  
<!-- sponsors -->
...`
}
Suggestion importance[1-10]: 9

__

Why: This suggestion identifies a critical logical flaw where the newly added shell checks to ensure the release description is non-empty will always pass due to the hardcoded <!-- sponsors --> footer.

High
General
Fallback on changelog read errors

Wrap the readPendingChangelog function call in a try/catch block.

pnpm11/utils/get-release-text/src/main.ts [26-33]

 export async function writeReleaseText (workspaceDir: string): Promise<void> {
   const pnpmDir = path.join(workspaceDir, 'pnpm11/pnpm')
   const pnpm = JSON.parse(fs.readFileSync(path.join(pnpmDir, 'package.json'), 'utf8'))
-  const changelog = await readPendingChangelog(workspaceDir, pnpm.name, pnpm.version) ??
-    fs.readFileSync(path.join(pnpmDir, 'CHANGELOG.md'), 'utf8')
-  const release = getChangelogEntry(changelog, pnpm.version)
+  let rawChangelog: string
+  try {
+    rawChangelog = await readPendingChangelog(workspaceDir, pnpm.name, pnpm.version)
+      ?? fs.readFileSync(path.join(pnpmDir, 'CHANGELOG.md'), 'utf8')
+  } catch {
+    rawChangelog = fs.readFileSync(path.join(pnpmDir, 'CHANGELOG.md'), 'utf8')
+  }
+  const release = getChangelogEntry(rawChangelog, pnpm.version)
   fs.writeFileSync(path.join(workspaceDir, 'RELEASE.md'), release.content)
 }
Suggestion importance[1-10]: 5

__

Why: Adding a try/catch block around readPendingChangelog provides a safer fallback to the on-disk CHANGELOG.md in case of unexpected errors, though it may hide underlying parsing issues.

Low
Use pn run for hidden script

Update the test script to use pn run .test instead of pn .test.

pnpm11/utils/get-release-text/package.json [6-12]

 "scripts": {
   "write-release-text": "node src/main.ts",
   "compile": "tsgo --build",
   "lint": "eslint src/**/*.ts test/**/*.ts",
-  "test": "pn compile && pn .test",
+  "test": "pn compile && pn run .test",
   ".test": "cross-env NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules --disable-warning=ExperimentalWarning --disable-warning=DEP0169\" jest"
 },
Suggestion importance[1-10]: 3

__

Why: While using pn run is slightly more explicit, pnpm fully supports running scripts without run (as already done with pn compile), making this a very minor improvement.

Low

@greptile-apps

greptile-apps Bot commented Jul 16, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5

The change is safe to merge — logic is correctly scoped to the release pipeline, failures degrade gracefully to a diagnostic body, and the draft-then-publish sequence is functionally sound.

The two issues raised in previous review threads are addressed: the release is created as a draft and published only after the body is validated. The async fallback for missing changelogs is also in place. The core logic flows correctly: atomic temp-write, normalizeNewlines comparison, and the test -s RELEASE.md guard all behave as intended.

No files require special attention.

Reviews (4): Last reviewed commit: "fix(release): normalize verified release..." | Re-trigger Greptile

Comment thread .github/workflows/release.yml Resolved
@qodo-code-review

qodo-code-review Bot commented Jul 16, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (2) 📘 Rule violations (1) 📜 Skill insights (0)

Context used
✅ Compliance rules (platform): 18 rules

Grey Divider


Action required

1. Release no longer draft ✓ Resolved 🐞 Bug ☼ Reliability
Description
The TypeScript release job removed draft: true from the softprops/action-gh-release step, so it
will create a published GitHub release instead of a draft. This bypasses the deliberate
maintainer-controlled publish gate used elsewhere in the workflow and can prematurely publish
artifacts/notes.
Code

.github/workflows/release.yml[R335-342]

      - name: Release
+        id: github-release
        # `gh release create` could replace this, but the release pipeline is
        # sensitive and softprops/action-gh-release is widely battle-tested.
        uses: softprops/action-gh-release@718ea10b132b3b2eba29c1007bb80653f286566b # v3.0.0 # zizmor: ignore[superfluous-actions]
        with:
-          draft: true
          files: dist/*
          body_path: RELEASE.md
Evidence
In the TypeScript release job, the softprops/action-gh-release step has no draft: true
configured, while the workflow’s Rust GitHub release job explicitly sets draft: true and documents
that it is drafted so a maintainer publishes deliberately.

.github/workflows/release.yml[265-350]
.github/workflows/release.yml[719-747]

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 TypeScript `Release` step no longer sets `draft: true`, changing the workflow from drafting to immediately publishing the GitHub release.

### Issue Context
This workflow already uses a draft GitHub release flow for Rust and documents why.

### Fix Focus Areas
- .github/workflows/release.yml[335-342]

### Suggested fix
Add `draft: true` back under the TypeScript job’s `softprops/action-gh-release` `with:` block (or, if immediate publishing is intentional, update the workflow comments/naming to reflect the policy change and ensure it matches release governance).

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



Remediation recommended

2. Brittle body normalization 🐞 Bug ☼ Reliability ⭐ New
Description
The release-body verification only normalizes CRLF vs LF, so any other benign formatting difference
between GitHub’s persisted body and RELEASE.md (notably trailing newline presence) will fail the
verification and block publishing. Because RELEASE.md generation includes a trailing newline, the
verification should canonicalize trailing newlines/null bodies before comparing to avoid false
mismatches.
Code

.github/workflows/release.yml[R366-368]

+          const normalizeNewlines = (text) => text?.replace(/\r\n?/g, '\n')
+          const actual = normalizeNewlines(JSON.parse(fs.readFileSync(process.env.RELEASE_JSON, 'utf8')).body)
+          const expected = normalizeNewlines(fs.readFileSync('RELEASE.md', 'utf8'))
Evidence
The new verification logic only normalizes CRLF and may produce undefined for a null body, and
the generated release text ends with a trailing newline, making the comparison sensitive to
terminal-newline differences.

.github/workflows/release.yml[365-371]
pnpm11/utils/get-release-text/src/main.ts[94-203]

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 workflow compares `actual` (GitHub API response `body`) and `expected` (`RELEASE.md`) after only CRLF normalization. This makes publishing sensitive to benign formatting differences like presence/absence of a final `\n`, and also allows `actual` to become `undefined` if the API returns `null`.

### Issue Context
`RELEASE.md` is generated with a trailing newline, so a body that is identical except for a final newline would currently be treated as a mismatch.

### Fix Focus Areas
- .github/workflows/release.yml[366-368]

### Suggested change
In the inline Node script, canonicalize both strings before comparing:
- Coerce `null`/`undefined` to `''`
- Normalize CRLF
- Normalize trailing newline consistently (e.g., ensure exactly one final `\n` on both sides or strip exactly one terminal newline from both)

Example:
```js
const normalizeNewlines = (text) => (text ?? '').replace(/\r\n?/g, '\n')
const normalizeTerminalNewline = (text) => normalizeNewlines(text).replace(/\n?$/, '\n')
const actual = normalizeTerminalNewline(JSON.parse(fs.readFileSync(process.env.RELEASE_JSON, 'utf8')).body)
const expected = normalizeTerminalNewline(fs.readFileSync('RELEASE.md', 'utf8'))
if (actual !== expected) throw new Error('GitHub draft release body does not match RELEASE.md')
```

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


3. Windows path traversal read 🐞 Bug ⛨ Security
Description
writeReleaseText() now passes pnpm.name (from package.json) into readPendingChangelog(),
which builds a path using a filename that only replaces / and can interpret \\ as a separator on
Windows. A crafted package name containing backslashes can escape .changeset/changelogs and cause
unintended file reads (and potentially leak content into RELEASE.md/release notes if the file
content happens to parse as a matching changelog section).
Code

pnpm11/utils/get-release-text/src/main.ts[R29-31]

+  const changelog = await readPendingChangelog(workspaceDir, pnpm.name, pnpm.version)
+  if (changelog == null) {
+    throw new Error(`No pending changelog found for pnpm ${pnpm.version}`)
Evidence
The new code path uses pnpm.name as a filesystem path component, and the pending changelog helper
only neutralizes /, leaving \\ untreated on Windows. Because pendingChangelogPath() uses
path.join(), a backslash in pkgName can be interpreted as a separator on win32, enabling a path
escape during the read.

pnpm11/utils/get-release-text/src/main.ts[26-32]
pnpm11/releasing/versioning/src/pendingChangelog.ts[24-30]
pnpm11/releasing/versioning/src/pendingChangelog.ts[71-79]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`writeReleaseText()` reads `pnpm.name` from `pnpm11/pnpm/package.json` and passes it to `readPendingChangelog()`. The pending changelog helper builds a file path from `pkgName`/`version` but only replaces `/`, which is insufficient on Windows where `\\` is also treated as a path separator. This can cause the pending changelog read to escape `.changeset/changelogs` if `pkgName` contains backslashes.

### Issue Context
This risk is now reachable because the new code path uses `pnpm.name` directly as an input to `readPendingChangelog()`.

### Fix Focus Areas
- pnpm11/__utils__/get-release-text/src/main.ts[29-31]
- pnpm11/releasing/versioning/src/pendingChangelog.ts[24-30]
- pnpm11/releasing/versioning/src/pendingChangelog.ts[71-79]

### Suggested fix
- In `pendingChangelogFilename()`, sanitize both slash types, e.g. replace any of `["/", "\\"]` with `!` (or another reversible encoding), and consider rejecting any input containing path traversal segments like `..`.
- Optionally harden further by verifying `path.resolve(pendingChangelogPath(...))` is still under the resolved `.changeset/changelogs` directory before reading/writing.
- Keep the fix in the shared helper (`pendingChangelog.ts`) so all call sites benefit, not just this new one.

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


4. slice() missing trailing comma 📘 Rule violation ⚙ Maintainability
Description
The multi-line .slice() argument list omits a trailing comma after endIndex. This violates the
TypeScript trailing-comma requirement and increases diff churn when list items change.
Code

pnpm11/utils/get-release-text/src/main.ts[R83-86]

+  ast['children'] = (ast['children'] as any).slice( // eslint-disable-line @typescript-eslint/no-explicit-any
+    headingStartInfo.index + 1,
+    endIndex
+  )
Evidence
PR Compliance ID 713434 requires trailing commas in multi-line TypeScript constructs. In
src/main.ts, the multi-line .slice(...) call ends with endIndex but has no trailing comma on
the last argument.

Rule 713434: Require trailing commas in TypeScript collections and multi-line constructs
pnpm11/utils/get-release-text/src/main.ts[83-86]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
A multi-line function call argument list is missing a trailing comma on the last argument (`endIndex`) in `getChangelogEntry`.

## Issue Context
The repo requires trailing commas in multi-line TypeScript constructs to keep diffs stable.

## Fix Focus Areas
- pnpm11/__utils__/get-release-text/src/main.ts[83-86]

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


Grey Divider

Previous review results

Review updated until commit baed9bc

Results up to commit 2650a9e


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


Action required
1. Release no longer draft ✓ Resolved 🐞 Bug ☼ Reliability
Description
The TypeScript release job removed draft: true from the softprops/action-gh-release step, so it
will create a published GitHub release instead of a draft. This bypasses the deliberate
maintainer-controlled publish gate used elsewhere in the workflow and can prematurely publish
artifacts/notes.
Code

.github/workflows/release.yml[R335-342]

      - name: Release
+        id: github-release
        # `gh release create` could replace this, but the release pipeline is
        # sensitive and softprops/action-gh-release is widely battle-tested.
        uses: softprops/action-gh-release@718ea10b132b3b2eba29c1007bb80653f286566b # v3.0.0 # zizmor: ignore[superfluous-actions]
        with:
-          draft: true
          files: dist/*
          body_path: RELEASE.md
Evidence
In the TypeScript release job, the softprops/action-gh-release step has no draft: true
configured, while the workflow’s Rust GitHub release job explicitly sets draft: true and documents
that it is drafted so a maintainer publishes deliberately.

.github/workflows/release.yml[265-350]
.github/workflows/release.yml[719-747]

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 TypeScript `Release` step no longer sets `draft: true`, changing the workflow from drafting to immediately publishing the GitHub release.

### Issue Context
This workflow already uses a draft GitHub release flow for Rust and documents why.

### Fix Focus Areas
- .github/workflows/release.yml[335-342]

### Suggested fix
Add `draft: true` back under the TypeScript job’s `softprops/action-gh-release` `with:` block (or, if immediate publishing is intentional, update the workflow comments/naming to reflect the policy change and ensure it matches release governance).

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



Remediation recommended
2. slice() missing trailing comma 📘 Rule violation ⚙ Maintainability
Description
The multi-line .slice() argument list omits a trailing comma after endIndex. This violates the
TypeScript trailing-comma requirement and increases diff churn when list items change.
Code

pnpm11/utils/get-release-text/src/main.ts[R83-86]

+  ast['children'] = (ast['children'] as any).slice( // eslint-disable-line @typescript-eslint/no-explicit-any
+    headingStartInfo.index + 1,
+    endIndex
+  )
Evidence
PR Compliance ID 713434 requires trailing commas in multi-line TypeScript constructs. In
src/main.ts, the multi-line .slice(...) call ends with endIndex but has no trailing comma on
the last argument.

Rule 713434: Require trailing commas in TypeScript collections and multi-line constructs
pnpm11/utils/get-release-text/src/main.ts[83-86]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
A multi-line function call argument list is missing a trailing comma on the last argument (`endIndex`) in `getChangelogEntry`.

## Issue Context
The repo requires trailing commas in multi-line TypeScript constructs to keep diffs stable.

## Fix Focus Areas
- pnpm11/__utils__/get-release-text/src/main.ts[83-86]

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


Results up to commit 08146d2


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


Remediation recommended
1. Windows path traversal read 🐞 Bug ⛨ Security
Description
writeReleaseText() now passes pnpm.name (from package.json) into readPendingChangelog(),
which builds a path using a filename that only replaces / and can interpret \\ as a separator on
Windows. A crafted package name containing backslashes can escape .changeset/changelogs and cause
unintended file reads (and potentially leak content into RELEASE.md/release notes if the file
content happens to parse as a matching changelog section).
Code

pnpm11/utils/get-release-text/src/main.ts[R29-31]

+  const changelog = await readPendingChangelog(workspaceDir, pnpm.name, pnpm.version)
+  if (changelog == null) {
+    throw new Error(`No pending changelog found for pnpm ${pnpm.version}`)
Evidence
The new code path uses pnpm.name as a filesystem path component, and the pending changelog helper
only neutralizes /, leaving \\ untreated on Windows. Because pendingChangelogPath() uses
path.join(), a backslash in pkgName can be interpreted as a separator on win32, enabling a path
escape during the read.

pnpm11/utils/get-release-text/src/main.ts[26-32]
pnpm11/releasing/versioning/src/pendingChangelog.ts[24-30]
pnpm11/releasing/versioning/src/pendingChangelog.ts[71-79]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`writeReleaseText()` reads `pnpm.name` from `pnpm11/pnpm/package.json` and passes it to `readPendingChangelog()`. The pending changelog helper builds a file path from `pkgName`/`version` but only replaces `/`, which is insufficient on Windows where `\\` is also treated as a path separator. This can cause the pending changelog read to escape `.changeset/changelogs` if `pkgName` contains backslashes.

### Issue Context
This risk is now reachable because the new code path uses `pnpm.name` directly as an input to `readPendingChangelog()`.

### Fix Focus Areas
- pnpm11/__utils__/get-release-text/src/main.ts[29-31]
- pnpm11/releasing/versioning/src/pendingChangelog.ts[24-30]
- pnpm11/releasing/versioning/src/pendingChangelog.ts[71-79]

### Suggested fix
- In `pendingChangelogFilename()`, sanitize both slash types, e.g. replace any of `["/", "\\"]` with `!` (or another reversible encoding), and consider rejecting any input containing path traversal segments like `..`.
- Optionally harden further by verifying `path.resolve(pendingChangelogPath(...))` is still under the resolved `.changeset/changelogs` directory before reading/writing.
- Keep the fix in the shared helper (`pendingChangelog.ts`) so all call sites benefit, not just this new one.

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


Qodo Logo

Comment thread .github/workflows/release.yml Resolved

@coderabbitai coderabbitai 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.

Actionable comments posted: 2

🧹 Nitpick comments (1)
pnpm11/__utils__/get-release-text/test/main.ts (1)

11-33: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Adopt asynchronous filesystem APIs in tests.

While synchronous filesystem operations are common for brevity in tests, as per coding guidelines, preferring asynchronous filesystem APIs and async/await is recommended across the repository.

♻️ Proposed refactor to use `fs.promises`
-beforeEach(() => {
-  workspaceDir = fs.mkdtempSync(path.join(os.tmpdir(), 'get-release-text-'))
+beforeEach(async () => {
+  workspaceDir = await fs.promises.mkdtemp(path.join(os.tmpdir(), 'get-release-text-'))
 })
 
-afterEach(() => {
-  fs.rmSync(workspaceDir, { recursive: true, force: true })
+afterEach(async () => {
+  await fs.promises.rm(workspaceDir, { recursive: true, force: true })
 })
 
 test('writes the parked registry changelog section', async () => {
   const pnpmDir = path.join(workspaceDir, 'pnpm11/pnpm')
-  fs.mkdirSync(pnpmDir, { recursive: true })
-  fs.writeFileSync(path.join(pnpmDir, 'package.json'), JSON.stringify({ name: 'pnpm', version: '11.13.1' }))
-  fs.writeFileSync(path.join(pnpmDir, 'CHANGELOG.md'), '# pnpm\n\n## 11.13.0\n\nOld release.\n')
+  await fs.promises.mkdir(pnpmDir, { recursive: true })
+  await fs.promises.writeFile(path.join(pnpmDir, 'package.json'), JSON.stringify({ name: 'pnpm', version: '11.13.1' }))
+  await fs.promises.writeFile(path.join(pnpmDir, 'CHANGELOG.md'), '# pnpm\n\n## 11.13.0\n\nOld release.\n')
   const pendingDir = path.join(workspaceDir, '.changeset/changelogs')
-  fs.mkdirSync(pendingDir, { recursive: true })
-  fs.writeFileSync(path.join(pendingDir, '[email protected]'), '## 11.13.1\n\n### Patch Changes\n\n- Fixed the release notes.\n')
+  await fs.promises.mkdir(pendingDir, { recursive: true })
+  await fs.promises.writeFile(path.join(pendingDir, '[email protected]'), '## 11.13.1\n\n### Patch Changes\n\n- Fixed the release notes.\n')
 
   await writeReleaseText(workspaceDir)
 
-  const release = fs.readFileSync(path.join(workspaceDir, 'RELEASE.md'), 'utf8')
+  const release = await fs.promises.readFile(path.join(workspaceDir, 'RELEASE.md'), 'utf8')
   expect(release).toContain('Fixed the release notes.')
   expect(release).not.toContain('Old release.')
 })
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pnpm11/__utils__/get-release-text/test/main.ts` around lines 11 - 33, Update
the test lifecycle hooks and test body around `beforeEach`, `afterEach`, and
`writes the parked registry changelog section` to use asynchronous `fs.promises`
filesystem APIs with `await`, including temporary-directory creation, directory
removal, directory creation, file writes, and release-file reading. Preserve the
existing test setup, assertions, and cleanup behavior.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/release.yml:
- Around line 335-350: Update the github-release step to create the release as a
draft, then make Verify published release description fetch the persisted GitHub
body and compare it exactly with RELEASE.md rather than only checking its
length. After that verification succeeds, publish the draft using the verified
release ID, ensuring any API failure or content mismatch leaves the release
unpublished.

In `@pnpm11/__utils__/get-release-text/src/main.ts`:
- Around line 26-33: Update writeReleaseText to use asynchronous fs.promises
APIs for reading package and changelog files and for writing RELEASE.md. Replace
the direct writeFileSync call with an atomic temporary-file write followed by
rename, ensuring failures do not leave a partially written RELEASE.md while
preserving the existing release.content output.

---

Nitpick comments:
In `@pnpm11/__utils__/get-release-text/test/main.ts`:
- Around line 11-33: Update the test lifecycle hooks and test body around
`beforeEach`, `afterEach`, and `writes the parked registry changelog section` to
use asynchronous `fs.promises` filesystem APIs with `await`, including
temporary-directory creation, directory removal, directory creation, file
writes, and release-file reading. Preserve the existing test setup, assertions,
and cleanup behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 41680f10-7550-4ff3-9938-78f37c21be67

📥 Commits

Reviewing files that changed from the base of the PR and between 566864e and 2650a9e.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml, !pnpm-lock.yaml
📒 Files selected for processing (6)
  • .github/workflows/release.yml
  • pnpm11/__utils__/get-release-text/package.json
  • pnpm11/__utils__/get-release-text/src/main.ts
  • pnpm11/__utils__/get-release-text/test/main.ts
  • pnpm11/__utils__/get-release-text/test/tsconfig.json
  • pnpm11/__utils__/get-release-text/tsconfig.json

Comment thread .github/workflows/release.yml Resolved
@github-actions

github-actions Bot commented Jul 16, 2026 •

Copy link
Copy Markdown
Contributor

Integrated-Benchmark Report (Linux)

Commit: c4ce4f35f836

Each scenario reports direct installs and pnpr installs. Bencher consumes pacquet@HEAD and pnpr@HEAD.

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.830 ± 0.184 2.512 3.079 1.65 ± 0.22
pacquet@main 3.081 ± 0.331 2.544 3.531 1.79 ± 0.28
pnpr@HEAD 1.752 ± 0.235 1.472 2.086 1.02 ± 0.18
pnpr@main 1.717 ± 0.200 1.441 2.117 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.8301154842599994,
      "stddev": 0.1844899269356852,
      "median": 2.7793422985599996,
      "user": 2.7545011799999997,
      "system": 2.0954042399999997,
      "min": 2.5119507950599997,
      "max": 3.0787108440599997,
      "times": [
        2.76444336306,
        2.86576794906,
        2.73424841206,
        3.0396580690599997,
        2.79424123406,
        2.75124935106,
        3.07023892406,
        3.0787108440599997,
        2.69064590106,
        2.5119507950599997
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 3.0810376753599997,
      "stddev": 0.33138696347703406,
      "median": 3.18585704106,
      "user": 3.2757882799999996,
      "system": 2.58250974,
      "min": 2.5437656350599998,
      "max": 3.53057169606,
      "times": [
        2.97509922106,
        2.6954125050599997,
        2.5437656350599998,
        2.72131717706,
        3.18654838406,
        3.25061890206,
        3.53057169606,
        3.3817118270599997,
        3.1851656980599996,
        3.34016570806
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.7516183699599999,
      "stddev": 0.23542512038230234,
      "median": 1.76456031156,
      "user": 1.7250529799999998,
      "system": 1.9091598399999998,
      "min": 1.47245371306,
      "max": 2.08584126406,
      "times": [
        1.78487650606,
        1.87070106806,
        2.00756183706,
        1.50219146106,
        1.51119432106,
        1.47245371306,
        2.08584126406,
        2.00066666706,
        1.53645274506,
        1.74424411706
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.7168229752600002,
      "stddev": 0.20020935022180136,
      "median": 1.70426253806,
      "user": 1.79858008,
      "system": 1.92430354,
      "min": 1.44127827306,
      "max": 2.11737289006,
      "times": [
        1.5745978500600002,
        2.11737289006,
        1.71235451706,
        1.85226089106,
        1.69617055906,
        1.8518443500600001,
        1.44127827306,
        1.8199813830600002,
        1.52266778206,
        1.5797012570600002
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 323.2 ± 21.5 285.5 352.9 1.05 ± 0.10
pacquet@main 308.1 ± 20.2 277.9 347.0 1.00
pnpr@HEAD 339.5 ± 32.3 290.9 401.5 1.10 ± 0.13
pnpr@main 345.5 ± 34.5 301.6 409.8 1.12 ± 0.13
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.32317101828,
      "stddev": 0.02152345081441738,
      "median": 0.33056281468000004,
      "user": 0.31672142,
      "system": 0.80534056,
      "min": 0.28549365968,
      "max": 0.35294810368,
      "times": [
        0.35294810368,
        0.28549365968,
        0.33135843768,
        0.30159414168000004,
        0.32976719168,
        0.30113360468,
        0.31733416368,
        0.33195249568,
        0.34779005268,
        0.33233833168000004
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.30812590638000004,
      "stddev": 0.020239435292040024,
      "median": 0.30798835968000005,
      "user": 0.30263512000000004,
      "system": 0.7792024599999998,
      "min": 0.27792772568,
      "max": 0.34697639068,
      "times": [
        0.33331678368,
        0.31125349668,
        0.31205648768,
        0.31066828568000004,
        0.30530843368000005,
        0.34697639068,
        0.29611485668000004,
        0.29815007768,
        0.28948652568,
        0.27792772568
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.33948907488,
      "stddev": 0.032321570240589806,
      "median": 0.33520194418000004,
      "user": 0.32642512,
      "system": 0.8080657600000001,
      "min": 0.29089564068,
      "max": 0.40145275068,
      "times": [
        0.31081881868,
        0.36042063168000005,
        0.29089564068,
        0.31898115568,
        0.40145275068,
        0.32715519368,
        0.37597060768,
        0.33563558068000005,
        0.33476830768000004,
        0.33879206168000003
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.3454683795800001,
      "stddev": 0.03453353678120744,
      "median": 0.34568069168000004,
      "user": 0.33582112,
      "system": 0.82939206,
      "min": 0.30155209168,
      "max": 0.40984848668,
      "times": [
        0.34065866668,
        0.36447976468000004,
        0.40984848668,
        0.35185580668000005,
        0.38571489168,
        0.35070271668,
        0.31496165768,
        0.31086214968000003,
        0.30155209168,
        0.32404756368000004
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 3.576 ± 0.217 3.164 3.882 2.22 ± 0.24
pacquet@main 3.355 ± 0.254 2.985 3.686 2.08 ± 0.25
pnpr@HEAD 1.611 ± 0.147 1.477 1.878 1.00
pnpr@main 1.730 ± 0.176 1.530 1.991 1.07 ± 0.15
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 3.5761424595,
      "stddev": 0.2174410402561454,
      "median": 3.5672075617,
      "user": 3.3307162200000002,
      "system": 2.4821872799999998,
      "min": 3.1641682837,
      "max": 3.8821106687,
      "times": [
        3.6014999787,
        3.6692372597,
        3.5329151447,
        3.8821106687,
        3.8447510567000003,
        3.7245212467,
        3.4609481107,
        3.1641682837,
        3.4991496177,
        3.3821232277
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 3.3547822591,
      "stddev": 0.25379681165243595,
      "median": 3.4180510092,
      "user": 3.02142402,
      "system": 2.12245598,
      "min": 2.9852103677,
      "max": 3.6857518527,
      "times": [
        3.6028538377,
        3.5244904707000004,
        3.5108843437000004,
        3.6857518527,
        3.3252176747,
        3.1405788797,
        3.5585922877000002,
        3.1700318867000004,
        2.9852103677,
        3.0442109897000003
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.61108569,
      "stddev": 0.14680026665629411,
      "median": 1.5331235032,
      "user": 1.48003762,
      "system": 1.5525628800000002,
      "min": 1.4768939627,
      "max": 1.8777370857,
      "times": [
        1.5415773437,
        1.5246696626999998,
        1.4984211287,
        1.7027507917,
        1.4768939627,
        1.8777370857,
        1.5155891887,
        1.4966116827,
        1.6465011687,
        1.8301048847
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.7295313472,
      "stddev": 0.1760855304484504,
      "median": 1.6861709362,
      "user": 1.44877992,
      "system": 1.57483658,
      "min": 1.5295338707,
      "max": 1.9910205987,
      "times": [
        1.9406883567,
        1.9910205987,
        1.8625681616999998,
        1.6504734547,
        1.5295338707,
        1.7218684176999999,
        1.5439220466999999,
        1.6418068297,
        1.8783214677,
        1.5351102677
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 787.2 ± 67.6 692.0 886.7 2.61 ± 0.30
pacquet@main 740.6 ± 51.5 681.5 819.0 2.45 ± 0.25
pnpr@HEAD 302.1 ± 22.6 260.8 344.2 1.00 ± 0.11
pnpr@main 301.9 ± 22.6 264.9 343.2 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.7871985481400002,
      "stddev": 0.06755501427876118,
      "median": 0.7731400076400001,
      "user": 1.0067805,
      "system": 0.81467022,
      "min": 0.6920427641400001,
      "max": 0.8866542481400002,
      "times": [
        0.8557903041400001,
        0.77200803114,
        0.8657560961400002,
        0.8866542481400002,
        0.7487937191400001,
        0.7142241601400001,
        0.7742719841400001,
        0.7366044531400001,
        0.6920427641400001,
        0.8258397211400001
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.7405529188400001,
      "stddev": 0.05146090213377472,
      "median": 0.7255451831400002,
      "user": 0.9472737999999999,
      "system": 0.7963723199999999,
      "min": 0.6814668441400001,
      "max": 0.8189769311400001,
      "times": [
        0.6820467861400001,
        0.6814668441400001,
        0.7038266771400001,
        0.7247497251400001,
        0.8189769311400001,
        0.8107209591400001,
        0.8006957881400001,
        0.7263406411400001,
        0.7364330401400001,
        0.7202717961400001
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.30205921624000004,
      "stddev": 0.022613134090306894,
      "median": 0.29904130614,
      "user": 0.2561191,
      "system": 0.6159135199999999,
      "min": 0.26084816114000003,
      "max": 0.34423525114000003,
      "times": [
        0.30838273814,
        0.30135772214,
        0.31869212614000003,
        0.29589930714,
        0.28745135314000003,
        0.34423525114000003,
        0.26084816114000003,
        0.29672489014000003,
        0.28731481714,
        0.31968579614000003
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.30193138074000003,
      "stddev": 0.022628376630624523,
      "median": 0.29731308864,
      "user": 0.24863739999999995,
      "system": 0.59724082,
      "min": 0.26488707514,
      "max": 0.34315985714,
      "times": [
        0.28621565714,
        0.29027112214,
        0.29384947814,
        0.29560427114,
        0.26488707514,
        0.33355345214000004,
        0.30660703514,
        0.34315985714,
        0.29902190614,
        0.30614395314000004
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.058 ± 0.063 1.979 2.182 7.47 ± 0.61
pacquet@main 2.094 ± 0.037 2.027 2.154 7.60 ± 0.59
pnpr@HEAD 0.294 ± 0.023 0.262 0.323 1.07 ± 0.12
pnpr@main 0.275 ± 0.021 0.256 0.326 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.05769679226,
      "stddev": 0.06298895763767212,
      "median": 2.0522211270599997,
      "user": 1.28276414,
      "system": 0.8891959799999999,
      "min": 1.9785044870600001,
      "max": 2.18213029106,
      "times": [
        1.98690155506,
        1.9785044870600001,
        2.18213029106,
        2.0885583090599997,
        2.08360670706,
        2.0406817180599996,
        2.0139607260599997,
        2.0204262160599997,
        2.0637605360599998,
        2.11843737706
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.09351790256,
      "stddev": 0.037396466598150824,
      "median": 2.09021124156,
      "user": 1.3491859400000001,
      "system": 0.9315139800000001,
      "min": 2.02675618306,
      "max": 2.15373195006,
      "times": [
        2.1164806230599997,
        2.15373195006,
        2.09553666506,
        2.14054883306,
        2.02675618306,
        2.08488581806,
        2.06849149906,
        2.10117394106,
        2.06324523306,
        2.08432828006
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.29409743116,
      "stddev": 0.022629678136627723,
      "median": 0.28794549055999996,
      "user": 0.23413053999999994,
      "system": 0.60841378,
      "min": 0.26208409905999996,
      "max": 0.32333249406,
      "times": [
        0.28634564906,
        0.27969809506,
        0.27628341706,
        0.27258842106,
        0.26208409905999996,
        0.28954533206,
        0.32106323306,
        0.30959201906,
        0.32333249406,
        0.32044155205999997
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.27543655735999995,
      "stddev": 0.020885467293167273,
      "median": 0.26896930456,
      "user": 0.22606823999999998,
      "system": 0.56324978,
      "min": 0.25589812406,
      "max": 0.32642952506,
      "times": [
        0.25888930406,
        0.26310291605999997,
        0.25589812406,
        0.27120866505999996,
        0.26672994406,
        0.26398475606,
        0.27998502506,
        0.27621619006,
        0.32642952506,
        0.29192112406
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 407.3 ± 26.2 372.4 470.2 4.78 ± 0.40
pacquet@main 398.7 ± 14.4 378.3 419.7 4.68 ± 0.30
pnpr@HEAD 85.2 ± 4.5 80.3 103.1 1.00
pnpr@main 88.2 ± 4.0 83.2 101.3 1.04 ± 0.07
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.40726164994,
      "stddev": 0.026158491978385635,
      "median": 0.40663544834,
      "user": 0.39411253999999996,
      "system": 0.07161384,
      "min": 0.37236422034,
      "max": 0.47020781434000003,
      "times": [
        0.39371618534,
        0.41169472734,
        0.40372767934000003,
        0.37236422034,
        0.38877329034,
        0.39096724034,
        0.41722734334,
        0.40954321734,
        0.47020781434000003,
        0.41439478134
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.39872075154,
      "stddev": 0.014386583095386245,
      "median": 0.39989699484,
      "user": 0.38923783999999995,
      "system": 0.06744634000000001,
      "min": 0.37826800434,
      "max": 0.41969198234,
      "times": [
        0.38644194134,
        0.39299255234,
        0.39409862434000004,
        0.37826800434,
        0.41376779034,
        0.40664757834000004,
        0.40569536534,
        0.38012018134000003,
        0.41969198234,
        0.40948349534
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.0851629686929412,
      "stddev": 0.004495823871614062,
      "median": 0.08451821034000001,
      "user": 0.01846738705882353,
      "system": 0.010589361176470588,
      "min": 0.08034815034000001,
      "max": 0.10314136634000001,
      "times": [
        0.08145641634,
        0.08702035034000001,
        0.08077906134,
        0.08164726534000001,
        0.08768280634,
        0.08876753834000001,
        0.09362728734,
        0.10314136634000001,
        0.08526893234,
        0.08426939134,
        0.08120815934,
        0.08106030134,
        0.08045471134,
        0.08414036934,
        0.08113600334,
        0.08490989734,
        0.08752266634,
        0.08203268134000001,
        0.08548468934,
        0.08034815034000001,
        0.08379167234,
        0.08490563934,
        0.08856418634,
        0.08472514034,
        0.08699130534,
        0.08666778634000001,
        0.08247882034000001,
        0.09073020334000001,
        0.08266539134,
        0.08630735834,
        0.08095429134,
        0.08737707234,
        0.08431128034,
        0.08311274334
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.08820536227939392,
      "stddev": 0.0040377048033266695,
      "median": 0.08687151034,
      "user": 0.016529967272727267,
      "system": 0.014213282424242425,
      "min": 0.08317217634,
      "max": 0.10127155734000001,
      "times": [
        0.08351831834000001,
        0.08764910434,
        0.08317217634,
        0.08795228434,
        0.08645214034000001,
        0.08502321034,
        0.08615876834000001,
        0.08664544434,
        0.08766696734,
        0.08484562634000001,
        0.08781271134,
        0.08431581934,
        0.08687151034,
        0.08653630934,
        0.09285040534000001,
        0.09764412834000001,
        0.09605244134,
        0.09251647634,
        0.10127155734000001,
        0.08936709734,
        0.08658652334,
        0.08580215634,
        0.08621808934,
        0.08826490334,
        0.08912161534,
        0.08992026934000001,
        0.08881587034,
        0.09169486934,
        0.08619760134,
        0.08496510034,
        0.08797377434,
        0.08461307834000001,
        0.08628060734000001
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 4.820 ± 0.148 4.634 5.030 1.34 ± 0.06
pacquet@main 4.922 ± 0.162 4.628 5.160 1.37 ± 0.06
pnpr@HEAD 3.650 ± 0.095 3.556 3.865 1.02 ± 0.04
pnpr@main 3.593 ± 0.119 3.489 3.912 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 4.819851035779999,
      "stddev": 0.14757234557735865,
      "median": 4.8191938710799995,
      "user": 2.83028312,
      "system": 2.0021875799999997,
      "min": 4.63432030358,
      "max": 5.02970813458,
      "times": [
        4.96228863258,
        4.63432030358,
        4.63647076158,
        4.97931359058,
        5.02970813458,
        4.70967668658,
        4.69176573058,
        4.916578775580001,
        4.83124102358,
        4.80714671858
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 4.9216558162799995,
      "stddev": 0.16231389588542122,
      "median": 4.94029617508,
      "user": 2.8148765199999994,
      "system": 1.9843954799999999,
      "min": 4.628097464580001,
      "max": 5.16005960058,
      "times": [
        5.16005960058,
        4.882725246580001,
        4.97161676958,
        4.99319195158,
        4.628097464580001,
        4.73185102358,
        5.06049653958,
        4.90897558058,
        4.8196669425800005,
        5.05987704358
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 3.64976452318,
      "stddev": 0.09484971780709955,
      "median": 3.62800359458,
      "user": 1.6791843200000003,
      "system": 1.6772057800000002,
      "min": 3.55574828258,
      "max": 3.86474480058,
      "times": [
        3.64468071358,
        3.6714813735800003,
        3.6113264755800003,
        3.7006336005800002,
        3.55574828258,
        3.86474480058,
        3.56086261158,
        3.56671091958,
        3.71688950258,
        3.60456695158
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 3.59334787448,
      "stddev": 0.11851149822624248,
      "median": 3.54995784158,
      "user": 1.6036620199999998,
      "system": 1.5462746800000002,
      "min": 3.48931242358,
      "max": 3.91208536258,
      "times": [
        3.54532127458,
        3.54284329058,
        3.54419725058,
        3.56961733858,
        3.61681703658,
        3.48931242358,
        3.91208536258,
        3.62239655858,
        3.55459440858,
        3.53629380058
      ]
    }
  ]
}

@github-actions

github-actions Bot commented Jul 16, 2026 •

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branchpr/13064
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
3,576.14 ms
(-5.75%)Baseline: 3,794.41 ms
4,553.29 ms
(78.54%)
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
🚷 view threshold
2,057.70 ms
(-23.25%)Baseline: 2,681.07 ms
3,217.28 ms
(63.96%)
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
🚷 view threshold
787.20 ms
(-31.05%)Baseline: 1,141.75 ms
1,370.10 ms
(57.46%)
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
🚷 view threshold
407.26 ms
(-26.06%)Baseline: 550.80 ms
660.95 ms
(61.62%)
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
🚷 view threshold
2,830.12 ms
(-17.78%)Baseline: 3,442.32 ms
4,130.79 ms
(68.51%)
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
🚷 view threshold
4,819.85 ms
(-23.42%)Baseline: 6,293.71 ms
7,552.45 ms
(63.82%)
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
🚷 view threshold
323.17 ms
(-38.14%)Baseline: 522.41 ms
626.89 ms
(51.55%)
🐰 View full continuous benchmarking report in Bencher

@github-actions

github-actions Bot commented Jul 16, 2026 •

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branchpr/13064
Testbedpnpr

⚠️ WARNING: No Threshold found!

Without a Threshold, no Alerts will ever be generated.

Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the --ci-only-thresholds flag.

Click to view all benchmark results
BenchmarkLatencymilliseconds (ms)
isolated-linker.fresh-install.cold-cache.cold-store📈 view plot
⚠️ NO THRESHOLD
1,611.09 ms
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
294.10 ms
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
302.06 ms
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
⚠️ NO THRESHOLD
85.16 ms
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
⚠️ NO THRESHOLD
1,751.62 ms
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
⚠️ NO THRESHOLD
3,649.76 ms
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
339.49 ms
🐰 View full continuous benchmarking report in Bencher

Copilot AI review requested due to automatic review settings July 16, 2026 07:48

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-code-review

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit c4ce4f3

@github-actions github-actions Bot added the reviewed: coderabbit CodeRabbit submitted an approving review label Jul 16, 2026
@qodo-code-review

Copy link
Copy Markdown

PR Code Suggestions ✨

Warning

/improve is deprecated. Use /agentic_review instead (removal date not yet scheduled).

No code suggestions found for the PR.

Auto-approved notes - no code suggestions found
- 'approve_pr_on_self_review' flag enabled

Copilot AI review requested due to automatic review settings July 16, 2026 08:32

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-code-review

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 08146d2

@qodo-code-review

Copy link
Copy Markdown

PR Code Suggestions ✨

Warning

/improve is deprecated. Use /agentic_review instead (removal date not yet scheduled).

No code suggestions found for the PR.

Auto-approved notes - no code suggestions found
- 'approve_pr_on_self_review' flag enabled

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/release.yml (1)

364-369: 🩺 Stability & Availability | 🔴 Critical | ⚡ Quick win

Normalize line endings before performing exact string comparisons.

GitHub's API normalizes Markdown text fields and will return the draft release body with CRLF (\r\n) line breaks. Because the locally generated RELEASE.md on the macOS runner uses LF (\n), the strict equality check will almost certainly fail, aborting the workflow and blocking publication. Normalize the line endings to ensure a robust, platform-agnostic comparison.

🛠️ Proposed fix to normalize the strings before comparing
           RELEASE_JSON="$release_json" node <<'NODE'
           const fs = require('node:fs')
-          const actual = JSON.parse(fs.readFileSync(process.env.RELEASE_JSON, 'utf8')).body
-          const expected = fs.readFileSync('RELEASE.md', 'utf8')
-          if (actual !== expected) throw new Error('GitHub draft release body does not match RELEASE.md')
+          const normalize = (s) => (s || '').replace(/\r\n/g, '\n').trim()
+          const actual = normalize(JSON.parse(fs.readFileSync(process.env.RELEASE_JSON, 'utf8')).body)
+          const expected = normalize(fs.readFileSync('RELEASE.md', 'utf8'))
+          if (actual !== expected) throw new Error('GitHub draft release body does not match RELEASE.md')
           NODE
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/release.yml around lines 364 - 369, Normalize line endings
in both the parsed GitHub release body and locally read RELEASE.md before the
strict comparison in the RELEASE_JSON validation script. Convert CRLF and any
other newline variants to LF, then preserve the existing mismatch error behavior
when the normalized strings differ.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@pnpm11/__utils__/get-release-text/src/main.ts`:
- Around line 30-32: Replace the plain Error throws in get-release-text’s
missing changelog validation at pnpm11/__utils__/get-release-text/src/main.ts
lines 30-32 and missing changelog entry validation at lines 85-87 with PnpmError
using codes MISSING_CHANGELOG and MISSING_CHANGELOG_ENTRY respectively; import
PnpmError from `@pnpm/error` and add `@pnpm/error` to the package dependencies.

---

Outside diff comments:
In @.github/workflows/release.yml:
- Around line 364-369: Normalize line endings in both the parsed GitHub release
body and locally read RELEASE.md before the strict comparison in the
RELEASE_JSON validation script. Convert CRLF and any other newline variants to
LF, then preserve the existing mismatch error behavior when the normalized
strings differ.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 73e91c0d-3e73-4ec6-8d45-715546790679

📥 Commits

Reviewing files that changed from the base of the PR and between c4ce4f3 and 08146d2.

📒 Files selected for processing (3)
  • .github/workflows/release.yml
  • pnpm11/__utils__/get-release-text/src/main.ts
  • pnpm11/__utils__/get-release-text/test/main.ts

Copilot AI review requested due to automatic review settings July 16, 2026 08:41

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.

@zkochan

zkochan commented Jul 16, 2026

Copy link
Copy Markdown
Member Author

Addressed the outside-diff newline portability finding in baed9bc564: the persisted GitHub body and local RELEASE.md now normalize CRLF and lone CR to LF before comparison, without trimming or otherwise weakening the exact-content check. The CRLF-versus-LF case was exercised locally.


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

@qodo-code-review

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit baed9bc

@qodo-code-review

Copy link
Copy Markdown

PR Code Suggestions ✨

Warning

/improve is deprecated. Use /agentic_review instead (removal date not yet scheduled).

No code suggestions found for the PR.

Auto-approved notes - no code suggestions found
- 'approve_pr_on_self_review' flag enabled

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

Labels

product: pnpm@11 reviewed: coderabbit CodeRabbit submitted an approving review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants