merge-steward 0.8.5 → 0.8.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -159,7 +159,6 @@ async function prepareEntry(ctx, entry, isHead, prevEntry) {
159
159
  }
160
160
  // Gate: non-spinning — skip if base hasn't changed since last conflict.
161
161
  if (isRetryGated(entry, baseSha)) {
162
- emit(ctx, entry, "retry_gated", { baseSha, detail: "base unchanged since last conflict" });
163
162
  try {
164
163
  const prStatus = await ctx.github.getStatus(entry.prNumber);
165
164
  if (prStatus.mergeStateStatus === "DIRTY") {
@@ -168,10 +167,18 @@ async function prepareEntry(ctx, entry, isHead, prevEntry) {
168
167
  detail: "retry gated and GitHub still reports merge conflict",
169
168
  });
170
169
  await evictEntry(ctx, entry, "integration_conflict");
170
+ return;
171
171
  }
172
+ // GitHub says CLEAN but local clone conflicted — the conflict was
173
+ // likely transient (stale clone state). Clear the gate and retry.
174
+ emit(ctx, entry, "retry_gated", { baseSha, detail: "local conflict but GitHub reports CLEAN, retrying" });
175
+ ctx.store.transition(entry.id, "preparing_head", {
176
+ lastFailedBaseSha: null, ...CLEAN_CI, ...CLEAN_SPEC,
177
+ }, "GitHub reports CLEAN, clearing retry gate");
172
178
  }
173
179
  catch {
174
- // Best-effort check.
180
+ // GitHub probe failed — hold the gate.
181
+ emit(ctx, entry, "retry_gated", { baseSha, detail: "base unchanged since last conflict" });
175
182
  }
176
183
  return;
177
184
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "merge-steward",
3
- "version": "0.8.5",
3
+ "version": "0.8.6",
4
4
  "description": "Serial merge queue for GitHub — rebase, CI-gate, and merge PRs one at a time",
5
5
  "type": "module",
6
6
  "repository": {