From 3e9940b4f00eb354116850ce1c5ebabfa904b514 Mon Sep 17 00:00:00 2001 From: mptyl Date: Wed, 12 Aug 2026 18:07:41 +0200 Subject: [PATCH] fix: rebase the curator clone before P3 mutation pushes --- backend/scripts/p3-acceptance.mjs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/scripts/p3-acceptance.mjs b/backend/scripts/p3-acceptance.mjs index 768066d3..6fb738ac 100644 --- a/backend/scripts/p3-acceptance.mjs +++ b/backend/scripts/p3-acceptance.mjs @@ -714,6 +714,10 @@ async function initializeGitAndRegistry(ctx) { async function mutateWorkspaceDescriptor(ctx, workspaceId, mutator, commitMessage) { const author = join(ctx.run.root, "author"); + // The registry may have produced docs-only follow-up commits on the remote; the curator + // always rebases onto the latest remote head before committing so the push stays fast-forward. + await git(ctx, ["fetch", "origin", "main"], { cwd: author }); + await git(ctx, ["reset", "--hard", "origin/main"], { cwd: author }); const workspace = structuredClone(ctx.workspaceObjects[workspaceId === "p2-dwh" ? "dwh" : "filesystem"]); mutator(workspace); ctx.workspaceObjects[workspaceId === "p2-dwh" ? "dwh" : "filesystem"] = workspace;