commit 9241b03df5e25a788fc829a07b5ee15cae5f58b6
parent 7bcd48c644a69c3713a6341b504726583ac9e8eb
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Wed, 4 Nov 2026 23:04:20 -0500
umtool: the queue store keeps process.cwd() out (the trace rule); the spec reaches /jobs from a page with the rail
scripts/next-build-trace.test.mjs refuses a module the app imports whose path calls carry
a cwd-derived value: addStep no longer defaults `cwd` to process.cwd() (the CLI passes its
own; the runner falls back to its umtool dir). The Takes page is a bench, which has no rail:
run-queue.spec goes to / for the rail's Running link.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat:
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/umtool/e2e/run-queue.spec.ts b/umtool/e2e/run-queue.spec.ts
@@ -117,7 +117,8 @@ test("a queued chain runs in order in the app; the failed render records itself;
expect(stepLog.status()).toBe(200);
expect(await stepLog.text()).toContain(`# queue ${q2} attempt 1: the broken take`);
- // /jobs: the queue and the renders, across projects; the rail's Running links it.
+ // /jobs: the queue and the renders, across projects; the rail's Running links it (the Takes page is a bench: no rail).
+ await page.goto("/");
await page.locator("[data-rail-jobs]").click();
await expect(page).toHaveURL(/\/jobs$/);
await expect(page.locator("[data-queue-runner='live']")).toBeVisible();
diff --git a/umtool/lib/queue/runner.ts b/umtool/lib/queue/runner.ts
@@ -58,7 +58,7 @@ export const queueDir = () => queueDirOf({ reportsRoot: REPORTS_ROOT });
const umtoolCli = () => path.join(/* turbopackIgnore: true */ UMTOOL_DIR, "bin", "umtool.mjs");
-type QueueStep = { qid: string; label: string; argv: string[]; cwd: string; timeoutMin: number; startedAt: string | null; target?: { project: string | null; take: string | null } | null };
+type QueueStep = { qid: string; label: string; argv: string[]; cwd: string | null; timeoutMin: number; startedAt: string | null; target?: { project: string | null; take: string | null } | null };
/** A failed take step's error, from the take's own render record when it is this attempt's. */
async function describe(step: QueueStep): Promise<string | null> {
@@ -84,7 +84,7 @@ const exec = {
{
label: step.label,
argv: [process.execPath, umtoolCli(), ...step.argv],
- cwd: step.cwd,
+ cwd: step.cwd ?? UMTOOL_DIR,
env: {},
timeoutMs: Math.max(1, step.timeoutMin) * 60_000,
logFile,
diff --git a/umtool/lib/queue/store.mjs b/umtool/lib/queue/store.mjs
@@ -240,7 +240,8 @@ export async function addStep(dir, o) {
seq,
label: o.label?.trim() || labelOf(o.argv),
argv: o.argv,
- cwd: o.cwd ?? process.cwd(),
+ // Where it was queued from (relative paths in its argv resolve there); the runner's own dir when unsaid.
+ cwd: o.cwd ?? null,
after,
target: o.target ?? null,
state: "queued",