Skip to content

ci(nix): let flake uv fetch the pinned CPython 3.14.6 - #656

Merged
c-vigo merged 3 commits into
feature/625-nix-claude-migrationfrom
feature/632-fix-flake-py314
Jun 23, 2026
Merged

c-vigo merged 3 commits into
feature/625-nix-claude-migrationfrom
feature/632-fix-flake-py314

Conversation

@c-vigo

@c-vigo c-vigo commented Jun 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Follow-up fix for #632 (T1.2). PR #653 enabled flake-provisioned CI but its Build Container Image and Project Checks jobs failed. PR #653 was already squash-merged into the epic at the broken state, so this lands as a new PR against feature/625-nix-claude-migration.

Three coordinated fixes, one root chain:

1. uv could not provide CPython 3.14.6

uv sync --frozen --all-extras failed with No interpreter found for Python 3.14.6. Causes:

  • The project pins an exact patch (requires-python == 3.14.6, also in uv.lock). nixpkgs does not package it — nixos-25.05 has python314 == 3.14.0, nixpkgs-unstable has 3.14.4; a Nix interpreter is rejected by uv --frozen as incompatible.
  • The nixpkgs build of uv ships with its embedded Python-download list stripped, so it cannot fetch a managed CPython on its own.

Fix: set UV_PYTHON_DOWNLOADS_JSON_URL in the flake dev-shell (mkProjectShell in flake.nix, the toolchain SSoT) to upstream uv's download-metadata.json, pinned to the same uv release the non-flake CI path installs (0.11.23). This restores managed downloads without un-pinning nixpkgs. UV_PYTHON_DOWNLOADS keeps its default.

2. The variable did not reach CI steps

GITHUB_PATH only carries PATH, not env vars, so the dev-shell variable never reached the uv sync step. Fix: forward UV_PYTHON_DOWNLOADS_JSON_URL from the dev-shell to GITHUB_ENV in the provision-via-flake setup step.

3. The flake's podman shadowed the host podman

With (1)+(2) fixed, build/image/integration jobs went green but Project Checks still failed: a BATS dry-run test (tests/bats/install.bats) errored because install.sh runs podman info and the flake's nix-store podman cannot reach the runner's setuid newuidmap/newgidmap. Fix: exclude the flake podman bin from the provision-via-flake PATH export so the runner's rootless-configured host podman is used (matches the documented intent on the provision-via-flake input). The flake's devTools (and the parity test) are unchanged.

Validation

  • nix develop -c uv sync --frozen --all-extras succeeds; dev-shell and venv both report Python 3.14.6.
  • pre-commit run --all-files green; flake parity test passes; nix flake check passes.
  • Full CI on this branch is green: Build Container Image, Project Checks, Image Tests, Integration Tests, Security Scan, Python Security Scan, Test Summary.

Refs: #632

c-vigo added 3 commits June 23, 2026 14:06
The nixpkgs build of uv ships with its embedded Python-download list
stripped, so under flake provisioning uv sync --frozen could not find an
interpreter for the project pin requires-python == 3.14.6, which nixpkgs
does not package (stable 3.14.0, unstable 3.14.4). Point the flake
dev-shell uv at upstream download-metadata.json via
UV_PYTHON_DOWNLOADS_JSON_URL so it can fetch the exact patch without
un-pinning nixpkgs.

Refs: #632
GITHUB_PATH only carries PATH, not env vars, so UV_PYTHON_DOWNLOADS_JSON_URL
set in the flake dev-shell never reached the uv sync step and CI still
failed to find CPython 3.14.6. Forward the variable from the dev-shell to
GITHUB_ENV in the provision-via-flake setup step so subsequent steps
(uv sync in build-image and project-checks) inherit it.

Refs: #632
The flake dev-shell ships podman, which got prepended to the CI PATH and
shadowed the runners host podman. The nix-store podman cannot reach the
hosts setuid newuidmap/newgidmap, so podman info failed and install.shs
runtime health check broke the project-checks BATS dry-run test. Exclude
the flake podman bin from the provision-via-flake PATH export so the
rootless-configured host podman is used, matching the documented intent.

Refs: #632
@c-vigo c-vigo closed this Jun 23, 2026
@c-vigo
c-vigo deleted the feature/632-fix-flake-py314 branch June 23, 2026 12:37
@c-vigo
c-vigo restored the feature/632-fix-flake-py314 branch June 23, 2026 12:38
@c-vigo c-vigo reopened this Jun 23, 2026
@c-vigo
c-vigo merged commit e03b247 into feature/625-nix-claude-migration Jun 23, 2026
10 checks passed
@c-vigo
c-vigo deleted the feature/632-fix-flake-py314 branch June 23, 2026 12:38
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