Files
stack/scripts/case2/citation-adapter.mjs
jason.woltje 04e1ce24cc row 227 R2 (#1728): run test-case2.sh standalone, without the slot controller
Remove the R1 slot-controller ties from the C2-14 fixture: the ROW227_CONTROL_ROOT
check, the native permit wait in bindLaunch, the fixture-cleanup.json write, the
priority.mjs preload and the owned-bwrap.sh override. The launcher uses its own bwrap.

The shell runs the driver from an explicit env -i environment (PATH, LANG, a sandbox
HOME, XDG dirs and TMPDIR, MOSAIC_CONFIG, no global git config) as its own process
group. On a signal the driver gets 3 s by the clock, then its group and any process
whose cwd is in the sandbox get SIGKILL, inside the landing gate's 5 s grace.

The fixture credentials are defined only in scripts/case2/fixture-credentials.mjs.
The new scripts/case2/leak-check.mjs reads them from there and never prints them.
2026-11-02 15:41:17 -06:00

15 lines
896 B
JavaScript

// C2-14 adds an observed real library tool read before C2-06's scripted reply adapter.
// The reply plan is fixture input, never evidence that a lookup or guard actually ran.
import { appendFileSync, existsSync, readFileSync } from 'node:fs';
import { dirname, join } from 'node:path';
import { callTool } from '../../packages/harness/src/tools.mjs';
const root = dirname(process.env.MOSAIC_TURN_MARKER);
const count = join(root, 'fixture-count');
const n = existsSync(count) ? Number(readFileSync(count, 'utf8')) : 0;
const step = JSON.parse(readFileSync(join(root, 'fixture-steps.json'), 'utf8'))[n];
for (const args of step?.lookups ?? []) {
const result = await callTool(process.env.MOSAIC_TOOL_SOCKET, 'library_get', args);
appendFileSync(join(root, 'fixture-lookups.jsonl'), JSON.stringify(result) + '\n');
}
await import('../../packages/harness/tests/fixtures/citation-adapter.mjs');