Skip to content

ci: fix lint cache key and codecov upload on dependabot PRs - #950

Merged
njbrake merged 1 commit into
mainfrom
fix/ci-linter-cache-codecov
Sep 21, 2026
Merged

njbrake merged 1 commit into
mainfrom
fix/ci-linter-cache-codecov

Conversation

@njbrake

@njbrake njbrake commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Description

Two CI bugs blocking every dependabot PR.

run-linter: with pre-commit-uv 4.2.1, uv 0.12.x writes version_info = 3.13 into a hook virtualenv's pyvenv.cfg while pre-commit expects 3.13.15, so every hook env is unhealthy right after install. Not a cache problem; it reproduces with an empty cache. 4.3.0 compares only the components uv recorded. Cache keys now carry the patch version too.

run-unit-tests: dependabot branches get no secrets, so the empty Codecov token was rejected ("Token required because branch is protected"). The upload is skipped when the token is empty; normal PRs and main unchanged.

Both jobs now fail further along on dependency drift: mcp 2.x dropped streamablehttp_client and renamed inputSchema. Separate fix.

PR Type

  • Bug Fix
  • Infrastructure

Relevant issues

None.

Checklist

  • I understand the code I am submitting.
  • I have added unit tests that prove my fix/feature works
  • I have run this code locally and verified it fixes the issue.
  • New and existing tests pass locally
  • Documentation was updated where necessary
  • I have read and followed the contribution guidelines
  • AI Usage:
    • No AI was used.
    • AI was used for drafting/refactoring.
    • This is fully AI-generated.

AI Usage Information

  • AI Model used: Claude Opus 5 (1M context)

  • AI Developer Tool used: Claude Code

  • Any other info you'd like to share: The hook install failure was reproduced locally with pre-commit-uv 4.2.1 and confirmed fixed with 4.3.0, same uv 0.12.17 and this repo's hook config. In CI on this branch, all 14 hooks now install and run; only mypy fails, on the dependency drift noted above. Workflow syntax checked with actionlint.

  • I am an AI Agent filling out this form (check box if true)

🤖 Generated with Claude Code

run-linter: with pre-commit-uv 4.2.1, uv 0.12.x records
"version_info = 3.13" in a hook virtualenv's pyvenv.cfg while pre-commit
compares it against the full "3.13.15", so every hook environment is
reported unhealthy right after install and pre-commit aborts with
"BUG: expected environment for python to be healthy immediately after
install". pre-commit-uv 4.3.0 compares only the components uv recorded.
Reproduced locally with 4.2.1 and confirmed fixed with 4.3.0 against this
repo's hook config.

The pre-commit and mypy cache keys now also carry the resolved CPython
patch version, so a runner on a newer patch release no longer restores
hook virtualenvs it has to discard and rebuild.

run-unit-tests: dependabot branches do not receive repository secrets, so
the empty Codecov token was rejected with "Token required because branch
is protected" and failed the job. The upload is skipped when the token is
empty. Uploads on normal PRs and on main are unchanged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@njbrake
njbrake force-pushed the fix/ci-linter-cache-codecov branch from f8616e1 to 0200e52 Compare September 21, 2026 14:08
@njbrake
njbrake merged commit 3eab34d into main Sep 21, 2026
4 of 13 checks passed
@njbrake
njbrake deleted the fix/ci-linter-cache-codecov branch September 21, 2026 15:37
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