fix(test): update draft-promotion test for expanded checkAutoStartAfterDiscuss

The static assertion searched the first 1200 chars of checkAutoStartAfterDiscuss
for CONTEXT-DRAFT and unlinkSync references, but the function grew to 4164 chars
after adding Gates 2-4 (STATE.md, PROJECT.md, manifest validation). The search
window now extends to the next export statement.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
deseltrus 2026-03-15 09:23:13 +01:00
parent f27ed34fc0
commit 3b914033f4

View file

@ -145,7 +145,8 @@ const guidedFlowSource = readFileSync(
);
const checkFnIdx = guidedFlowSource.indexOf("checkAutoStartAfterDiscuss");
const checkFnChunk = guidedFlowSource.slice(checkFnIdx, checkFnIdx + 1200);
const checkFnEnd = guidedFlowSource.indexOf("\nexport ", checkFnIdx + 1);
const checkFnChunk = guidedFlowSource.slice(checkFnIdx, checkFnEnd > checkFnIdx ? checkFnEnd : checkFnIdx + 5000);
assert(
checkFnChunk.includes("CONTEXT-DRAFT"),