From 3b914033f496cb71fd0dbe2b9f4235a96c4b08cc Mon Sep 17 00:00:00 2001 From: deseltrus Date: Sun, 15 Mar 2026 09:23:13 +0100 Subject: [PATCH] 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) --- src/resources/extensions/gsd/tests/draft-promotion.test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/resources/extensions/gsd/tests/draft-promotion.test.ts b/src/resources/extensions/gsd/tests/draft-promotion.test.ts index 4ea6f976c..0ce24ed50 100644 --- a/src/resources/extensions/gsd/tests/draft-promotion.test.ts +++ b/src/resources/extensions/gsd/tests/draft-promotion.test.ts @@ -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"),