Skip to content

ci: skip pre-commit hook on automated cache commit#1320

Merged
sbryngelson merged 1 commit intoMFlowCode:masterfrom
sbryngelson:fix/cache-commit-no-verify
Mar 17, 2026
Merged

ci: skip pre-commit hook on automated cache commit#1320
sbryngelson merged 1 commit intoMFlowCode:masterfrom
sbryngelson:fix/cache-commit-no-verify

Conversation

@sbryngelson
Copy link
Copy Markdown
Member

Summary

  • The rebuild-cache CI job's git commit triggers the pre-commit hook, which runs precheck on the entire repo. If any other merged PR introduced a spelling/lint issue, the automated cache commit fails — even though only test_coverage_cache.json.gz is being committed.
  • Fix: add --no-verify to the automated git commit in the "Commit Cache to Master" step.

Fixes the failure in https://github.com/MFlowCode/MFC/actions/runs/23218089807/job/67484083040

Test plan

  • rebuild-cache job succeeds on the next push to master

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings March 17, 2026 23:26
@github-actions
Copy link
Copy Markdown

Claude Code Review

Head SHA: 048439c

Files changed:

  • 1
  • .github/workflows/test.yml

Summary:

  • Single-line CI fix: adds --no-verify to the automated git commit in the rebuild-cache job's "Commit Cache to Master" step.
  • The problem is real: the pre-commit hook runs ./mfc.sh precheck (full lint gate) on the entire repo. An automated commit that only touches test_coverage_cache.json.gz should not be blocked by unrelated lint issues in source files introduced by other merged PRs.
  • The fix is scoped correctly — --no-verify is only applied to this single automated bot commit, not to developer commits.
  • The commit message already carries [skip ci] to suppress re-triggering CI, and the step is already gated on github.ref == 'refs/heads/master', so the blast radius is minimal.

Findings:

  • No issues found. The change is correct and well-scoped.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the CI workflow that regenerates and commits the gcov coverage cache so that the automated commit step does not run local git hooks (e.g., the repo’s auto-installed pre-commit hook), improving reliability of the cache-push automation.

Changes:

  • Add --no-verify to the workflow’s git commit command when committing the regenerated coverage cache to master.

@sbryngelson sbryngelson merged commit d91e6ac into MFlowCode:master Mar 17, 2026
47 of 56 checks passed
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 17, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 46d4c015-af2e-4f0f-a289-3a6a37cf4d17

📥 Commits

Reviewing files that changed from the base of the PR and between 808a668 and 048439c.

📒 Files selected for processing (1)
  • .github/workflows/test.yml

📝 Walkthrough

Walkthrough

The pull request modifies .github/workflows/test.yml to add the --no-verify flag to the git commit command in the "Commit Cache to Master" step. The workflow's control flow remains unchanged: when changes are staged, the commit is made, followed by a rebase onto master and a push; when no changes are staged, no action is taken. One line is added and one line is removed in this modification.

📝 Coding Plan
  • Generate coding plan for human review comments

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 and usage tips.

Tip

CodeRabbit can suggest fixes for GitHub Check annotations.

Configure the reviews.tools.github-checks setting to adjust the time to wait for GitHub Checks to complete.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 45.01%. Comparing base (38a7b4b) to head (048439c).
⚠️ Report is 6 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1320      +/-   ##
==========================================
- Coverage   45.12%   45.01%   -0.11%     
==========================================
  Files          70       70              
  Lines       20554    20562       +8     
  Branches     1962     1962              
==========================================
- Hits         9274     9255      -19     
- Misses      10152    10179      +27     
  Partials     1128     1128              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants