diff --git a/scripts/src/pikaoa-test-target.ts b/scripts/src/pikaoa-test-target.ts index be23640c..f7180220 100644 --- a/scripts/src/pikaoa-test-target.ts +++ b/scripts/src/pikaoa-test-target.ts @@ -351,9 +351,6 @@ function parseTarget(id: string, root: Record, configLabel: str workerReadinessPath: httpPath(workerProbes.readinessPath, `${path}.probes.worker.readinessPath`), }, }; - if (!target.migration.command.includes("migrate") || !target.migration.command.includes("up")) { - throw new Error(`${path}.migration.command 必须显式调用产品 migrate up`); - } const secretKeys = secretSources(target).map((item) => item.targetKey); if (new Set(secretKeys).size !== secretKeys.length || secretKeys.includes("pikaoa.yaml")) { throw new Error(`${path} 的 Secret targetKey 必须唯一且不能使用 pikaoa.yaml`); @@ -561,6 +558,7 @@ function safetyBlockers(options: TestTargetOptions, selection: Selection, contex function consistencyWarnings(target: TestTargetSpec, context: RenderContext | null): Warning[] { const warnings: Warning[] = []; + if (!target.migration.command.includes("migrate") || !target.migration.command.includes("up")) warnings.push(warning("migration-command-unrecognized", "迁移命令未显示产品 migrate up;配置一致性只报告 warning。")); if (!target.source.apiImage.includes("${commit}") || !target.source.workerImage.includes("${commit}") || !target.source.migrationImage.includes("${commit}")) warnings.push(warning("image-template-not-commit-scoped", "API、Worker 或迁移镜像模板未包含 ${commit};版本一致性只报告 warning。")); if (context !== null && (!context.apiImage.includes(context.commit) || !context.workerImage.includes(context.commit) || !context.migrationImage.includes(context.commit))) warnings.push(warning("image-commit-not-visible", "渲染镜像引用未显示选中 commit;该漂移不阻塞当前 MVP。")); if (target.observability.exporterWarning) warnings.push(warning("otel-exporter-warning-only", "OTel exporter 失败按 owning YAML 仅报告 warning,不阻塞业务运行。"));