Skip to content

ci: fix create release PR - #12610

Merged
zkochan merged 1 commit into
mainfrom
fix-release-job
Jun 23, 2026
Merged

zkochan merged 1 commit into
mainfrom
fix-release-job

Conversation

@zkochan

@zkochan zkochan commented Jun 23, 2026 •

Copy link
Copy Markdown
Member

Fixes https://github.com/pnpm/pnpm/actions/runs/28032330259/job/82976119867

Summary by CodeRabbit

  • Bug Fixes
    • Improved --check output so reported fingerprint differences use clearer, repository-relative paths.
    • Adjusted path handling to make key-file lookups more reliable across the repository layout.

@coderabbitai

coderabbitai Bot commented Jun 23, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: ea8556b4-5a10-4737-a56d-3ba898aa9c53

📥 Commits

Reviewing files that changed from the base of the PR and between 852d537 and 3ae1a6f.

📒 Files selected for processing (1)
  • pnpm11/crypto/shasums-file/scripts/update-node-release-keys.mjs

📝 Walkthrough

Walkthrough

This change updates a release-key maintenance script to distinguish its local script root from the repository root, uses those roots for TypeScript and Rust key file paths, and makes --check fingerprint drift labels relative to the repository root.

Changes

Release key script path handling

Layer / File(s) Summary
Root and label path updates
pnpm11/crypto/shasums-file/scripts/update-node-release-keys.mjs
The script now computes both ROOT and REPO_ROOT, resolves the embedded TypeScript and Rust key file paths from those bases, and reports embedded fingerprint labels relative to REPO_ROOT.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~4 minutes

Assessment against linked issues

Objective Addressed Explanation
Update npm to version 3.7.3 and related dependency/doc changes [#123] ❌ The diff only adjusts path resolution and diagnostic labels in pnpm11/crypto/shasums-file/scripts/update-node-release-keys.mjs; it does not update npm versioning or the listed dependency/doc changes.

Assessment against linked issues: Out-of-scope changes

Code Change Explanation
Adjust script root constants and embedded key file path resolution (pnpm11/crypto/shasums-file/scripts/update-node-release-keys.mjs) This script-path update does not align with the linked objective to update npm to version 3.7.3.
Change fingerprint diagnostic label base to REPO_ROOT (pnpm11/crypto/shasums-file/scripts/update-node-release-keys.mjs) This reporting-path change is not part of the linked npm version update objective.

Suggested labels

product: pnpm@11

✨ 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-job

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration.


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 merged commit 6a6e432 into main Jun 23, 2026
21 of 22 checks passed
@zkochan
zkochan deleted the fix-release-job branch June 23, 2026 14:25
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Fix node release key sync script paths for pnpm11 + repo-root pacquet
🐞 Bug fix ⚙️ Configuration changes 🕐 Less than 10 minutes

Grey Divider

Description

• Fix pacquet key-file path resolution when running from pnpm11/ subtree.
• Make drift/check output paths relative to the real repository root.
• Prevent CI/release automation from failing due to missing Rust key file.
Diagram

graph TD
  CI["CI: create release PR"] --> Script["update-node-release-keys.mjs"] --> Upstream{{"nodejs/release-keys"}}
  Script --> Write["Render & write keys"] --> TS[/"pnpm11/.../nodeReleaseKeys.ts"/]
  Write --> Rust[/"pacquet/.../node_release_keys.rs"/]

  subgraph Legend
    direction LR
    _proc["Process/Job"] ~~~ _file[/"File"/] ~~~ _ext{{"External source"}}
  end
Loading
High-Level Assessment

The chosen approach (explicitly introducing REPO_ROOT and building the pacquet path from it) is the simplest and most reliable fix for a monorepo layout where pnpm11/ and pacquet/ have different roots. Alternatives like auto-detecting the root via git or walking parent directories add complexity without clear benefit here.

Files changed (1) +4 / -2

Bug fix (1) +4 / -2
update-node-release-keys.mjsResolve pacquet key file path from repo root (not pnpm11 root) +4/-2

Resolve pacquet key file path from repo root (not pnpm11 root)

• Adds an explicit REPO_ROOT to distinguish pnpm11/ (TS CLI) from the repository root where pacquet lives. Updates the Rust key file path and the drift/check label paths to be relative to REPO_ROOT, preventing missing-file failures in CI/release jobs.

pnpm11/crypto/shasums-file/scripts/update-node-release-keys.mjs

@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Jun 23, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

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

Grey Divider


Remediation recommended

1. Stale refresh instructions 🐞 Bug ⚙ Maintainability
Description
The key-file generator still hardcodes a refresh command that points to crypto/shasums-file/... at
the repo root, but the script lives under pnpm11/crypto/.... Following the embedded instruction
from the repo root will fail, making manual key refreshes unnecessarily error-prone.
Code

pnpm11/crypto/shasums-file/scripts/update-node-release-keys.mjs[R17-21]

+// The TypeScript pnpm CLI lives under pnpm11/, while pacquet stays at the repo root.
const ROOT = path.join(path.dirname(fileURLToPath(import.meta.url)), '..', '..', '..')
+const REPO_ROOT = path.join(ROOT, '..')
const TS_KEYS_FILE = path.join(ROOT, 'crypto', 'shasums-file', 'src', 'nodeReleaseKeys.ts')
-const RUST_KEYS_FILE = path.join(ROOT, 'pacquet', 'crates', 'crypto-shasums-file', 'src', 'node_release_keys.rs')
+const RUST_KEYS_FILE = path.join(REPO_ROOT, 'pacquet', 'crates', 'crypto-shasums-file', 'src', 'node_release_keys.rs')
Evidence
Repo tooling and CI invoke the script via pnpm11/..., but the generator (and currently generated
files) still instruct running it from crypto/... without the pnpm11 prefix, which will not resolve
from the repo root.

package.json[30-34]
.github/workflows/create-release-pr.yml[53-66]
pnpm11/crypto/shasums-file/scripts/update-node-release-keys.mjs[82-108]
pnpm11/crypto/shasums-file/src/nodeReleaseKeys.ts[1-9]
pacquet/crates/crypto-shasums-file/src/node_release_keys.rs[1-7]

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 generator writes a `Refresh with:` comment into the generated TS/Rust key modules that omits the `pnpm11/` prefix. Since the script is actually located at `pnpm11/crypto/shasums-file/scripts/update-node-release-keys.mjs`, the embedded instruction is wrong when run from the repo root.

### Issue Context
This PR explicitly distinguishes `pnpm11/` vs repo root (`REPO_ROOT`) to reach `pacquet/`, so the refresh instructions should match how the repo actually invokes the script.

### Fix Focus Areas
- pnpm11/crypto/shasums-file/scripts/update-node-release-keys.mjs[82-117]
- pnpm11/crypto/shasums-file/src/nodeReleaseKeys.ts[1-10]
- pacquet/crates/crypto-shasums-file/src/node_release_keys.rs[1-8]

### What to change
1) In `renderTypeScript()` and `renderRust()`, change the embedded command to:
  - `node pnpm11/crypto/shasums-file/scripts/update-node-release-keys.mjs --update`
2) Update the existing generated files’ header comment lines to match (just the `Refresh with:` command line), so the repo is consistent without requiring a full regeneration diff.

ⓘ 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 3ae1a6f

Results up to commit 3ae1a6f


🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Great, no issues found!

Qodo reviewed your code and found no material issues that require review
Auto-approved notes - no code review findings
- 'auto_approve_for_no_suggestions' flag enabled

Qodo Logo

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 3ae1a6f

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.

1 participant