From e89c0fbd6bc3a5059730d48b5e1964962021d591 Mon Sep 17 00:00:00 2001 From: wangdl Date: Sun, 21 Jun 2026 09:51:10 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20B1=20=E2=80=94=20=E6=97=A0=20Projector?= =?UTF-8?q?=20=E8=B7=AF=E5=BE=84=E8=B0=83=E7=94=A8=20markSucceeded=20?= =?UTF-8?q?=E9=98=B2=E6=AD=A2=20Job=20=E5=8D=A1=E5=9C=A8=20running?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit projectorKey 为 undefined 或 Projector 未注册时, ProjectionExecutor 调用 markSucceeded 后再返回空 Artifact 列表。 避免 Engine 的 AI 调用成功后 Job 永远停留在 running 状态。 Co-Authored-By: Claude --- src/modules/ai-job/projection-executor.service.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/modules/ai-job/projection-executor.service.ts b/src/modules/ai-job/projection-executor.service.ts index 83c53aa..49e48a3 100644 --- a/src/modules/ai-job/projection-executor.service.ts +++ b/src/modules/ai-job/projection-executor.service.ts @@ -54,14 +54,16 @@ export class ProjectionExecutor { context: ProjectionContext, ): Promise { if (!projectorKey) { - this.logger.log(`No projectorKey for jobType=${context.job.jobType} — skipping projection`); + this.logger.log(`No projectorKey for jobType=${context.job.jobType} — marking succeeded without projection`); + await this.lifecycleRepo.markSucceeded(context.job.id); return []; } const projector = this.projectorMap.get(projectorKey); if (!projector) { - // Projector 未注册,跳过(不应影响 job 成功) - this.logger.warn(`Projector "${projectorKey}" not registered — skipping projection for job=${context.job.id}`); + // Projector 未注册 — 仍应标记 Job 成功(Engine 的 AI 调用已完成) + this.logger.warn(`Projector "${projectorKey}" not registered — marking succeeded without projection for job=${context.job.id}`); + await this.lifecycleRepo.markSucceeded(context.job.id); return []; }