Skip to content

build: pin an absolute exclude-newer so CI can verify the lockfile - #12

Merged
beallio merged 3 commits into
devfrom
fix/pin-exclude-newer
Aug 2, 2026
Merged

build: pin an absolute exclude-newer so CI can verify the lockfile#12
beallio merged 3 commits into
devfrom
fix/pin-exclude-newer

Conversation

@beallio

@beallio beallio commented Aug 2, 2026

Copy link
Copy Markdown
Owner

Restores uv sync --locked across every CI leg, and fixes a yanked dependency found on the way.

The problem

The maintainer's global ~/.config/uv/uv.toml sets exclude-newer = "7 days" — a relative
constraint. uv stamps it into uv.lock as exclude-newer-span = "P7D", which CI cannot
reproduce, so --locked failed deterministically and had to be removed. Lockfile verification
was off as a result.

The fix

Pin an absolute date in pyproject.toml:

[tool.uv]
exclude-newer = "2026-07-25"

The lock now records an absolute exclude-newer = "2026-07-26T07:00:00Z" and contains no
exclude-newer-span, so it is machine-independent and --locked works everywhere.

The yanked dependency this surfaced

polars uploaded yanked
1.43.0 Jul 21 yes ← was locked
1.43.1 Jul 27 yes
1.43.2 Aug 1 no

The project was on a yanked polars. The fix postdates the pin, so polars is exempted
per-package rather than freezing on a yanked release:

exclude-newer-package = { polars = false, "polars-runtime-32" = false, "polars-runtime-64" = false }

Everything else keeps the supply-chain guard.

Verified

check result
uv sync --locked succeeds
exclude-newer-span in lock absent
polars 1.43.0 → 1.43.2 (not yanked)
tests 3.14 / 3.12 354 passed, 7 deselected — both
spark tier 7 passed
other package versions changed none

The CI audit test previously asserted --locked was absent; it now asserts it is present,
with a comment on why reverting to a relative exclude-newer would break it again.

🤖 Generated with Claude Code

https://claude.ai/code/session_01SjSyr1rQx2gnGTdw9Ncj6h

beallio added 3 commits August 1, 2026 22:56
A relative exclude-newer (the maintainer's global "7 days") stamps a machine-specific
exclude-newer-span into uv.lock, which CI cannot reproduce, so --locked could never be
satisfied. Pinning an absolute date makes the lock machine-independent and restores
lockfile verification across every CI leg.

polars 1.43.0 and 1.43.1 are yanked and the fix (1.43.2) postdates the pin, so polars is
exempted per-package rather than leaving the project on a yanked release.
A bare date resolves to local midnight, so the lock recorded 2026-07-26T07:00:00Z on a
PDT machine while CI computed 2026-07-26T00:00:00Z — the same class of machine-dependence
the absolute pin was meant to remove.
uv merges the maintainer's global exclude-newer-package into the lockfile, so the project
must declare the same entries or CI computes a different set and --locked fails.
@beallio
beallio merged commit 9a6df8f into dev Aug 2, 2026
9 checks passed
@beallio
beallio deleted the fix/pin-exclude-newer branch August 2, 2026 06:03
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