From 7caf2565813159cad7da8a3c5d9b4af9ccfc4e46 Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Thu, 6 Aug 2026 08:43:00 +0000 Subject: [PATCH 1/2] Resolve pure add/add pin conflicts automatically, and pin the slim kimi-k3 PR --- .github/workflows/unsloth-prebuilt.yml | 23 ++++++++++++++++++++--- scripts/unsloth/pr-set.json | 7 +++---- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/.github/workflows/unsloth-prebuilt.yml b/.github/workflows/unsloth-prebuilt.yml index 5393bc8cdbee..017081ff12c4 100644 --- a/.github/workflows/unsloth-prebuilt.yml +++ b/.github/workflows/unsloth-prebuilt.yml @@ -280,9 +280,26 @@ jobs: if ! git rev-parse --verify -q "${SHA}^{commit}" >/dev/null; then echo "fetched something for ${SRC}#${NUM} but ${SHA} is still missing" >&2; exit 1 fi - git -c user.name='github-actions[bot]' -c user.email='41898282+github-actions[bot]@users.noreply.github.com' \ - merge --no-ff --no-edit -m "Merge ${SRC}#${NUM} @ ${SHA}" "$SHA" \ - || { echo "${SRC}#${NUM} (${SHA}) does not merge cleanly onto ${BASE} + the PRs listed before it; reorder or drop it in scripts/unsloth/pr-set.json" >&2; exit 1; } + # diff3 so additive_merge.py can see the merge base and refuse + # anything that is not a pure add/add. + if ! git -c user.name='github-actions[bot]' -c user.email='41898282+github-actions[bot]@users.noreply.github.com' \ + -c merge.conflictStyle=diff3 \ + merge --no-ff --no-edit -m "Merge ${SRC}#${NUM} @ ${SHA}" "$SHA"; then + # The recurring conflict is two PRs adding a line to the same + # architecture table, where the answer is always "keep both". + # additive_merge.py resolves only that, and refuses when + # either side edited existing text, so a real disagreement + # still hard-fails here rather than being papered over. + if python3 scripts/unsloth/additive_merge.py \ + && [ -z "$(git diff --name-only --diff-filter=U)" ]; then + git -c user.name='github-actions[bot]' -c user.email='41898282+github-actions[bot]@users.noreply.github.com' \ + commit -q --no-edit + echo "::warning::${SRC}#${NUM} needed an additive merge; every conflict was a pure add/add and both sides were kept" + else + git merge --abort 2>/dev/null + echo "${SRC}#${NUM} (${SHA}) does not merge cleanly onto ${BASE} + the PRs listed before it; reorder or drop it in scripts/unsloth/pr-set.json" >&2; exit 1 + fi + fi done < <(jq -r '.[] | "\(.repo) \(.number) \(.sha)"' <<<"$PRS") else # Plain build: only the base tree is needed. Shallow is fine -- the diff --git a/scripts/unsloth/pr-set.json b/scripts/unsloth/pr-set.json index c6dd60dc6e08..d030d6025591 100644 --- a/scripts/unsloth/pr-set.json +++ b/scripts/unsloth/pr-set.json @@ -10,8 +10,7 @@ ], "prs": [ "https://github.com/ggml-org/llama.cpp/pull/24423/commits/c3fb97241295c196e09b783e705e84b96cd1bd74", - "https://github.com/ggml-org/llama.cpp/pull/25731/commits/1e6f9e4a59138004e7936b543464afad71024a74", - "https://github.com/unslothai/llama.cpp/pull/48/commits/daef2b3e1b5b1ac7b575f13b13a9450cb2d02862", - "https://github.com/ggml-org/llama.cpp/pull/26185/commits/04d6828b2b555ef300bae8096663c6e675afdd47" + "https://github.com/ggml-org/llama.cpp/pull/25731/commits/3fd7901cb40248fb4b959ce84f9be97e868e2e62", + "https://github.com/unslothai/llama.cpp/pull/70/commits/06d2326acbf515b10f8d6abeada09123d361acde" ] -} \ No newline at end of file +} From e618890ec4a106a7121fa0d1b6a57e287119d9b5 Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Thu, 6 Aug 2026 08:48:12 +0000 Subject: [PATCH 2/2] Give the preflight the same additive fallback as resolve --- .github/workflows/unsloth-pin-preflight.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/unsloth-pin-preflight.yml b/.github/workflows/unsloth-pin-preflight.yml index a1601c0eaf39..808b07acdf63 100644 --- a/.github/workflows/unsloth-pin-preflight.yml +++ b/.github/workflows/unsloth-pin-preflight.yml @@ -122,10 +122,20 @@ jobs: continue fi if git -c user.name=preflight -c user.email=preflight@local \ + -c merge.conflictStyle=diff3 \ merge --no-ff --no-edit -m "probe ${SRC}#${NUM}" "$SHA" >/dev/null 2>&1; then echo "ok ${SRC}#${NUM}" continue fi + # Mirror resolve: a pure add/add is what the nightly will merge + # automatically, so reporting it as a conflict here is a false + # alarm. Anything additive_merge.py refuses is still a conflict. + if python3 ../scripts/unsloth/additive_merge.py >/dev/null 2>&1 \ + && [ -z "$(git diff --name-only --diff-filter=U)" ]; then + git -c user.name=preflight -c user.email=preflight@local commit -q --no-edit + echo "ok ${SRC}#${NUM} (additive resolve)" + continue + fi FILES="$(git diff --name-only --diff-filter=U | sed 's/^/ /')" HUNKS="$(git diff --diff-filter=U -U0 2>/dev/null | grep -E '^\+|^-' | grep -vE '^(\+\+\+|---)' | head -20)" git merge --abort 2>/dev/null