Skip to content

fix: block bare-zero cost and undeclared preview failures at candidate finalization - #205

Open
ruanzhengxin-zhuxing wants to merge 1 commit into
mainfrom
harness/bbd3e2d8
Open

fix: block bare-zero cost and undeclared preview failures at candidate finalization#205
ruanzhengxin-zhuxing wants to merge 1 commit into
mainfrom
harness/bbd3e2d8

Conversation

@ruanzhengxin-zhuxing

Copy link
Copy Markdown
Collaborator

背景

Session 62a1cae4e5524c1492d28c152809e8a0 中,OSS+CDN 候选在 preview_validation.succeeded=false(CdnDomainName 缺失)的情况下仍以 ¥0/月 的月成本定稿完成并进入用户选择,与 ECS+SLB 候选形成误导性成本对比。

改动

  • complete_step 守卫增强:新增 when_conclusion_field_matches 正则谓词与 forbid_completion 动作,及两个 message key(零成本禁止 / preview 失败须声明缺口)
  • selling pipelinecost_estimating 新增 completion_guards——裸零金额 monthly_estimate 拒绝定稿;preview_validation.succeeded=false 时必须提供 missing_deployment_parameterserror(PreviewStack 保持软门禁,不误杀外部输入缺失场景)
  • iac-aliyun-cost skill/prompt:按量付费资源(OSS 存储/CDN 流量)询价为 0 或不支持询价时,必须输出标注按量计费口径的用量区间估算或"询价失败",禁止 ¥0/月
  • confirm_and_select prompt:候选展示必须透传预览未通过/参数缺口/成本口径警示,total_monthly_cost 不得展示 ¥0/月 伪确定值
  • i18n:新增 3 条可翻译串并补全 6 个 locale 翻译

测试

  • 新增 TestCostEstimatingGuards(引擎层 18 例)与 tests/pipeline/selling/test_cost_estimating_guards.py(配置/正则 17 例)
  • make lint 通过;全量 pytest 13305 passed(2 项 pre-existing 环境相关失败与本改动无关)

Harness WorkItem: bbd3e2d8-028d-409f-b9d7-ca6d688fa480

…e finalization

The OSS+CDN candidate in session 62a1cae4 finished cost_estimating with
preview_validation.succeeded=false (missing CdnDomainName) and a
misleading ¥0/月 monthly estimate, then entered user selection as a
comparable option.

- complete_step: add when_conclusion_field_matches regex predicate and
  forbid_completion guard action with two new message keys
- selling pipeline: cost_estimating now rejects bare-zero
  monthly_estimate and requires missing_deployment_parameters/error
  when preview validation fails (PreviewStack stays a soft gate)
- iac-aliyun-cost skill/prompt: pay-as-you-go resources must report a
  usage-based range estimate or "询价失败", never bare ¥0/月
- confirm_and_select prompt: surface preview/cost warnings in candidate
  summaries and forbid presenting ¥0/月 as a definite monthly cost
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant