Repository navigation
Conversation
Reviewer's GuideThe PR enforces the retention operator’s independent Node 22.19.0+ runtime contract at the earliest CLI entry point, documents the behavior without changing the application Node engine or CI matrix, and adds cross-matrix in-process and subprocess regressions proving both rejection safety and unchanged supported-runtime behavior. Sequence diagram for retention runtime enforcementsequenceDiagram
participant CLI
participant main
participant Runtime as assertRuntime
participant Mode as parseMode
participant Source as assertTrustedSource
participant Runner as apply.mjs
CLI->>main: main(argv, deps, io)
main->>Runtime: assertRuntime()
alt runtime is unsupported or malformed
Runtime-->>main: stop(runtime-mismatch)
main-->>CLI: runtime-mismatch
else Node 22.19.0+ runtime
Runtime-->>main: return
main->>Mode: parseMode(argv)
opt reconcile mode
main->>Source: assertTrustedSource(deps)
end
main->>Runner: import('./apply.mjs')
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
🤖 CodeAnt AI — Review Status
|
Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🏁 CodeAnt Quality Gate ResultsCommit: ✅ Overall Status: PASSEDQuality Gate Details
|
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. Next included review available in 45 minutes. View limit details
📝 Walkthrough
Priority: ⬇️ Low Merge Risk: 🔵 Low · up to
|
There was a problem hiding this comment.
Hey - I've found 2 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="tests/unit/tooling/vercelRetentionRuntime.test.mjs" line_range="109-110" />
<code_context>
+}
+
+test('the actual matrix runtime refuses before tools, locks and runner imports', () => {
+ const supported = /^22\./.test(process.versions.node);
+ const argv = supported ? ['--execute'] : ['reconcile'];
+ const stderr = guardedChild(argv);
+ assert.ok(
</code_context>
<issue_to_address>
**Supported Node 22 checks fail**
When the test suite runs under Node 22.0.0 through 22.18.x, the test `the actual matrix runtime refuses before tools, locks and runner imports` treats every Node 22 version as supported and expects `invalid-arguments`; on Node 22.18 or earlier, the correct runtime guard returns `runtime-mismatch`, so this test fails.
Determine support using the full 22.19.0 minimum, or derive the expected reason by calling `assertRuntime` with the current version.
</issue_to_address>
### Comment 2
<location path="tests/unit/tooling/vercelRetentionRuntime.test.mjs" line_range="102-103" />
<code_context>
+ lines.find((line) => line.startsWith('RETENTION_SUMMARY ')).slice(18),
+ );
+ assert.equal(summary.stop, null);
+ assert.equal(summary.writeAttempts, mode === 'dry-run' ? 0 : world.writes.length);
+ assert.equal(world.released, mode === 'dry-run' ? 0 : 1);
+ assert.ok(world.calls.some((call) => call.startsWith('vercel api')));
+ });
</code_context>
<issue_to_address>
**No-op reconcile passes runtime test**
When the reconcile implementation skips all retirement writes but still completes its provider reads and post-proof without stopping, the test `reconcile accepts supported runtime with mocked provider and unchanged source checks` only compares `summary.writeAttempts` with `world.writes.length`; if reconcile stops performing writes, both are zero, and the remaining assertions still pass, so the test reports success for a no-op reconcile.
For reconcile mode, assert a positive expected write count and verify the expected deployment IDs were written.
</issue_to_address>Sourcery assessment
Approval pending. 2 findings to address first.
Blocking findings: tests/unit/tooling/vercelRetentionRuntime.test.mjs:110, tests/unit/tooling/vercelRetentionRuntime.test.mjs:103
CodeAnt PR Risk: Low Risk
Assessed commit: |
There was a problem hiding this comment.
🧹 Nitpick comments: 1
tests/unit/tooling/vercelRetentionRuntime.test.mjs: 1
76-90: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winAdd an invalid-argument case for rejected runtimes.
The rejected-runtime cases pass valid modes. If argument parsing moves before the runtime check, these cases can still report
runtime-mismatchand pass. The existing invalid-argument case runs only on a supported runtime, so it does not detect this ordering regression.Suggested fix
+test('rejects unsupported runtimes before argument parsing', () => { + for (const version of [ + '24.18.0', + '20.19.0', + '21.9.0', + '23.0.0', + '22.18.9', + 'private-invalid-value', + ]) { + const stderr = guardedChild(['--execute'], version); + assert.match(stderr, /RETENTION_STOP: runtime-mismatch/); + assert.ok(!stderr.includes('invalid-arguments')); + } +});
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository: qnbs/WorldScript-Studio/.coderabbit.yaml
- Review profile: CHILL
- Plan: Essentials
- Run ID:
048d883d-a23e-4215-b383-75ebb013460f
📒 Files selected for processing: 1
CHANGELOG.md
Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 2 reviews per hour.
There was a problem hiding this comment.
Gates Passed
3 Quality Gates Passed
See analysis details in CodeScene
Quality Gate Profile: The Bare Minimum
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.
Final-head status — 2026-10-17
Reviewer evidence on this head: Sourcery and CodeScene approved; CodeAnt quality gates passed; reviewer-governance check passed; both inline Sourcery threads are resolved and the paginated review/comment channels were checked. CodeRabbit's latest exact-head attempt is rate-limited ( The required Security Audit is still red: exact-head run |
User description
Summary
Evidence
ci:prepushpasses on the signed branch commit; change classification was conservativeAMBIGUOUS, so the full local admission checks ran.Merge conditions
Merge only after current required checks, the repository's three review channels, and all security checks pass on the exact PR head. This change does not remediate the existing ZIP OSV findings.
Summary by Sourcery
Require the Vercel retention operator to run on a supported Node 22 runtime before performing any retention work.
Bug Fixes:
Enhancements:
Documentation:
Tests:
Chores:
Summary by cubic
Enforces the Vercel retention operator's Node 22.19.0+ runtime requirement. The operator now validates
process.versions.nodeat entry and stops withRETENTION_STOP: runtime-mismatchon unsupported or malformed runtimes before argument handling, source checks, provider calls, runner imports, or lock acquisition, with no override.Behavior
Written for commit 19dfd02. Summary will update on new commits.
CodeAnt-AI Description
Require Node 22.19 or later for retention operations
What Changed
Impact
✅ No provider calls or locks on unsupported Node runtimes✅ Clear Node 22.19+ requirement for retention operators✅ Node 24 remains supported for the application💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.
Summary by CodeRabbit