Repository navigation
fix(launcher,wiki): install without a pip module, refuse an empty refine (#582, #583) - #584
Conversation
…ine (#582, #583) The launcher built every install command as `sys.executable -m pip`, so from an interpreter without a pip module (a `uv venv`, or `python -m venv --without-pip`) no dependency could be installed at all. `launcher_pip.pip_entry()` now resolves the installed module first, then the pip wheel the standard library bundles for ensurepip, run in place so nothing is installed into the interpreter, and otherwise raises an error naming the interpreter (ADR-1067). Measured in a `uv venv` on Python 3.13.7: the 12 installer tests pass where 11 errored in setup. `wiki_refine_draft` accepted a call carrying nothing but a draft_id: it stamped the draft's synth_model and wrote a refined_llm memo recording a refinement that never happened. Such a call is now refused whole, with no write to the draft and no memo (ADR-1068). The behaviour predates #579; registering the tool is what made it reachable. Full suite: 8675 passed, 8 skipped. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01Cz7A6goxVzfKL9NT7k4zDH
|
ZETETIC-REVIEW: APPROVE SummaryBoth fixes are correct, mutation-tested, and match the PR's claims exactly. Move 0 - Ledger reconciliation and seen-defect check (§13.2 + §14)
Stakes calibration (Move 7)
Layer check (Move 1)
SOLID audit (Move 2)No violations. Wiring & contract drift (Move 3)
Test adequacy (Move 4) - evidence, not assertionRan everything myself in the pip-less worktree venv (
Complexity & structure (Move 5)
Security & hygiene (Move 6)
Gates run (this worktree,
|
The 10-minute budget left 1.7x headroom over this job's p90, and two runs of 2026-09-16 exceeded it: main at a981f93, cancelled at 616s having reached 74% of the suite, which made CI Green fail on test-sqlite='cancelled'; and PR #584's first attempt at 610s. Both passed on a rerun, in 416s and 276s, with no code change. The main run's own tree had taken 266s as the pull request of the commit it squashed. Measured over that day's 21 job executions, every attempt counted: 18 successes from 234s to 416s, median 328s, p90 348s, and three non-successes: the two timeouts above and a 47s cancellation from a superseded push. The budget is now 20 minutes, 3.4x that p90, about twice the point where both timeouts fired, and one eighteenth of GitHub's own ceiling, with the measurement recorded beside the number so suite growth into the new headroom stays visible (ADR-1074). The Windows and matrix budgets are untouched: nothing measured here applies to them. An earlier draft of this commit, its ADR and its CHANGELOG entry cited 29 runs, 27 successes and a second cancellation from a superseded push. That sample crossed several days and counted only each run's latest attempt, so it hid the two reruns and invented the 150s cancellation. The review of PR #595 caught it; the numbers above are the reproducible ones. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01Cz7A6goxVzfKL9NT7k4zDH
The 10-minute budget left 1.7x headroom over this job's p90, and two runs of 2026-09-16 exceeded it: main at a981f93, cancelled at 616s having reached 74% of the suite, which made CI Green fail on test-sqlite='cancelled'; and PR #584's first attempt at 610s. Both passed on a rerun, in 416s and 276s, with no code change. The main run's own tree had taken 266s as the pull request of the commit it squashed. Measured over that day's 21 job executions, every attempt counted: 18 successes from 234s to 416s, median 328s, p90 348s, and three non-successes: the two timeouts above and a 47s cancellation from a superseded push. The budget is now 20 minutes, 3.4x that p90, about twice the point where both timeouts fired, and one eighteenth of GitHub's own ceiling, with the measurement recorded beside the number so suite growth into the new headroom stays visible (ADR-1074). The Windows and matrix budgets are untouched: nothing measured here applies to them. An earlier draft of this commit, its ADR and its CHANGELOG entry cited 29 runs, 27 successes and a second cancellation from a superseded push. That sample crossed several days and counted only each run's latest attempt, so it hid the two reruns and invented the 150s cancellation. The review of PR #595 caught it; the numbers above are the reproducible ones. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01Cz7A6goxVzfKL9NT7k4zDH
The 10-minute budget left 1.7x headroom over this job's p90, and two runs of 2026-09-16 exceeded it: main at a981f93, cancelled at 616s having reached 74% of the suite, which made CI Green fail on test-sqlite='cancelled'; and PR #584's first attempt at 610s. Both passed on a rerun, in 416s and 276s, with no code change. The main run's own tree had taken 266s as the pull request of the commit it squashed. Measured over that day's 21 job executions, every attempt counted: 18 successes from 234s to 416s, median 328s, p90 348s, and three non-successes: the two timeouts above and a 47s cancellation from a superseded push. The budget is now 20 minutes, 3.4x that p90, about twice the point where both timeouts fired, and one eighteenth of GitHub's own ceiling, with the measurement recorded beside the number so suite growth into the new headroom stays visible (ADR-1074). The Windows and matrix budgets are untouched: nothing measured here applies to them. An earlier draft of this commit, its ADR and its CHANGELOG entry cited 29 runs, 27 successes and a second cancellation from a superseded push. That sample crossed several days and counted only each run's latest attempt, so it hid the two reruns and invented the 150s cancellation. The review of PR #595 caught it; the numbers above are the reproducible ones. Claude-Session: https://claude.ai/code/session_01Cz7A6goxVzfKL9NT7k4zDH Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
Summary
Two fixes the review of #581 and the local suite surfaced.
scripts/launcher_pip.pybuilt every install command assys.executable -m pip, so an interpreter without a pip module could not fill the plugin's privatedeps/at all, reportingNo module named pip. A virtual environment made byuv venvorpython -m venv --without-piphas no pip module by design.pip_entry()now resolves the installed module first, then the pip wheel CPython bundles forensurepip, run in place from the wheel path so nothing is installed into the interpreter, and otherwise raises aFileNotFoundErrornaming that interpreter, which travels theOSErrorpath both call sites already report (ADR-1067).tests_py/scripts/test_installer_upgrade_single_version.pyseeds its fixture through the same resolution instead of hardcoding-m pip.mcp_server/handlers/wiki_refine.pyaccepted awiki_refine_draftcall carrying nothing but adraft_id:synth_modelalways defaulted, so the draft was stamped with a model that wrote none of its content and arefined_llmmemo recorded a refinement that never happened. Such a call is now refused whole, with no write to the draft and no memo (ADR-1068).Closes #582
Closes #583
Type of change
Test plan
tests_py/scripts/test_launcher_pip_entry.pypins the resolution order: installed module preferred; bundled wheel used when no pip module is importable; that resolved command answering as pip when actually run; the interpreter named when neither exists;_pip_commandbuilt on the resolved entry. Four of the five fail on the previous code.test_a_refine_carrying_no_content_writes_nothingintests_py/handlers/test_wiki_refine_confidence.pyasserts the draft'ssynth_modelandleadare unchanged, the memo count for that draft is unchanged, and the response is an error. It fails on the previous handler.test_installer_rerun_keeps_entries.pyandtest_installer_upgrade_single_version.pypass in this pip-lessuv venv, where 11 of them errored in setup before.ruff check,ruff format --check: clean.pyright mcp_server/: 0 errors.scripts/check_craftsmanship.py --base origin/main: OK.scripts/check_doc_claims.py: OK.Audit notes
bundled_pip_wheel()locatesensurepipwithimportlib.util.find_specrather than importing it, so a standard library without the module returnsNoneinstead of raising at import time.Coding-standards compliance
Breaking changes
None. A
wiki_refine_draftcall with only adraft_idused to returnupdated: trueafter writing a memo; it now returns an error. The tool has been registered only since #581 and the store holds one such memo, from a test runner in April 2026.Reviewer checklist
wiki_refine_drafttool description).