Repository navigation
Fix workflow YAML structural validation before normalization - #3708
Open
AbigailDeng wants to merge 1 commit into
Open
AbigailDeng wants to merge 1 commit into
AbigailDeng wants to merge 1 commit into
Conversation
AbigailDeng
force-pushed
the
feat/2026-10-27_yaml-structure-validation
branch
from
October 27, 2026 04:32
f9cf419 to
b1254a3
Compare
This branch has not been deployed
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.
工作流 YAML 中的
branches: oops和缺少条件/目标的分支条目,原先可能在映射时变成空分支或被直接丢弃。后续语义校验看到的是归一化后的定义,无法再发现原文结构错误;children: [null]等输入则可能产生空引用异常。本次在资源限制与 YAML 语法解析之后、反序列化和默认值处理之前,增加共享的原始 AST 结构校验。Core 运行时和 Studio 文档解析复用同一组规则,非法结构必须先报错,不能生成可继续归一化的部分文档。
后端集成基线:
feature/integrate(0cc82b0ad)。方案与影响路径
WorkflowYamlStructureException保留yaml_structure/unknown_field与 JSON Pointer 字段路径。Studio 在构造文档和图之前返回错误,IWorkflowYamlValidator的诊断也保留字段路径。docs/canon/workflow-runtime.md的阶段定义、边界和流程图。目标/角色引用、步骤类型与控制流语义仍由后续WorkflowValidator负责;IWorkflowYamlValidator保持原有 parse-only 契约。例如
branches: [{ condition: ready }]现在会在/steps/0/branches/0返回结构错误。原先依赖忽略不完整分支的 YAML 将被明确拒绝;分支目标只支持 scalar 或单层目标别名 mapping。验证
环境:.NET SDK 10.0.100;门禁使用 Python 3.12,并将本机 .NET SDK 加入 PATH。
feature/integrate已有的studio_fact_owner_guard.sh违规,详见下方基线问题。本地使用受影响后端项目的聚焦测试;未运行全量 solution 测试。
已确认的基线门禁问题
DIFF_RANGE=origin/feature/integrate...HEAD bash tools/ci/architecture_guards.sh在studio_fact_owner_guard.sh处退出:src/platform/Aevatar.GAgentService.Hosting/Endpoints/WorkflowApiEndpoints.cs:103传递request.Layout,第 204 行仍声明WorkflowLayoutDocument,违反 UI/layout 字段由客户端持有的现有规则。已使用
git archive origin/feature/integrate src tools导出的纯基线快照单独运行同一门禁,复现完全相同的两处命中(exit 1)。该文件在基线与本 PR 中的 Git blob 均为fa18f8566f1b180e1554ecd046c23bf208e5ebf5,本 PR 没有修改该文件。该基线问题使架构总门禁未能完成,不将本次聚焦测试通过等同于所有门禁通过。