fix(wechat): guard ambiguous memory recall and scheduled task execution

Skip memory injection for short filler messages, demote page-workflow memory
pollution, keep scheduled automation off page.generate, and fail scheduled
tasks that only return clarification instead of deliverables.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-08-01 22:49:52 +08:00
parent dcf83e9b6f
commit 26fe5912a3
9 changed files with 222 additions and 0 deletions
+6
View File
@@ -1,6 +1,7 @@
import {
executeScheduledTask,
formatScheduledTaskDeliveryMessage,
looksLikeScheduledTaskNonDelivery,
} from './scheduled-task-executor.mjs';
export function startScheduledTaskWorker({
@@ -77,6 +78,11 @@ export function startScheduledTaskWorker({
timeoutMs: executionTimeoutMs,
logger,
});
if (looksLikeScheduledTaskNonDelivery(result.deliveryText)) {
const err = new Error('定时任务未产出可交付结果');
err.code = 'SCHEDULED_TASK_NON_DELIVERY';
throw err;
}
await deliverTaskResult(task, result.deliveryText);
await scheduledTaskService.markTaskSucceeded(task, {
result: {