fix(deps): manage bot lockfile with Renovate pip-compile manager (#178) #179

Merged
claude-bot merged 1 commit from fix/178-pydantic-lock-pip-compile into main 2026-07-16 21:43:24 +00:00
Contributor

Fixes #178.

Why

bot/requirements.txt is a pip-compile lockfile (source bot/requirements.in). Its only direct pydantic dependency is pydantic-settings; pydantic and pydantic-core are transitive, and pydantic pins pydantic-core to an exact version.

Renovate managed this file with the pip_requirements manager, which edits pins in place, one package per PR, never re-running pip-compile. Every pydantic bump therefore decoupled the pair:

The user requested pydantic-core==2.41.5
pydantic 2.13.4 depends on pydantic-core==2.46.4

…failing the bot tests, the dependency audit, and the bot Docker image build. The mirror PR (pydantic-core → 2.47.0) was unmergeable by construction — pydantic 2.13.4 pins core to exactly 2.46.4.

main was never broken (2.12.5 + 2.41.5 are internally consistent) — only the Renovate branches were. But this would have recurred on every future pydantic bump, including security bumps.

What changed

  1. renovate.json — opt bot/requirements.txt into the pip-compile manager (its default managerFilePatterns is empty, so it requires explicit opt-in), and disable pip_requirements for that one file only.
  2. bot/requirements.txt — regenerated to a consistent pair: pydantic 2.12.5 → 2.13.4, pydantic-core 2.41.5 → 2.46.4. The regen also corrected pre-existing drift: adds pyjwt==2.13.0 (required by redis==5.3.1, previously missing) and drops a stale sniffio entry.

Deliberately out of scope

webapp/backend/requirements.txt stays on pip_requirements. Despite a header claiming pip-compile requirements.in, there is no webapp/backend/requirements.in in the repo — it's hand-maintained and doesn't pin pydantic/pydantic-core at all, so it never hit this conflict. That misleading header is worth a separate tidy-up.

Verification

Installed the regenerated lock in python:3.12 and ran the suite:

  • resolves and installs cleanly (previously ResolutionImpossible)
  • pydantic 2.13.4 + pydantic-core 2.46.4 confirmed installed
  • 186 bot tests pass
  • renovate-config-validator (renovate 42.99.0) — "Config validated successfully" as repo config

CI on this PR re-validates the bot image build that was failing.

Follow-ups

  • Supersedes the two broken Renovate PRs (pydantic → 2.13.4, pydantic-core → 2.47.0) — they should be closed once this merges.
  • Runner prerequisite: the pip-compile manager must be able to execute pip-compile (Python 3.12 + pip-tools) in the Renovate runner. Renovate runs from an external/central runner, not a workflow in this repo — worth confirming on the next run that it regenerates the lock rather than erroring on artifact update.

🤖 Generated with Claude Code

Fixes #178. ## Why `bot/requirements.txt` is a **pip-compile lockfile** (source `bot/requirements.in`). Its only *direct* pydantic dependency is `pydantic-settings`; **`pydantic` and `pydantic-core` are transitive**, and pydantic pins pydantic-core to an **exact** version. Renovate managed this file with the **`pip_requirements`** manager, which edits pins **in place, one package per PR**, never re-running pip-compile. Every pydantic bump therefore decoupled the pair: ``` The user requested pydantic-core==2.41.5 pydantic 2.13.4 depends on pydantic-core==2.46.4 ``` …failing the bot tests, the dependency audit, and the bot Docker image build. The mirror PR (`pydantic-core → 2.47.0`) was unmergeable by construction — pydantic 2.13.4 pins core to exactly 2.46.4. `main` was never broken (2.12.5 + 2.41.5 are internally consistent) — only the Renovate branches were. But this would have recurred on **every** future pydantic bump, including security bumps. ## What changed 1. **`renovate.json`** — opt `bot/requirements.txt` into the **`pip-compile` manager** (its default `managerFilePatterns` is empty, so it requires explicit opt-in), and disable `pip_requirements` for **that one file only**. 2. **`bot/requirements.txt`** — regenerated to a consistent pair: `pydantic 2.12.5 → 2.13.4`, `pydantic-core 2.41.5 → 2.46.4`. The regen also corrected pre-existing drift: adds `pyjwt==2.13.0` (required by `redis==5.3.1`, previously missing) and drops a stale `sniffio` entry. ### Deliberately out of scope `webapp/backend/requirements.txt` stays on `pip_requirements`. Despite a header claiming `pip-compile requirements.in`, **there is no `webapp/backend/requirements.in` in the repo** — it's hand-maintained and doesn't pin `pydantic`/`pydantic-core` at all, so it never hit this conflict. That misleading header is worth a separate tidy-up. ## Verification Installed the regenerated lock in `python:3.12` and ran the suite: - resolves and installs cleanly (previously `ResolutionImpossible`) - `pydantic 2.13.4` + `pydantic-core 2.46.4` confirmed installed - **186 bot tests pass** - `renovate-config-validator` (renovate 42.99.0) — "Config validated successfully" as repo config CI on this PR re-validates the bot image build that was failing. ## Follow-ups - Supersedes the two broken Renovate PRs (`pydantic → 2.13.4`, `pydantic-core → 2.47.0`) — they should be closed once this merges. - **Runner prerequisite:** the `pip-compile` manager must be able to *execute* pip-compile (Python 3.12 + pip-tools) in the Renovate runner. Renovate runs from an external/central runner, not a workflow in this repo — worth confirming on the next run that it regenerates the lock rather than erroring on artifact update. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix(deps): manage bot lockfile with Renovate pip-compile manager (#178)
All checks were successful
CI / Backend lint (ruff) (pull_request) Successful in 35s
CI / Docker image build (pull_request) Successful in 46s
CI / Frontend tests, audit, and build (pull_request) Successful in 1m25s
CI / Bot tests and audit (pull_request) Successful in 2m39s
CI / Backend migration, tests, and audit (pull_request) Successful in 3m59s
b11223b9fb
bot/requirements.txt is a pip-compile lockfile whose only direct pydantic
dependency is pydantic-settings; pydantic and pydantic-core are transitive, and
pydantic pins pydantic-core to an exact version. Renovate managed the file with
the pip_requirements manager, which edits pins in place one package per PR and
never re-runs pip-compile, so each pydantic bump decoupled the pair:

    The user requested pydantic-core==2.41.5
    pydantic 2.13.4 depends on pydantic-core==2.46.4

...failing bot tests, the dependency audit, and the bot image build. The mirror
PR (pydantic-core 2.47.0) was unmergeable by construction. main itself was never
broken; only the Renovate branches were.

Opt bot/requirements.txt into the pip-compile manager (empty default
managerFilePatterns, so it needs explicit opt-in) and disable pip_requirements
for that one file, leaving webapp/backend/requirements.txt and the
requirements-dev.txt files untouched — webapp has no requirements.in and is
hand-maintained.

Regenerate the lock to a consistent pair: pydantic 2.13.4 + pydantic-core
2.46.4. This also corrects pre-existing drift (adds pyjwt, required by
redis 5.3.1; drops a stale sniffio entry).

Verified in python:3.12: installs cleanly, 186 bot tests pass.
Config validated by renovate-config-validator (renovate 42.99.0).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
claude-bot deleted branch fix/178-pydantic-lock-pip-compile 2026-07-16 21:43:24 +00:00
Sign in to join this conversation.
No description provided.