| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
feat(harness):去除status.json里面无用的provider信息 Co-authored-by: zhouqilong<zhouqilong2@huawei.com> !62 merge workflow-orchestrator into master feat(harness):去除status.json里面无用的provider信息 Created-by: zhou-qilong Commit-by: zhouqilong Merged-by: cann-robot Description: ### 当前 PR 是否有 AI 参与 - [x] 否 - [ ] 是 1. AI Agent 平台: 2. AI 模型: 3. Prompt 上下文: 工作流首次初始化时会将 --provider 写入 .workflow/status.json,但执行流程始终使用本次启动的命令行参数,状态文件中的值既未被读取,也可能在切换 provider 后过时。 本次删除初始化后的 provider 写入及对应的状态读写操作,使新建状态文件不再记录该字段。重启时仍可通过 --provider 切换执行任务的 Coding Agent CLI,例如首次使用 opencode,恢复时使用 claude。 同步更新 test_status_ledger_fields,断言生成的状态文件不包含 provider。 无。 - 已检查 harness 目录,没有脚本读取状态文件中的 provider;执行、恢复及回滚任务使用本次启动传入的 provider。 - 已有状态文件中的旧字段不主动清理,但不会影响 provider 的选择。 - 两个变更文件同时包含格式调整;经 AST 对比,逻辑变更仅为删除初始化时的三行状态读写代码及修改一处测试断言。 - [ ] Bug 修复 / Bug Fix - [ ] 新功能 / New Feature - [ ] 性能优化 / Performance - [x] 代码重构 / Refactoring - [ ] 文档更新 / Documentation - [x] 测试相关 / Test - [ ] 其它 / Other 执行 python3 -m unittest discover -s harness/workflow-orchestrator/tests,154 项测试全部通过,覆盖初始化、恢复、回滚等流程。 - [x] 单元测试通过 / UT passed - [ ] 集成测试通过 / ST passed - [ ] 人工验证通过 / Manual verified - [ ] 代码符合规范 / Code follows style guide - [x] 测试更新并通过 / Tests updated and passed - [ ] 文档已更新 / Docs updated if needed - [x] 无硬编码敏感信息 / No secrets hardcoded - [ ] 提交信息符合规范 / Commit message follows convention See merge request: cann/cannbot!62 | 2 个月前 | |
增加回滚功能 Co-authored-by: zhouqilong<zhouqilong2@huawei.com> # message auto-generated for no-merge-commit merge: !10 merge rollback into master 增加回滚功能 Created-by: zhou-qilong Commit-by: zhouqilong Merged-by: cann-robot Description: <!-- 感谢您的合入申请! --> ### 当前PR是否有AI参与: [x] 否 [ ] 是 __1. AI Agent 平台: __2. AI 模型: __3. Prompt上下文 : ### PR功能描述 / 为什么需要这个合入**: 为 workflow-orchestrator 增加回滚(rollback)能力。此前任务重试预算耗尽后只有 exit / continue 两种出路,失败后需要人工清理现场、从头重跑。本次新增第三种策略 rollback:恢复到上游节点 checkpoint 并重做,同时自动归档失败时间线、生成重做建议(advice),让重做一次通过。 核心改动: - on_exhaust 新增 rollback 取值;普通节点新增 rollback_to(条件必填,指向传递上游普通节点);顶层新增 max_rollbacks(可选,缺省 1,超出后等价 exit 返回 [STUCK])。 - 回滚流程:排干在飞任务 → 归档失败时间线到 .workflow/history/<X>.to.<Y>.<n>/ → 生成 advice 到 .workflow/advice/<X>.to.<Y>.<n>.md → 从 .workflow/checkpoints/<Y>/ 恢复 checkpoint → 重置下游状态 → 重新调度。 - 每个任务首次执行时快照 work_dir 到 .workflow/checkpoints/<task_id>/(作为回滚恢复点)。 - 新增 skill harness/workflow-rollback-advice/SKILL.md:分析失败 session 与归档产物,产出 advice md;Y 重做时该 advice 注入执行提示词(Rollback-Advice 行)。advice 生成失败时降级为占位 md,不阻塞回滚。 - 更新 README / 模板注释,补齐新增字段与产物说明。 ### 该PR关联的issue *(格式为fixes #<issue号>, 或者resolves #<issue号>)*: fixes # ### 希望检视人员了解: - workflow-rollback-advice 为 model-invoked skill:由 orchestrator spawn 的 general agent 按名调用,需保留 description(不可设 disable-model-invocation)。 - advice 生成走 general agent;若该 skill 不可用或 CLI 崩溃,会降级为占位 md,回滚仍继续。 - rollback_to 只能指向普通节点(不能指向 subgraph 容器),且必须是当前节点的传递上游;其余策略下该字段不校验、不生效。 ## 改动类型 / Change Type - [ ] Bug 修复 / Bug Fix - [x] 新功能 / New Feature - [ ] 性能优化 / Performance - [ ] 代码重构 / Refactoring - [ ] 文档更新 / Documentation - [ ] 测试相关 / Test - [ ] 其它 / Other ## 测试信息 / Testing <!-- 简要测试说明或关键结果 / Brief test description or key results --> harness/workflow-orchestrator 本地 pytest:32 passed。 - [x] 单元测试通过 / UT passed - [ ] 集成测试通过 / ST passed - [x] 人工验证通过 / Manual verified ## 检查清单 / Checklist - [x] 代码符合规范 / Code follows style guide - [x] 测试添加并通过 / Tests added and passed - [x] 文档已更新 / Docs updated if needed - [x] 无硬编码敏感信息 / No secrets hardcoded - [x] 提交信息符合规范 / Commit message follows convention See merge request: cann/cannbot!10 | 2 个月前 |