Repository navigation
fix(pricing): commit the codex fallback snapshot from its real path - #1510
Conversation
The models.dev job has failed on every hourly run since #1428 moved the adapter crates: fatal: pathspec 'rust/crates/ccusage-adapter-codex/src/codex-auto-review-fallbacks.json' did not match any files The file lives at rust/adapters/codex/src/codex-auto-review-fallbacks.json, so models.dev pricing has not been refreshed since that move; only the LiteLLM half of the workflow still worked. The path was duplicated between the update script and the workflow, which is how it drifted from the Rust tree in the first place. The script now reports the paths it owns through GITHUB_OUTPUT and the workflow passes that straight to the push action, so there is one list. The script also asserts up front that the snapshots exist, so the next move fails immediately instead of after a full regenerate-and-validate cycle.
📝 WalkthroughWalkthroughPricing update scripts now validate snapshot paths and report both change status and affected files. The GitHub Actions workflow consumes those reported paths when committing updates, removing the duplicated models-dev path list. ChangesPricing update output ownership
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant UpdateScript
participant ReportHelper
participant GitHubActions
participant Git
UpdateScript->>ReportHelper: report changed status and owned paths
ReportHelper->>GitHubActions: write changed and paths outputs
GitHubActions->>Git: commit reported paths
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
ccusage-guide | e138a1e | Commit Preview URL Branch Preview URL |
Jul 28 2026, 01:24 AM |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — corrects the codex fallback snapshot path broken by the crate split in #1428, and centralizes path reporting so the file list can't drift again.
- Fix
SNAPSHOTSpath inupdate-models-dev-lock.nu— the committed fallback snapshot moved fromrust/crates/ccusage-adapter-codex/torust/adapters/codex/in #1428 but the CI script was never updated, causing the models.dev leg to fail on every hourly run. - Add fail-fast path assertion —
update-models-dev-lock.nunow checks that every snapshot path exists before doing any work, so the next directory move fails immediately with a clear error. - Centralize path reporting — both update scripts now emit
pathsalongsidechangedviaGITHUB_OUTPUT, and the workflow readssteps.update.outputs.pathsinstead of duplicating the file list in the matrix.
@v0 or keep the SHA fresh with Dependabot | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
All reported issues were addressed across 3 files
Reply with feedback, questions, or to request a fix.
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: |
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. |
… scripts Both update scripts carried a byte-identical `report` definition, so any change to the GITHUB_OUTPUT format had to be made twice. Move it to a `.github/scripts/pricing-lock.nu` module both scripts import. Nushell resolves relative `use` paths against the importing file, so the module loads regardless of the workflow's working directory. Co-authored-by: Codesmith <[email protected]>
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. |

Summary
The models.dev half of
update-pricing.yamlhas failed on every hourly run since #1428 split the workspace and moved the adapter crates:The tracked file is at
rust/adapters/codex/src/codex-auto-review-fallbacks.json. So models.dev pricing has not been refreshed since that move — only the LiteLLM half of the workflow still worked. Caught by pullfrog on #1509; the wrong path predates that PR, which carried it over unchanged.What Changed
.github/scripts/update-models-dev-lock.nu.GITHUB_OUTPUT, and the workflow passessteps.update.outputs.pathsstraight to the push action.Testing
nu-checkpasses on both scripts.git checkout -- flake.lock <snapshots>with the corrected list against a clean tree: the revert arm the job could never reach before is now a no-op instead of a fatal pathspec error.update-litellm-lock.nuend to end: bumped34561482tof2cda740and reportedchanged=true/paths=flake.lock. Lock restored afterwards.just fmt(actionlint, zizmor, nufmt) passes.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is enabled.Summary by cubic
Fixes the models.dev pricing job by committing the codex fallback snapshot from its real path and removing duplicated path lists, restoring hourly updates.
Bug Fixes
rust/adapters/codex/src/codex-auto-review-fallbacks.json.Refactors
reporthelper to.github/scripts/pricing-lock.nu; both lock scripts import it to emitchangedandpathsviaGITHUB_OUTPUT.steps.update.outputs.pathsinstead of hardcoded lists to prevent drift.Written for commit e138a1e. Summary will update on new commits.
Summary by CodeRabbit
Bug Fixes
Chores