fix(container): use detached checkout for shallow clones - #21
Merged
Conversation
gh pr checkout fails with --depth=1 clones on gh CLI 2.90.0: "fatal: cannot set up tracking information; starting point is not a branch" The --detach flag avoids setting up a tracking branch, which is unnecessary since the container only needs the PR files on disk. Also fixes pre-existing ruff format issue in test_sessions_router.py.
|
helPRs session created for this PR. Skill: |
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
gh pr checkoutfails on shallow clones (--depth=1) with gh CLI 2.90.0, breaking all container sessions--detachflag -- containers only need files on disk, not a tracking branchtest_sessions_router.pyFound during E2E QA
Full product validation revealed this as a blocking bug -- no sessions could start. All other flows passed:
Known issues (pre-existing, not addressed here)
mark_completedmay not run, leaving session stuck as RUNNING. Cleanup task handles these as TIMEOUT eventually.structlog.capture_logsmisses async log output in fresh venvs (passes on cached venvs).Test plan
docker runtest:gh pr checkout 20 --detachsucceeds on shallow clonemake lintpassesmake testpasses (237/239, 2 pre-existing flaky failures)