merge-steward 0.9.2 → 0.9.3
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.
- package/dist/reconciler.js +19 -0
- package/package.json +1 -1
package/dist/reconciler.js
CHANGED
|
@@ -38,6 +38,25 @@ export async function reconcile(ctx) {
|
|
|
38
38
|
// Truth guard: verify entry against GitHub before processing.
|
|
39
39
|
if (await sanitizeEntry(ctx, entry))
|
|
40
40
|
continue;
|
|
41
|
+
// Stale dependency guard: if this entry's spec was built on top of
|
|
42
|
+
// another entry that was dequeued or evicted (without downstream
|
|
43
|
+
// invalidation), the spec is contaminated with the removed entry's
|
|
44
|
+
// changes. Reset so it rebuilds on the correct base next tick.
|
|
45
|
+
// Exclude "merged" — a merged dependency means main advanced to its
|
|
46
|
+
// spec, so our cumulative spec is still valid (speculative consistency).
|
|
47
|
+
if (entry.specBasedOn) {
|
|
48
|
+
const dep = ctx.store.getEntry(entry.specBasedOn);
|
|
49
|
+
if (!dep || dep.status === "dequeued" || dep.status === "evicted") {
|
|
50
|
+
emit(ctx, entry, "invalidated", {
|
|
51
|
+
detail: `dependency ${entry.specBasedOn} is ${dep?.status ?? "removed"}`,
|
|
52
|
+
});
|
|
53
|
+
await cleanupSpec(ctx, entry);
|
|
54
|
+
ctx.store.transition(entry.id, "preparing_head", {
|
|
55
|
+
...CLEAN_CI, ...CLEAN_SPEC,
|
|
56
|
+
}, `stale dependency ${dep?.status ?? "removed"}`);
|
|
57
|
+
continue;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
41
60
|
const isHead = i === 0;
|
|
42
61
|
const prevEntry = i > 0 ? ctx.store.getEntry(allActive[i - 1].id) ?? null : null;
|
|
43
62
|
const phase = entry.status;
|