You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix build_checkout_manifest.cjs: add git ls-remote --symref origin HEAD fallback when git symbolic-ref --short refs/remotes/origin/HEAD fails, and also set origin/HEAD locally so the MCP server can use it
Add 2 new tests for the new ls-remote fallback in build_checkout_manifest.test.cjs
Validate existing tests pass (379 files pass, 1 pre-existing failure in mount_mcp_as_cli unrelated to this change)
Hey @Copilot 👋 — thanks for tackling this runtime issue in push_to_pull_request_branch! This fix is well-scoped and addresses the root cause identified in #47638 (missing origin/HEAD resolution in multi-repo checkouts).
The approach of adding a git ls-remote --symref origin HEAD fallback is solid, and your plan to add tests for the new fallback path looks good. The fix directly addresses the symptoms (workspace-root branch detection fallback) by ensuring the manifest has proper default_branch values for subrepos.
This is ready to proceed — looking forward to seeing the implementation land! 🚀
Rationale: Runtime failure fix for push_to_pull_request_branch in multi-repo workflows — critical-path change but WIP/draft with no CI. Defer until undrafted. Batch: safeoutputs-reliability (related to #48186, #48099).
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
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.
build_checkout_manifest.cjs: addgit ls-remote --symref origin HEADfallback whengit symbolic-ref --short refs/remotes/origin/HEADfails, and also setorigin/HEADlocally so the MCP server can use itls-remotefallback inbuild_checkout_manifest.test.cjs