Skip to content

Reword JS runtime-order messages (bun, deno, pnpm, npm last resort) - #1049

Merged
hyperpolymath merged 1 commit into
mainfrom
claude/js-runtime-order-message
Nov 11, 2026
Merged

hyperpolymath merged 1 commit into
mainfrom
claude/js-runtime-order-message

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Summary

Reword the JS runtime-order text in lib/rules/cicd_rules.ex (:nodejs_detected, :npx_in_workflow) and the comment in lib/rules/root_hygiene.ex so it states a preference order: bun, then deno, then pnpm; npm only as a last resort when bun, deno and pnpm are all impossible. No rule logic, patterns or severities change, and no extra toolchains are implied.

Test plan

  • Not run: no Elixir toolchain in this environment.
  • Reading the existing assertion in test/rules/cicd_rules_rescript_npm_js_test.exs, it should still hold ("use Bun", no "use Deno", "JS-RUNTIME-POLICY" all remain in the message). Only a comment in that test changed.
  • CI should confirm.

Open question for the owner

The previous text said "Deno banned 2026-09-22". This PR follows the newer order in the hand-off brief, which lists deno second. Please confirm the Deno ruling has changed. .machine_readable/MUST.contractile still says "Deno only", and the README/docs were not touched.


Generated by Claude Code

State the JS runtime order as a preference (bun, then deno, then pnpm;
npm only when bun, deno and pnpm are all impossible) instead of saying
npm/Deno are banned. Message text and comments only; no rule logic changed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0136P7ZpE5cb1MCPbmPbDjHg
@coderabbitai

coderabbitai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Caution

Review failed

The pull request is closed.

Summary

Summary by CodeRabbit

  • Documentation
    • Updated the guidance for JavaScript tooling to prefer Bun, then Deno, then pnpm. npm is described as a last resort when those options are not possible.
    • Updated related CI guidance and test descriptions to reflect this preference order.

The JavaScript runtime policy comments and rule reasons now list Bun, Deno and pnpm in preference order. They describe npm as a last resort when those options are impossible. A related test comment now reflects the same order.

Changes: JavaScript runtime policy

Layer / File(s) Summary
Align runtime policy wording
lib/rules/cicd_rules.ex, lib/rules/root_hygiene.ex, test/rules/cicd_rules_rescript_npm_js_test.exs
Policy comments, rule reasons and test commentary now state the Bun, Deno, pnpm preference order and npm as a last resort when those options are impossible.

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

Change: Other

Suggested reviewers: claude

Merge Risk: Low · up to b7a0e

npm-only CI workflows receive an unavailable remedy, but the finding can be suppressed. The change is mergeable with this bounded issue acknowledged.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@sonarqubecloud

Copy link
Copy Markdown

@hyperpolymath
hyperpolymath marked this pull request as ready for review November 11, 2026 01:12
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-11T01:15:08.554111Z b7a0e8b Draft marked ready
🔒 Security Review ❌ Failed 2026-11-11T01:12:50.709313Z
We couldn’t complete this review. Comment @codex security review to try again.
b7a0e8b Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

This security review couldn’t start because the paying account has exhausted its Codex allowance and has insufficient available credits. The payer can check their balance and add credits in the Codex usage dashboard, then try again. If you do not manage the paying account, contact this repository's admins.

@hyperpolymath
hyperpolymath merged commit 4797c1b into main Nov 11, 2026
78 of 79 checks passed
@hyperpolymath
hyperpolymath deleted the claude/js-runtime-order-message branch November 11, 2026 01:13

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b7a0e8b163

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread lib/rules/cicd_rules.ex
glob: "package-lock.json",
reason:
"npm lockfile banned -- use Bun (`bun install`, bun.lock; JS runtime order Bun > pnpm > npm, Deno banned 2026-09-22, standards docs/JS-RUNTIME-POLICY.adoc)",
"npm lockfile not permitted here -- use Bun (`bun install`, bun.lock). JS runtime preference order: bun, then deno, then pnpm; npm only as a last resort when bun, deno and pnpm are all impossible (standards docs/JS-RUNTIME-POLICY.adoc)",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Do not advertise a fallback that the rule rejects

When bun, deno, and pnpm are all impossible, this diagnostic now tells the user that npm is an acceptable last resort, but check_commit_blocks/1 still unconditionally reports :nodejs_detected for any package-lock.json outside the fixed path allowlist; root hygiene also marks the lockfile high-severity/delete, and the similarly changed :npx_in_workflow rule still reports npm use. Thus following the new fallback guidance cannot make the scan pass. Either add an explicit last-resort exemption mechanism and explain it here, or avoid describing npm as usable.

Useful? React with 👍 / 👎.

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.

3 participants