Skip to content

ci(release): read the npm version from npm, not process.versions - #1073

Merged
V3RON merged 2 commits into
mainfrom
ci/release-npm-version-check
Oct 30, 2026
Merged

V3RON merged 2 commits into
mainfrom
ci/release-npm-version-check

Conversation

@V3RON

@V3RON V3RON commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Release run 41041285506 failed at "Publish to npm", in the step that checks npm is 11.5.1 or later. The check read process.versions.npm, which Node does not set, so it threw Cannot read properties of undefined (reading 'split'). The runner's npm was 11.19.1, so it should have passed. By then the tag job had already pushed chore(release): 0.4.0 and v0.4.0. 0.4.0 was then published by hand.

The check now compares the output of npm --version. Tested locally: 11.19.1 and 11.5.1 pass, 11.5.0 and 10.9.2 fail.

The 0.4.0 release commit also broke oxfmt --check: GitHub's generated notes use * bullets and no blank line under a heading. CHANGELOG.md is reformatted, and release.mjs changelog now converts the notes, so the next release commit arrives formatted. Replaying the real 0.4.0 notes through it gives the formatted file exactly.

Review

Spec review: skipped. Code review: 0 blocking, 0 fixed, 0 notes. Claims review: 0 blocking, 0 fixed, 0 notes.
Assessment: complete
Spec skipped: the PR closes no issue.

Written by an agent.

@coderabbitai

coderabbitai Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: QUIET
  • Plan: Advanced
  • Run ID: 81243bcb-c75a-49d6-acba-65db6de1d27e
Commits

Reviewing files that changed from the base of the PR and between 4102e23 and cd1105e.

Files selected for processing: 3
  • CHANGELOG.md
  • scripts/release.mjs
  • src/release-script.test.ts

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

Walkthrough

The release workflow now captures and prints the npm CLI version with npm --version. It passes that version to the existing check, which rejects versions earlier than 11.5.1. Changelog generation adds spacing after headings, converts heading levels, and changes list markers from * to -. Tests update the expected changelog output and describe its formatting.

Priority: Normal

Merge Risk: Minimal · up to cd110

No actionable merge-blocking risk was established in the release workflow or changelog formatting changes.

Architecture risk: Low · up to cd110

The change affects 2 systems.

Changed systems: scripts, src

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — scripts (service) was modified; 1 changed file maps to changed impact.
  • observed — src (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in scripts/release.mjs: changelogWithRelease now inserts a blank line after ## headings when one is not already present, then converts remaining ## headings to ### and * bullets to -. Previously, it only converted ## headings to ###.
  • observed — Modified behavior in src/release-script.test.ts: The changelog test description now specifies that the output is formatted as oxfmt formats it.
  • observed — Modified behavior in src/release-script.test.ts: The expected changelog output changes the release-note and contributor list markers from * to - .
  • observed — Modified behavior in src/release-script.test.ts: The expected first-release changelog changes both list markers from * to - .
Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the primary change: reading the npm version from npm instead of process.versions.
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 The description explains the failed release run, the npm version check fix (now comparing the output of npm --version), local test results for several npm versions, and the changelog formatting chan…
Full details: Description check

Explanation

The description explains the failed release run, the npm version check fix (now comparing the output of npm --version), local test results for several npm versions, and the changelog formatting change in release.mjs and CHANGELOG.md. It is directly related to the changeset and gives enough detail to judge the change.

Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 2 files.

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches: 💡 1
🛠️ Fix failing CI checks: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

GitHub's generated notes use `*` bullets and no blank line under a
heading, so the 0.4.0 release commit failed oxfmt --check in Static
checks. Reformat CHANGELOG.md and have release.mjs changelog convert
the notes.
@V3RON

V3RON commented Oct 30, 2026

Copy link
Copy Markdown
Contributor Author

Review findings

Round 1 at cd1105e. Code and claims lenses: F0, assessment complete. Spec skipped (no issue). CHANGELOG.md reformat is mechanical; the new section matches what release.mjs changelog writes from the real 0.4.0 notes. The npm version gate gives 10.9.2 and 11.5.0 => fail, 11.5.1, 11.6.0-pre and 12.0.0 => pass.

Written by an agent.

@V3RON
V3RON merged commit 92feba1 into main Oct 30, 2026
42 of 43 checks passed
@V3RON
V3RON deleted the ci/release-npm-version-check branch October 30, 2026 16:34
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