fix(get_repo): verify git tag exists before fetching (issue #10)#11
Merged
Conversation
…ritative hash Root cause of run https://github.com/bradford-tech/code/actions/runs/27261205466: The cron check job queried the MS update API, found VS Code 1.123.2 at commit 3c631b164c239e7aeaaae7c626b46c527b361af2, and decided to build it (upstream > pin). The build job's get_repo.sh then attempted: git fetch --depth 1 origin 3c631b164c239e7aeaaae7c626b46c527b361af2 Microsoft's GitHub repo had no 1.123.2 tag at the time — only 1.123.0 is tagged. GitHub rejected the fetch with "not our ref", a generic error that hides the real cause. Fix: after MS_TAG and MS_COMMIT are resolved, run git ls-remote to verify the tag is present in microsoft/vscode before attempting the fetch. This converts the opaque "not our ref" failure into a clear diagnostic: Error: Tag 1.123.2 is not yet present in microsoft/vscode ... Bonus: if the tag IS present but its commit differs from the API-reported hash (e.g. after a force-push), adopt the git-authoritative hash so the subsequent git fetch succeeds rather than failing with "not our ref" again.
sbs44
added a commit
that referenced
this pull request
Jun 12, 2026
* fix: rebase 11-update-use-github-release patch onto VS Code 1.124.0
VS Code 1.124.0 restructured doApplyUpdate in updateService.win32.ts:
moved the spawn() block inside an else { } branch guarded by a new
mutex-based isInstallerActive() check, adding one tab of indentation
and a blank line before const child = spawn().
Hunk #11 of the patch was searching for the old 2-tab-indented context
without the blank line — no longer present in 1.124.0 — causing a
patch rejection.
Fix: regenerate the win32.ts section of the patch from the 1.124.0
base so the spawn MSI/Setup conditional lands inside the existing
else { } block with correct 3-tab indentation and blank-line context.
Also bump upstream/stable.json to 1.124.0 so the PR build targets
the same upstream commit the patch is written against.
* fix(patches): rebase 20-keymap-use-custom-lib for vscode 1.124.0
* fix(patches): rebase 51-ext-copilot-remove-it for VS Code 1.124.0
VS Code 1.124.0 restructured the agent host's Copilot integration, so
51-ext-copilot-remove-it no longer applied (build halted on it after the
11 + 20 rebases). Rebase it so it both applies AND leaves no dangling
references once @github/copilot* is removed (would otherwise fail
compile-src on the next attempt):
- package.json / package-lock.json: drop @github/copilot +
@github/copilot-sdk against the new 1.0.57 / 1.0.0 entries (versions
drifted from 1.0.55-3 / 1.0.0-beta.8); lock root deps stay in sync
with package.json for `npm ci`.
- agentHostServerMain.ts: drop the CopilotAgent import + registration
(surrounding context shifted in 1.124.0).
- Delete copilotSessionLauncher.ts — a new copilot-only file that
imports @github/copilot-sdk and is referenced only by the deleted
copilot agent/tests.
- common/otel/agentHostOTelService.ts: shim the SDK TelemetryConfig
import. 1.123.0 used a local IAgentHostSdkTelemetryConfig mirror;
1.124.0 switched it to `import type { TelemetryConfig } from
'@github/copilot-sdk'`, mirroring the existing node/otel shim.
Verified locally: every patch applies in CI order against pristine
1.124.0, and no @github/copilot* imports or references to deleted
copilot modules remain in compiled src.
Refs #12
---------
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: claude[bot] <claude@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.
Root cause
The cron build (run 27261205466) failed because:
3c631b164c239e7aeaaae7c626b46c527b361af2.checkjob detected upstream (1.123.2) > pin (1.123.0) and setMS_COMMITfrom the API response.get_repo.sh, which attemptedgit fetch --depth 1 origin 3c631b16....1.123.2tag at that time (only1.123.0is tagged).git fetchreturnedfatal: remote error: upload-pack: not our ref 3c631b16....The update API sometimes announces a binary release before the corresponding git tag is pushed to GitHub (typically a few-hour gap). The previous error message gave no indication of this timing issue.
Fix
get_repo.shnow runsgit ls-remote origin "refs/tags/${MS_TAG}"before attempting the fetch:What this doesn't change
Deeper fix (needs human action)
The ideal prevention is in the
checkjob ofcron-build-and-release.yml: rungit ls-remotebefore decidingneeds_build=true, so the expensive macOS runner never starts for a version whose tag isn't in git. That change requiresworkflows: writepermission which the Claude App'sGITHUB_TOKENdoes not currently have. A repo admin can apply it with a PAT that hasworkflowscope.Refs #10