Repository navigation
feat(release): auto-refresh embedded signing keys in the release PR - #12798
Conversation
The create-release-pr workflow previously failed when the embedded npm signing keys or Node.js release keys drifted from their canonical sources, requiring a manual update PR before a release could proceed. Now the workflow runs the update scripts in --update mode and commits the refreshed keys together with the version bumps, so the new trust roots are reviewed as part of the release PR diff. A synthesized changeset records the refresh in the changelogs of the affected packages. Also embeds the Node.js release team's new signing key 655F3B5C1FB3FA8D1A0CA6BDE4A7D232B936D2FD (Stewart X Addison), which the last release run reported as missing, and fixes the Rust renderer in update-node-release-keys.mjs so its output is lint-clean (angle-bracket URL for dylint's bare-url lint, raw-string hashes only when the key contains a quote for clippy's needless_raw_string_hashes) and matches the committed file byte-for-byte on a no-drift run.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughThis PR adds a new Node.js release signing key to the embedded key stores, updates the key-refresh scripts and workflow to auto-commit key drift as changesets, and rewords related npm signing-key comments. ChangesNode release key addition and automation
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Suggested labels: Suggested reviewers: ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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
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. Comment |
PR Summary by QodoAuto-refresh embedded signing keys during release PR creation
AI Description
Diagram
High-Level Assessment
Files changed (7)
|
Micro-Benchmark ResultsLinux |
Code Review by Qodo
1. Workflow heredoc never terminates
|
|
Code review by qodo was updated up to the latest commit 0ccbf1c |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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/create-release-pr.yml:
- Around line 69-93: The heredoc blocks in the Add changesets for refreshed keys
step are indented, so the EOF terminators will not be recognized and the
generated .changeset files will keep leading spaces. Update the workflow snippet
around the two cat <<'EOF' sections so the heredoc delimiters and contents are
flush to column 0, preserving valid changeset frontmatter when the step runs.
🪄 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: f1f7f46e-6454-42b1-8564-937925352e3a
📒 Files selected for processing (7)
.changeset/add-sxa-node-release-key.md.github/workflows/create-release-pr.ymlpacquet/crates/crypto-shasums-file/src/node_release_keys.rspnpm11/crypto/shasums-file/scripts/update-node-release-keys.mjspnpm11/crypto/shasums-file/src/nodeReleaseKeys.tspnpm11/deps/security/signatures/scripts/update-npm-signing-keys.mjspnpm11/deps/security/signatures/src/npmSigningKeys.ts
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #12798 +/- ##
==========================================
- Coverage 85.06% 85.06% -0.01%
==========================================
Files 415 415
Lines 65533 65533
==========================================
- Hits 55746 55744 -2
- Misses 9787 9789 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Review follow-ups: sort the merged npm signing keys by keyid so a reordering of npm's response cannot churn the generated file or synthesize a spurious changeset, and leave an explicit warning comment on the release PR whenever embedded trust roots were refreshed, so a key change cannot slip through buried in a large version-bump diff.
|
Responding to the Qodo review findings: 1. Workflow heredoc never terminates — false positive. The 2. Key refresh output order churn — fixed in 42c9592. 3. Auto-committed trust roots — the move from fail-on-drift to auto-refresh is intentional: the hard failure blocked releases and still ended with a human running the same scripts against the same endpoints, so it added friction without adding an independent verification step. That said, the review-signal concern is fair, and 42c9592 addresses it: whenever the workflow refreshes either key set, it now posts an explicit Written by an agent (Claude Code, claude-fable-5). |
|
Code review by qodo was updated up to the latest commit 42c9592 |
|
Code review by qodo was updated up to the latest commit 42c9592 |
Summary
The last dispatch of the Create Release PR workflow failed because the embedded Node.js release keys had drifted from the canonical
nodejs/release-keyslist (a new release signer was added), and the workflow treated any drift as a hard failure requiring a manual update PR first.This PR makes the workflow self-healing: instead of failing, it now runs both key-update scripts (npm registry signing keys and Node.js release keys) in⚠️ comment on the release PR naming the refreshed trust roots, so a key change cannot slip through buried in a large version-bump diff.
--updatemode and commits the refreshed keys together with the version bumps, so new trust roots are reviewed as part of the release PR diff. When keys drifted, the workflow also synthesizes a changeset so the refresh shows up in the changelogs of the affected packages (@pnpm/deps.security.signatures/@pnpm/crypto.shasums-file) andpnpm, and posts an explicitIt also lands the update that unblocks the pending release: the Node.js release team's new signing key
655F3B5C1FB3FA8D1A0CA6BDE4A7D232B936D2FD(Stewart X Addison) is embedded in both the TypeScript CLI and pacquet, in the exact form the generator produces, so the first automated refresh run starts from a clean, byte-identical baseline.Fixing that baseline required generator fixes: the Rust output of
update-node-release-keys.mjsno longer matched what the repo's linters accept — the header URL is now emitted in angle brackets (dylintperfectionist::bare-url) and raw-string hashes are only used when a key actually contains a quote (clippyneedless_raw_string_hashes).update-npm-signing-keys.mjsnow sorts the merged key set bykeyidso a reordering of npm's response cannot churn the generated file or synthesize a spurious changeset.Squash Commit Body
Checklist
pacquet/port, or the description notes what still needs porting.(The update script writes both stacks' key files; the new key is embedded in both.)
pnpm changeset) if this PR changes any publishedpackage. Keep it short and written for pnpm users — it becomes a release note.
tests in
@pnpm/crypto.shasums-fileandpacquet-crypto-shasums-file, whichparse the full embedded key set; no new test surface.)
Written by an agent (Claude Code, claude-fable-5).
Summary by CodeRabbit
SHASUMS256.txtsignatures.