feat: make the managed-python choice sticky across installer runs - #4646
feat: make the managed-python choice sticky across installer runs#4646CrysisDeu wants to merge 1 commit into
Conversation
Design Review (Fable 5) — ✅ PASSDesign-level review of Design-Verdict: PASS A real regression path (updates silently flipping a managed install), fixed at the right layer — the installer itself — so all flag-less re-runs are covered, not just Suggestions
[DESIGN-REVIEWED] c293131 |
GPT 5.6 Review — ✅ no blocking findingsGPT 5.6 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Opus 4.8 Review — ✅ no blocking findingsReviewed Review detailsI've read the instruction file, the candidate list, and the full diff. Let me verify the one candidate against the actual code behavior. The single candidate (CANDIDATE 1) claims Testing (a) — a concrete input that occurs in practice: The script targets macOS and Linux. BSD I also independently checked the neighboring changed logic for grounded defects:
Nothing grounds to the (a)/(b)/(c) bar at 80+. No findings. [OPUS-REVIEWED] c293131 Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
7d1a1f8 to
4ea979a
Compare
|
4ea979a to
76ccde7
Compare
|
76ccde7 to
9da8716
Compare
A --managed-python install records its interpreter mode in the data home (python-mode, next to channel). A later installer run with no explicit flag or KIROCREW_MANAGED_PYTHON value reuses it -- most importantly the re-run that 'kirocrew update' performs, which passes only --channel. Without the marker, every update silently flipped a managed install back onto whatever system interpreter it found, discarding the user's choice. --system-python (new) opts back out explicitly and re-records the mode; an explicit flag or env value always outranks the marker. README gains the experimental one-liner for --managed-python installs, and the install guide documents the sticky semantics. Verified end-to-end on an isolated instance: install with --managed-python (marker written as 'managed'), re-run with no flag -- the run reuses the recorded choice and the venv stays on the PBS interpreter. Hermetic tests cover the marker read and the --system-python override.
9da8716 to
c293131
Compare
Marker-persistence branch table (rounds 2–4 all landed in this span; recording completeness so the next round can check against it):
Note: |
Summary
Follow-up to #4594. Two changes:
1. The managed-python choice is now sticky. A
--managed-pythoninstall records its interpreter mode in the data home (python-mode, next tochannel). A later installer run with no explicit flag orKIROCREW_MANAGED_PYTHONvalue reuses it — most importantly the re-run thatkirocrew updateperforms, which composes only--channel(update_layout.wheel_update_command). Without the marker, every update silently flipped a managed install back onto whatever system interpreter it found, discarding the user's choice. A new--system-pythonflag opts back out explicitly and re-records the mode; an explicit flag or env value always outranks the marker (three-state resolution: flag/env > marker > system default).2. README documents the experimental install command. The One-line install section gains the
--managed-pythonone-liner with the sticky semantics spelled out;docs/guides/install.mdupdated in the same commit.Tests
test_cli_reuses_a_recorded_managed_python_choice: with amanagedmarker on disk and a perfectly usable system python3.12 on PATH, a flag-less run must reach for the pinned uv tarball (curl marker) and print the reuse notice.test_cli_system_python_flag_overrides_the_recorded_choice:--system-pythonwith the marker present must use the system interpreter and never touch uv.origin/mainon this host:test_artifact_source/test_artifacts_handlers/test_xdist_host_budget/test_history_coverage/test_prepare_pr_prove).Manual verification
Real E2E on an isolated instance (fresh HOME/KIROCREW_HOME, aarch64 Linux):
--managed-pythoninstall writespython-mode=managed; a flag-less re-run prints "Reusing the recorded managed-python choice", rebuilds the venv against the PBS interpreter (pyvenv.cfg home verified), andkirocrew --versionruns.no linked issue: gap found while answering "does an upgrade need the flag again?" right after #4594 merged.
Why no screenshot: installer shell script, docs, and backend test only; nothing renders in the browser.