From 6401cad64d1e89fb441a311a9190887816bca1f8 Mon Sep 17 00:00:00 2001 From: "prompt.ac/@jeffrey" Date: Fri, 24 Apr 2026 15:50:31 -0700 Subject: [PATCH] oven: stash build-artifact dirt before papers-build rebase MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit xelatex leaves tracked .log/.toc/.aux files (and sometimes intermediate .pdfs in papers/arxiv-*/) modified after each run. Those unstaged modifications don't need to be preserved — the auto-build only commits system/public/papers.aesthetic.computer/ + metadata.json + BUILDLOG.md — but they block `git pull --rebase origin main`, which silently breaks the push step and causes the oven's local main to diverge from origin. Add a `git checkout -- papers/` cleanup between `git commit` and `git pull --rebase`. Failures are non-fatal; any real rebase conflict will still surface in the next step. --- oven/papers-builder.mjs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/oven/papers-builder.mjs b/oven/papers-builder.mjs index 141c1a1a0c..ef460074b8 100644 --- a/oven/papers-builder.mjs +++ b/oven/papers-builder.mjs @@ -148,6 +148,21 @@ async function commitAndPushPDFs(job) { addLogLine(job, "stdout", ` GIT: committing ${changedFiles.length} file(s)...`); await git(["commit", "-m", msg]); + // Discard any remaining unstaged build artifacts (xelatex leaves tracked + // .log/.toc/.aux/.fls files modified after each run, and intermediate .pdfs + // in papers/arxiv-*/ may also be dirty). We only commit system/public/... + + // metadata.json + BUILDLOG.md, so anything still dirty is byproduct we + // don't want to preserve — and leaving it dirty blocks `git pull --rebase`. + try { + await git(["checkout", "--", "papers/"]); + } catch (cleanupErr) { + addLogLine( + job, + "stderr", + ` GIT: pre-rebase cleanup note: ${cleanupErr.message || cleanupErr}`, + ); + } + // Pull any changes that landed while we were building (rebase our commit on top) addLogLine(job, "stdout", " GIT: pulling latest before push..."); try { -- 2.51.2