From 66501533dd24a2060cb6050f474798e89c559a7d Mon Sep 17 00:00:00 2001 From: Codex Date: Thu, 16 Jul 2026 15:28:06 +0200 Subject: [PATCH] =?UTF-8?q?docs:=20=E8=B7=9F=E8=B8=AA=20HWLAB=20CaseRun=20?= =?UTF-8?q?=E6=94=B6=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../details/hwlab-caserun/R1.1_Task_Report.md | 32 +++++++++++++ .../details/hwlab-caserun/R1.2_Task_Report.md | 31 +++++++++++++ docs/MDTODO/hwlab-caserun.md | 45 +++++++++++++++++++ 3 files changed, 108 insertions(+) create mode 100644 docs/MDTODO/details/hwlab-caserun/R1.1_Task_Report.md create mode 100644 docs/MDTODO/details/hwlab-caserun/R1.2_Task_Report.md create mode 100644 docs/MDTODO/hwlab-caserun.md diff --git a/docs/MDTODO/details/hwlab-caserun/R1.1_Task_Report.md b/docs/MDTODO/details/hwlab-caserun/R1.1_Task_Report.md new file mode 100644 index 00000000..82c0db84 --- /dev/null +++ b/docs/MDTODO/details/hwlab-caserun/R1.1_Task_Report.md @@ -0,0 +1,32 @@ +# R1.1 任务报告 + +## 结论 + +已从 Git 分叉点完成 v0.2 与 v0.3 的 CaseRun/Harness 能力分析,并确认本工作主归属 `PJ2026-0103 HarnessRL`、具体归属 `PJ2026-010301 CaseRun规格`。现有 HarnessRL SPEC 已生效,包含目标架构图、数据流图、关键时序图和 Web CaseRun 端到端边界,可以作为实现 P0;后续若改变稳定 stage、artifact、评价、回放或责任边界,仍须先更新 SPEC。 + +## Git 基线 + +- merge-base:`34ee9472857ab43c77d8d302101bfa0580c27867`。 +- v0.2 分析 tip:`21992d9b27406ec9b5cfb42329df97cf94d649cc`。 +- v0.3 分析 tip:`166c5c7545ab210fd1affec6076cf1cd990a89c1`。 +- 分叉后 v0.2 独有 101 个提交,v0.3 独有 1606 个提交。 +- v0.2 分叉后 CaseRun/Harness 相关提交 46 个,v0.3 为 7 个。 + +## 能力判定 + +- v0.3 已吸收或重写:基础 CaseRun 生命周期、Web CaseRun、software-smoke、基础 registry/archive、tracked/untracked diff、provider profile 基础设施、HWPOD spec/topology。 +- v0.3 部分具备:aggregate/manifest、provider evidence、final response missing reason、Agent final/post-validation 边界、UART 恢复。 +- v0.3 明确缺失:显式 refresh/backfill、离线 inspect/trace-summary/skill-usage、AgentRun toolCallSummary、结构化 HWPOD build wait、完整终态收口、ioProbe runtime validation 与 aggregate reading、board-comm 验证。 +- 禁止迁移:v0.2 URL/fallback/direct route、AgentRun v0.1 envelope、固定 profile/project、旧 workspace/registry 路径和 bundled spec runtime authority。 + +## 目标合同 + +实现按以下关系组织: + +`case definition -> AgentRun terminal/tool evidence -> HWPOD operation/observation -> artifact manifest -> aggregate/evaluation -> replay/训练反馈` + +HarnessRL 负责 CaseRun stage、证据关系、aggregate、evaluation、replay 和训练反馈;Agent编排生产 AgentRun 生命周期事实;硬件池生产 HWPOD operation 与原始硬件事实;客户端只消费同一 read model。 + +## 计划与追踪 + +完整分析、迁移矩阵、P1-P6 计划、依赖关系和验收标准已写入 [HWLAB #2204](https://github.com/pikasTech/HWLAB/issues/2204)。后续从 R1.2 开始进入证据模型与执行收口实现。 diff --git a/docs/MDTODO/details/hwlab-caserun/R1.2_Task_Report.md b/docs/MDTODO/details/hwlab-caserun/R1.2_Task_Report.md new file mode 100644 index 00000000..d2410deb --- /dev/null +++ b/docs/MDTODO/details/hwlab-caserun/R1.2_Task_Report.md @@ -0,0 +1,31 @@ +# R1.2 任务报告 + +## 结论 + +已完成 [HWLAB #2567](https://github.com/pikasTech/HWLAB/issues/2567) 的 P1 证据模型与执行收口,并通过 [PR #2571](https://github.com/pikasTech/HWLAB/pull/2571) 合并到 `v0.3`。最终 merge commit 为 `324bb9d2e459cbad5abd076290cefc266f72dce5`。 + +## 实现 + +- 消费 AgentRun nested/direct `toolCallSummary`,并分类 build、download 与 UART 命令。 +- 投影 requested provider、resolved backend、provider、model 与 infrastructure backend provenance。 +- 分离 Agent final、runner post-validation、Agent warning 与 runner warning。 +- 联合 AgentRun terminal facts 解释 timeout、cancel、natural end 与 final-response 缺失原因。 +- 将遗留 `build-completed` 状态稳定收口为 terminal。 +- 在 evidence、artifact manifest、aggregate、result 与 summary 中保持同一字段关系。 +- 按职责拆分 CaseRun 模块,保持单向依赖,相关源码文件均低于 2000 行。 + +## 审查与验证 + +- Artificer 初始实现提交:`517110572d9400e93ec0077f054b03ef0c41c12d`。 +- 主代理审查发现并纠正缺失的 `TraceEventRow` 类型导入、重复纯 helper 和压缩单行声明。 +- 返工提交:`8a84e6d6a9063e4e0bd28a4b300b62466445f93a`。 +- `bun test tools/hwlab-cli/caserun.test.ts`:16 项通过,0 项失败。 +- `git diff --check`:通过。 +- NC01/v03 自动链绑定 source commit `324bb9d2`:PipelineRun `hwlab-nc01-v03-ci-poll-hbqz9` 成功,Argo `Synced/Healthy`,公网 Web 与 `/health/live` 返回 200。 +- `case prompt d601-f103-v2-compile --api-url https://lab-dev.hwpod.com` 在目标实现 worktree 成功,解析出受约束的 subject worktree、HWPOD 参数和 prompt hash `ab4f75d5ca69a7e7bfaf5cec63e40aa5e876cf5c81a800eeeb1f3689eb3c6762`,未使用 v0.2 URL 或 fallback。 + +## 边界 + +#2567 明确为无部署授权、focused tests 的无服务工作流变更。完整 compile-only 硬件 run 未作为本子任务门禁;当前 UniDesk `config/hwlab-test-accounts.yaml` 未声明 `NC01/v03` 测试身份,未绕过 YAML Secret authority 寻找或复制凭据。完整 software-smoke、compile、download/UART 与 ioProbe 原入口矩阵继续由 R1.7 在 R1.2-R1.6 完成后统一验收。 + +control-plane 总状态中的 GitOps mirror pending-flush 与 Code Agent env mismatch 不属于本次 CaseRun CLI 变更;未执行人工 flush、trigger、PipelineRun 或运行面热补。 diff --git a/docs/MDTODO/hwlab-caserun.md b/docs/MDTODO/hwlab-caserun.md new file mode 100644 index 00000000..8cc3a064 --- /dev/null +++ b/docs/MDTODO/hwlab-caserun.md @@ -0,0 +1,45 @@ +# HWLAB CaseRun + +- 问题域:`PJ2026-0103 HarnessRL` 下的 `PJ2026-010301 CaseRun规格`。 +- 长期规格:[PJ2026-0103 HarnessRL](../../project-management/PJ2026-01/specs/PJ2026-0103-harness-rl.md)。 +- 当前大型计划:[HWLAB #2204](https://github.com/pikasTech/HWLAB/issues/2204)。 +- 目标运行面:HWLAB `NC01/v03`、AgentRun `NC01/nc01-v02`。 +- 执行原则:吸收 v0.2 成熟行为合同,按 v0.3 架构重写;不恢复 v0.2 URL、fallback、direct route 或旧运行面兼容。 +- 验收原则:源码和测试不能替代 YAML-selected 原入口验证;CaseRun 结果必须保留 AgentRun、HWPOD、artifact manifest、aggregate 和终态证据关系。 + + +## R1 [in_progress] + +执行 [HWLAB #2204](https://github.com/pikasTech/HWLAB/issues/2204):从 Git 分叉事实出发,把 v0.2 CaseRun/Harness 成熟行为合同按 v0.3 架构吸收进 `PJ2026-0103 HarnessRL` 泛化问题域,不恢复 v0.2 运行面兼容,并完成 NC01/v03 原入口验收,完成任务后将详细报告写入[任务报告](./details/hwlab-caserun/R1_Task_Report.md)。 + +### R1.1 [completed] + +P0 基线与合同设计:复核 merge-base、v0.2/v0.3 能力矩阵和 HarnessRL SPEC,明确 evidence、manifest、stage、aggregate、HWPOD observation 与 replay 目标合同;若稳定语义变化先更新 SPEC。来源:[HWLAB #2204](https://github.com/pikasTech/HWLAB/issues/2204),完成任务后将详细报告写入[任务报告](./details/hwlab-caserun/R1.1_Task_Report.md)。 + +### R1.2 [completed] + +执行 [HWLAB #2567](https://github.com/pikasTech/HWLAB/issues/2567) P1 证据模型与执行收口:消费 AgentRun `toolCallSummary`,补齐 provider provenance,分离 Agent final/post-validation 与 agent/runner warning,统一 timeout、cancel、natural-end、build-completed 终态;依赖 R1.1,完成任务后将详细报告写入[任务报告](./details/hwlab-caserun/R1.2_Task_Report.md)。 + +### R1.3 [in_progress] + +执行 [HWLAB #2574](https://github.com/pikasTech/HWLAB/issues/2574) P2 Registry、aggregate 与离线诊断:实现 registry-only aggregate、`case refresh/backfill`、manifest/hash 收口及 `inspect`、`trace-summary`、`skill-usage`,保证离线默认不访问 runtime;依赖 R1.2,完成任务后将详细报告写入[任务报告](./details/hwlab-caserun/R1.3_Task_Report.md)。 + +### R1.4 [in_progress] + +执行 [HWLAB #2575](https://github.com/pikasTech/HWLAB/issues/2575) P3 Workspace diff 与 HWPOD 执行合同:验收 tracked/untracked/submodule/include/ignore,按 v0.3 operation result 重建 build wait、YAML topology route 校验和 UART monitor 自动恢复;依赖 R1.1,可与 R1.3 并行,完成任务后将详细报告写入[任务报告](./details/hwlab-caserun/R1.4_Task_Report.md)。 + +### R1.5 + +P4 ioProbe、board-comm 与 runtime validation:从 case definition 推导验证模式,通过 HWPOD service 引用带单位、采样、统计和动作关联的 observation result,并纳入 manifest、aggregate 与 replay;依赖 R1.2-R1.4,完成任务后将详细报告写入[任务报告](./details/hwlab-caserun/R1.5_Task_Report.md)。 + +### R1.6 + +P5 Web/API/read model 对齐:把 stage、blocker、manifest、aggregate 和 replay refs 投影到同源 API,确保 Web、CLI、web-probe 使用同一事实且不在客户端合成结果;依赖 R1.2-R1.5,完成任务后将详细报告写入[任务报告](./details/hwlab-caserun/R1.6_Task_Report.md)。 + +### R1.7 + +P6 NC01/v03 原入口验收与收口:依次执行 software-smoke、两个 compile-only case、download+UART 和 ioProbe case,记录 runId、traceId、operation result、manifest/aggregate SHA、selected origin 和无 v0.2 fallback 证据;依赖 R1.2-R1.6,完成任务后将详细报告写入[任务报告](./details/hwlab-caserun/R1.7_Task_Report.md)。 + +## R2 [in_progress] + +执行 [HWLAB #2573](https://github.com/pikasTech/HWLAB/issues/2573):为 CaseRun 模块拆分与证据收口提供单命令静态审计入口,一次覆盖 scoped 类型、依赖方向、重复 helper、压缩声明和源码行数检查,输出 compact text/显式 JSON 与 typed finding;不改变运行面或 CaseRun 业务语义,完成任务后将详细报告写入[任务报告](./details/hwlab-caserun/R2_Task_Report.md)。