Skip to content

Truncate exclude-newer span timestamps to midnight UTC - #1

Merged
naveenOnarayanan merged 13 commits into
mainfrom
nn/uv-exclude-newer-only-update-at-day-boundary
Apr 9, 2026
Merged

Truncate exclude-newer span timestamps to midnight UTC#1
naveenOnarayanan merged 13 commits into
mainfrom
nn/uv-exclude-newer-only-update-at-day-boundary

Conversation

@naveenOnarayanan

Copy link
Copy Markdown

When exclude-newer is computed from a relative span (e.g., "P7D"),
the resulting timestamp now gets truncated to the start of the day
(midnight UTC) instead of preserving second/millisecond precision.

This eliminates lockfile churn caused by different developers running
uv lock at slightly different times on the same day — they will all
get the same T00:00:00Z timestamp. The timestamp only changes when
the calendar day boundary crosses.

Applied to both code paths:

  • ExcludeNewerValue::recompute() — called when tools re-evaluate spans
  • ExcludeNewerValue::from_str() — called when initially parsing spans

Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

Summary

Test Plan

When exclude-newer is computed from a relative span (e.g., "P7D"),
the resulting timestamp now gets truncated to the start of the day
(midnight UTC) instead of preserving second/millisecond precision.

This eliminates lockfile churn caused by different developers running
`uv lock` at slightly different times on the same day — they will all
get the same `T00:00:00Z` timestamp. The timestamp only changes when
the calendar day boundary crosses.

Applied to both code paths:
- `ExcludeNewerValue::recompute()` — called when tools re-evaluate spans
- `ExcludeNewerValue::from_str()` — called when initially parsing spans

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
naveenOnarayanan and others added 7 commits April 8, 2026 18:47
Remove all platform targets that Doppel doesn't need:
- macOS x86_64 (Intel Macs)
- Windows (all architectures)
- Linux i686 (32-bit)
- Linux armv7 and armv6 (32-bit ARM)
- Linux s390x (IBM Z)
- Linux powerpc64le (POWER)
- Linux riscv64 (RISC-V)
- All musllinux targets (Alpine)

Remaining targets:
- aarch64-apple-darwin (macOS arm64 — developer laptops)
- x86_64-unknown-linux-gnu (Linux amd64 — Cloud Run containers)
- aarch64-unknown-linux-gnu (Linux arm64 — potential future use)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds a composite action at .github/actions/setup-safe-chain/ that
installs a pinned safe-chain release (v1.4.6) with SHA-256 verification
and configures a 72-hour minimum package age for pip installs.

Integrates it into all four build jobs in build-release-binaries.yml:
- sdist (Ubuntu)
- macos-aarch64
- linux (x86_64)
- linux-arm (aarch64)

Safe Chain wraps pip via shims on PATH, blocking packages published
less than 72 hours ago to protect against supply chain attacks during
the build.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
CI workflow:
- Remove the complex plan job that orchestrated ~15 upstream test suites
- Keep only check-fmt, check-lint, and build-release-binaries
- The plan job used depot-ubuntu-24.04 which doesn't exist on doppelxyz

Runners (all workflows):
- Replace depot-ubuntu-24.04-4 → ubuntu-24.04
- Replace depot-ubuntu-24.04-8 → ubuntu-24.04
- Replace depot-ubuntu-latest-4 → ubuntu-latest
- Replace depot-macos-14 → macos-14
- Replace ubuntu-slim → ubuntu-latest

Depot is a paid CI service used by upstream Astral. The doppelxyz org
uses standard GitHub-hosted runners.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
macOS doesn't ship sha256sum — use shasum -a 256 as fallback.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Remove clippy-windows job from check-lint.yml (no Windows targets)
- Remove build-release-binaries from ci.yml (only run on release)
- Keep ubuntu-slim runners as-is from upstream

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Updates the 3 user-facing crates (uv, uv-build, uv-version) and the
workspace dependency to use 0.11.5-doppel. This makes `uv --version`
clearly identify the Doppel fork vs upstream.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@naveenOnarayanan
naveenOnarayanan force-pushed the nn/uv-exclude-newer-only-update-at-day-boundary branch from 4ea6a40 to d466efb Compare April 9, 2026 02:16
doppel-set-version.sh updates the version across all 4 files that carry
it, appending -doppel automatically. Works on both macOS and Linux.

RELEASE.md documents the release process, upstream sync workflow,
version scheme, and monorepo integration.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@naveenOnarayanan
naveenOnarayanan force-pushed the nn/uv-exclude-newer-only-update-at-day-boundary branch from d466efb to 4654d9a Compare April 9, 2026 02:19
naveenOnarayanan and others added 4 commits April 8, 2026 21:14
maturin rejects SemVer pre-release identifiers like `0.11.5-doppel`
because Python uses PEP 440 (not SemVer). Fix by maintaining dual
versions:
- Cargo.toml files: 0.11.5-doppel (SemVer, for `uv --version`)
- pyproject.toml files: 0.11.5.dev0 (PEP 440, for maturin/wheels)

Updated doppel-set-version.sh to handle both formats automatically.

Simplified release.yml:
- Removed custom-build-docker (uses Depot with Astral's project ID)
- Removed custom-publish-pypi (we don't publish to PyPI)
- Removed custom-publish-crates (we don't publish to crates.io)
- Removed custom-publish-docs/versions/mirror
- Removed release-gate environment (requires Astral's GitHub App)
- Kept: plan → build-release-binaries → manifests → GitHub Release

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Maturin reads the version from Cargo.toml (not pyproject.toml) and
rejects SemVer pre-release identifiers that aren't PEP 440 compatible.
"-doppel" is valid SemVer but not PEP 440.

Switch to "-dev.0" which works in both:
- Cargo SemVer: 0.11.5-dev.0 (printed by `uv --version`)
- PEP 440: 0.11.5.dev0 (maturin auto-converts for wheels)

Updated doppel-set-version.sh to use simpler regex and handle both
Cargo.toml and pyproject.toml files. Also updated RELEASE.md.

Verified locally: `maturin sdist` produces uv-0.11.5.dev0.tar.gz.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replaced the entire cargo-dist pipeline (plan, synthesize manifests,
build global artifacts, host) with a simple two-stage workflow:

release.yml:
  1. build-release-binaries (reusable workflow)
  2. gh release create with all artifacts

build-release-binaries.yml:
  - Removed sdist, maturin wheel builds, uv-build, and check-wheels
  - Each job now does: cargo build --release → tar.gz + sha256
  - 3 jobs: macos-aarch64, linux-x86_64, linux-aarch64
  - All include Safe Chain

This eliminates the maturin PEP 440 version compatibility issue entirely
since we no longer build Python wheels.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@naveenOnarayanan
naveenOnarayanan enabled auto-merge (squash) April 9, 2026 05:30

@krishmas krishmas 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.

stamp

@naveenOnarayanan
naveenOnarayanan merged commit 70e4a52 into main Apr 9, 2026
15 checks passed
naveenOnarayanan added a commit that referenced this pull request Apr 9, 2026
When exclude-newer is computed from a relative span (e.g., "P7D"),
the resulting timestamp now gets truncated to the start of the day
(midnight UTC) instead of preserving second/millisecond precision.

This eliminates lockfile churn caused by different developers running
`uv lock` at slightly different times on the same day — they will all
get the same `T00:00:00Z` timestamp. The timestamp only changes when
the calendar day boundary crosses.

Applied to both code paths:
- `ExcludeNewerValue::recompute()` — called when tools re-evaluate spans
- `ExcludeNewerValue::from_str()` — called when initially parsing spans

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

<!--
Thank you for contributing to uv! To help us out with reviewing, please
consider the following:

- Does this pull request include a summary of the change? (See below.)
- Does this pull request include a descriptive title?
- Does this pull request include references to any relevant issues?
-->

<!-- What's the purpose of the change? What does it do, and why? -->

<!-- How was it tested? -->

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

2 participants