Skip to content

Revert "perf(ci): pin Rust deps with a GC root" - #1275

Merged
ryoppippi merged 1 commit into
mainfrom
revert-1274-deps-gcroot
Jun 11, 2026
Merged

ryoppippi merged 1 commit into
mainfrom
revert-1274-deps-gcroot

Conversation

@ryoppippi

@ryoppippi ryoppippi commented Jun 11, 2026 •

Copy link
Copy Markdown
Member

Reverts #1274.

The GC-root pin did not fix the dependency rebuild: a rerun of build-linux-arm64
still rebuilt all deps (~234s) with the root in place. The sticky disk persists
~24GB for this job (confirmed in the Blacksmith dashboard), so the store is being
retained but the cargoArtifacts path is still missing on restore — the root
didn't prevent it. Reverting the no-op change while we inspect the disk directly
via a Blacksmith testbox.


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


Summary by cubic

Reverts the CI GC-root pin for Rust dependency artifacts and removes the cargoArtifacts passthru in Nix, since the change didn’t reduce rebuilds. This returns the Linux build to previous behavior while we debug the sticky disk separately.

  • Refactors
    • Removed “Pin dependency cache root” step from .github/actions/build-linux-native-package/action.yaml.
    • Dropped passthru.cargoArtifacts from nix/static-package.nix.

Written for commit fa9b08b. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • Chores
    • Simplified the Linux native package build workflow by removing internal dependency cache pinning logic.

@ryoppippi
ryoppippi merged commit f28fa45 into main Jun 11, 2026
1 check was pending
@ryoppippi
ryoppippi deleted the revert-1274-deps-gcroot branch June 11, 2026 16:33
@coderabbitai

coderabbitai Bot commented Jun 11, 2026 •

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: de2983ee-1154-4e5a-95a8-c3158d506a82

📥 Commits

Reviewing files that changed from the base of the PR and between c764998 and fa9b08b.

📒 Files selected for processing (2)
  • .github/actions/build-linux-native-package/action.yaml
  • nix/static-package.nix

📝 Walkthrough

Walkthrough

The PR removes a Nix garbage-collection root pinning mechanism from both the CI workflow and the static package derivation. The GitHub Action no longer creates a GC-root directory or invokes nix build --out-link for Cargo artifacts, and the corresponding passthru.cargoArtifacts attribute is removed from the derivation configuration.

Changes

Remove Nix GC-root pinning infrastructure

Layer / File(s) Summary
GC-root pinning removal
.github/actions/build-linux-native-package/action.yaml, nix/static-package.nix
The "Pin dependency cache root" step that created a persistent GC-root directory and invoked nix build --out-link is deleted from the workflow; the passthru.cargoArtifacts attribute that exposed Cargo artifacts for pinning is removed from the derivation, eliminating the entire artifact-pinning infrastructure.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • ccusage/ccusage#1249: Both PRs touch the Linux native package composite action, with this PR removing the CI GC-root pinning step while the related PR introduces/refactors that action for the Blacksmith CI flow.

Poem

🐰 Pinning roots in Nix so tight,
We held those artifacts through the night,
But now we let the GC roots be,
Build flows faster, wild and free! ✨

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch revert-1274-deps-gcroot

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

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

✅ No new issues found.

Reviewed changes — clean revert of #1274 after confirming the GC-root pin didn't prevent full dependency rebuilds.

  • Revert CI GC-root pin step — removes the "Pin dependency cache root" step from .github/actions/build-linux-native-package/action.yaml
  • Remove passthru.cargoArtifacts from Nix — drops the static-package.nix passthru that exposed deps artifacts for GC-root pinning

Pullfrog  | View workflow run | Using Big Pickle (free via Pullfrog for OSS) | 𝕏

@github-actions

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: fa9b08b7ef9a
Base SHA: c764998d5528

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

Package runner startup

Execution setup measures any pre-benchmark package materialization used by the execution benchmark. Bunx temp cache measures one bunx -p <url> ccusage --version run with an empty Bun install cache. Warm reuses that cache and reports the median of repeated runs.

Package SHA Execution setup Bunx temp cache Bunx warm median Warm samples
Base pkg.pr.new c764998d5528 1.240s 928.0ms 57.1ms 3
PR pkg.pr.new fa9b08b 813.2ms 923.1ms 59.0ms 3

Cached bunx execution performance

Runs the same large fixture through bunx -p <pkg.pr.new URL> ccusage after the Bun install cache has already been populated by the startup measurement. This separates cached package-runner execution from first-fetch package materialization.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2,597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2,597 files)
Base package: c764998d5528; PR package: fa9b08b. Both run through bunx -p <pkg.pr.new URL> ccusage using the warmed Bun install cache from package runner startup, 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
bunx -p <pkg> ccusage claude --offline --json 1.01 GiB 808.0ms 826.6ms 0.98x 733.25 MiB 733.00 MiB 1.00x 1.25 GiB/s 1.22 GiB/s
bunx -p <pkg> ccusage codex --offline --json 1.01 GiB 179.1ms 175.1ms 1.02x 93.75 MiB 91.00 MiB 0.97x 5.62 GiB/s 5.75 GiB/s

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, 2,597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2,597 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 830.6ms 1.21 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 792.9ms 1.27 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 157.5ms 6.39 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 119.0ms 8.46 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 55.5ms 44.4ms 1.25x 43.00 MiB 43.00 MiB 1.00x 0.03 MiB/s 0.03 MiB/s
claude session --offline --json 0.00 MiB 55.8ms 41.5ms 1.35x 43.00 MiB 43.00 MiB 1.00x 0.03 MiB/s 0.04 MiB/s
codex daily --offline --json 0.00 MiB 42.1ms 41.4ms 1.02x 43.00 MiB 43.25 MiB 1.01x 0.02 MiB/s 0.02 MiB/s
codex session --offline --json 0.00 MiB 40.6ms 41.1ms 0.99x 43.00 MiB 43.00 MiB 1.00x 0.02 MiB/s 0.02 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, 2,597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2,597 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 896.3ms 882.2ms 1.02x 738.25 MiB 736.50 MiB 1.00x 1.12 GiB/s 1.14 GiB/s
codex --offline --json 1.01 GiB 156.3ms 153.7ms 1.02x 90.25 MiB 87.50 MiB 0.97x 6.44 GiB/s 6.55 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 17.33 KiB 17.32 KiB -0.00 KiB 1.00x
installed native package binary 3324.84 KiB 3324.84 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: fa9b08b7ef9a
Base SHA: c764998d5528

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

Package runner startup

Execution setup measures any pre-benchmark package materialization used by the execution benchmark. Bunx temp cache measures one bunx -p <url> ccusage --version run with an empty Bun install cache. Warm reuses that cache and reports the median of repeated runs.

Package SHA Execution setup Bunx temp cache Bunx warm median Warm samples
Base pkg.pr.new c764998d5528 991.8ms 1.167s 68.3ms 3
PR pkg.pr.new fa9b08b 985.9ms 880.1ms 73.3ms 3

Cached bunx execution performance

Runs the same large fixture through bunx -p <pkg.pr.new URL> ccusage after the Bun install cache has already been populated by the startup measurement. This separates cached package-runner execution from first-fetch package materialization.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2,597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2,597 files)
Base package: c764998d5528; PR package: fa9b08b. Both run through bunx -p <pkg.pr.new URL> ccusage using the warmed Bun install cache from package runner startup, 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
bunx -p <pkg> ccusage claude --offline --json 1.01 GiB 1.019s 1.135s 0.90x 741.75 MiB 709.75 MiB 0.96x 1012.15 MiB/s 908.17 MiB/s
bunx -p <pkg> ccusage codex --offline --json 1.01 GiB 237.3ms 251.5ms 0.94x 92.50 MiB 99.00 MiB 1.07x 4.24 GiB/s 4.00 GiB/s

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, 2,597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2,597 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 1.026s 1004.93 MiB/s 1
claude --offline --json Installed native binary 1.01 GiB 1.053s 978.61 MiB/s 1
codex --offline --json Package wrapper 1.01 GiB 240.3ms 4.19 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 166.5ms 6.04 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 rust/target/release/ccusage directly. 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 45.5ms 6.0ms 7.52x 43.25 MiB 3.00 MiB 0.07x 0.03 MiB/s 0.26 MiB/s
claude session --offline --json 0.00 MiB 47.3ms 6.0ms 7.88x 43.00 MiB 2.75 MiB 0.06x 0.03 MiB/s 0.26 MiB/s
codex daily --offline --json 0.00 MiB 43.2ms 5.8ms 7.39x 43.00 MiB 2.75 MiB 0.06x 0.02 MiB/s 0.15 MiB/s
codex session --offline --json 0.00 MiB 48.0ms 5.6ms 8.61x 43.00 MiB 2.75 MiB 0.06x 0.02 MiB/s 0.15 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, 2,597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2,597 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs rust/target/release/ccusage directly. 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 857.4ms 981.7ms 0.87x 743.00 MiB 748.25 MiB 1.01x 1.17 GiB/s 1.03 GiB/s
codex --offline --json 1.01 GiB 180.1ms 147.2ms 1.22x 92.75 MiB 92.50 MiB 1.00x 5.59 GiB/s 6.84 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 17.33 KiB 17.32 KiB -0.00 KiB 1.00x
installed native package binary 3324.84 KiB 3324.84 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.

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