chore: untrack committed developer virtualenv (build-env/) [#106] - #132
Merged
Merged
Conversation
Closes #106. 49 entries under `build-env/` were tracked in version control: pip/pytest launchers with a hardcoded absolute interpreter path, the four shell activation scripts, `pyvenv.cfg`, and a `lib64` symlink. These are machine-specific environment artifacts, not SDK source. - `git rm -r --cached build-env` removes them from the index only; a developer's actual on-disk environment is untouched. - `.gitignore` gains `build-env/` plus `pyvenv.cfg` so a recreated environment is not re-added. - `tests/test_no_tracked_virtualenv.py` asserts via `git ls-files` that no virtualenv directory or marker file is tracked, and that `build-env/` is ignored. All three assertions fail on the parent commit. No history rewrite. No source, packaging or dependency declaration changed. Nothing in the repository referenced `build-env` (verified by `git grep` over all tracked files and a recursive grep over the working tree), and neither the sdist nor the wheel ever contained these files. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015ao5paex73xXvuM424Libo
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Merged
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.
Closes #106.
A developer virtualenv was tracked in version control. This removes the tracked entries from the tip of
main, adds an ignore rule so a recreated environment is not re-added, and adds a guard test so it cannot regress. No history rewrite; no developer's on-disk environment is deleted.1. Reproduced on current
mainThe 49 entries are 45 launcher scripts under
build-env/bin/(includingpip,pip3,pip3.12,pytest,py.test,python,python3,python3.12,black,mypy,ruff,twine,virtualenv,pre-commit,oilprice), the four shell activation scripts (activate,activate.csh,activate.fish,Activate.ps1),build-env/pyvenv.cfg, and thebuild-env/lib64symlink. Each launcher carries a shebang with an absolute path to one machine's interpreter.The local
build-env/directory is 34 MB; only these 49 entries were ever tracked, and only those 49 are in scope here.2. Nothing in the repository consumes
build-envSearch over every tracked file:
Recursive search over the whole working tree, not just tracked files:
Targeted search of the build/CI surface:
Both greps returned no matches (exit 1). A positive control with the same command shape confirms the invocation works rather than silently matching nothing:
The other consumers named in the issue do not exist in this repository — there is no
Makefile,tox.ini,noxfile.py,setup.py,setup.cfgor.pre-commit-config.yaml.MANIFEST.inandpyproject.tomlexist and neither mentionsbuild-env. The five workflows under.github/workflows/(github-pages.yml,live-tests.yml,publish.yml,test.yml,weekly-health.yml) each create their own environment; none reference the tracked one.Conclusion: no required consumer. Deletion is safe.
3. Red / green evidence
tests/test_no_tracked_virtualenv.pyshells out togit ls-filesand asserts that (a) no tracked path sits under a virtualenv directory, (b) nopyvenv.cfgor activation script is tracked anywhere, and (c)git check-ignorecoversbuild-env/, so recreating the environment cannot re-add it.RED — on the parent commit, with the 49 files still tracked
GREEN — after
git rm -r --cached build-envand the.gitignoreruleThe ignore rule is in force, and the developer's environment is still on disk:
4. Packaging proof — sdist and wheel contain no virtualenv files
Built with the 34 MB
build-env/still present on disk, so this exercises the realistic developer case:sdist — 79 entries, no virtualenv artifacts:
Wheel — 54 entries, two top-level directories, no virtualenv artifacts:
Clean install of that wheel into a throwaway venv:
The CLI message is the expected behaviour of the base install:
oilpriceis declared as an entry point and the rich/typer dependencies live in the[cli]extra. The entry point resolves and runs.5. Full suite
main(baseline)867 = 864 + 3— the three new guard assertions. The same three failures appear on both sides:tests/integration/test_demo_contract.pymakes live calls to the demo endpoint and is receiving HTTP 429. Environmental, unrelated to this change, unchanged by it.Diff shape
Nothing else is touched. No source file, no
pyproject.tomldependency declaration, no version bump (stays at 1.14.0), no history rewrite.Scope and constraints
filter-branch, nofilter-repo. The blobs remain in history; this PR removes them from the working tree going forward.git rm -r --cachedwas used, so no developer loses their actual environment.🤖 Generated with Claude Code
https://claude.ai/code/session_015ao5paex73xXvuM424Libo