Skip to content

fix(ci): pin the working Tirith scanner - #1819

Merged
ryoppippi merged 2 commits into
mainfrom
codex/fix-tirith-ci
Oct 2, 2026
Merged

ryoppippi merged 2 commits into
mainfrom
codex/fix-tirith-ci

Conversation

@ryoppippi

@ryoppippi ryoppippi commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

Tirith 0.4.2 now blocks the repository's existing workflow bodies with analysis_incomplete findings and flags the deliberately base-only PR gate. This stops unrelated open pull requests before the test jobs run. Pin the previously passing Tirith 0.3.1 through a separate Nix input and install the same flake package in CI and the dev shell, while leaving the main nixpkgs input current. Disable Renovate updates for this input so the pin only moves deliberately.

The high failure threshold, snapshot exclusion, and SARIF publication remain in place. This restores the existing hidden-content scan; the workflow-analysis rules added in 0.4 are deferred until the workflows can be modeled reliably.

Validation:

  • Reproduced the eight blocking findings with Tirith 0.4.2 on clean tracked source.
  • The exact CI scan with the pinned 0.3.1 package exits 2 (eight advisory warnings, no blocking findings).
  • A disposable ANSI escape fixture still fails the gate with exit 1.
  • just fmt and commit/push hooks pass.
  • Strict Renovate configuration validation passes.
  • Linux and ARM macOS package versions evaluate to 0.3.1; nix build .#devShells.aarch64-darwin.default --no-link succeeds.
  • GitHub CI passed the scanner, preflight, and nix flake check. Full local nix flake check --no-build encountered an invalid local Nix source-store path that did not reproduce in GitHub CI.

Tirith 0.4.2 blocks the existing workflow bodies with incomplete-analysis findings, so unrelated pull requests never reach the test jobs. Pin the previously passing 0.3.1 package independently of the main nixpkgs input and use it in both CI and the dev shell.
@ryoppippi

Copy link
Copy Markdown
Member Author

@coderabbitai @cubic-dev-ai Please review the scanner version pin and CI/dev-shell consistency, including the explicitly deferred Tirith 0.4 workflow rules.

@coderabbitai

coderabbitai Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 11b77c98-01dd-4b91-b0ce-1357ef37c368

📥 Commits

Reviewing files that changed from the base of the PR and between b2871d0 and dcb00a1.

📒 Files selected for processing (1)
  • .github/renovate.json

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.


📝 Walkthrough

Walkthrough

The flake adds a pinned nixpkgs input and exposes its tirith package. The development shell includes that package, and CI installs it from the flake. Renovate disables updates for the pinned input.

Changes

Tirith package setup and use

Layer / File(s) Summary
Define the pinned tirith package
flake.nix, nix/tirith.nix, .github/renovate.json
The flake pins a nixpkgs input, imports the tirith module, and selects the package for the current system. Renovate disables updates for the input.
Use tirith in development and CI
nix/dev-shell.nix, .github/workflows/ci.yaml
The default development shell includes the package. CI installs it directly from the flake.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to dcb00

The Renovate rule protects the Tirith pin, and the supplied evidence identifies no actionable merge-blocking issue. The change appears ready for normal checks.

Architecture Summary

Architecture risk: 🔵 Low · up to dcb00

The change affects 2 systems.

Changed systems: nix, flake.nix

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — nix (service) was modified; 2 changed files map to changed impact.
  • observed — flake.nix (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in flake.nix: Adds the tirith-nixpkgs input pinned to a specific nixpkgs commit; the adjacent comments state that it is kept separate from routine nixpkgs updates.
  • observed — Modified behavior in flake.nix: Adds ./nix/tirith.nix to the flake’s imported modules.
  • observed — Modified behavior in nix/dev-shell.nix: Added config.packages.tirith to the default development shell’s build inputs.
  • observed — Modified behavior in nix/tirith.nix: Adds a Nix flake module whose perSystem function selects the current system’s tirith package from inputs.tirith-nixpkgs.legacyPackages.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: pinning a working Tirith scanner version for CI.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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.

❤️ Share

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

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

@coderabbitai @cubic-dev-ai Please review the scanner version pin and CI/dev-shell consistency, including the explicitly deferred Tirith 0.4 workflow rules.

@ryoppippi I have started the AI code review. It will take a few minutes to complete.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 2, 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 dcb00a1 Commit Preview URL

Branch Preview URL
Oct 02 2026, 06:14 PM

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

All reported issues were addressed across 5 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread nix/dev-shell.nix Resolved

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

ℹ️ Minor suggestions only — the pin restores the gate, but automation can silently undo it.

Reviewed changes Reviewed the single-commit Tirith 0.3.1 pin against main.

  • Pinned scanner input — adds a tirith-nixpkgs flake input at nixpkgs rev 91cc1fdf so the scanner stays put while the main nixpkgs input floats.
  • Shared flake package — new nix/tirith.nix exposes packages.tirith from the pinned input and wires it into the flake imports and the dev shell.
  • CI and shell parity — ci.yaml now installs .#tirith from the flake instead of nixpkgs#tirith, so CI scans with the same package developers get.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using muse-spark-1.3-contributor (free via Pullfrog for OSS) | 𝕏

Comment thread flake.nix Resolved
Comment thread nix/tirith.nix Resolved
@ryoppippi

Copy link
Copy Markdown
Member Author

@coderabbitai @cubic-dev-ai Please review dcb00a1, which protects the scanner pin from Renovate. The ARM macOS dev shell was also built successfully; the platform-validation thread has the exact verification details.

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

@coderabbitai @cubic-dev-ai Please review dcb00a1, which protects the scanner pin from Renovate. The ARM macOS dev shell was also built successfully; the platform-validation thread has the exact verification details.

@ryoppippi I have started the AI code review. It will take a few minutes to complete.

@pkg-pr-new

pkg-pr-new Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

ccusage

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

@ccusage/ccusage-darwin-arm64

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

@ccusage/ccusage-darwin-x64

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

@ccusage/ccusage-linux-arm64

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

@ccusage/ccusage-linux-x64

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

@ccusage/ccusage-win32-x64

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

commit: dcb00a1

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

No issues found across 6 files

Re-trigger cubic

@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 Reviewed the delta since the prior pullfrog review (b2871d0 → dcb00a1).

  • Protected the scanner pin — added a packageRules entry in .github/renovate.json disabling updates for the tirith-nixpkgs input under the nix manager.
  • Left runtime behavior untouched — no changes to the flake package, dev shell, or CI install in this delta; prior pin behavior stands.

Prior feedback on Renovate automerge protection and multi-platform evaluation is addressed by this delta and the author's confirmations.

Pullfrog  | View workflow run | Using muse-spark-1.3-contributor (free via Pullfrog for OSS) | 𝕏

@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: b2871d055245
Base SHA: 4c255c896f02

Performance comparison skipped.

Base package URL was not ready before 300.000s. Fixture performance comparison requires a base package when --base-dir is not provided.

Base package: 4c255c896f02

@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: b2871d055245
Base SHA: 4c255c896f02

Performance comparison skipped.

Base package URL was not ready before 300.000s. Fixture performance comparison requires a base package when --base-dir is not provided.

Base package: 4c255c896f02

@coderabbitai

coderabbitai Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

@ryoppippi I’ll review the Tirith 0.3.1 pin, CI/dev-shell consistency, and Renovate protection in dcb00a1a. I’ll also check that the Tirith 0.4 workflow rules remain explicitly deferred while the existing hidden-content scan stays enforced.

⚠️ Action not completed

Already reviewed the last commit. Use @coderabbitai full review to rerun a review of the entire changeset.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Oct 2, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail
git show --format=fuller --stat dcb00a1a
git show --format= --no-ext-diff dcb00a1a
for file in .github/renovate.json flake.nix nix/tirith.nix nix/dev-shell.nix .github/workflows/ci.yaml; do
  printf '\n--- outline: %s ---\n' "$file"
  ast-grep outline "$file" || true
done
printf '\n--- PR description and comments ---\n'
gh pr view 1819 --repo ccusage/ccusage --json body,comments
printf '\n--- Review comments ---\n'
gh api --paginate repos/ccusage/ccusage/pulls/1819/comments --jq '.[] | {user: .user.login, path, line, body, html_url}'

Length of output: 26746


🏁 Script executed:

#!/bin/bash
set -euo pipefail
for file in .github/renovate.json flake.nix nix/tirith.nix nix/dev-shell.nix; do
  printf '\n--- %s ---\n' "$file"
  cat -n "$file"
done
printf '\n--- scanner workflow ---\n'
rg -n -C12 'tirith|sarif|fail-on|snapshot' .github/workflows/ci.yaml
printf '\n--- locked inputs ---\n'
jq '{root: .nodes.root.inputs, main: .nodes.nixpkgs, tirith: .nodes["tirith-nixpkgs"]}' flake.lock
printf '\n--- current PR checks ---\n'
gh pr view 1819 --repo ccusage/ccusage --json headRefOid,statusCheckRollup --jq '{headRefOid, checks: [.statusCheckRollup[] | {name, status, conclusion, detailsUrl}]}'

Length of output: 28147


🤖 web_search executed:

Renovate nix manager flake.nix input depName matchDepNames matchManagers enabled false packageRules input name versus packageName github nixpkgs

Length of output: 1531


@ryoppippi Reviewed dcb00a1a. No actionable findings.

  • Renovate protection: The rule disables updates only for the tirith-nixpkgs input. matchDepNames is the correct matcher because Renovate uses the flake input name as depName. Updates to the main nixpkgs input remain enabled. No later package rule overrides this protection. See the Renovate Nix documentation.
  • CI/dev-shell consistency: CI installs .#tirith, and the dev shell includes config.packages.tirith. Both select the same pinned input. The revision in flake.nix matches flake.lock.
  • Deferred workflow rules: The comments and PR description explicitly defer Tirith 0.4 workflow analysis. The scan retains --fail-on high, the *.snap exclusion, SARIF publication, and blocking behavior for exit code 1 or unexpected exit codes.
  • Validation: I read the platform-validation thread. It reports successful ARM macOS scanner execution and a successful dev-shell build. GitHub reports successful scanner, SARIF upload, preflight, and test jobs at dcb00a1a.

I did not rerun builds in the inspection sandbox. The performance-comment jobs were still running when I checked.

You are interacting with an AI system.

@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: dcb00a1a95c3
Base SHA: 4c255c896f02

Performance comparison skipped.

Base package URL was not ready before 300.000s. Fixture performance comparison requires a base package when --base-dir is not provided.

Base package: 4c255c896f02

@ryoppippi
ryoppippi merged commit 065e099 into main Oct 2, 2026
41 checks passed
@ryoppippi
ryoppippi deleted the codex/fix-tirith-ci branch October 2, 2026 18:26
@github-actions github-actions Bot mentioned this pull request Oct 2, 2026
@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: dcb00a1a95c3
Base SHA: 4c255c896f02

Performance comparison skipped.

Base package URL was not ready before 300.000s. Fixture performance comparison requires a base package when --base-dir is not provided.

Base package: 4c255c896f02

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