Skip to content

fix(container): use detached checkout for shallow clones - #21

Merged
mariuspruvot merged 1 commit into
mainfrom
fix/e2e-qa
Apr 18, 2026
Merged

fix(container): use detached checkout for shallow clones#21
mariuspruvot merged 1 commit into
mainfrom
fix/e2e-qa

Conversation

@mariuspruvot

Copy link
Copy Markdown
Owner

Summary

  • gh pr checkout fails on shallow clones (--depth=1) with gh CLI 2.90.0, breaking all container sessions
  • Root cause: git cannot set up tracking branch info from a shallow clone ref
  • Fix: add --detach flag -- containers only need files on disk, not a tracking branch
  • Also fixes pre-existing ruff format issue in test_sessions_router.py

Found during E2E QA

Full product validation revealed this as a blocking bug -- no sessions could start. All other flows passed:

  • Landing page, OAuth, dashboard, settings, skill selector
  • Multi-turn sessions (after fix), session stop, session replay
  • Error handling (deleted branch), API endpoints, cleanup

Known issues (pre-existing, not addressed here)

  1. Fast-failing container race: when a container exits before SSE stream fully processes, mark_completed may not run, leaving session stuck as RUNNING. Cleanup task handles these as TIMEOUT eventually.
  2. Flaky webhook dispatcher tests: structlog.capture_logs misses async log output in fresh venvs (passes on cached venvs).

Test plan

  • Verified fix with docker run test: gh pr checkout 20 --detach succeeds on shallow clone
  • Verified deleted branch still fails correctly (exit 1, error surfaced)
  • Full session lifecycle tested: skill select -> first turn -> multi-turn -> stop -> replay
  • make lint passes
  • make test passes (237/239, 2 pre-existing flaky failures)

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-local-mariuspruvot

Copy link
Copy Markdown

helPRs session created for this PR.

Skill: challenge-me | Open session

@mariuspruvot
mariuspruvot merged commit 53353ff into main Apr 18, 2026
8 of 10 checks passed
@mariuspruvot
mariuspruvot deleted the fix/e2e-qa branch April 18, 2026 20:30
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