Determine base SHA fails at depth > 50
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.4k
- PR merge metrics
- PR metrics pending
Description
Thanks for the review @bryanchen-d. Flagging the `Screenshots & Tests` failure, since it is not caused by this change and a re-run will not clear it.
The job failed in the `Determine base SHA` step, before any test or screenshot ran ([log](https://github.com/microsoft/vscode/actions/runs/30259061875/job/91800428882)). That step does:
```
git fetch --no-tags --depth=50 origin "$BASE_REF"
BASE_SHA=$(git merge-base "$EVENT_SHA" "$TARGET_REF")
```
This PR was opened on Jul 27 and `main` is now 557 commits ahead of its base (`725890f6`). The merge-base is well outside the 50-commit shallow window, so `git merge-base` finds no common ancestor and exits 1 — and the step runs under `bash -e`, so the job aborts there. It is deterministic rather than flaky: any PR branch more than ~50 commits behind `main` will hit the same thing.
Happy to rebase if that is the preferred fix. Raising it mainly in case the workflow should use a deeper fetch, since otherwise this will keep catching branches that sit for a while.
For context on the risk here: the diff is a single markdown file (`extensions/copilot/src/extension/chatSessions/claude/AGENTS.md`) correcting relative paths that no longer resolve. No code is touched.
_Originally posted by @SVOG23 in https://github.com/microsoft/vscode/issues/327612#issuecomment-5171147426_
Contributor guide
Assessment
This issue has not been assessed yet.