fix: B1 — 无 Projector 路径调用 markSucceeded 防止 Job 卡在 running
Some checks failed
Deploy API Server / build-and-unit (push) Failing after 28s
Deploy API Server / current-integration (push) Has been skipped
Deploy API Server / backward-compat (push) Has been skipped
Deploy API Server / deploy (push) Has been skipped

projectorKey 为 undefined 或 Projector 未注册时,
ProjectionExecutor 调用 markSucceeded 后再返回空 Artifact 列表。
避免 Engine 的 AI 调用成功后 Job 永远停留在 running 状态。

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
wangdl 2026-06-21 09:51:10 +08:00
parent 4cfcb7afe5
commit e89c0fbd6b

View File

@ -54,14 +54,16 @@ export class ProjectionExecutor {
context: ProjectionContext,
): Promise<ArtifactReference[]> {
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 [];
}