Repository navigation
perf(ci): cache Rust builds with cache-nix-action (check, test, native build) - #1285
Conversation
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — experimental PR replacing the Linux native build's Blacksmith sticky disk setup with cache-nix-action (mirroring the macOS approach), to validate whether GHA's native cache can replace the Blacksmith disk within the 10GB limit.
- New
setup-linux-nix-action-cachecomposite action — installs Nix vianixbuild/nix-quick-install-actionand manages the store withnix-community/cache-nix-action, keyed on flake+lockfile hashes, with 4GB GC limit and 2-day purge - Swap
build-linux-native-packageto use the new action — replacesuses: ./.github/actions/setup-nixwithuses: ./.github/actions/setup-linux-nix-action-cache
Big Pickle (free via Pullfrog for OSS) | 𝕏
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughAdds a new composite action (.github/actions/setup-linux-nix-action-cache) that installs Nix and caches/restores the Linux Nix store (with gc-max-store-size-linux), updates the Linux build action to use it and clarifies pinning comments, and removes a per-matrix concurrency block from the CI job. ChangesLinux Nix caching & CI updates
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
ccusage-guide | ae53dd3 | Commit Preview URL Branch Preview URL |
Jun 11 2026, 08:54 PM |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/actions/setup-linux-nix-action-cache/action.yaml:
- Around line 22-26: The workflow currently sets gc-max-store-size-linux:
4000000000 and gc-max-store-size-macos: 3500000000 with purge flags in
.github/actions/setup-linux-nix-action-cache/action.yaml (keys:
gc-max-store-size-linux, gc-max-store-size-macos, purge, purge-prefixes,
purge-created, purge-primary-key), but GC alone may not guarantee the cache fits
GitHub Actions limits; add a lightweight pre-save check step that measures/logs
the nix store size (e.g., run nix store --query --size or du on the store path)
and fail or emit a warning when the measured size exceeds the target thresholds
(4GB/3.5GB) so the action can trim or abort before save, and ensure the check
runs on both Linux and macOS paths that use the respective gc-max-store-size-*
keys.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: c128ccb8-364d-4b16-a73c-ce2ba9947f15
📒 Files selected for processing (2)
.github/actions/build-linux-native-package/action.yaml.github/actions/setup-linux-nix-action-cache/action.yaml
| gc-max-store-size-linux: 4000000000 | ||
| purge: true | ||
| purge-prefixes: nix-buildnative-${{ runner.os }}-${{ runner.arch }}- | ||
| purge-created: 172800 | ||
| purge-primary-key: never |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Description: Compare with macOS Nix setup to verify parameter consistency
# Find macOS Nix setup action
echo "Searching for macOS Nix setup configuration..."
fd -e yaml . .github/actions/ | xargs rg -l 'cache-nix-action' | grep -i mac
# Check cache-nix-action usage across all workflow files
echo ""
echo "All cache-nix-action configurations:"
rg -n -A10 'cache-nix-action' --type yamlRepository: ccusage/ccusage
Length of output: 194
🌐 Web query:
cache-nix-action v7.0.2 documentation gc-max-store-size-linux purge parameters
💡 Result:
In cache-nix-action v7.0.2, the parameters regarding Nix store garbage collection and cache purging operate as follows [1][2]: Garbage Collection The gc-max-store-size-linux input allows you to specify the maximum size of the Nix store (in bytes) before the action attempts to save a new cache [1][3]. When provided, the action runs nix store gc --max to collect garbage until the store size is at or below the specified limit [1][4]. This parameter specifically overrides the general gc-max-store-size input and only takes effect on Linux runners [1][3]. You may use suffixes K, M, or G (representing kibibytes, mebibytes, and gibibytes, respectively) [1][4]. This process occurs just before the action saves a new cache and has no effect if a primary-key hit occurs [1][5]. Purge Parameters The purge functionality is enabled by setting purge: true [1][2]. When enabled, it purges caches scoped to the current GITHUB_REF based on the following parameters [1][3]: - purge-prefixes: A newline-separated list of non-empty cache key prefixes. The action will select for purging any caches with keys matching these prefixes [1][5][6]. - purge-created: Purges selected caches that were created more than this specified number of seconds ago, relative to the start of the Post Restore phase [7][8]. - purge-last-accessed: Purges selected caches that were last accessed more than this number of seconds ago, relative to the start of the Post Restore phase [7][6]. - purge-primary-key: Controls whether the cache with the current primary-key is purged. Setting this to always will force purging, while never will exempt the primary-key cache from being purged [1][4]. These inputs have no effect unless purge is set to true [1][7].
Citations:
- 1: https://github.com/nix-community/cache-nix-action/blob/2ce599504bcfcb3be1c1e30e2b68f946c47b5cde/save/action.yml
- 2: https://github.com/nix-community/cache-nix-action
- 3: https://github.com/nix-community/cache-nix-action/blob/4570172cf1b450b1349f8ba6261c126950a25fac/action.yml
- 4: https://github.com/nix-community/cache-nix-action/blob/dd63ede9d618c9475240bd8b55902fc54101fb0a/save/action.yml
- 5: https://github.com/nix-community/cache-nix-action/blob/c3f867e9b09f9f54f22bc341f8ebc75b3013c3c4/save/action.yml
- 6: https://github.com/nix-community/cache-nix-action/blob/607b1de450d13a5819c7c9605a4a3b1f80997804/README.md
- 7: https://github.com/nix-community/cache-nix-action/blob/9a16d381967c374378211d3be02c5309c2ae851a/README.md
- 8: https://github.com/nix-community/cache-nix-action/blob/f9c1672ccf78212481271e948d7f034374b00cb7/README.md
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "Linux action file (requested lines 22-26):"
ls -la .github/actions/setup-linux-nix-action-cache/action.yaml
cat -n .github/actions/setup-linux-nix-action-cache/action.yaml | sed -n '1,120p'
echo ""
echo "macOS action file (found by initial search):"
ls -la .github/actions/setup-macos-nix-cache/action.yaml
cat -n .github/actions/setup-macos-nix-cache/action.yaml | sed -n '1,160p'
echo ""
echo "Search for cache-nix-action usage and version pins in ./ .github/actions:"
rg -n "cache-nix-action" .github/actions --type yaml -S || true
echo ""
echo "Search for cache-nix-action usage in workflows:"
rg -n "cache-nix-action" .github/workflows --type yaml -S || true
echo ""
echo "Search for gc-max-store-size and purge parameters in those action files:"
rg -n "gc-max-store-size|purge(:|-) |purge-prefixes|purge-created|purge-primary-key" .github/actions --type yaml -S || trueRepository: ccusage/ccusage
Length of output: 4299
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "Linux action file (requested lines 22-26):"
ls -la .github/actions/setup-linux-nix-action-cache/action.yaml
cat -n .github/actions/setup-linux-nix-action-cache/action.yaml | sed -n '1,120p'
echo ""
echo "macOS action file (found by initial search):"
ls -la .github/actions/setup-macos-nix-cache/action.yaml
cat -n .github/actions/setup-macos-nix-cache/action.yaml | sed -n '1,160p'
echo ""
echo "Search for cache-nix-action usage and version pins in ./ .github/actions:"
rg -n "cache-nix-action" .github/actions --type yaml -S || true
echo ""
echo "Search for cache-nix-action usage in workflows:"
rg -n "cache-nix-action" .github/workflows --type yaml -S || true
echo ""
echo "Search for gc-max-store-size and purge parameters in those action files:"
rg -n "gc-max-store-size|purge-prefixes|purge-created|purge-primary-key|purge:" .github/actions --type yaml -S || trueRepository: ccusage/ccusage
Length of output: 4299
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "Linux action file:"
cat -n .github/actions/setup-linux-nix-action-cache/action.yaml | sed -n '1,200p'
echo ""
echo "macOS action file:"
cat -n .github/actions/setup-macos-nix-cache/action.yaml | sed -n '1,220p'
echo ""
echo "cache-nix-action usage in .github/actions:"
rg -n "cache-nix-action" .github/actions --type yaml -S || true
echo ""
echo "cache-nix-action usage in .github/workflows:"
rg -n "cache-nix-action" .github/workflows --type yaml -S || true
echo ""
echo "gc/purge parameters in .github/actions:"
rg -n "gc-max-store-size|purge-prefixes|purge-created|purge-primary-key|purge:" .github/actions --type yaml -S || trueRepository: ccusage/ccusage
Length of output: 3978
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "Linux action file:"
cat -n .github/actions/setup-linux-nix-action-cache/action.yaml | sed -n '1,200p'
echo ""
echo "macOS action file:"
cat -n .github/actions/setup-macos-nix-cache/action.yaml | sed -n '1,220p'
echo ""
echo "cache-nix-action usage in .github/actions:"
rg -n "cache-nix-action" .github/actions --type yaml -S || true
echo ""
echo "cache-nix-action usage in .github/workflows:"
rg -n "cache-nix-action" .github/workflows --type yaml -S || true
echo ""
echo "gc/purge parameters in .github/actions:"
rg -n "gc-max-store-size|purge-prefixes|purge-created|purge-primary-key|purge:" .github/actions --type yaml -S || trueRepository: ccusage/ccusage
Length of output: 3978
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "Linux action file:"
cat -n .github/actions/setup-linux-nix-action-cache/action.yaml | sed -n '1,200p'
echo ""
echo "macOS action file:"
cat -n .github/actions/setup-macos-nix-cache/action.yaml | sed -n '1,220p'
echo ""
echo "cache-nix-action usage in .github/actions:"
rg -n "cache-nix-action" .github/actions --type yaml -S || true
echo ""
echo "cache-nix-action usage in .github/workflows:"
rg -n "cache-nix-action" .github/workflows --type yaml -S || true
echo ""
echo "gc/purge parameters in .github/actions:"
rg -n "gc-max-store-size|purge-prefixes|purge-created|purge-primary-key|purge:" .github/actions --type yaml -S || trueRepository: ccusage/ccusage
Length of output: 3978
Confirm cache-nix-action v7.0.2 GC/purge params match the deps-pin trimming goal
.github/actions/setup-linux-nix-action-cache/action.yamlpinsnix-community/cache-nix-action@... # v7.0.2; on Linux it setsgc-max-store-size-linux: 4000000000, which runsnix store gc --maxbefore cache save (only on Linux, and not when the primary-key restores).- Purge is consistent with the intent:
purge: true,purge-prefixes: nix-buildnative-${{ runner.os }}-${{ runner.arch }}-,purge-created: 172800,purge-primary-key: never. - macOS mirrors the same purge behavior (
purge: true,purge-created: 172800,purge-primary-key: never) but usesgc-max-store-size-macos: 3500000000andpurge-prefixes: nix-${{ runner.os }}-${{ runner.arch }}-(key prefix differs). - The “keep rooted cargoArtifacts / trim toolchain” outcome still depends on the deps/profile pin actually making the desired paths reachable; GC alone won’t guarantee 4GB is sufficient—consider adding a lightweight check (e.g., log/store size) to ensure the cache stays under the GitHub Actions limit.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/actions/setup-linux-nix-action-cache/action.yaml around lines 22 -
26, The workflow currently sets gc-max-store-size-linux: 4000000000 and
gc-max-store-size-macos: 3500000000 with purge flags in
.github/actions/setup-linux-nix-action-cache/action.yaml (keys:
gc-max-store-size-linux, gc-max-store-size-macos, purge, purge-prefixes,
purge-created, purge-primary-key), but GC alone may not guarantee the cache fits
GitHub Actions limits; add a lightweight pre-save check step that measures/logs
the nix store size (e.g., run nix store --query --size or du on the store path)
and fail or emit a warning when the measured size exceeds the target thresholds
(4GB/3.5GB) so the action can trim or abort before save, and ensure the check
runs on both Linux and macOS paths that use the respective gc-max-store-size-*
keys.
There was a problem hiding this comment.
This PR is an exploratory "do not merge" run whose explicit purpose is to validate whether the 4GB gc-max-store-size-linux keeps the cache under the 10GB GHA limit. The cache-nix-action already runs nix store gc --max before save, and the CI run output reports cache size, so an extra pre-save size-check step is out of scope for this minimal experiment.
There was a problem hiding this comment.
Skipped: comment is from another GitHub bot.
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. |
ccusage
@ccusage/ccusage-darwin-arm64
@ccusage/ccusage-linux-arm64
@ccusage/ccusage-linux-x64
@ccusage/ccusage-win32-x64
commit: |
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. |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.github/actions/setup-linux-nix-action-cache/action.yaml (1)
24-24: ⚖️ Poor tradeoffConsider whether 2GB gc-max-store-size-linux is sufficient for the deps pin.
The
gc-max-store-size-linuxis set to 2GB, which is lower than macOS's 3.5GB limit and significantly lower than the 4GB discussed in past reviews. While the description claims the cache stays small (~900MB), this leaves limited headroom for:
- Multiple generations of pinned deps across runs
- Stale build outputs before the GC purge runs
- Store overhead and metadata
Since this is an exploratory PR validating cache size, monitor the actual cache size in CI logs to confirm 2GB provides sufficient margin.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/actions/setup-linux-nix-action-cache/action.yaml at line 24, Review and adjust the gc-max-store-size-linux value in action.yaml: consider raising gc-max-store-size-linux from 2000000000 to a larger limit (e.g., ~4000000000 or at least match macOS 3500000000) to provide headroom for pinned deps, stale outputs and metadata, and add a short comment next to the gc-max-store-size-linux key explaining the chosen value and that CI will monitor actual cache sizes (log and alert if close to the limit) so we can iterate if needed.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/actions/setup-linux-nix-action-cache/action.yaml:
- Line 22: The primary-key in
.github/actions/setup-linux-nix-action-cache/action.yaml omits package.json
(which package.nix reads), causing cache misses; update the primary-key's
hashFiles(...) list used for the primary-key to include "package.json" and also
add any other files your Nix expressions depend on (e.g., "default.nix" and
"rust/**/Cargo.toml") so changes to those inputs affect the cache key; locate
the primary-key entry and append those filenames/globs to the hashFiles(...)
argument.
---
Nitpick comments:
In @.github/actions/setup-linux-nix-action-cache/action.yaml:
- Line 24: Review and adjust the gc-max-store-size-linux value in action.yaml:
consider raising gc-max-store-size-linux from 2000000000 to a larger limit
(e.g., ~4000000000 or at least match macOS 3500000000) to provide headroom for
pinned deps, stale outputs and metadata, and add a short comment next to the
gc-max-store-size-linux key explaining the chosen value and that CI will monitor
actual cache sizes (log and alert if close to the limit) so we can iterate if
needed.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: a27d17f4-18fb-472a-bf73-9c94093b6506
📒 Files selected for processing (3)
.github/actions/build-linux-native-package/action.yaml.github/actions/setup-linux-nix-action-cache/action.yaml.github/workflows/ci.yaml
💤 Files with no reviewable changes (1)
- .github/workflows/ci.yaml
mirror the macos primary-key hash list so the linux key invalidates on the same nix inputs. `package.nix` reads `version` from `package.json`, and the nix build references `default.nix` plus the rust workspace `Cargo.toml` files, which were previously omitted from the linux key. Co-authored-by: Codesmith <[email protected]>
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. |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — incremental delta from the prior Pullfrog review at c548fb6: refined the cache description and tightened the gc-max bound to 2GB; dropped the Blacksmith concurrency serialization that is no longer needed.
- Tightened gc-max to 2GB and refined cache description — lowered
gc-max-store-size-linuxfrom 4GB to 2GB in.github/actions/setup-linux-nix-action-cache/action.yaml, and updated the description to more precisely note that cache-nix-action only caches non-substitutable paths (~900MB) - Removed
build-native-packagesconcurrency group —.github/workflows/ci.yaml: the sticky-disk concurrency serialization is no longer needed with cache-nix-action - Updated deps pin comment —
.github/actions/build-linux-native-package/action.yaml: thepin-nix-depscomment now explains the rooting-for-GC rationale instead of the token-hardening rationale
Big Pickle (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — new commit ee126f1 that aligns the Linux Nix cache primary key hash inputs with the macOS setup.
- Aligned Linux cache key inputs with macOS — added
default.nix,package.json, andrust/**/Cargo.tomlto thehashFiles(...)call insetup-linux-nix-action-cache/action.yaml, matching the existing macOS key atsetup-macos-nix-cache/action.yaml. Withoutrust/**/Cargo.toml, changes to individual crate manifests wouldn't bust the cache. Correctness fix.
Big Pickle (free via Pullfrog for OSS) | 𝕏
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. |
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. |
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. |

Summary
The Rust jobs (
check,test,build-native-packages) recompiled the entirecrate dependency set (~3 min on the arm runner) on nearly every run. This moves
all of them to
cache-nix-action(the same mechanism macOS already uses), whichmakes the deps reliably warm.
Root cause
crane's
cargoArtifacts(deps-only) is an unrooted intermediate. What droppedit differed by cache mechanism:
does not honor
/nix/var/nix/profiles/*— verified on a restoredbuild-native disk: the pinned
ccusage-depsprofile symlink survived but itstarget was GC'd.
checkonly looked warm because its store is small enough toskip the trim, not because the pin worked.
nix store gc, whichdoes honor the profile pin, so the rooted deps survive and are cached. It
also only stores non-substitutable paths, so the cache is small (~880MB) and
the toolchain still comes from cache.nixos.org.
Change
setup-linux-nix-action-cacheaction: nix-quick-install + cache-nix-actionwith
gc-max-store-size-linux(bounds the cache) and a per-github.jobkey socheck/test/build don't thrash each other's caches.
check,test, and the Linux native build use it; each pins its own cranedeps (
pin-nix-deps) so the GC keeps them.concurrency(cache keys are immutable — no clobber).Verified
cache hit.
Notes
nix profile installtools and don't build the crate.Summary by CodeRabbit