ci(doc-drift): bump Node to 22 and scope gh calls to repo#102
Conversation
- 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
📝 WalkthroughWalkthroughThe 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. ChangesDocumentation drift workflow
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
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/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
📒 Files selected for processing (1)
.github/workflows/doc-drift.yml
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 | ||
| with: | ||
| node-version: '20' | ||
| node-version: '22' |
There was a problem hiding this comment.
🩺 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/workflowsRepository: TRocket-Labs/vectorlint
Length of output: 1758
🏁 Script executed:
#!/bin/bash
sed -n '1,120p' tests/workflows/docs-drift-test.yml | cat -nRepository: 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.
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 functionfrom undici and exited before running. A second failure followed: thegh pr commentcalls infer the repo from the current directory's git remote, but the workspace root isn't a git checkout aftermainandprare cloned into subdirectories, so the failure-comment step errored withfatal: not a git repository.What this PR covers
node-versionfrom 20 to 22 so Pi meets its engine requirement.--repoto everygh pr diffandgh pr commentcall so they resolve the repository explicitly instead of relying on the working directory.How to test / verify
/check-docson a PR. TheShow Pi versionstep should print the version and the run should proceed to the drift check.Summary by CodeRabbit