Skip to content

Publish prebuilt CLI binaries#259

Merged
eluce2 merged 5 commits into
mainfrom
feature/cli-prebuilt-binaries
May 12, 2026
Merged

Publish prebuilt CLI binaries#259
eluce2 merged 5 commits into
mainfrom
feature/cli-prebuilt-binaries

Conversation

@eluce2
Copy link
Copy Markdown
Collaborator

@eluce2 eluce2 commented May 12, 2026

Summary

  • add prebuilt Bun CLI binaries for macOS, Linux, and Windows
  • switch proofkit entrypoint to a CJS launcher with native-binary fallback
  • generate package version constants at build time and remove install-time runtime deps from @proofkit/cli
  • update release workflow, tests, and template route typings for the new packaging layout

Testing

  • Not run
  • pnpm run ci not run
  • binary build scripts not run locally

Summary by CodeRabbit

  • New Features

    • Prebuilt platform-specific CLI binaries are published and used when available, with automatic fallback to the local CLI.
  • Improvements

    • Install-time runtime dependencies removed so npx / pnpm dlx flows avoid dependency build approvals.
    • Project initialization now emits a pnpm workspace with explicit trust/policy defaults.
    • CI workflows pin a specific Bun runtime for more deterministic builds.
  • Tests

    • Integration and smoke tests updated to exercise the published CLI entrypoint.

Review Change Stack

- add Bun-built platform binaries
- remove install-time runtime deps
- update release and tests for bin entry
@vercel
Copy link
Copy Markdown

vercel Bot commented May 12, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
proofkit-docs Ready Ready Preview, Comment May 12, 2026 7:49pm

Request Review

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 12, 2026

🦋 Changeset detected

Latest commit: 99460b8

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@proofkit/cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 12, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 9542f285-311e-401b-a7dd-9aa827ed690e

📥 Commits

Reviewing files that changed from the base of the PR and between c91bacd and 99460b8.

📒 Files selected for processing (2)
  • .github/workflows/release.yml
  • packages/cli/scripts/build-binaries.mjs

📝 Walkthrough

Walkthrough

Publishes prebuilt platform-specific CLI binaries with a Node selector entrypoint, generates version constants at build time, adds Bun-based binary build scripts, replaces an external package-sort dependency with a local utility, updates pnpm workspace output and init bootstrap, updates templates/tests to use local artifacts, and adds Bun setup to CI workflows.

Changes

CLI Binary Distribution Infrastructure

Layer / File(s) Summary
Platform-specific binary selector entrypoint
packages/cli/bin/proofkit.cjs
Selector script maps platform/arch to bundled binaries, runs the native binary via spawnSync with PROOFKIT_PKG_ROOT, falls back to dist/index.js under Node, or errors when no runnable artifact exists.
Binary build scripts and orchestration
packages/cli/scripts/build-binaries.mjs, packages/cli/scripts/build-current-binary.mjs
Bun-based build scripts produce per-platform binaries under packages/cli/bin, support target filtering, clean prior outputs (preserving selector), and set executable permissions; helper builds current platform target.
Version constant generation and runtime wiring
packages/cli/scripts/write-cli-version.mjs, packages/cli/src/generated/*, packages/cli/src/utils/getProofKitVersion.ts, packages/cli/src/index.ts, packages/cli/src/consts.ts
A script reads sibling package.json versions and writes src/generated/package-versions.ts; runtime code imports generated constants (e.g., CLI_VERSION), narrows fs imports, and PKG_ROOT supports an env override.
Package wiring, build scripts, and CI changes
packages/cli/package.json, packages/cli/tsdown.config.ts, .gitignore, .github/workflows/*, .changeset/*
Package metadata now exposes bin/proofkit.cjs, includes bin/ in published files, runs version generation before builds, adds binary build steps, removes sort-package-json, simplifies tsdown config, ignores generated binaries (except selector), and adds Bun setup to CI workflows.
Local sort utility and imports
packages/cli/src/utils/sortPackageJson.ts, packages/cli/src/core/executeInitPlan.ts, packages/cli/src/utils/addPackageDependency.ts
Introduces sortPackageJson for deterministic package.json ordering and replaces imports of the external sort-package-json with the local utility.
pnpm workspace generation and policy changes
packages/cli/src/core/planInit.ts, packages/cli/tests/*
Removes dynamic PNPM build policy and emits a hardcoded pnpm-workspace.yaml containing packages: and trust/policy fields (trustPolicy, trustPolicyIgnoreAfter, blockExoticSubdeps); tests updated accordingly.
ExecuteInitPlan bootstrap change and tests
packages/cli/src/core/executeInitPlan.ts, packages/cli/tests/executor.test.ts
Adds pnpm self-update 11 before pnpm install in init bootstrap; executor tests updated to expect the new sequence and to adjust install-failure assertions.
Test entrypoint updates and jsonc-parser ESM imports
packages/cli/tests/*, packages/cli/src/*
All CLI tests now invoke bin/proofkit.cjs; several modules and tests switch jsonc-parser imports to jsonc-parser/lib/esm/main.js; planner/init scaffold tests updated for pnpm workspace assertions.
Template route type extraction and imports
packages/cli/template/nextjs-shadcn/src/app/proofkit-route.ts, packages/cli/template/nextjs-shadcn/src/app/navigation.tsx, packages/cli/template/nextjs-shadcn/src/components/AppShell/internal/HeaderNavLink.tsx
Adds local ProofKitRoute types and updates template modules to import them locally instead of from @proofkit/cli.

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs:

  • proofsh/proofkit#224: Touches CLI packaging and src/consts.ts, overlapping packaging/version changes.
  • proofsh/proofkit#225: Modifies packages/cli/src/consts.ts and other CLI constants, related to runtime wiring.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ 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%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title 'Publish prebuilt CLI binaries' directly summarizes the main change: adding and publishing prebuilt Bun CLI binaries to eliminate install-time dependencies.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/cli-prebuilt-binaries

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

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🤖 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/release.yml:
- Around line 159-162: The workflow currently pins Bun via the "Setup Bun" step
using oven-sh/setup-bun@v2 with bun-version: 1.3.11; update the bun-version
input to the latest release (e.g., 1.3.13) or add a comment/documentation in the
workflow explaining why bun-version: 1.3.11 must remain pinned for compatibility
with your build/test steps so reviewers know the pin is intentional.

In `@packages/cli/package.json`:
- Around line 43-45: The script write-cli-version.mjs writes package-versions.ts
with fs.writeFileSync without ensuring the parent folder exists, causing ENOENT
when src/generated is missing; fix by creating the output directory before
writing—call fs.mkdirSync(path.dirname(outputPath), { recursive: true }) (or
equivalent) just before the existing fs.writeFileSync(...) in
write-cli-version.mjs so the src/generated directory is created when needed.

In `@packages/cli/scripts/build-binaries.mjs`:
- Around line 20-25: The script currently parses PROOFKIT_BINARY_TARGETS into
selectedTargets (const selectedTargets = new Set(...)) but proceeds to build
even if that set is empty; update the code right after selectedTargets is
created (and similarly after the target-filtering logic around the loop between
lines ~35-72) to detect when selectedTargets.size === 0 and immediately log a
clear error including the provided PROOFKIT_BINARY_TARGETS value and available
valid targets, then exit non‑zero (e.g., process.exit(1)) so the build fails
fast when no valid binary targets were specified.

In `@packages/cli/scripts/write-cli-version.mjs`:
- Around line 12-26: The write-to-file can fail with ENOENT because the target
directory for outputPath isn't created; before calling writeFileSync(outputPath,
...), ensure the directory exists by creating the directory returned from
path.dirname(outputPath) (using fs.mkdirSync or fs.promises.mkdir with {
recursive: true } or your project's ensureDir helper), so that writeFileSync in
the script (packages/cli/scripts/write-cli-version.mjs) always has an existing
src/generated folder to write the generated package-versions.ts file into.
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 3ea25848-c22f-4bde-9778-69176805a3de

📥 Commits

Reviewing files that changed from the base of the PR and between 1ace20e and 16a0542.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (22)
  • .changeset/ninety-pets-argue.md
  • .github/workflows/release.yml
  • packages/cli/bin/proofkit.cjs
  • packages/cli/package.json
  • packages/cli/scripts/build-binaries.mjs
  • packages/cli/scripts/build-current-binary.mjs
  • packages/cli/scripts/write-cli-version.mjs
  • packages/cli/src/consts.ts
  • packages/cli/src/core/executeInitPlan.ts
  • packages/cli/src/index.ts
  • packages/cli/src/utils/addPackageDependency.ts
  • packages/cli/src/utils/getProofKitVersion.ts
  • packages/cli/src/utils/sortPackageJson.ts
  • packages/cli/template/nextjs-shadcn/src/app/navigation.tsx
  • packages/cli/template/nextjs-shadcn/src/app/proofkit-route.ts
  • packages/cli/template/nextjs-shadcn/src/components/AppShell/internal/HeaderNavLink.tsx
  • packages/cli/tests/browser-apps.smoke.test.ts
  • packages/cli/tests/cli.test.ts
  • packages/cli/tests/init-non-interactive-failures.test.ts
  • packages/cli/tests/init-scaffold-contract.test.ts
  • packages/cli/tests/webviewer-apps.test.ts
  • packages/cli/tsdown.config.ts
💤 Files with no reviewable changes (1)
  • packages/cli/tsdown.config.ts

Comment thread .github/workflows/release.yml
Comment thread packages/cli/package.json
Comment thread packages/cli/scripts/build-binaries.mjs
Comment thread packages/cli/scripts/write-cli-version.mjs
- honor `PROOFKIT_DISABLE_BUNDLED_BINARY`
- switch `jsonc-parser` imports to ESM path
- create CLI version dir before write
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

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 `@packages/cli/bin/proofkit.cjs`:
- Around line 23-40: The run() wrapper currently throws on spawn errors and
turns signal-terminated children into exit code 1; instead, when spawnSync
returns result.error, do not throw—return/propagate a failure value so the JS
fallback can run (update callers that expect a boolean or use its return). Also,
if result.signal is set, re-emit that signal against the current process (e.g.,
process.kill(process.pid, result.signal)) to preserve signal semantics;
otherwise if typeof result.status === "number" call process.exit(result.status).
Update the logic used around spawnSync/result.error and the handling of
result.signal and result.status in run() (and the duplicate block at the other
occurrence).
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 4387c6b6-d9d5-4e1f-9319-f08365f67a7b

📥 Commits

Reviewing files that changed from the base of the PR and between 16a0542 and a3f96b3.

📒 Files selected for processing (8)
  • .gitignore
  • packages/cli/bin/proofkit.cjs
  • packages/cli/package.json
  • packages/cli/scripts/write-cli-version.mjs
  • packages/cli/src/core/doctor.ts
  • packages/cli/src/generators/fmdapi.ts
  • packages/cli/src/utils/projectFiles.ts
  • packages/cli/tests/init-scaffold-contract.test.ts
✅ Files skipped from review due to trivial changes (2)
  • packages/cli/src/utils/projectFiles.ts
  • .gitignore
🚧 Files skipped from review as they are similar to previous changes (2)
  • packages/cli/tests/init-scaffold-contract.test.ts
  • packages/cli/package.json

Comment on lines +23 to +40
function run(command, args) {
const result = spawnSync(command, args, {
stdio: "inherit",
env: {
...process.env,
PROOFKIT_PKG_ROOT: path.resolve(__dirname, ".."),
},
});

if (result.error) {
throw result.error;
}

if (typeof result.status === "number") {
process.exit(result.status);
}

process.exit(1);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Preserve fallback on spawn errors and propagate child signals.

run() currently throws on spawn errors, so a present-but-unexecutable bundled binary prevents reaching the JS fallback. Also, signal-terminated child processes are converted to exit code 1 instead of preserving signal semantics.

Suggested patch
 function run(command, args) {
   const result = spawnSync(command, args, {
     stdio: "inherit",
     env: {
       ...process.env,
       PROOFKIT_PKG_ROOT: path.resolve(__dirname, ".."),
     },
   });
 
   if (result.error) {
     throw result.error;
   }
 
   if (typeof result.status === "number") {
     process.exit(result.status);
   }
+
+  if (result.signal) {
+    process.kill(process.pid, result.signal);
+    return;
+  }
 
   process.exit(1);
 }
 
 if (process.env.PROOFKIT_DISABLE_BUNDLED_BINARY !== "1") {
   const binaryName = BINARIES[process.platform]?.[process.arch];
   if (binaryName) {
     const binaryPath = path.join(__dirname, binaryName);
     if (existsSync(binaryPath)) {
-      run(binaryPath, process.argv.slice(2));
+      try {
+        run(binaryPath, process.argv.slice(2));
+      } catch (error) {
+        if (!["EACCES", "ENOENT", "ENOEXEC"].includes(error?.code)) {
+          throw error;
+        }
+      }
     }
   }
 }

Also applies to: 47-49

🤖 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 `@packages/cli/bin/proofkit.cjs` around lines 23 - 40, The run() wrapper
currently throws on spawn errors and turns signal-terminated children into exit
code 1; instead, when spawnSync returns result.error, do not
throw—return/propagate a failure value so the JS fallback can run (update
callers that expect a boolean or use its return). Also, if result.signal is set,
re-emit that signal against the current process (e.g., process.kill(process.pid,
result.signal)) to preserve signal semantics; otherwise if typeof result.status
=== "number" call process.exit(result.status). Update the logic used around
spawnSync/result.error and the handling of result.signal and result.status in
run() (and the duplicate block at the other occurrence).

- add Bun 1.3.11 to continuous and tagged release jobs
- keep release installs aligned for prebuilt binary publishing
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 12, 2026

Open in StackBlitz

@proofkit/better-auth

pnpm add https://pkg.pr.new/proofsh/proofkit/@proofkit/better-auth@259

@proofkit/cli

pnpm add https://pkg.pr.new/proofsh/proofkit/@proofkit/cli@259

create-proofkit

pnpm add https://pkg.pr.new/proofsh/proofkit/create-proofkit@259

@proofkit/fmdapi

pnpm add https://pkg.pr.new/proofsh/proofkit/@proofkit/fmdapi@259

@proofkit/fmodata

pnpm add https://pkg.pr.new/proofsh/proofkit/@proofkit/fmodata@259

@proofkit/typegen

pnpm add https://pkg.pr.new/proofsh/proofkit/@proofkit/typegen@259

@proofkit/webviewer

pnpm add https://pkg.pr.new/proofsh/proofkit/@proofkit/webviewer@259

commit: 99460b8

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

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/release.yml:
- Around line 82-86: The workflow currently uses the mutable action reference
"uses: oven-sh/setup-bun@v2" in the "Setup Bun" step; replace that mutable tag
with the action's immutable commit SHA (e.g.,
oven-sh/setup-bun@<full-commit-sha>) in both occurrences of the "Setup Bun" step
so the release job pins to a specific commit instead of `@v2`.
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 194cde64-18d6-4e60-9bfb-bdf455f56b32

📥 Commits

Reviewing files that changed from the base of the PR and between a3f96b3 and 46e9f96.

📒 Files selected for processing (2)
  • .github/workflows/continuous-release.yml
  • .github/workflows/release.yml

Comment on lines +82 to +86
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.11

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify that Bun setup action refs are pinned to 40-char commit SHAs.
rg -nP --glob '.github/workflows/*.yml' 'uses:\s*oven-sh/setup-bun@(?![0-9a-f]{40}\b).+'

Repository: proofsh/proofkit

Length of output: 209


🏁 Script executed:

# Find workflow files in the repository
fd -e yml -e yaml . .github/workflows/ 2>/dev/null || echo "Directory may not exist, checking alternatives"

# Also check if .github directory exists
ls -la .github/ 2>/dev/null || echo ".github directory not found"

# List all files in .github if it exists
find .github -type f 2>/dev/null | head -20

Repository: proofsh/proofkit

Length of output: 590


🏁 Script executed:

# Check the content of release.yml to see lines around 82-86 and 164-168
wc -l .github/workflows/release.yml

# Read lines 75-95 to see context around line 82-86
echo "=== Lines 75-95 (context for 82-86) ==="
sed -n '75,95p' .github/workflows/release.yml

# Read lines 155-175 to see context around line 164-168
echo ""
echo "=== Lines 155-175 (context for 164-168) ==="
sed -n '155,175p' .github/workflows/release.yml

# Search for all oven-sh/setup-bun references
echo ""
echo "=== All oven-sh/setup-bun references ==="
rg -n 'oven-sh/setup-bun' .github/workflows/release.yml

Repository: proofsh/proofkit

Length of output: 1314


🏁 Script executed:

# Search for any existing commit SHAs in the workflow file that might give us a pattern
rg -n 'uses:.*@[0-9a-f]{40}' .github/workflows/release.yml

# Check if there are any other GitHub actions pinned to commit SHAs in this file
rg -n 'uses:.*@[0-9a-f]{8,40}' .github/workflows/release.yml

# Look at other actions in the file to see the pinning pattern used
rg -n 'uses:' .github/workflows/release.yml | head -20

Repository: proofsh/proofkit

Length of output: 637


🏁 Script executed:

# Let me check if there's a way to find the commit SHA for oven-sh/setup-bun@v2
# First, let's see if there's any documentation or other files that might reference it
rg -i 'oven-sh/setup-bun' . --type md --type txt 2>/dev/null | head -10

# Check if there are any comments or notes about commit SHAs in the repo
rg -i 'commit.*sha|pin.*commit' .github/workflows/ 2>/dev/null | head -10

Repository: proofsh/proofkit

Length of output: 42


Pin oven-sh/setup-bun to a full commit SHA in both jobs.

Using @v2 is mutable and weakens release-pipeline supply-chain guarantees. Pin these references to immutable commit SHAs at lines 83 and 165.

Example change
-        uses: oven-sh/setup-bun@v2
+        uses: oven-sh/setup-bun@<full_commit_sha_for_v2>
🤖 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/release.yml around lines 82 - 86, The workflow currently
uses the mutable action reference "uses: oven-sh/setup-bun@v2" in the "Setup
Bun" step; replace that mutable tag with the action's immutable commit SHA
(e.g., oven-sh/setup-bun@<full-commit-sha>) in both occurrences of the "Setup
Bun" step so the release job pins to a specific commit instead of `@v2`.

- write new pnpm-workspace trust policy
- self-update pnpm before install
- adjust init tests
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
packages/cli/src/core/planInit.ts (1)

24-34: ⚡ Quick win

Extract policy literals into named constants

Line 32 introduces a magic number (43200). Pull policy values into named constants so intent is clearer and future updates are safer.

Suggested refactor
+const PNPM_TRUST_POLICY = "no-downgrade";
+const PNPM_TRUST_POLICY_IGNORE_AFTER = 43_200;
+const PNPM_BLOCK_EXOTIC_SUBDEPS = true;
+
-function createPnpmWorkspaceFileContent() {
+function createPnpmWorkspaceFileContent(): string {
   return [
@@
-    "trustPolicy: no-downgrade",
+    `trustPolicy: ${PNPM_TRUST_POLICY}`,
@@
-    "trustPolicyIgnoreAfter: 43200",
+    `trustPolicyIgnoreAfter: ${PNPM_TRUST_POLICY_IGNORE_AFTER}`,
@@
-    "blockExoticSubdeps: true",
+    `blockExoticSubdeps: ${PNPM_BLOCK_EXOTIC_SUBDEPS}`,

As per coding guidelines, "Use meaningful variable names instead of magic numbers - extract constants with descriptive names".

🤖 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 `@packages/cli/src/core/planInit.ts` around lines 24 - 34, The
trustPolicyIgnoreAfter literal (43200) in createPnpmWorkspaceFileContent should
be extracted to a well-named constant (e.g., TRUST_POLICY_IGNORE_AFTER_SECONDS
or DEFAULT_TRUST_POLICY_IGNORE_AFTER_HOURS) declared at the top of the module;
replace the inline magic number in the trustPolicyIgnoreAfter line with that
constant name so the intent is clear and future changes are centralized. Ensure
the constant name reflects the unit (seconds/hours) and update any related
comments or tests if present.
🤖 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 `@packages/cli/src/core/planInit.ts`:
- Line 26: The generated workspace comment string contains typos and awkward
phrasing; update the string that currently reads "\"# This setting defines where
in the repo your apps/packages that need installed dependancies exist. This of
this as a list of paths to your package.json files. \"" to a clear, user-facing
sentence such as "\"# This setting defines where in the repo your apps/packages
that need installed dependencies exist. Think of this as a list of paths to your
package.json files.\"", fixing "dependancies" → "dependencies" and "This of
this" → "Think of this".

---

Nitpick comments:
In `@packages/cli/src/core/planInit.ts`:
- Around line 24-34: The trustPolicyIgnoreAfter literal (43200) in
createPnpmWorkspaceFileContent should be extracted to a well-named constant
(e.g., TRUST_POLICY_IGNORE_AFTER_SECONDS or
DEFAULT_TRUST_POLICY_IGNORE_AFTER_HOURS) declared at the top of the module;
replace the inline magic number in the trustPolicyIgnoreAfter line with that
constant name so the intent is clear and future changes are centralized. Ensure
the constant name reflects the unit (seconds/hours) and update any related
comments or tests if present.
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 7e02c07a-6f67-4eaf-9696-0ced05add7da

📥 Commits

Reviewing files that changed from the base of the PR and between 46e9f96 and c91bacd.

📒 Files selected for processing (5)
  • packages/cli/src/core/executeInitPlan.ts
  • packages/cli/src/core/planInit.ts
  • packages/cli/tests/executor.test.ts
  • packages/cli/tests/init-scaffold-contract.test.ts
  • packages/cli/tests/planner.test.ts
✅ Files skipped from review due to trivial changes (1)
  • packages/cli/tests/planner.test.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • packages/cli/tests/init-scaffold-contract.test.ts
  • packages/cli/src/core/executeInitPlan.ts

return [
"allowBuilds:",
...Object.entries(policy).map(([packageName, allowed]) => ` ${JSON.stringify(packageName)}: ${allowed}`),
"# This setting defines where in the repo your apps/packages that need installed dependancies exist. This of this as a list of paths to your package.json files. ",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Fix typo/grammar in generated workspace comment

Line 26 has user-facing wording issues (dependancies, This of this). Since this is scaffolded into new projects, it’s worth cleaning up.

Suggested patch
-    "# This setting defines where in the repo your apps/packages that need installed dependancies exist. This of this as a list of paths to your package.json files. ",
+    "# This setting defines where in the repo your apps/packages with installable dependencies exist. Think of this as a list of paths to your package.json files.",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"# This setting defines where in the repo your apps/packages that need installed dependancies exist. This of this as a list of paths to your package.json files. ",
"# This setting defines where in the repo your apps/packages with installable dependencies exist. Think of this as a list of paths to your package.json files.",
🤖 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 `@packages/cli/src/core/planInit.ts` at line 26, The generated workspace
comment string contains typos and awkward phrasing; update the string that
currently reads "\"# This setting defines where in the repo your apps/packages
that need installed dependancies exist. This of this as a list of paths to your
package.json files. \"" to a clear, user-facing sentence such as "\"# This
setting defines where in the repo your apps/packages that need installed
dependencies exist. Think of this as a list of paths to your package.json
files.\"", fixing "dependancies" → "dependencies" and "This of this" → "Think of
this".

- fail fast on invalid PROOFKIT_BINARY_TARGETS
- skip empty builds and update Bun version in release workflow
@eluce2 eluce2 merged commit de47a64 into main May 12, 2026
13 of 14 checks passed
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