Require parent interpreter for persona speech

This commit is contained in:
Meta Vens 2026-06-07 04:18:07 +01:00
commit ccaf856b53
6 changed files with 32 additions and 69 deletions

View file

@ -0,0 +1,28 @@
import { readFileSync } from "node:fs";
import { resolve } from "node:path";
const workerSource = readFileSync(resolve("apps", "worker", "src", "index.ts"), "utf8");
const forbidden = [
"routeUnparsedWouldSay",
"extractUnconditionalWouldSay",
"Parent interpreter fallback: routed unconditional Persona Would say.",
];
const present = forbidden.filter((needle) => workerSource.includes(needle));
if (present.length > 0) {
console.error(JSON.stringify({
ok: false,
reason: "Repo Persona parent interpreter must not route raw child Would say output when interpreter parsing fails.",
present,
}, null, 2));
process.exit(1);
}
console.log(JSON.stringify({
ok: true,
checked: [
"no raw Would say fallback route remains in worker parent-interpreter boundary",
],
}, null, 2));