Repository navigation
ci: scrub the hook's git env from the selftest; pin the Python stage to 3.11 - #5
Merged
Merged
Conversation
Inside a git hook, git sets GIT_DIR to the repository the hook runs for. The selftest's temporary repositories ran git init and git add with that variable set, so they acted on the real repository. On a push from a worktree, that rewrote the shared config to core.bare = true, and every worktree then failed with "must be run in a work tree". clean_git_env drops the repository-location variables. The checks' git() helper and the selftest use it, so temporary repositories find only their own .git. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
CI pins Python 3.11 for the Python tests. The local python stage used whichever python ran ci.py, and on Windows Python 3.13 hangs in tests/test_overlay.py::test_a_session_runs_over_real_sockets_after_the_handshake (a known issue, not diagnosed yet). The stage now finds a 3.11 (py -3.11 or python3.11) and fails with a clear message if there is none. It also rebuilds an existing venv that was made with another Python. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
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
Two small fixes to the local pipeline in
ci/. No product code changes.GIT_DIRto the repository the hook runs for. The selftest's temporary repositories rangit initandgit addwith that variable set, so they acted on the real repository. On a push from a worktree, this rewrote the shared config tocore.bare = true, and every worktree then failed with "must be run in a work tree".clean_git_env()drops the repository-location variables.checks.git()and the tests use it. This is a backport of f178fec fromchore/rsa-0.10.py -3.11orpython3.11, fails with a clear message if neither exists, and rebuilds an existing venv that was made with another Python.Known issue
On Windows, the Python suite hangs on Python 3.13.
python/tests/test_overlay.py::test_a_session_runs_over_real_sockets_after_the_handshakenever finishes. On Python 3.11 the suite passes (168 passed, 16 skipped). The cause is not diagnosed yet. This PR avoids 3.13 for the local stage instead of fixing the hang.Testing
python ci/ci.py run --only selftestpasses.GIT_DIRpointed at a scratch repository, and that repository's config is unchanged.ensure_venvwas run with a stub context: the 3.13 venv was removed and recreated withpy -3.11.ci/, so the local pre-push hook is the check for this change.🤖 Generated with Claude Code