Darkwing's row 121 round 2 (agents/darkwing/work/queue-121/r2, base20d2b5788, manifest 710d5086...e67e9b, 30 files), applied unchanged on d7ebaa9a5; no commit since the base touches any of the 30 paths. Dewey asked for changes on round 1 in comment 28591 (F1 to F6) and approved round 2 in 28615. Landing gate ond7ebaa9a5plus the candidate: all 24 suites passed, 0 failed. F6 and Dewey's three round 2 notes are follow-ups (sage-0369, P19 task 311). One of them corrects the packet: BUILD.md says the decision-route setup's projects key is needed, and Dewey's probe showed project.create reads it only with repo, so the key is dead setup. The live bus stays at 3b until Mos's schema window migrates it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
22 lines
1.3 KiB
JavaScript
22 lines
1.3 KiB
JavaScript
// A stand-in harness turn for the thread launch tests (row 121, #1615). It
|
|
// keeps a history in $MOSAIC_SESSION_DIR, which for a thread run is the
|
|
// thread's store, and a transcript per turn under $HOME/.claude/projects.
|
|
// It answers with the message body and what both held before this turn, so
|
|
// a test reads from the reply what a later run of the same thread kept.
|
|
|
|
import { appendFileSync, existsSync, readdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
import { join } from "node:path";
|
|
|
|
const request = process.env.MOSAIC_REQUEST ?? "";
|
|
const body = request.match(/^Message [^\n]*:\n\n([\s\S]*)$/m)?.[1] ?? "";
|
|
const historyFile = join(process.env.MOSAIC_SESSION_DIR, "history");
|
|
const before = existsSync(historyFile) ? readFileSync(historyFile, "utf8").split("\n").filter(Boolean) : [];
|
|
const projects = join(process.env.HOME, ".claude", "projects");
|
|
const transcripts = existsSync(projects) ? readdirSync(projects).sort() : null;
|
|
// A turn longer than the test's idle time.
|
|
if (body === "slow") Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, 3000);
|
|
appendFileSync(historyFile, `${body}\n`);
|
|
if (transcripts) writeFileSync(join(projects, `turn-${before.length + 1}.jsonl`), `${JSON.stringify(body)}\n`);
|
|
process.stdout.write(`THREAD ${JSON.stringify({ body, before, transcripts })}\n`);
|
|
writeFileSync(process.env.MOSAIC_TURN_MARKER, "done\n");
|