Skip to content

fix(runner): base a new run on origin's head, not the local branch - #110

Merged
abedegno merged 2 commits into
mainfrom
fix/run-base-from-origin
Sep 28, 2026
Merged

abedegno merged 2 commits into
mainfrom
fix/run-base-from-origin

Conversation

@abedegno

Copy link
Copy Markdown
Owner

What and why

muesli #782 was specified and planned against 31 August code. A new run's base was git rev-parse HEAD in the runner's muesli checkout, and nothing ever moves that local branch. It sat at 70508dd (31 Aug) while origin/main was current at cc1f9e0. The spec and plan therefore set out to build ami-eval from scratch, although #780 had already shipped it. The implementer, working on the real head, correctly refused the plan, and the run ended as escalated.

_run_base_sha fetches and returns the head of origin's default branch (refs/remotes/origin/HEAD, falling back to origin/main). If the fetch fails, it returns origin's last-fetched head with a warning, never the local branch. Both mint paths use it: run_item and --recover-pr.

Effect on the merge gate

None directly. The recorded base is what verdict bindings compare against. It is now a real upstream commit rather than a stale local one, so bindings are more accurate, not less.

Testing

  • bash batch/run-queue.sh --self-test passes (macOS; Linux via CI)
  • New behaviour has test cases: tests/execution/test_run_base_sha.py uses real git repos. A clone whose local main is behind origin gets origin's head, and so does a failed fetch after an earlier one. Both mint sites are checked.
  • Guards shown red first: all tests failed before the helper existed.

Whole suite: 2031 passed, 3 skipped.

Anything a reviewer should look at twice

After this deploys, #782 needs requeueing. Its run ended on the stale base.

…l branch

run_item minted every run from `git rev-parse HEAD` in the muesli
checkout, and nothing moves that local branch: it sat on 31 August while
origin/main was current. #782's spec and plan were written against
month-old code with no ami-eval, and the implementer, on the real head,
correctly refused the plan and the run ended. _run_base_sha fetches and
answers origin's default-branch head (the last-fetched one, with a
warning, if the fetch fails). --recover-pr mints the same way.
@abedegno
abedegno merged commit f8b24c6 into main Sep 28, 2026
2 checks passed
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