build: migrate package tooling to nushell and node test#1306
Conversation
Replace the Bun ensure-native-binary script with a Nushell script that keeps the same native package fast path, portable binary validation, cargo fallback build, and version check behavior. This removes Bun as a required runtime for the package prepack native-binary check. The dev shell now provides Nushell, and the CI/release packaging jobs install nushell instead of bun for that prepack path while keeping Bun available for the remaining benchmark and fixture TypeScript scripts.
|
@coderabbitai review |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughReplaces Bun/Vitest automation with Nushell scripts and Node test runner: Nushell implementations added for native-binary staging/verification, performance comparison, large/E2E fixture generation, and PR-comment upsert; CI/workflows, package scripts, justfiles, test configs, and docs updated accordingly. ChangesNushell migration and workflow update
Estimated code review effort 🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested reviewers
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
|
@ryoppippi I have started the AI code review. It will take a few minutes to complete. |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
ccusage-guide | 107ca57 | Commit Preview URL Branch Preview URL |
Jun 13 2026, 12:23 AM |
🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Fetch PR details and diff
gh pr view 1306 --repo ccusage/ccusage --json title,body,files,additions,deletions,changedFiles
echo "---FILES---"
gh pr diff 1306 --repo ccusage/ccusageLength of output: 16779
SummaryThe Nushell port is a clean, faithful translation of the original Bun/TypeScript script. All core paths are preserved — native package fast path with portable-binary validation, version check, and cargo fallback build. Observations✅ Logic is faithfully preserved
✅ Idiomatic Nushell
🔍 Minor observations
This is consistent with the TypeScript version — the cargo fallback is used only in dev/local scenarios; CI pre-builds and downloads artifacts. No change needed, just confirming parity.
This is correct per the PR description: other TS scripts (bench, large-fixture) still use Bun APIs. VerdictThe migration is well-executed and the logic is equivalent to the original. CI/release workflow comments are updated to reflect the change. No functional issues found. ✅ Action performedReview finished.
|
There was a problem hiding this comment.
1 issue found across 6 files
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
ccusage
@ccusage/ccusage-darwin-arm64
@ccusage/ccusage-darwin-x64
@ccusage/ccusage-linux-arm64
@ccusage/ccusage-linux-x64
@ccusage/ccusage-win32-x64
commit: |
Avoid duplicating the native package platform map in the Nushell prepack check. The script now scans the native package manifests and selects the package whose os and cpu metadata match the current platform. This addresses cubic feedback about drift risk while preserving the same fast path and cargo fallback behavior.
ccusage performance comparisonPR SHA: This compares the Rust PR release binary against the configured base package on the same CI runner. Package runner startupExecution setup measures any pre-benchmark package materialization used by the execution benchmark. Bunx temp cache measures one
Cached bunx execution performanceRuns the same large fixture through Fixtures: Claude
Package runtime diagnosticsCompares the PR package wrapper, the installed native optional dependency binary, and the workspace release binary on the same large fixture. This identifies whether slow package results come from JavaScript wrapper overhead, the published native binary build, or the Rust core itself. Fixtures: Claude
Committed fixture performanceCommitted small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage. Fixtures: Claude
Large real-world-shaped fixture performanceGenerated fixtures shaped from aggregate local log statistics: thousands of JSONL files, many small sessions, and a long tail of larger sessions. No real prompts, paths, or outputs are stored in the fixtures. Fixtures: Claude
Artifact size
Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees. |
|
@cubic-dev-ai addressed your P3 drift-risk finding in 82b37b2 by deriving the native package root from the package manifests os/cpu metadata instead of keeping a separate hardcoded map in the Nushell script. Validation after the fix:
@coderabbitai review |
ccusage performance comparisonPR SHA: This compares the PR package against the configured base package on the same CI runner. Package runner startupExecution setup measures any pre-benchmark package materialization used by the execution benchmark. Bunx temp cache measures one
Cached bunx execution performanceRuns the same large fixture through Fixtures: Claude
Package runtime diagnosticsCompares the PR package wrapper, the installed native optional dependency binary, and the workspace release binary on the same large fixture. This identifies whether slow package results come from JavaScript wrapper overhead, the published native binary build, or the Rust core itself. Fixtures: Claude
Committed fixture performanceCommitted small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage. Fixtures: Claude
Large real-world-shaped fixture performanceGenerated fixtures shaped from aggregate local log statistics: thousands of JSONL files, many small sessions, and a long tail of larger sessions. No real prompts, paths, or outputs are stored in the fixtures. Fixtures: Claude
Artifact size
Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees. |
@ryoppippi I have started the AI code review. It will take a few minutes to complete. |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Get the latest diff of the PR
gh pr diff 1306 --repo ccusage/ccusageLength of output: 12950
glob ($repo_root | path join packages 'ccusage-*' package.json)
| each {|package_json_path|
let os = $package_json.os?
let cpu = $package_json.cpu?
if (list_contains $os $target_platform) and (list_contains $cpu $target_arch) { ... }
}
| where {|package_root| $package_root != null }A few things I verified:
The rest of the script is unchanged from the previous review. Everything looks good. ✅ [approve] |
ccusage performance comparisonPR SHA: This compares the PR package against the configured base package on the same CI runner. Package runner startupExecution setup measures any pre-benchmark package materialization used by the execution benchmark. Bunx temp cache measures one
Cached bunx execution performanceRuns the same large fixture through Fixtures: Claude
Package runtime diagnosticsCompares the PR package wrapper, the installed native optional dependency binary, and the workspace release binary on the same large fixture. This identifies whether slow package results come from JavaScript wrapper overhead, the published native binary build, or the Rust core itself. Fixtures: Claude
Committed fixture performanceCommitted small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage. Fixtures: Claude
Large real-world-shaped fixture performanceGenerated fixtures shaped from aggregate local log statistics: thousands of JSONL files, many small sessions, and a long tail of larger sessions. No real prompts, paths, or outputs are stored in the fixtures. Fixtures: Claude
Artifact size
Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees. |
ccusage performance comparisonPR SHA: This compares the Rust PR release binary against the configured base package on the same CI runner. Package runner startupExecution setup measures any pre-benchmark package materialization used by the execution benchmark. Bunx temp cache measures one
Cached bunx execution performanceRuns the same large fixture through Fixtures: Claude
Package runtime diagnosticsCompares the PR package wrapper, the installed native optional dependency binary, and the workspace release binary on the same large fixture. This identifies whether slow package results come from JavaScript wrapper overhead, the published native binary build, or the Rust core itself. Fixtures: Claude
Committed fixture performanceCommitted small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage. Fixtures: Claude
Large real-world-shaped fixture performanceGenerated fixtures shaped from aggregate local log statistics: thousands of JSONL files, many small sessions, and a long tail of larger sessions. No real prompts, paths, or outputs are stored in the fixtures. Fixtures: Claude
Artifact size
Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees. |
Make the native-binary check executable and let the script acquire Nushell through a Nix shebang pinned to the repository flake inputs. The package build no longer needs nushell installed into the lightweight CI or release profiles, and the dev shell does not need to add nushell just for this prepack script. The cargo fallback still works when the script is invoked from the project dev shell.
|
@coderabbitai review Pushed c4545e1 to use a Nix shebang for the Nushell script and remove nushell from the lightweight CI/release profile installs. I also checked the remaining small scripts and documented why stage-native-package.mjs should stay JS for the Windows action path. |
@ryoppippi I have started the AI code review. It will take a few minutes to complete. |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
gh pr diff 1306 --repo ccusage/ccusageLength of output: 12786
✅ Nix shebang — correct form and path#!/usr/bin/env nix
#! nix shell --inputs-from ../../.. nixpkgs#nushell --command nuThe multi-line Nix shebang is the standard form. The ✅ CI/release profile installs trimmed correctly
Nushell is no longer an explicit profile install — it's self-provisioned on first invocation through the shebang. ✅ Direct invocation in package.json
Everything is clean. The self-bootstrapping pattern is a nice quality-of-life improvement — one fewer thing to keep in sync across [approve] |
ccusage performance comparisonPR SHA: This compares the Rust PR release binary against the configured base package on the same CI runner. Package runner startupExecution setup measures any pre-benchmark package materialization used by the execution benchmark. Bunx temp cache measures one
Cached bunx execution performanceRuns the same large fixture through Fixtures: Claude
Package runtime diagnosticsCompares the PR package wrapper, the installed native optional dependency binary, and the workspace release binary on the same large fixture. This identifies whether slow package results come from JavaScript wrapper overhead, the published native binary build, or the Rust core itself. Fixtures: Claude
Committed fixture performanceCommitted small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage. Fixtures: Claude
Large real-world-shaped fixture performanceGenerated fixtures shaped from aggregate local log statistics: thousands of JSONL files, many small sessions, and a long tail of larger sessions. No real prompts, paths, or outputs are stored in the fixtures. Fixtures: Claude
Artifact size
Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees. |
ccusage performance comparisonPR SHA: This compares the PR package against the configured base package on the same CI runner. Package runner startupExecution setup measures any pre-benchmark package materialization used by the execution benchmark. Bunx temp cache measures one
Cached bunx execution performanceRuns the same large fixture through Fixtures: Claude
Package runtime diagnosticsCompares the PR package wrapper, the installed native optional dependency binary, and the workspace release binary on the same large fixture. This identifies whether slow package results come from JavaScript wrapper overhead, the published native binary build, or the Rust core itself. Fixtures: Claude
Committed fixture performanceCommitted small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage. Fixtures: Claude
Large real-world-shaped fixture performanceGenerated fixtures shaped from aggregate local log statistics: thousands of JSONL files, many small sessions, and a long tail of larger sessions. No real prompts, paths, or outputs are stored in the fixtures. Fixtures: Claude
Artifact size
Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees. |
Replace the Bun-based upsert-pr-comment helper with a Nushell script that uses gh api through a Nix shebang. The perf jobs can now update PR comments without invoking Bun for the GitHub API wrapper. The script preserves the existing update-or-create behavior and keeps 401/403 comment write failures non-fatal for restricted tokens.
|
@coderabbitai review Pushed bbe813b to replace the Bun-based performance comment upsert helper with a Nushell script that uses gh api through a Nix shebang. I also checked Nushell markdown support: to md exists, but compare-pr-performance.ts still owns too much measurement/data-processing logic to move in this PR without adding churn. |
@ryoppippi I have started the AI code review. It will take a few minutes to complete. |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
gh pr diff 1306 --repo ccusage/ccusageLength of output: 20061
✅ Nix shebang — correct path#!/usr/bin/env nix
#! nix shell --inputs-from ../.. nixpkgs#nushell nixpkgs#gh --command nu
✅ Behavior parity with the TypeScript version
✅ CI invocation updated
Everything is clean. The switch to [approve] |
ccusage performance comparisonPR SHA: This compares the Rust PR release binary against the configured base package on the same CI runner. Package runner startupExecution setup measures any pre-benchmark package materialization used by the execution benchmark. Bunx temp cache measures one
Cached bunx execution performanceRuns the same large fixture through Fixtures: Claude
Package runtime diagnosticsCompares the PR package wrapper, the installed native optional dependency binary, and the workspace release binary on the same large fixture. This identifies whether slow package results come from JavaScript wrapper overhead, the published native binary build, or the Rust core itself. Fixtures: Claude
Committed fixture performanceCommitted small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage. Fixtures: Claude
Large real-world-shaped fixture performanceGenerated fixtures shaped from aggregate local log statistics: thousands of JSONL files, many small sessions, and a long tail of larger sessions. No real prompts, paths, or outputs are stored in the fixtures. Fixtures: Claude
Artifact size
Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees. |
ccusage performance comparisonPR SHA: This compares the PR package against the configured base package on the same CI runner. Package runner startupExecution setup measures any pre-benchmark package materialization used by the execution benchmark. Bunx temp cache measures one
Cached bunx execution performanceRuns the same large fixture through Fixtures: Claude
Package runtime diagnosticsCompares the PR package wrapper, the installed native optional dependency binary, and the workspace release binary on the same large fixture. This identifies whether slow package results come from JavaScript wrapper overhead, the published native binary build, or the Rust core itself. Fixtures: Claude
Committed fixture performanceCommitted small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage. Fixtures: Claude
Large real-world-shaped fixture performanceGenerated fixtures shaped from aggregate local log statistics: thousands of JSONL files, many small sessions, and a long tail of larger sessions. No real prompts, paths, or outputs are stored in the fixtures. Fixtures: Claude
Artifact size
Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees. |
|
You're iterating quickly on this pull request. To help protect your rate limits, cubic has paused automatic reviews on new pushes for now—when you're ready for another review, comment |
ccusage performance comparisonPR SHA: This compares the Rust PR release binary against the configured base package on the same CI runner. Package runner startupExecution setup measures any pre-benchmark package materialization used by the execution benchmark. Bunx temp cache measures one
Cached bunx execution performanceRuns the same large fixture through Fixtures: Claude
Package runtime diagnosticsCompares the PR package wrapper, the installed native optional dependency binary, and the workspace release binary on the same large fixture. This identifies whether slow package results come from JavaScript wrapper overhead, the published native binary build, or the Rust core itself. Fixtures: Claude
Committed fixture performanceCommitted small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage. Fixtures: Claude
Large real-world-shaped fixture performanceGenerated fixtures shaped from aggregate local log statistics: thousands of JSONL files, many small sessions, and a long tail of larger sessions. No real prompts, paths, or outputs are stored in the fixtures. Fixtures: Claude
Artifact size
Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees. |
ccusage performance comparisonPR SHA: This compares the PR package against the configured base package on the same CI runner. Package runner startupExecution setup measures any pre-benchmark package materialization used by the execution benchmark. Bunx temp cache measures one
Cached bunx execution performanceRuns the same large fixture through Fixtures: Claude
Package runtime diagnosticsCompares the PR package wrapper, the installed native optional dependency binary, and the workspace release binary on the same large fixture. This identifies whether slow package results come from JavaScript wrapper overhead, the published native binary build, or the Rust core itself. Fixtures: Claude
Committed fixture performanceCommitted small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage. Fixtures: Claude
Large real-world-shaped fixture performanceGenerated fixtures shaped from aggregate local log statistics: thousands of JSONL files, many small sessions, and a long tail of larger sessions. No real prompts, paths, or outputs are stored in the fixtures. Fixtures: Claude
Artifact size
Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees. |
Replace the remaining Action-facing JavaScript helper scripts with Nushell shebang scripts so CI can invoke them without a workspace JS install. Keep E2E coverage by generating the preview fixture from Nushell and keep package URL materialization in compare-pr-performance on Bun because pkg.pr.new install is the remaining Bun-specific path. Remove the unused mitata bench script, drop @types/bun and the repo-local Bun API skill, and keep Bun out of the dev shell and GitHub Actions profile installs. Package execution benchmarks now run the built JS launcher with Node while package installation still runs Bun from the script shebang-provided Nix shell.
ccusage performance comparisonPR SHA: This compares the Rust PR release binary against the configured base package on the same CI runner. Package runtime diagnosticsCompares the PR package wrapper, the installed native optional dependency binary, and the workspace release binary on the same large fixture. This identifies whether slow package results come from JavaScript wrapper overhead, the published native binary build, or the Rust core itself. Fixtures: Claude
Committed fixture performanceCommitted small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage. Fixtures: Claude
Large real-world-shaped fixture performanceGenerated fixtures shaped from aggregate local log statistics: thousands of JSONL files, many small sessions, and a long tail of larger sessions. No real prompts, paths, or outputs are stored in the fixtures. Fixtures: Claude
Artifact size
Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees. |
ccusage performance comparisonPR SHA: This compares the PR package against the configured base package on the same CI runner. Package runtime diagnosticsCompares the PR package wrapper, the installed native optional dependency binary, and the workspace release binary on the same large fixture. This identifies whether slow package results come from JavaScript wrapper overhead, the published native binary build, or the Rust core itself. Fixtures: Claude
Committed fixture performanceCommitted small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage. Fixtures: Claude
Large real-world-shaped fixture performanceGenerated fixtures shaped from aggregate local log statistics: thousands of JSONL files, many small sessions, and a long tail of larger sessions. No real prompts, paths, or outputs are stored in the fixtures. Fixtures: Claude
Artifact size
Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees. |
Move the remaining TypeScript package tests to Node built-in test runner so Vitest and its transitive dependency tree can leave the workspace. Use oxlint type-aware type checking as the root typecheck entry point and remove tsgo from the dev shell. Keep hermetic Nix formatter/check paths on a lightweight oxlint config because pure Nix checks do not include npm dependencies. Refresh repo-local skills and agent guidance for Node tests and Nushell scripts.
|
@coderabbitai review |
@ryoppippi I have started the AI code review. It will take a few minutes to complete. |
|
✅ Action performedReview finished.
|
origin/main added models-dev compact tests while this branch removed Vitest. Convert those tests to node:test assertions so the PR merge commit passes oxlint type-aware checking.
ccusage performance comparisonPR SHA: This compares the Rust PR release binary against the configured base package on the same CI runner. Package runtime diagnosticsCompares the PR package wrapper, the installed native optional dependency binary, and the workspace release binary on the same large fixture. This identifies whether slow package results come from JavaScript wrapper overhead, the published native binary build, or the Rust core itself. Fixtures: Claude
Committed fixture performanceCommitted small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage. Fixtures: Claude
Large real-world-shaped fixture performanceGenerated fixtures shaped from aggregate local log statistics: thousands of JSONL files, many small sessions, and a long tail of larger sessions. No real prompts, paths, or outputs are stored in the fixtures. Fixtures: Claude
Artifact size
Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees. |
ccusage performance comparisonPR SHA: This compares the PR package against the configured base package on the same CI runner. Package runtime diagnosticsCompares the PR package wrapper, the installed native optional dependency binary, and the workspace release binary on the same large fixture. This identifies whether slow package results come from JavaScript wrapper overhead, the published native binary build, or the Rust core itself. Fixtures: Claude
Committed fixture performanceCommitted small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage. Fixtures: Claude
Large real-world-shaped fixture performanceGenerated fixtures shaped from aggregate local log statistics: thousands of JSONL files, many small sessions, and a long tail of larger sessions. No real prompts, paths, or outputs are stored in the fixtures. Fixtures: Claude
Artifact size
Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees. |
|
no API key found — this repo is configured to use To fix: add the key as a GitHub Actions secret (referenced from your workflow's Open repo secrets → · Configure model → · Setup docs → · Ask in Discord →
|
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
nix/git-hooks.nix (1)
86-90: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick winAlign oxlint invocation with the repo-wide pinned config.
Line 89 runs
oxlint .without--config nix/oxlint-check.json, whilenix/checks.nixLine 124 andnix/treefmt.nixLines 131-135 now pin that config. This can create contradictory local pre-push vs flake/treefmt lint outcomes.Suggested fix
- entry = "${lib.getExe pkgs.oxlint} ."; + entry = "${lib.getExe pkgs.oxlint} --config nix/oxlint-check.json .";🤖 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 `@nix/git-hooks.nix` around lines 86 - 90, The oxlint hook definition ccusage-oxlint-check invokes oxlint via the entry attribute but omits the pinned config; update the entry for ccusage-oxlint-check (the entry value currently referencing lib.getExe pkgs.oxlint) to include the same --config nix/oxlint-check.json flag so the hook runs oxlint with the repo-wide pinned config (i.e., change the invocation string produced by entry to call oxlint --config nix/oxlint-check.json .).
🤖 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.
Outside diff comments:
In `@nix/git-hooks.nix`:
- Around line 86-90: The oxlint hook definition ccusage-oxlint-check invokes
oxlint via the entry attribute but omits the pinned config; update the entry for
ccusage-oxlint-check (the entry value currently referencing lib.getExe
pkgs.oxlint) to include the same --config nix/oxlint-check.json flag so the hook
runs oxlint with the repo-wide pinned config (i.e., change the invocation string
produced by entry to call oxlint --config nix/oxlint-check.json .).
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 95464765-881e-4e09-b51e-c59e7e14bb92
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (65)
.agents/skills/bun-api-reference/SKILL.md.agents/skills/commit/references/revertable-commits.md.agents/skills/development/references/environment-and-validation.md.agents/skills/nushell/SKILL.md.agents/skills/profile/SKILL.md.agents/skills/profile/references/rust.md.agents/skills/profile/references/typescript.md.agents/skills/tdd/SKILL.md.agents/skills/tdd/references/node-test.md.agents/skills/tdd/references/vitest-examples.md.agents/skills/tdd/references/vitest.md.agents/skills/testing/SKILL.md.agents/skills/testing/references/node-test.md.agents/skills/testing/references/vitest.md.agents/skills/typescript/SKILL.md.claude/settings.json.github/actions/build-linux-native-package/action.yaml.github/actions/build-macos-nix-native-package/action.yaml.github/actions/build-windows-native-package/action.yaml.github/scripts/generate-e2e-fixture.mjs.github/scripts/generate-e2e-fixture.nu.github/scripts/upsert-pr-comment.nu.github/workflows/ci.yaml.github/workflows/release.yaml.oxlintrc.jsonAGENTS.mdapps/ccusage/AGENTS.mdapps/ccusage/eslint.config.jsapps/ccusage/justfileapps/ccusage/package.jsonapps/ccusage/scripts/bench.mjsapps/ccusage/scripts/compare-pr-performance.nuapps/ccusage/scripts/compare-pr-performance.tsapps/ccusage/scripts/ensure-native-binary.nuapps/ccusage/scripts/generate-large-fixture.nuapps/ccusage/scripts/generate-large-fixture.tsapps/ccusage/scripts/stage-native-package.mjsapps/ccusage/scripts/stage-native-package.nuapps/ccusage/scripts/verify-native-package.mjsapps/ccusage/scripts/verify-native-package.nuapps/ccusage/src/cli.test.tsapps/ccusage/src/cli.tsapps/ccusage/tsconfig.jsonapps/ccusage/tsdown.config.tsapps/ccusage/vitest.config.tsdocs/justfiledocs/package.jsondocs/tsconfig.jsonjustfilenix/checks.nixnix/dev-shell.nixnix/git-hooks.nixnix/models-dev-compact.test.tsnix/oxlint-check.jsonnix/treefmt.nixpackage.jsonpackages/ccusage-darwin-arm64/package.jsonpackages/ccusage-darwin-x64/package.jsonpackages/ccusage-linux-arm64/package.jsonpackages/ccusage-linux-x64/package.jsonpackages/ccusage-win32-arm64/package.jsonpackages/ccusage-win32-x64/package.jsonpnpm-workspace.yamltsconfig.jsonvitest.config.ts
💤 Files with no reviewable changes (14)
- apps/ccusage/vitest.config.ts
- .agents/skills/tdd/references/vitest.md
- .github/scripts/generate-e2e-fixture.mjs
- apps/ccusage/scripts/verify-native-package.mjs
- .agents/skills/bun-api-reference/SKILL.md
- .agents/skills/testing/references/vitest.md
- vitest.config.ts
- apps/ccusage/scripts/generate-large-fixture.ts
- apps/ccusage/scripts/bench.mjs
- .agents/skills/tdd/references/vitest-examples.md
- apps/ccusage/scripts/stage-native-package.mjs
- pnpm-workspace.yaml
- apps/ccusage/tsdown.config.ts
- apps/ccusage/scripts/compare-pr-performance.ts
✅ Files skipped from review due to trivial changes (15)
- .agents/skills/development/references/environment-and-validation.md
- packages/ccusage-darwin-x64/package.json
- packages/ccusage-linux-x64/package.json
- nix/oxlint-check.json
- packages/ccusage-linux-arm64/package.json
- .agents/skills/testing/references/node-test.md
- docs/tsconfig.json
- .agents/skills/profile/SKILL.md
- nix/dev-shell.nix
- .agents/skills/profile/references/rust.md
- AGENTS.md
- .agents/skills/tdd/references/node-test.md
- .agents/skills/tdd/SKILL.md
- .agents/skills/typescript/SKILL.md
- .agents/skills/commit/references/revertable-commits.md
🚧 Files skipped from review as they are similar to previous changes (3)
- .github/scripts/upsert-pr-comment.nu
- .github/workflows/release.yaml
- apps/ccusage/scripts/ensure-native-binary.nu
ccusage performance comparisonPR SHA: This compares the Rust PR release binary against the configured base package on the same CI runner. Package runtime diagnosticsCompares the PR package wrapper, the installed native optional dependency binary, and the workspace release binary on the same large fixture. This identifies whether slow package results come from JavaScript wrapper overhead, the published native binary build, or the Rust core itself. Fixtures: Claude
Committed fixture performanceCommitted small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage. Fixtures: Claude
Large real-world-shaped fixture performanceGenerated fixtures shaped from aggregate local log statistics: thousands of JSONL files, many small sessions, and a long tail of larger sessions. No real prompts, paths, or outputs are stored in the fixtures. Fixtures: Claude
Artifact size
Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees. |
ccusage performance comparisonPR SHA: This compares the PR package against the configured base package on the same CI runner. Package runtime diagnosticsCompares the PR package wrapper, the installed native optional dependency binary, and the workspace release binary on the same large fixture. This identifies whether slow package results come from JavaScript wrapper overhead, the published native binary build, or the Rust core itself. Fixtures: Claude
Committed fixture performanceCommitted small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage. Fixtures: Claude
Large real-world-shaped fixture performanceGenerated fixtures shaped from aggregate local log statistics: thousands of JSONL files, many small sessions, and a long tail of larger sessions. No real prompts, paths, or outputs are stored in the fixtures. Fixtures: Claude
Artifact size
Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees. |
Node test migration replaced the Vitest guard with a direct argv entry comparison. npm and npx execute package bins through node_modules/.bin symlinks, so the wrapper skipped runCli and produced empty output in E2E JSON checks. Compare real paths for the module URL and argv entry, and cover the symlink case in the launcher tests.
ccusage performance comparisonPR SHA: This compares the PR package against the configured base package on the same CI runner. Package runtime diagnosticsCompares the PR package wrapper, the installed native optional dependency binary, and the workspace release binary on the same large fixture. This identifies whether slow package results come from JavaScript wrapper overhead, the published native binary build, or the Rust core itself. Fixtures: Claude
Committed fixture performanceCommitted small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage. Fixtures: Claude
Large real-world-shaped fixture performanceGenerated fixtures shaped from aggregate local log statistics: thousands of JSONL files, many small sessions, and a long tail of larger sessions. No real prompts, paths, or outputs are stored in the fixtures. Fixtures: Claude
Artifact size
Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees. |
ccusage performance comparisonPR SHA: This compares the Rust PR release binary against the configured base package on the same CI runner. Package runtime diagnosticsCompares the PR package wrapper, the installed native optional dependency binary, and the workspace release binary on the same large fixture. This identifies whether slow package results come from JavaScript wrapper overhead, the published native binary build, or the Rust core itself. Fixtures: Claude
Committed fixture performanceCommitted small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage. Fixtures: Claude
Large real-world-shaped fixture performanceGenerated fixtures shaped from aggregate local log statistics: thousands of JSONL files, many small sessions, and a long tail of larger sessions. No real prompts, paths, or outputs are stored in the fixtures. Fixtures: Claude
Artifact size
Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees. |
|
@coderabbitai review |
@ryoppippi I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
0 issues found across 2 files (changes from recent commits).
You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.
Re-trigger cubic


Migrates package and CI helper tooling away from Bun/TypeScript runner dependencies where practical. The PR now covers Nushell script ports, Node built-in tests, oxlint type-aware checking, and lighter just/package scripts.
Changes:
Validation: