fix(selling): distinguish new vs existing VPC in architecture planning - #197
Open
ruanzhengxin-zhuxing wants to merge 1 commit into
Open
fix(selling): distinguish new vs existing VPC in architecture planning#197ruanzhengxin-zhuxing wants to merge 1 commit into
ruanzhengxin-zhuxing wants to merge 1 commit into
Conversation
architecture_planning 在 intent 未声明 VPC 已存在时仍预设已有 VPC, 只产出「已有 VPC 下新建 VSwitch」单候选,候选集遗漏用户的 VPC 创建需求。 - iac-aliyun-architecture skill 明确 use_existing/reference 只能来自 intent 显式声明,未声明的资源(含 resource_intents 缺失)默认按 create 处理 - 承载关系中被依赖资源生命周期未确认时,要求同时给出「新建 VPC + 新建 VSwitch」和「复用已有 VPC + 新建 VSwitch」两个候选;仅在 intent 显式 声明或 network_constraints 给出已有资源标识后才收敛为单候选 - 收紧「简单明确需求给单候选」口径为资源清单与生命周期均已确定 - 补充两个 eval 用例与契约测试覆盖未确认/已确认两种语义 evaluate_candidates 为引擎驱动的 parallel_sub_pipeline,只消费 architecture.candidates,不产生候选,无需改动。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
针对 Session
5bed835ca9c84c7d9e3ec57fbc95c0e9:intent_parsing只解析出 VPC、VSwitch 两个 product 且未声明 VPC 已存在,但architecture_planning仍预设已有 VPC,只产出单一候选「已有 VPC 下新建 VSwitch」,evaluate_candidates沿用该候选,导致候选集完全遗漏用户的 VPC 创建需求。根因
iac-aliyun-architectureskill 的「资源生命周期约束」只规定了 intent 已显式声明resource_intents时如何执行硬约束,缺少未声明时的默认语义;同时「简单明确需求 → 单候选」的口径让 VPC+VSwitch 这类需求被判成简单需求而直接收敛,收敛过程中把未声明的 VPC 悄悄预设成已有资源。iac-aliyun-intent侧已有的「用户没说明就不要标use_existing」约束没有对称下传到 architecture 侧。变更
skills/iac-aliyun-architecture/SKILL.mduse_existing/reference只能来自 intent 显式声明;未声明的 product 以及resource_intents整体缺失时一律按action=create处理;写入本 Session 的反例。resource_intents或non_functional.network_constraints中的具体已有资源标识,确认后收敛单候选;每个候选的resource_intents必须与该候选自身语义一致。prompts/architecture_planning.md:方案数量规则补充「生命周期未确认时至少 2 个方案」;注意事项补充「未显式声明即按新建处理,不要预设已有资源」。skills/iac-aliyun-architecture/evals.json:新增 eval 9(未声明已有 VPC → 覆盖新建 VPC、候选 ≥2)、eval 10(已给出 VPC ID → 收敛单候选且 VPC 为use_existing)。tests/pipeline/selling/skills/test_iac_aliyun_architecture_skill.py:新增 4 个契约测试锁定上述规则。evaluate_candidates是引擎驱动的parallel_sub_pipeline(prompts/evaluate_candidates.md明确无 agent 介入),只消费architecture.candidates、不产生候选,因此未改动。验证
uv run pytest tests/pipeline -n auto→ 1533 passed(含tests/pipeline/selling352 项)uv run ruff check src/ tests/→ All checks passeduv run ty check src/→ All checks passed