From 6d4c319a0a34e7b851cd6e59682abd7d31ec84c1 Mon Sep 17 00:00:00 2001 From: sunlei Date: Sat, 13 Jun 2026 10:03:40 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E5=9B=BA=E5=8C=96=E4=B8=8A=E7=BA=BF?= =?UTF-8?q?=E8=87=AA=E6=B5=8B=E9=97=A8=E7=A6=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/tools/closeout.ts | 10 ++++++++-- src/tools/verification.ts | 9 +++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/tools/closeout.ts b/src/tools/closeout.ts index 53bf460..7f387b2 100644 --- a/src/tools/closeout.ts +++ b/src/tools/closeout.ts @@ -88,7 +88,9 @@ export function buildWorkstreamCloseout(input: WorkstreamCloseoutInput = {}): Re const ktWorkflowUpdated = input.ktWorkflowUpdated === true; const missingItems = [ title ? '' : '填写本轮大方向名称或目标。', - verificationEvidence.length > 0 ? '' : '补充测试或 smoke 验证证据;只有计划不算闭环完成。', + verificationEvidence.length > 0 + ? '' + : '补充测试或 smoke 验证证据;上线功能必须包含线上自测证据,只有计划或 Jenkins/K8s 成功不算闭环完成。', docSyncEvidence.length > 0 ? '' : '补充文档同步证据;无需更新时也要显式写明原因。', cleanupOk ? '' : '补充历史产物清理证据;至少包含 cleanup-history dry-run deleted=0 或结构化 cleanupFinalDeleted=0。', reviewEvidence.length > 0 ? '' : '补充 KT 全局 review 证据。', @@ -109,7 +111,11 @@ export function buildWorkstreamCloseout(input: WorkstreamCloseoutInput = {}): Re canReportComplete: missingItems.length === 0, closeoutOrder: [ buildPhase('development', title ? [title] : [], '写清本轮完成的开发目标。'), - buildPhase('test/smoke verification', verificationEvidence, '补一条可复验的验证证据。'), + buildPhase( + 'test/smoke verification', + verificationEvidence, + '补一条可复验的验证证据;上线功能必须补线上自测证据。', + ), buildPhase('documentation sync', docSyncEvidence, '补充 kt_change_doc_sync 证据或无需更新说明。'), { evidence: [ diff --git a/src/tools/verification.ts b/src/tools/verification.ts index bffcdba..208afd5 100644 --- a/src/tools/verification.ts +++ b/src/tools/verification.ts @@ -33,6 +33,12 @@ export function buildVerificationPlan(input: VerificationPlanInput): Verificatio ); } + if (changeType === 'deploy') { + notes.push( + '上线功能必须在 Jenkins/K8s 成功后补对应线上自测证据;只有构建成功、镜像更新或 Pod Running 不能标记功能完成。', + ); + } + if ( typecheck && ['api', 'frontend', 'general', 'mcp', 'page', 'refactor', 'style'].includes(changeType) @@ -49,6 +55,9 @@ export function buildVerificationPlan(input: VerificationPlanInput): Verificatio if (['api', 'backend'].includes(changeType)) { notes.push('接口改动需要本地启动或复用本地服务,真实调用对应接口一次。'); } + if (changeType === 'deploy') { + notes.push('API 上线后至少执行一个对应线上接口或业务链路 smoke。'); + } } if (project.alias === 'playground' && scripts['build-preview'] && changeType === 'deploy') {