wip(rm-02): close all success output paths

This commit is contained in:
2026-08-01 14:45:11 -05:00
parent 9b7005d59b
commit c5b0d510d7
4 changed files with 36 additions and 9 deletions
+15 -4
View File
@@ -20,13 +20,24 @@ const accepted = prohibitedReports.filter((report) => {
});
const verifier = await readFile(path.join(process.cwd(), 'scripts', 'gate-verify.mjs'), 'utf8');
const outputWrites = [...verifier.matchAll(/process\.stdout\.write\s*\(/g)].length;
const stdoutWrites = [...verifier.matchAll(/process\.stdout\.write\s*\(/g)].length;
const stderrWrites = [...verifier.matchAll(/process\.stderr\.write\s*\(/g)].length;
const gatedErrorWrites = [...verifier.matchAll(/process\.stderr\.write\(`GATE VERIFY FAILED:/g)]
.length;
const currentTreeWriterCalls = [...verifier.matchAll(/writeCurrentTreeOutput\s*\(/g)].length;
const productionRendererWired =
outputWrites === 2 &&
/for \(const observation of observations\) \{\s*assertCurrentTreeObservation\(observation\);\s*process\.stdout\.write/s.test(
stdoutWrites === 1 &&
stderrWrites === 2 &&
gatedErrorWrites === 2 &&
currentTreeWriterCalls === 3 &&
/function writeCurrentTreeOutput\(output\) \{\s*assertCurrentTreeObservation\(output\);\s*process\.stdout\.write/s.test(
verifier,
) &&
!/\bconsole\.(?:log|info|debug)\s*\(/.test(verifier);
/for \(const observation of observations\) \{\s*writeCurrentTreeOutput\(observation\);\s*\}/s.test(
verifier,
) &&
/writeCurrentTreeOutput\(\s*`REGISTRY SUMMARY open behavior deltas:/s.test(verifier) &&
!/\bconsole\.(?:log|info|debug|error|warn)\s*\(/.test(verifier);
if (accepted.length > 0 || !productionRendererWired) {
process.stderr.write(