Round 2 of #1519: R1 to R5 fixed and reproduced, 43/43 on Node 26 and Node 24, 22 of 23 mutants killed against a clean baseline. Records a reparented-CLI path past the human proof for Sage's ruling. Co-Authored-By: Claude Opus 5.5 <[email protected]>
9 lines
855 B
JavaScript
9 lines
855 B
JavaScript
// A CLI reparented to pid 1 with a clean environment: verifyHuman never reads pid 1, so the walk ends at the CLI.
|
|
const nonce = 'a'.repeat(64), cliPath = '/fixture/human-cli.mjs';
|
|
for (const tree of ['s2-review', 's2-r2']) {
|
|
const { verifyHuman } = await import(`/home/jwoltje/darkwing-scratch/${tree}/packages/bus/src/human.mjs`);
|
|
const read = (pid) => { if (pid === 4242) return { pid, ppid: 1, startTime: '1', uid: process.getuid(), argv: ['node', cliPath], env: { MOSAIC_BUS_CLI_NONCE: nonce } }; throw Object.assign(new Error('unexpected read ' + pid), { code: 'x' }); };
|
|
let out; try { out = JSON.stringify(verifyHuman({ pid: 4242, startTime: '1', nonce, business: 'demo' }, { cliPath, readProcess: read })); } catch (e) { out = e.code; }
|
|
console.log(tree === 's2-review' ? 'round 1:' : 'round 2:', 'CLI with ppid 1, clean env ->', out);
|
|
}
|