Skip to content

tooling: bugfix_kit scope runs in the worktree's own venv - #4417

Merged
squid-protocol merged 1 commit into
mainfrom
tooling/bugfix-kit-scope-venv
Oct 5, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
tooling/bugfix-kit-scope-venv

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

The kit's scope step launched scope_check.py with the kit's own interpreter. Started from the live checkout's .venv (stale editable install lacking gitgalaxy.core.source_text), golden_diff failed to import.

Fix: scope now runs under the worktree's .crucible_venvs/{full_precision,zero_dependency} python (built through crucible_check.ensure_venv when missing, clear KitError if it cannot be), with PYTHONPATH/VIRTUAL_ENV/PYTHONHOME scrubbed. Audited the other steps: ledger/estate/audit already use kit venvs with PYTHONPATH=worktree, bless/crucible_check is stdlib-only and builds its own venv, so no change needed there.

Tests: pure venv-selection tests added to test_bugfix_kit.py (18 pass). Real run: bugfix_kit.py scope <clean worktree> --expect cobol under the live .venv gives 0 differences. mypy/ruff/dead_key audits clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FNWHcUSn5p7eMxFTsB5rFo

scope_check imports golden_diff -> gitgalaxy in its own process; the kit launched it
with the kit's interpreter (the live checkout's stale editable .venv), which lacks
gitgalaxy.core.source_text. Run it under the worktree's .crucible_venvs python
(built via crucible_check.ensure_venv if missing, clear KitError otherwise) with
PYTHONPATH/VIRTUAL_ENV/PYTHONHOME scrubbed. Other kit steps already use scoped venvs.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol
squid-protocol marked this pull request as ready for review October 5, 2026 05:37
@squid-protocol
squid-protocol merged commit 3c825d4 into main Oct 5, 2026
29 checks passed
@squid-protocol
squid-protocol deleted the tooling/bugfix-kit-scope-venv branch October 5, 2026 05:37
squid-protocol added a commit that referenced this pull request Oct 5, 2026
genapp-lgapvs01's record and page: main's taken whole; re-proven and
re-rendered by the tools below, never hand-merged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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