Skip to content

fix: orchestrator rebase fetch creates proper remote ref#143

Merged
microsasa merged 1 commit intomainfrom
fix/orchestrator-rebase-fetch
Mar 17, 2026
Merged

fix: orchestrator rebase fetch creates proper remote ref#143
microsasa merged 1 commit intomainfrom
fix/orchestrator-rebase-fetch

Conversation

@microsasa
Copy link
Owner

Fixes the orchestrator rebase step failing with fatal: 'origin/BRANCH' is not a commit.

git fetch origin BRANCH fetches to FETCH_HEAD but doesn't create a tracking ref. Fixed by explicitly mapping: git fetch origin BRANCH:refs/remotes/origin/BRANCH.

Discovered during first live test of v2 on PR #113.

Part of #135

Copilot AI review requested due to automatic review settings March 17, 2026 19:18
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes the pipeline orchestrator’s “rebase PRs behind main” step by ensuring the PR head branch is fetched into a proper refs/remotes/origin/<branch> remote-tracking ref (avoiding fatal: 'origin/BRANCH' is not a commit).

Changes:

  • Fetch the PR branch with an explicit refspec mapping to refs/remotes/origin/$BRANCH.
  • Fix git checkout invocation to correctly use origin/$BRANCH as a start-point (not a pathspec).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

# Fetch latest and attempt rebase
git fetch origin main "$BRANCH" || {
# Fetch latest refs for main and the PR branch
git fetch origin main "$BRANCH":"refs/remotes/origin/$BRANCH" || {
continue
}
git checkout -B "$BRANCH" -- "origin/$BRANCH"
git checkout -B "$BRANCH" "origin/$BRANCH"
git fetch origin BRANCH doesn't create origin/BRANCH tracking ref,
causing 'not a commit' error on checkout. Fixed by explicitly mapping
the fetch to refs/remotes/origin/BRANCH.

Part of #135

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@microsasa microsasa force-pushed the fix/orchestrator-rebase-fetch branch from 8a62308 to bcae7ce Compare March 17, 2026 19:22
@microsasa microsasa merged commit 31fa0a4 into main Mar 17, 2026
3 checks passed
@microsasa microsasa deleted the fix/orchestrator-rebase-fetch branch March 17, 2026 19:22
microsasa pushed a commit that referenced this pull request Mar 17, 2026
- Changelog: added entries for PRs #140-#143, dependabot bumps,
  orchestrator v1/v2, PR #113 auto-merge success
- Agentic-workflows: replaced removed orchestrator section with
  current bash implementation, updated agent inventory, added
  history entry
- Test-analysis: changed cron from weekly to daily (0 9 * * *)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
microsasa pushed a commit that referenced this pull request Mar 19, 2026
Changelog: added entries for orchestrator v1/v2 (PRs #140-#143),
the v3/responder/trigger-disable reverts, and key discoveries.

Agentic-workflows: updated orchestrator section (v1+v2 on main,
v3 reverted), responder status (target '*' fix, workflow_dispatch),
agent inventory (added orchestrator, updated responder/quality-gate),
history (3 new entries covering March 17-18), and 3 new pitfalls
(safe output target, review trigger loops, over-specifying agents).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

2 participants