From 5647a34294a13a789f425c0c1967cacfdf04b4d2 Mon Sep 17 00:00:00 2001 From: Eve Date: Fri, 24 Apr 2026 07:29:21 +0800 Subject: [PATCH] test: cover fake progress evidence regression --- .../test_force_recall_long_task_preflight.mjs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/scripts/test_force_recall_long_task_preflight.mjs b/scripts/test_force_recall_long_task_preflight.mjs index dfbe967..9466460 100755 --- a/scripts/test_force_recall_long_task_preflight.mjs +++ b/scripts/test_force_recall_long_task_preflight.mjs @@ -256,6 +256,22 @@ async function main() { assert.match(neutralInjected, /autoChainAllowed=false/, 'hook neutral-path should keep auto-chain disabled'); assert.doesNotMatch(neutralInjected, /reason=explicit auto-chain next action requires dispatched-action evidence/, 'hook neutral-path should not fail on auto-chain evidence when no explicit tool action exists'); + const fakeProgressEvidenceInjected = await withPatchedWrapper(buildWrapperScript({ + classification: 'long_task', + silentCandidate: true, + needsCheckpoint: true, + needsSubagent: false, + needsOwnerDecision: false, + silentLaunchOk: true, + silentLaunchReason: 'task name exists but no externalized artifact', + taskRecord: { task_name: 'descriptive-task-name-only' }, + handoff: { mode: 'direct_reply' }, + }), async () => runScenario(forceRecall, requestText)); + assert.match(fakeProgressEvidenceInjected, /gateStatus=fail/, 'hook fake-progress-evidence path should fail when only task_name exists'); + assert.match(fakeProgressEvidenceInjected, /reason=claimed progression without concrete progress evidence is forbidden/, 'hook fake-progress-evidence path should mention missing concrete progress evidence'); + assert.match(fakeProgressEvidenceInjected, /requiredEvidence=progressEvidence/, 'hook fake-progress-evidence path should require progressEvidence'); + assert.match(fakeProgressEvidenceInjected, /reason=silent long-task cannot continue without externalized checkpoint path/, 'hook fake-progress-evidence path should also require real checkpoint evidence'); + const specReviewWithoutEvidenceInjected = await withPatchedWrapper(buildWrapperScript({ classification: 'long_task', silentCandidate: false,