Skip to content

chore(dependabot): track pre-commit hook versions - #55

Merged
finallyjay merged 3 commits into
mainfrom
chore/dependabot-pre-commit
Aug 3, 2026
Merged

chore(dependabot): track pre-commit hook versions#55
finallyjay merged 3 commits into
mainfrom
chore/dependabot-pre-commit

Conversation

@finallyjay

Copy link
Copy Markdown
Owner

The problem

Dependabot bumps requirements-dev.txt but has never touched .pre-commit-config.yaml. The two drift, and pre-commit ends up linting and type-checking with different versions than CI.

This is not hypothetical — it is what blocked #53 and #49 since July. CodeRabbit flagged both, correctly, and they sat there. The drift predates them too: main had ruff==0.15.20 pinned against hook rev: v0.15.17.

requirements-dev.txt hook rev (before)
ruff 0.16.1 v0.15.17
mypy 2.3.0 v2.1.0

Two minors apart for mypy is enough for the two to disagree on what type-checks — you pass locally and fail in CI, or the reverse.

The fix

Adds the pre-commit ecosystem so Dependabot maintains the hook revs alongside the pip pins:

  - package-ecosystem: pre-commit
    directory: "/"
    schedule:
      interval: weekly

pre-commit is a supported ecosystem; directory: "/" points at the repo-root .pre-commit-config.yaml. YAML validated, all four ecosystems parse: pip, docker, github-actions, pre-commit.

This stops the drift recurring. #53 and #49 have had their revs synced by hand in their own branches.

🤖 Generated with Claude Code

Dependabot bumps requirements-dev.txt but has never touched
.pre-commit-config.yaml, so the hook revs drift from the pins and
pre-commit runs a different ruff/mypy than CI. Both #53 and #49 were
blocked on exactly that.

Adding the pre-commit ecosystem makes Dependabot maintain the hook revs
too, so the two stay in step without anyone remembering to do it by hand.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings August 3, 2026 09:42
@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 3cdefc69-dab8-40b7-af27-2a1003780de2

📥 Commits

Reviewing files that changed from the base of the PR and between 440c38e and ad10e99.

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

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.


📝 Walkthrough

Summary by CodeRabbit

  • Chores
    • Added weekly automated maintenance checks to help keep development tooling current.
    • Added guidance to support consistent version updates and reduce manual maintenance effort.

Walkthrough

Adds a root-level Dependabot configuration for weekly updates in the pre-commit ecosystem. Comments document synchronization with requirements-dev.txt.

Changes

Dependabot configuration

Layer / File(s) Summary
Weekly pre-commit update configuration
.github/dependabot.yml
Dependabot now checks the root pre-commit ecosystem weekly. Comments document synchronization with requirements-dev.txt.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

Suggested labels: dependencies

Poem

A rabbit checks the weekly beat,
While pre-commit pins stay neat.
Dependabot hops in time,
Syncing every dev-time line.
Tiny config, tidy treat!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: tracking pre-commit hook versions with Dependabot.
Description check ✅ Passed The description clearly explains the problem, fix, validation, and related issues, although it does not use the repository template headings.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/dependabot-pre-commit

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

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates Dependabot configuration so it also tracks and updates pre-commit hook revisions, preventing drift between .pre-commit-config.yaml hook versions and the Python dev-tool versions pinned in requirements-dev.txt.

Changes:

  • Add a package-ecosystem: pre-commit entry to Dependabot’s scheduled updates.
  • Document (in-file) why pre-commit hook revs must be kept in sync with CI/pip pins.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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/dependabot.yml:
- Around line 18-21: Update the synchronization comment in the Dependabot
configuration to accurately state that the pre-commit and pip ecosystems update
independently, removing the claim that their versions stay synchronized; do not
change the dependency configuration.
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ea1280a1-3050-48e4-83d2-455e1fdcf026

📥 Commits

Reviewing files that changed from the base of the PR and between 356a9be and 440c38e.

📒 Files selected for processing (1)
  • .github/dependabot.yml
📜 Review details
⏰ Context from checks skipped due to timeout. (3)
  • GitHub Check: copilot-pull-request-reviewer
  • GitHub Check: Analyze (python)
  • GitHub Check: Analyze (actions)
🔇 Additional comments (1)
.github/dependabot.yml (1)

22-25: LGTM!

Comment thread .github/dependabot.yml Outdated
finallyjay and others added 2 commits August 3, 2026 13:15
The comment claimed this keeps hook revs "in step with" the pip pins. It
does not: pip and pre-commit are separate ecosystems and Dependabot raises
a PR per ecosystem, so the two can still diverge between merges.

What it does buy is that .pre-commit-config.yaml stops being ignored
entirely. Reworded, and the manual check at review time is now stated
rather than implied.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@finallyjay
finallyjay merged commit adbf5b0 into main Aug 3, 2026
7 checks passed
@finallyjay
finallyjay deleted the chore/dependabot-pre-commit branch August 3, 2026 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Dependency updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants