Skip to content

Select from the merge base, not the base branch tip - #14

Merged
danielholanda merged 1 commit into
mainfrom
fix/select-from-merge-base
Sep 9, 2026
Merged

Select from the merge base, not the base branch tip#14
danielholanda merged 1 commit into
mainfrom
fix/select-from-merge-base

Conversation

@danielholanda

@danielholanda danielholanda commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

This PR ensures that only the required tests run when needed. Before this PR, the "branch diff" was done pointing at the wrong reference, causing excessive tests to run).

A pull request event names two commits, and the discover job diffed them
directly. That answers how the two trees differ, which stops being the same
question as what the branch did the moment the base branch moves on without
it: everything merged into the base since the branch left comes back in that
diff, in reverse, as though this branch had touched it.

amd/skills#207 edits one skill and got behavioral legs for all seven, because
its branch predates a base commit touching .github/workflows/evals.yml -- an
infra path, so selection re-ran the entire catalog off a file the branch never
opened. Two other skills came back the same way and failed on their own.

Diff from the merge base instead. It lives in `select --since BASE HEAD`
rather than in the workflow's inline Python, because a decision made in YAML
cannot be tested or re-run by hand, and this is the one that decides what a
run costs. `--changed` still reads a list of paths from stdin for a caller
that works them out some other way.

There is no merge base for unrelated histories, or in a clone too shallow to
hold one. That falls back to the plain diff with a warning: selecting too much
costs a slow run, selecting too little ships an untested change.

Replaying amd/skills#207 against this build plans one leg
(hyperloom-workload-optimizer on its Instinct runner) plus routing, down from
eleven behavioral legs.

Co-authored-by: Cursor <cursoragent@cursor.com>
@danielholanda
danielholanda merged commit 68b69e2 into main Sep 9, 2026
5 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