chore(nix): package bumpp and changelogithub, refactor publint by ryoppippi · Pull Request #1316 · ccusage/ccusage · GitHub
Skip to content

chore(nix): package bumpp and changelogithub, refactor publint#1316

Open
ryoppippi wants to merge 4 commits into
mainfrom
chore/nixify-release-tools
Open

chore(nix): package bumpp and changelogithub, refactor publint#1316
ryoppippi wants to merge 4 commits into
mainfrom
chore/nixify-release-tools

Conversation

@ryoppippi

@ryoppippi ryoppippi commented Jun 14, 2026

Copy link
Copy Markdown
Member

Summary

Move the npm release tools bumpp and changelogithub out of pnpm and into Nix packages, and refactor the existing publint package to use file-based lockfiles. Add a reusable builder and nix run updaters so the pinned tools stay maintainable.

What changed

  • Shared builder (nix/pnpm-tool.nix): extracts the "install an npm CLI with pnpm and wrap its binary" logic that was inline in publint.nix.
  • publint refactor: now lives in nix/publint/ with a standalone package.json and pnpm-lock.yaml instead of inline heredocs. The derivation and FOD hash are unchanged.
  • bumpp / changelogithub: packaged under nix/bumpp/ and nix/changelogithub/ and added to the dev shell. The changelogithub lockfile carries the c12@3.3.4 override that previously lived in pnpm-workspace.yaml.
  • pnpm removal: dropped both tools from the root devDependencies, the release catalog, the c12 override, and pnpm-lock.yaml.
  • Consumers switched to the Nix binaries: just release calls bumpp -r, the release workflow runs changelogithub under nix develop, and bump.config.ts mirrors the small slice of bumpp's config types locally instead of importing the package.
  • Updaters: each tool's updateProgram is exposed as a flake app (update-publint, update-bumpp, update-changelogithub). Run just update-pnpm-tools (or nix run .#update-<tool>) to refresh the version, regenerate the lockfile, and recompute the FOD hash automatically.

Why

These are dev/release-only tools. Keeping them in Nix matches the existing publint setup, keeps the pnpm install lean, and makes the lockfiles reviewable as real files. The updater apps remove the only real downside (manual FOD hash bumps), since renovate cannot update Nix hashes on its own.

Testing

  • nix build .#publint .#bumpp .#changelogithub — all build
  • nix run .#update-bumpp — verified end-to-end (regenerates lockfile, recomputes hash, rebuilds)
  • just typecheck (oxlint) — 0 errors
  • nix fmt, pre-commit hooks (treefmt, gitleaks, node test) — pass

Note

The updater is run on demand (just update-pnpm-tools); there is no scheduled CI job wiring it up yet. Happy to add a scheduled workflow that runs it and opens a PR if wanted.


View with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is enabled.


Summary by cubic

Packages the release tools bumpp and changelogithub with Nix and refactors publint to use real lockfiles. Adds a shared builder and nix run updaters so versions, lockfiles, and hashes are easy to refresh.

  • New Features

    • Shared builder nix/pnpm-tool.nix to install npm CLIs with pnpm and wrap their binaries.
    • Nix packages: publint (same hash), bumpp 11.1.0, changelogithub 14.0.0 with c12@3.3.4 override; all included in the dev shell.
    • Updaters exposed as flake apps (update-publint, update-bumpp, update-changelogithub) and a just update-pnpm-tools recipe.
  • Refactors

    • Moved publint to nix/publint/ with package.json and pnpm-lock.yaml (reviewable files); removed the old nix/publint.nix.
    • Removed bumpp and changelogithub from root devDependencies, release catalog, c12 override, and pnpm-lock.yaml.
    • Switched consumers to Nix binaries: just release calls bumpp -r, the release workflow runs nix develop --command changelogithub, and bump.config.ts defines minimal local types instead of importing from bumpp.
    • Cleaned up the updater script by removing unused gnugrep from its runtime inputs.

Written for commit 9953df7. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • New Features

    • Added runnable “update” utilities for release tooling (publint, bumpp, and changelogithub) and a helper command to refresh the Nix-packaged tools.
    • Updated the development environment to include bumpp and changelogithub.
  • Chores

    • Updated the release workflow’s changelog generation to use the Nix-provided invocation.
    • Updated release version-bumping to use the direct tool command.
  • Refactor

    • Centralized Nix packaging for pnpm-based CLI tools and expanded the flake to export the new update apps and packages.

@pullfrog

pullfrog Bot commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

@coderabbitai

coderabbitai Bot commented Jun 14, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 58095f4f-b385-4745-a12c-32ad16c44cbb

📥 Commits

Reviewing files that changed from the base of the PR and between 1a6e933 and 9953df7.

⛔ Files ignored due to path filters (4)
  • nix/bumpp/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • nix/changelogithub/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • nix/publint/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (15)
  • .github/workflows/release.yaml
  • bump.config.ts
  • justfile
  • nix/bumpp/package.json
  • nix/bumpp/package.nix
  • nix/changelogithub/package.json
  • nix/changelogithub/package.nix
  • nix/dev-shell.nix
  • nix/packages.nix
  • nix/pnpm-tool.nix
  • nix/publint.nix
  • nix/publint/package.json
  • nix/publint/package.nix
  • package.json
  • pnpm-workspace.yaml
💤 Files with no reviewable changes (1)
  • nix/publint.nix
✅ Files skipped from review due to trivial changes (5)
  • nix/changelogithub/package.json
  • nix/bumpp/package.json
  • nix/publint/package.nix
  • nix/publint/package.json
  • nix/dev-shell.nix
🚧 Files skipped from review as they are similar to previous changes (7)
  • nix/changelogithub/package.nix
  • package.json
  • justfile
  • .github/workflows/release.yaml
  • pnpm-workspace.yaml
  • nix/packages.nix
  • bump.config.ts

📝 Walkthrough

Walkthrough

Introduces a shared nix/pnpm-tool.nix derivation builder for pnpm-based CLI tools with an auto-update mechanism. Refactors publint to use it, adds bumpp and changelogithub as Nix-packaged tools, removes them from the pnpm workspace, and updates the release workflow, justfile, and bump.config.ts to invoke tools directly.

Changes

Nix-packaged pnpm CLI tools

Layer / File(s) Summary
Shared pnpm-tool.nix builder
nix/pnpm-tool.nix
Adds a parameterized stdenvNoCC.mkDerivation factory that builds any pnpm-based CLI tool from its package.json and lockfile, wraps the binary, and exposes a passthru.updateProgram script that handles npm registry lookups, lockfile regeneration, and fixed-output hash recomputation.
Per-tool package definitions
nix/publint/package.json, nix/publint/package.nix, nix/bumpp/package.json, nix/bumpp/package.nix, nix/changelogithub/package.json, nix/changelogithub/package.nix
Refactors publint from its monolithic nix/publint.nix into the shared builder pattern. Adds equivalent package.json + package.nix pairs for bumpp (11.1.0) and changelogithub (14.0.0), including a pnpm sub-dependency override for changelogithub>c12.
Flake packages, apps, and dev shell wiring
nix/packages.nix, nix/dev-shell.nix
Wires all three tools into the flake via callPackage, exports them under packages, adds update-publint, update-bumpp, and update-changelogithub to apps, and installs bumpp and changelogithub into the default dev shell.
Remove tools from pnpm workspace; update workflow, justfile, and bump config
package.json, pnpm-workspace.yaml, bump.config.ts, justfile, .github/workflows/release.yaml
Removes bumpp and changelogithub from package.json and pnpm-workspace.yaml. Updates bump.config.ts to drop the bumpp import and use local type stubs. Changes the release workflow and justfile to invoke changelogithub and bumpp directly (not via pnpm), and adds an update-pnpm-tools justfile recipe.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • ccusage/ccusage#1254: Modifies the same .github/workflows/release.yaml step that invokes changelogithub inside nix develop, which is the exact line changed in this PR.
  • ccusage/ccusage#1312: Introduces a publint flake check that depends on the nix/publint/package.nix definition and flake wiring added in this PR.

Poem

🐇 Hop hop, no more pnpm in the way,
bumpp and changelogithub now live in Nix today!
A shared builder wraps them neat and tight,
pnpm-tool.nix shines a golden light.
The lockfiles spin, the hashes align —
This bunny thinks the release looks fine! 🌿

🚥 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 title accurately captures the main purpose of the PR: moving bumpp and changelogithub into Nix packages and refactoring publint to use the new shared infrastructure.
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 chore/nixify-release-tools

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

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 14, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
ccusage-guide 9953df7 Commit Preview URL

Branch Preview URL
Jun 15 2026, 03:34 AM

@coderabbitai coderabbitai 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.

🧹 Nitpick comments (1)
bump.config.ts (1)

44-77: Use satisfies for the config literal instead of type annotation.

This tooling-file config object should use satisfies BumppConfig instead of the : BumppConfig annotation to align with the repository's TypeScript guidelines for typed literals.

Suggested change
-const config: BumppConfig = {
-	async execute(operation) {
+const config = {
+	async execute(operation: BumppOperation) {
 		const result = spawnSync(
 			'cargo',
 			[
 				'set-version',
 				'--manifest-path',
@@
 		operation.update({
 			updatedFiles: [
 				...new Set([
 					...operation.state.updatedFiles,
 					...getUpdatedRustReleaseFiles(operation.options.cwd).map((filePath) =>
 						resolve(operation.options.cwd, filePath),
 					),
 				]),
 			],
 		});
 	},
-};
+} satisfies BumppConfig;
🤖 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 `@bump.config.ts` around lines 44 - 77, The config constant declaration
currently uses a type annotation with `: BumppConfig` syntax. Replace this with
the `satisfies BumppConfig` keyword instead to align with the repository's
TypeScript guidelines for typed literals. Update the declaration of the config
constant to use satisfies rather than a direct type annotation.

Source: Coding guidelines

🤖 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.

Nitpick comments:
In `@bump.config.ts`:
- Around line 44-77: The config constant declaration currently uses a type
annotation with `: BumppConfig` syntax. Replace this with the `satisfies
BumppConfig` keyword instead to align with the repository's TypeScript
guidelines for typed literals. Update the declaration of the config constant to
use satisfies rather than a direct type annotation.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a0e10281-c657-462a-919e-ddd21ddd4041

📥 Commits

Reviewing files that changed from the base of the PR and between 92c518d and 2409f51.

⛔ Files ignored due to path filters (4)
  • nix/bumpp/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • nix/changelogithub/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • nix/publint/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (15)
  • .github/workflows/release.yaml
  • bump.config.ts
  • justfile
  • nix/bumpp/package.json
  • nix/bumpp/package.nix
  • nix/changelogithub/package.json
  • nix/changelogithub/package.nix
  • nix/dev-shell.nix
  • nix/packages.nix
  • nix/pnpm-tool.nix
  • nix/publint.nix
  • nix/publint/package.json
  • nix/publint/package.nix
  • package.json
  • pnpm-workspace.yaml
💤 Files with no reviewable changes (3)
  • nix/publint.nix
  • package.json
  • pnpm-workspace.yaml

@pkg-pr-new

pkg-pr-new Bot commented Jun 14, 2026

Copy link
Copy Markdown

Open in StackBlitz

ccusage

npx https://pkg.pr.new/ccusage@1316

@ccusage/ccusage-darwin-arm64

npx https://pkg.pr.new/@ccusage/ccusage-darwin-arm64@1316

@ccusage/ccusage-darwin-x64

npx https://pkg.pr.new/@ccusage/ccusage-darwin-x64@1316

@ccusage/ccusage-linux-arm64

npx https://pkg.pr.new/@ccusage/ccusage-linux-arm64@1316

@ccusage/ccusage-linux-x64

npx https://pkg.pr.new/@ccusage/ccusage-linux-x64@1316

@ccusage/ccusage-win32-x64

npx https://pkg.pr.new/@ccusage/ccusage-win32-x64@1316

commit: 9953df7

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

1 issue found across 19 files

Tip: cubic can generate docs of your entire codebase and keep them up to date. Try it here.

Fix all with cubic | Re-trigger cubic

Comment thread nix/pnpm-tool.nix Outdated
@github-actions

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: 2409f51e03a0
Base SHA: 92c518dfed4e

This compares the Rust PR release binary against the configured base package on the same CI runner.

Package runtime diagnostics

Compares 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 /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 files)
All rows run --offline --json, measured by hyperfine with 0 warmups and 1 runs. This isolates wrapper overhead from the installed native optional dependency and the workspace release binary built on the runner.

Command Runtime Input Median Throughput Samples
claude --offline --json Package wrapper 1.01 GiB 239.5ms 4.20 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 230.5ms 4.37 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 110.8ms 9.09 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 96.7ms 10.41 GiB/s 1

Committed fixture performance

Committed small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage.

Fixtures: Claude apps/ccusage/test/fixtures/claude (0.00 MiB, 2 files), Codex apps/ccusage/test/fixtures/codex (0.00 MiB, 1 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published native ccusage binary from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 2 warmups and 7 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude daily --offline --json 0.00 MiB 28.3ms 4.7ms 6.05x 53.75 MiB 10.20 MiB 0.19x 0.05 MiB/s 0.33 MiB/s
claude session --offline --json 0.00 MiB 25.6ms 4.6ms 5.56x 53.50 MiB 10.19 MiB 0.19x 0.06 MiB/s 0.34 MiB/s
codex daily --offline --json 0.00 MiB 28.6ms 2.5ms 11.35x 53.75 MiB 8.18 MiB 0.15x 0.03 MiB/s 0.34 MiB/s
codex session --offline --json 0.00 MiB 25.7ms 2.8ms 9.03x 53.75 MiB 8.18 MiB 0.15x 0.03 MiB/s 0.30 MiB/s

Large real-world-shaped fixture performance

Generated 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 /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published native ccusage binary from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 0 warmups and 1 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude --offline --json 1.01 GiB 286.1ms 226.4ms 1.26x 942.33 MiB 944.34 MiB 1.00x 3.52 GiB/s 4.45 GiB/s
codex --offline --json 1.01 GiB 109.7ms 88.0ms 1.25x 411.03 MiB 431.03 MiB 1.05x 9.18 GiB/s 11.44 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 18.08 KiB 18.08 KiB -0.00 KiB 1.00x
installed native package binary 3851.06 KiB 3851.06 KiB +0.00 KiB 1.00x

Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees.

@github-actions

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: 2409f51e03a0
Base SHA: 92c518dfed4e

This compares the PR package against the configured base package on the same CI runner.

Package runtime diagnostics

Compares 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 /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 files)
All rows run --offline --json, measured by hyperfine with 0 warmups and 1 runs. This isolates wrapper overhead from the installed native optional dependency and the workspace release binary built on the runner.

Command Runtime Input Median Throughput Samples
claude --offline --json Package wrapper 1.01 GiB 231.3ms 4.35 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 212.6ms 4.74 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 143.3ms 7.03 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 88.7ms 11.35 GiB/s 1

Committed fixture performance

Committed small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage.

Fixtures: Claude apps/ccusage/test/fixtures/claude (0.00 MiB, 2 files), Codex apps/ccusage/test/fixtures/codex (0.00 MiB, 1 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published ccusage package from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 2 warmups and 7 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude daily --offline --json 0.00 MiB 29.5ms 29.3ms 1.01x 54.00 MiB 53.75 MiB 1.00x 0.05 MiB/s 0.05 MiB/s
claude session --offline --json 0.00 MiB 30.5ms 29.7ms 1.03x 53.75 MiB 54.00 MiB 1.00x 0.05 MiB/s 0.05 MiB/s
codex daily --offline --json 0.00 MiB 27.4ms 27.5ms 1.00x 54.00 MiB 53.75 MiB 1.00x 0.03 MiB/s 0.03 MiB/s
codex session --offline --json 0.00 MiB 27.3ms 26.4ms 1.03x 53.50 MiB 53.75 MiB 1.00x 0.03 MiB/s 0.03 MiB/s

Large real-world-shaped fixture performance

Generated 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 /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published ccusage package from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 0 warmups and 1 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude --offline --json 1.01 GiB 274.4ms 245.2ms 1.12x 946.32 MiB 926.32 MiB 0.98x 3.67 GiB/s 4.11 GiB/s
codex --offline --json 1.01 GiB 109.2ms 118.0ms 0.93x 401.03 MiB 421.03 MiB 1.05x 9.22 GiB/s 8.53 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 18.08 KiB 18.08 KiB -0.00 KiB 1.00x
installed native package binary 3851.06 KiB 3851.06 KiB +0.00 KiB 1.00x

Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees.

@github-actions

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: 1a6e933d3fd7
Base SHA: 92c518dfed4e

This compares the PR package against the configured base package on the same CI runner.

Package runtime diagnostics

Compares 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 /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 files)
All rows run --offline --json, measured by hyperfine with 0 warmups and 1 runs. This isolates wrapper overhead from the installed native optional dependency and the workspace release binary built on the runner.

Command Runtime Input Median Throughput Samples
claude --offline --json Package wrapper 1.01 GiB 238.4ms 4.22 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 220.1ms 4.57 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 113.9ms 8.84 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 84.8ms 11.87 GiB/s 1

Committed fixture performance

Committed small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage.

Fixtures: Claude apps/ccusage/test/fixtures/claude (0.00 MiB, 2 files), Codex apps/ccusage/test/fixtures/codex (0.00 MiB, 1 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published ccusage package from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 2 warmups and 7 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude daily --offline --json 0.00 MiB 29.7ms 27.6ms 1.08x 53.50 MiB 54.00 MiB 1.01x 0.05 MiB/s 0.06 MiB/s
claude session --offline --json 0.00 MiB 30.6ms 28.0ms 1.09x 53.75 MiB 53.75 MiB 1.00x 0.05 MiB/s 0.06 MiB/s
codex daily --offline --json 0.00 MiB 28.9ms 28.3ms 1.02x 53.50 MiB 54.00 MiB 1.01x 0.03 MiB/s 0.03 MiB/s
codex session --offline --json 0.00 MiB 27.9ms 28.4ms 0.98x 53.75 MiB 53.75 MiB 1.00x 0.03 MiB/s 0.03 MiB/s

Large real-world-shaped fixture performance

Generated 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 /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published ccusage package from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 0 warmups and 1 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude --offline --json 1.01 GiB 277.4ms 275.9ms 1.01x 950.33 MiB 934.32 MiB 0.98x 3.63 GiB/s 3.65 GiB/s
codex --offline --json 1.01 GiB 114.0ms 114.3ms 1.00x 419.04 MiB 413.03 MiB 0.99x 8.83 GiB/s 8.81 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 18.08 KiB 18.08 KiB -0.00 KiB 1.00x
installed native package binary 3851.06 KiB 3851.06 KiB +0.00 KiB 1.00x

Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees.

@github-actions

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: 1a6e933d3fd7
Base SHA: 92c518dfed4e

This compares the Rust PR release binary against the configured base package on the same CI runner.

Package runtime diagnostics

Compares 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 /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 files)
All rows run --offline --json, measured by hyperfine with 0 warmups and 1 runs. This isolates wrapper overhead from the installed native optional dependency and the workspace release binary built on the runner.

Command Runtime Input Median Throughput Samples
claude --offline --json Package wrapper 1.01 GiB 256.2ms 3.93 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 219.6ms 4.58 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 106.0ms 9.49 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 89.3ms 11.28 GiB/s 1

Committed fixture performance

Committed small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage.

Fixtures: Claude apps/ccusage/test/fixtures/claude (0.00 MiB, 2 files), Codex apps/ccusage/test/fixtures/codex (0.00 MiB, 1 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published native ccusage binary from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 2 warmups and 7 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude daily --offline --json 0.00 MiB 25.7ms 4.3ms 5.94x 53.50 MiB 10.20 MiB 0.19x 0.06 MiB/s 0.36 MiB/s
claude session --offline --json 0.00 MiB 24.9ms 2.6ms 9.62x 53.75 MiB 10.20 MiB 0.19x 0.06 MiB/s 0.60 MiB/s
codex daily --offline --json 0.00 MiB 25.3ms 2.1ms 12.30x 53.50 MiB 8.18 MiB 0.15x 0.03 MiB/s 0.42 MiB/s
codex session --offline --json 0.00 MiB 25.9ms 2.3ms 11.50x 53.50 MiB 8.18 MiB 0.15x 0.03 MiB/s 0.38 MiB/s

Large real-world-shaped fixture performance

Generated 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 /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published native ccusage binary from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 0 warmups and 1 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude --offline --json 1.01 GiB 294.6ms 249.1ms 1.18x 966.33 MiB 934.32 MiB 0.97x 3.42 GiB/s 4.04 GiB/s
codex --offline --json 1.01 GiB 103.3ms 78.9ms 1.31x 419.04 MiB 403.04 MiB 0.96x 9.74 GiB/s 12.76 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 18.08 KiB 18.08 KiB -0.00 KiB 1.00x
installed native package binary 3851.06 KiB 3851.06 KiB +0.00 KiB 1.00x

Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees.

ryoppippi and others added 4 commits June 15, 2026 03:32
Extract the duplicated "install an npm CLI with pnpm and wrap its
binary" logic from publint.nix into a reusable nix/pnpm-tool.nix
builder. publint now lives in its own directory with a standalone
package.json and pnpm-lock.yaml instead of inline heredocs, so the
lockfile is a normal reviewable file.

The builder also exposes an updateProgram so packaged tools can be
refreshed (version, lockfile, and FOD hash) without manual edits.

No behaviour change: the publint derivation and its FOD hash are
identical to the previous inline definition.
Add bumpp and changelogithub as Nix packages built through the shared
pnpm-tool builder, each with its own pinned package.json and
pnpm-lock.yaml, and expose them in the dev shell. The changelogithub
lockfile carries the c12 3.3.4 override previously kept in
pnpm-workspace.yaml.

Wire each tool's updateProgram as a flake app (update-publint,
update-bumpp, update-changelogithub) and add a `just update-pnpm-tools`
recipe so the pinned versions, lockfiles, and FOD hashes can be
refreshed with `nix run`.
Drop bumpp and changelogithub from the root devDependencies, the
release catalog, the c12 override, and the pnpm lockfile now that they
are provided by the Nix dev shell.

Point the consumers at the Nix-provided binaries: `just release` calls
`bumpp -r` directly, the release workflow runs `changelogithub` under
`nix develop`, and bump.config.ts mirrors the small slice of the bumpp
config types locally instead of importing from the package.
Co-authored-by: Codesmith <codesmith-bot@users.noreply.github.com>
@blacksmith-sh blacksmith-sh Bot force-pushed the chore/nixify-release-tools branch from 1a6e933 to 9953df7 Compare June 15, 2026 03:33
@github-actions

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: 9953df7b8402
Base SHA: c6ae70a0ac38

This compares the Rust PR release binary against the configured base package on the same CI runner.

Package runtime diagnostics

Compares 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 /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 files)
All rows run --offline --json, measured by hyperfine with 0 warmups and 1 runs. This isolates wrapper overhead from the installed native optional dependency and the workspace release binary built on the runner.

Command Runtime Input Median Throughput Samples
claude --offline --json Package wrapper 1.01 GiB 269.1ms 3.74 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 225.4ms 4.47 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 113.9ms 8.84 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 90.8ms 11.09 GiB/s 1

Committed fixture performance

Committed small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage.

Fixtures: Claude apps/ccusage/test/fixtures/claude (0.00 MiB, 2 files), Codex apps/ccusage/test/fixtures/codex (0.00 MiB, 1 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published native ccusage binary from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 2 warmups and 7 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude daily --offline --json 0.00 MiB 26.5ms 4.0ms 6.57x 53.50 MiB 10.19 MiB 0.19x 0.06 MiB/s 0.38 MiB/s
claude session --offline --json 0.00 MiB 27.8ms 3.9ms 7.15x 53.50 MiB 10.20 MiB 0.19x 0.06 MiB/s 0.40 MiB/s
codex daily --offline --json 0.00 MiB 23.7ms 2.2ms 10.78x 53.50 MiB 8.18 MiB 0.15x 0.04 MiB/s 0.39 MiB/s
codex session --offline --json 0.00 MiB 22.9ms 2.2ms 10.45x 53.50 MiB 8.18 MiB 0.15x 0.04 MiB/s 0.39 MiB/s

Large real-world-shaped fixture performance

Generated 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 /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published native ccusage binary from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 0 warmups and 1 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude --offline --json 1.01 GiB 283.7ms 240.4ms 1.18x 954.34 MiB 948.32 MiB 0.99x 3.55 GiB/s 4.19 GiB/s
codex --offline --json 1.01 GiB 108.4ms 84.2ms 1.29x 429.04 MiB 417.04 MiB 0.97x 9.29 GiB/s 11.96 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 18.08 KiB 18.08 KiB +0.00 KiB 1.00x
installed native package binary 3851.00 KiB 3851.00 KiB +0.00 KiB 1.00x

Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees.

@github-actions

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: 9953df7b8402
Base SHA: c6ae70a0ac38

This compares the PR package against the configured base package on the same CI runner.

Package runtime diagnostics

Compares 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 /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 files)
All rows run --offline --json, measured by hyperfine with 0 warmups and 1 runs. This isolates wrapper overhead from the installed native optional dependency and the workspace release binary built on the runner.

Command Runtime Input Median Throughput Samples
claude --offline --json Package wrapper 1.01 GiB 258.7ms 3.89 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 226.6ms 4.44 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 115.6ms 8.71 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 78.9ms 12.77 GiB/s 1

Committed fixture performance

Committed small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage.

Fixtures: Claude apps/ccusage/test/fixtures/claude (0.00 MiB, 2 files), Codex apps/ccusage/test/fixtures/codex (0.00 MiB, 1 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published ccusage package from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 2 warmups and 7 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude daily --offline --json 0.00 MiB 24.6ms 25.0ms 0.99x 53.50 MiB 54.00 MiB 1.01x 0.06 MiB/s 0.06 MiB/s
claude session --offline --json 0.00 MiB 24.0ms 25.9ms 0.93x 53.50 MiB 53.75 MiB 1.00x 0.06 MiB/s 0.06 MiB/s
codex daily --offline --json 0.00 MiB 22.9ms 23.4ms 0.98x 53.50 MiB 54.00 MiB 1.01x 0.04 MiB/s 0.04 MiB/s
codex session --offline --json 0.00 MiB 24.2ms 23.4ms 1.03x 53.75 MiB 53.75 MiB 1.00x 0.04 MiB/s 0.04 MiB/s

Large real-world-shaped fixture performance

Generated 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 /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published ccusage package from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 0 warmups and 1 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude --offline --json 1.01 GiB 267.0ms 265.5ms 1.01x 940.33 MiB 942.33 MiB 1.00x 3.77 GiB/s 3.79 GiB/s
codex --offline --json 1.01 GiB 104.7ms 104.8ms 1.00x 421.03 MiB 419.04 MiB 1.00x 9.61 GiB/s 9.61 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 18.08 KiB 18.08 KiB +0.00 KiB 1.00x
installed native package binary 3851.00 KiB 3851.00 KiB +0.00 KiB 1.00x

Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees.

@yong076 yong076 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.

auto-approved by hermes

@yong076 yong076 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.

auto-approved by hermes

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.

2 participants