Repository navigation
feat(image): allow overriding the mkProjectShell python interpreter - #1048
Merged
Merged
Conversation
This was referenced Jul 14, 2026
[FEATURE] mkProjectShell: overridable Python interpreter for nixpkgs C-extension ABI alignment
#1038
Closed
c-vigo
added a commit
that referenced
this pull request
Jul 14, 2026
## Summary Implements #1039 via the issue's recommended Option 1 — a runtime guard, so the scaffold stays uniform and a repo later flipped public starts scanning automatically with no re-scaffold. - Job-level `if: ${{ !github.event.repository.private }}` on `codeql.yml`'s `analyze` and `scorecard.yml`'s `analysis` jobs. Private repos get skipped (neutral) runs instead of two permanently red workflows (CodeQL needs GHAS — unavailable on Free-plan private repos; Scorecard is public-only). - Both files are manifest-synced: the guard lands in the root SSoT copies (a no-op for the public devkit) and the scaffold copies are regenerated byte-identical. - Trigger-payload correctness researched explicitly: `github.event.repository.private` is populated on `pull_request`, `push`, and — since GitHub's 2022-09-27 change adding repository info to scheduled-run payloads — `schedule`, covering every trigger both workflows declare. Reasoning recorded in each workflow header. - Documented in `docs/MIGRATION.md` at the existing codeql/scorecard description. Unblocks the second cad2gdml Phase-0 prerequisite (#1040); the last one (#1038) merged in #1048. TDD: new `tests/test_workflow_private_repo_guard.py` (YAML-parses all 4 copies, asserts the job guard) — RED 4 failed → GREEN 4 passed. ## Test evidence - `uv run pytest tests/test_workflow_private_repo_guard.py` → 4 passed - `actionlint` clean on all 4 workflow files - `prek run --all-files` → green (re-verified independently before push) Closes #1039 Refs: #1040
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements #1038 — the ABI-alignment knob blocking the cad2gdml onboarding (#1040 Phase 0).
mkProjectShellgainspython ? pkgs.python314(same additive pattern asmodules/hooks);UV_PYTHONderives from${python}/bin/${python.executable}instead of the hardcodedpython3.14string, so uv pins whatever interpreter the consumer selects.vig-utils(a devTools entry, built against the devkit's pinned 3.14) propagates its interpreter onto PATH, shadowing an overriddenpython3. A conditional hook prepends the override'sbinto PATH — only whenpython != pkgs.python314, so the hook is the empty string by default and the zero-argument shell stays byte-identical (drvPath parity test added alongside the override test).python314pins — the published image is devkit's toolchain, not consumer-overridable; the issue scopes to the dev-shell builder.docs/MIGRATION.mdwith the issue's FreeCAD snippet (mkProjectShell { python = pkgs.python313; extraPackages = [ pkgs.freecad ]; }).TDD: failing-test commit (RED:
unexpected argument 'python') → implementation → docs.Test evidence
uv run pytest tests/test_flake_devshell.py tests/test_flake_modules.py→ 21 passed, 1 skipped (NixOS-only test on an FHS host)python = pkgs.python314, and override test assertingUV_PYTHON→ storepython3.13+python3 --versionreports 3.13prek run --all-files→ green (re-verified independently before push)Closes #1038
Refs: #1040