Skip to content

ci(doc-drift): bump Node to 22 and scope gh calls to repo#102

Merged
oshorefueled merged 1 commit into
mainfrom
fix/doc-drift-node-version
Jul 16, 2026
Merged

ci(doc-drift): bump Node to 22 and scope gh calls to repo#102
oshorefueled merged 1 commit into
mainfrom
fix/doc-drift-node-version

Conversation

@oshorefueled

@oshorefueled oshorefueled commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Summary

The doc drift workflow crashed on its first post-merge run. Pi 0.79.6 requires Node ≥22.19.0, but the workflow set up Node 20, so Pi threw TypeError: webidl.util.markAsUncloneable is not a function from undici and exited before running. A second failure followed: the gh pr comment calls infer the repo from the current directory's git remote, but the workspace root isn't a git checkout after main and pr are cloned into subdirectories, so the failure-comment step errored with fatal: not a git repository.

What this PR covers

  • Bumps node-version from 20 to 22 so Pi meets its engine requirement.
  • Adds --repo to every gh pr diff and gh pr comment call so they resolve the repository explicitly instead of relying on the working directory.

How to test / verify

  • Comment /check-docs on a PR. The Show Pi version step should print the version and the run should proceed to the drift check.

Summary by CodeRabbit

  • Chores
    • Updated documentation drift checks to run on Node.js 22.
    • Improved pull request reporting reliability by explicitly targeting the repository when retrieving changes and posting results.
    • Enhanced failure notifications for documentation drift checks.

- Bump setup-node from Node 20 to Node 22 so Pi 0.79.6 meets its
  engine requirement (>=22.19.0); under Node 20, Pi crashed at startup
  with a TypeError in undici's CacheStorage
- Pass --repo to every gh pr diff and gh pr comment invocation so the
  calls do not depend on the workspace root being a git checkout,
  which it is not after main and PR are cloned into subdirectories
@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The documentation drift workflow now runs on Node.js 22 and passes the current repository explicitly to GitHub CLI commands that fetch pull request diffs and post comments.

Changes

Documentation drift workflow

Layer / File(s) Summary
Node.js runtime update
.github/workflows/doc-drift.yml
Changes the workflow’s Node.js runtime from version 20 to 22.
Repository-scoped pull request commands
.github/workflows/doc-drift.yml
Adds explicit repository targeting to pull request diff retrieval and success or failure comment commands.

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

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers summary, intent, and verification, but it omits the required Branch Target section from the template. Add the Branch Target section and check the correct target branch (release-docs or main), then confirm verification was performed.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the workflow update: Node 22 bump and explicit repo scoping for gh commands.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/doc-drift-node-version

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.

@oshorefueled
oshorefueled merged commit 8a0faad into main Jul 16, 2026
2 of 3 checks passed

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/doc-drift.yml:
- Line 111: Update the Node.js version pin in
tests/workflows/docs-drift-test.yml from 20 to 22 so the manual
documentation-drift workflow matches the runtime configured in the doc-drift
workflow.
🪄 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: ed4c5c99-283d-4c9e-abc5-d7ba572cdbc5

📥 Commits

Reviewing files that changed from the base of the PR and between ec39c67 and c721741.

📒 Files selected for processing (1)
  • .github/workflows/doc-drift.yml

uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
with:
node-version: '20'
node-version: '22'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify all doc-drift workflows use the same Node.js major version.
rg -n -C2 "node-version|pi-coding-agent@0\.79\.6" .github/workflows tests/workflows

Repository: TRocket-Labs/vectorlint

Length of output: 1758


🏁 Script executed:

#!/bin/bash
sed -n '1,120p' tests/workflows/docs-drift-test.yml | cat -n

Repository: TRocket-Labs/vectorlint

Length of output: 3911


Update tests/workflows/docs-drift-test.yml to Node.js 22. tests/workflows/docs-drift-test.yml still pins Node.js 20, so the manual doc-drift path runs on a different runtime than .github/workflows/doc-drift.yml.

🤖 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/doc-drift.yml at line 111, Update the Node.js version pin
in tests/workflows/docs-drift-test.yml from 20 to 22 so the manual
documentation-drift workflow matches the runtime configured in the doc-drift
workflow.

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