From 2d0d407ba60c9c81380b82ea87d32bb65e202cc1 Mon Sep 17 00:00:00 2001 From: Jason Woltje Date: Thu, 22 Oct 2026 10:41:40 -0500 Subject: [PATCH] row 269 (264b, #1774): the M6 halt test halts after mayLaunch answers A halt inside the op reaches the bus's own fence first (runtime.mjs:564-566, processingWork at :352-356), so the launcher refused limit-check-failed (launcher.mjs:389-391) before its recheck admission() at :397. First-run red of a new test on 6d9ab3503 early signal, placed under mos-1272. --- packages/cli/tests/session-launch.test.mjs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/cli/tests/session-launch.test.mjs b/packages/cli/tests/session-launch.test.mjs index 10e72d15c..ea81c8e5f 100644 --- a/packages/cli/tests/session-launch.test.mjs +++ b/packages/cli/tests/session-launch.test.mjs @@ -372,8 +372,8 @@ test("REQ-THREAD-2 REQ-LAUNCH-1 a symlinked session store refuses thread-store-r // T2, M6 and the halt fence (C2). The credentialStatus op runs in start() after check() returned. // Its first call halts and resumes, a new generation with no halt, so only start()'s own // admission(admissionGeneration) refuses, before the session workspace is made. On the retry, -// the recheck's mayLaunch op (inside check(), after the lock is taken) halts, and the recheck -// refuses processing-halted. Neither attempt spawns, and the second releases its lock. +// the recheck's mayLaunch op (inside check(), after the lock is taken) halts once it has answered, +// and the recheck's admission() refuses processing-halted. Neither attempt spawns, and the second releases its lock. test("REQ-THREAD-2 REQ-LAUNCH-1 a named session's start refuses processing-generation-changed, then processing-halted, after check() and before any spawn", { skip, timeout: 60000 }, async (t) => { const prepared = prepare(t); const { f } = prepared; @@ -389,12 +389,15 @@ test("REQ-THREAD-2 REQ-LAUNCH-1 a named session's start refuses processing-gener } return runtime.credentialStatus(m.business, m.role); }, - mayLaunch: (m) => { + // The halt lands after the op answers: halted inside it, the bus's own fence + // (runtime.mjs processingWork) throws and the launcher refuses limit-check-failed. + mayLaunch: async (m) => { + const may = await runtime.mayLaunch(m); if (m.instance === "assistant" && credentials === 2 && halts === 1) { halt(); halts++; } - return runtime.mayLaunch(m); + return may; }, }), });