Lands Gosalyn's round 1 candidate,8f403d0d4on gosalyn/c2-20-r2 (48f044cccplus its BUILD.md, on62ddc96cc), approved by Webby (webby-0073, REVIEW-r1a0a00630e, rev 2808). 22 paths, manifest 20f05e3a6ad5. No 221 path changed between62ddc96ccand this commit's parent. Patch-id dfbb754c6fb4, the same as 62ddc96cc..8f403d0d4. The two state.db fixtures and auth.json are short text stand-ins. Webby's N1, N2 and N4 go to the C2-20b follow-up row before Jason's import run. N3 (mutants.py:48 anchor) is in DEFERRED.md. The script itself runs only under Jason's go (design 10 step 6, 9.1). Evidence: Gosalyn's singles on my slot, 419/0 on48f044ccc(gosalyn-0104). Gate on my slot, 11:07:50-11:19Z onb1fece6f0plus the 22 paths: case2-persona-import.test.mjs alone 11/0, harness 140/0 (bundle.mjs changed), cli 677/0, and every scripts/test-*.sh green (auth 15, conductor 17, config 31, discord 78, extension-package 18, foundation 44, land-work 86, queue 156 and 28, release 14, task 98, all 0 failed). Lands before row 197 r7: no shared paths, and r7's proof candidates both carry it (sage-1954).
21 lines
1.1 KiB
JavaScript
21 lines
1.1 KiB
JavaScript
// Read trace for case2-persona-import.test.mjs: loaded with --import, it logs every path the script
|
|
// opens, reads or lists to $PERSONA_TRACE, one "op path" line each. The log is written through
|
|
// the original functions so the trace doesn't trace itself.
|
|
import fs from "node:fs";
|
|
import { syncBuiltinESMExports } from "node:module";
|
|
|
|
const { openSync, writeSync } = fs;
|
|
const log = openSync(process.env.PERSONA_TRACE, "a", 0o600);
|
|
const record = (op, p) => {
|
|
if (typeof p === "string" || p instanceof URL || Buffer.isBuffer(p)) writeSync(log, `${op} ${String(p)}\n`);
|
|
};
|
|
for (const name of ["openSync", "readFileSync", "readdirSync", "opendirSync", "createReadStream", "open", "readFile", "readdir", "opendir"]) {
|
|
const original = fs[name];
|
|
fs[name] = function traced(p, ...rest) { record(name, p); return original.call(this, p, ...rest); };
|
|
}
|
|
for (const name of ["open", "readFile", "readdir", "opendir"]) {
|
|
const original = fs.promises[name];
|
|
fs.promises[name] = function traced(p, ...rest) { record(`promises.${name}`, p); return original.call(this, p, ...rest); };
|
|
}
|
|
syncBuiltinESMExports();
|