Skip to content

chore: pin deps so Renovate honors minimumReleaseAge (reliable automerge)#820

Merged
cailmdaley merged 2 commits into
developfrom
chore/renovate-reliable-automerge
Jul 13, 2026
Merged

chore: pin deps so Renovate honors minimumReleaseAge (reliable automerge)#820
cailmdaley merged 2 commits into
developfrom
chore/renovate-reliable-automerge

Conversation

@cailmdaley

@cailmdaley cailmdaley commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Why

ShapePipe has no repo Renovate config — everything comes from Mend defaults, and dependency automerge is unreliable: grouped update PRs (#816) stall on a renovate/artifacts "Artifact file update failure."

The failure is a supply-chain-gate mechanics problem, not a real conflict. pyproject.toml uses floor constraints (tqdm>=4.68.1). Renovate wants to move to an aged version (tqdm 4.68.3, past the minimum-release-age window), but updates the lock via uv lock, which resolves the floor to the newest in-range release (4.68.4) — still too fresh. Renovate can't tell uv to pin an exact version (renovatebot/renovate#41624), so it fails instead of waiting.

Keep the release-age gate — it's the point

minimumReleaseAge is a supply-chain defense: a hijacked-but-legitimate package (compromised maintainer, malicious release — the common attack now) gets a detection window before it auto-merges into the pipeline. We want to keep it, not drop it. The task is making Renovate actually honor it.

The fix

A renovate.json layered over the Mend defaults:

  • rangeStrategy: "pin" — the one way Renovate can honor minimumReleaseAge with uv. It writes the exact aged version into pyproject.toml, so uv lock can't overshoot to a too-fresh release. Renovate's own recommendation for applications.
  • internalChecksFilter: "strict" — only ever act on versions that have passed the age gate.
  • minimumReleaseAge: "3 days" — the supply-chain delay, now owned in git (not an invisible Mend toggle) and tunable. Bump it for a longer detection window.

Trade-offs to weigh (your + Martin's call)

  • pyproject deps become exact == pins. This departs from the CLAUDE.md "abstract floors / uv.lock is the pin" design. But that design's rationale is downstream flexibility for library installers — and shapepipe isn't a library: it's not on PyPI, it ships as a container built from uv.lock. For an application, pinning is the standard, secure choice. Renovate will open a one-time "Pin dependencies" PR to do the rewrite.
  • Direct deps only. minimumReleaseAge gates the deps Renovate sees (direct, in pyproject). Transitive deps in uv.lock still float to latest via lockFileMaintenance — an existing gap, not made worse here.
  • Watch the pin PR for the git-sourced deps (ngmix, cs_util via [tool.uv.sources]) — pinning should leave their git refs alone, but worth a glance on the first run.

If you'd rather keep abstract floors and accept that automerge needs an occasional nudge (the failures self-heal as versions age), say so and I'll pare this back to just documenting that.

Note

Config takes effect once merged to develop and Renovate re-runs; a malformed config surfaces as a Renovate comment, not a CI failure here. Validated as well-formed JSON against the schema.

🤖 Generated with Claude Code

cailmdaley and others added 2 commits July 13, 2026 13:43
ShapePipe had no repo Renovate config — everything came from Mend defaults.
Two knobs, layered on top of those defaults, to make dependency automerge
hands-off:

- rangeStrategy = update-lockfile: pyproject.toml carries floor constraints
  (major-version signals); uv.lock is the real pin. Bump the lock for
  minor/patch updates, never rewrite the floors. (Non-lock ecosystems —
  Dockerfile, github-actions — fall back to "replace" automatically.)

- minimumReleaseAge = 0 days: removes the release-age gate that was stalling
  automerge. With floor ranges, Renovate targets an aged version but `uv lock`
  resolves the floor to the newest in-range release — which may still be inside
  the age window — and Renovate can't pin uv to an exact version
  (renovatebot/renovate#41624), so the artifact update fails (this blocked
  #816). CI (full test suite + example pipeline, every PR) is the real safety
  gate for a dependency bump, so gate on CI, not a waiting period.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CBC6HKdgXaZ7ei5XfdvZGo
…lay)

Keep the release-age gate — the point of it is supply-chain defense: a
hijacked-but-legitimate package (compromised maintainer / malicious release)
gets a detection window before it auto-merges — and make automerge reliable at
the same time.

Root problem: with floor ranges (>=) + rangeStrategy=update-lockfile, `uv lock`
resolves the floor to the newest in-range release, which may be too fresh, and
Renovate can't pin uv to an exact aged version (renovatebot/renovate#41624). So
it fails the artifact update instead of waiting — this is what stalled #816.

Fix: rangeStrategy=pin writes the exact aged version into pyproject.toml, so uv
can't overshoot and minimumReleaseAge is honored. internalChecksFilter=strict
ensures Renovate only ever acts on versions past the age gate. minimumReleaseAge
set explicitly (3 days) so the control is owned in git, tunable.

shapepipe ships as a container and isn't on PyPI (an app, not a library with
downstream installers), so pinning is the appropriate, standard choice; the
abstract-floors design targets libraries. Gates DIRECT deps only — transitive
deps in uv.lock still float via lockFileMaintenance.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CBC6HKdgXaZ7ei5XfdvZGo
@cailmdaley cailmdaley changed the title chore: add renovate.json for reliable dependency automerge chore: pin deps so Renovate honors minimumReleaseAge (reliable automerge) Jul 13, 2026
@cailmdaley cailmdaley merged commit 6c3e2f4 into develop Jul 13, 2026
2 checks passed
@cailmdaley cailmdaley deleted the chore/renovate-reliable-automerge branch July 13, 2026 12:25
cailmdaley added a commit that referenced this pull request Jul 13, 2026
Match the docs to the strategy landed in #820: shapepipe pins deps to exact
versions in pyproject.toml so Renovate can honor a supply-chain release-age
delay (it can't hold uv back to an aged version through a floor range —
renovatebot/renovate#41624). shapepipe ships as a container, not a published
library, so there are no downstream installers that abstract floors would
serve. Updates CLAUDE.md and the pyproject.toml header, which both still
described the old abstract-minimums convention.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CBC6HKdgXaZ7ei5XfdvZGo
@renovate renovate Bot mentioned this pull request Jul 14, 2026
1 task
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