docs: rename caserun registry repo
This commit is contained in:
@@ -133,7 +133,7 @@ HWLAB 是硬件实验室运行面和控制面项目。本文是 agent、指挥
|
||||
- DEV 依赖 runtime base 构建:`npm run dev-runtime-base:build`
|
||||
- Legacy D601 DEV CD:旧脚本入口已删除;事故回放只读历史 issue/commit,不恢复旧命令。
|
||||
- v0.2 WEB 等价短连接 CLI:在 `G14:/root/hwlab-v02` 或当前 v0.2 worktree 直接运行 `bun tools/hwlab-cli/bin/hwlab-cli.ts client ... --base-url http://74.48.78.17:19666`,默认走 Cloud Web 同源 API;细则见 [docs/reference/spec-v02-hwlab-cli.md](docs/reference/spec-v02-hwlab-cli.md)。
|
||||
- v0.2 HWPOD CaseRun 无服务入口:`bun tools/hwlab-cli/bin/hwlab-cli.ts case run <caseId> --case-repo /root/hwpod-cases`,第一阶段默认 compile-only 并把 evidence 写回 case repo,细则见 [docs/reference/spec-hwpod-harness.md](docs/reference/spec-hwpod-harness.md)。
|
||||
- v0.2 HWPOD CaseRun 无服务入口:`bun tools/hwlab-cli/bin/hwlab-cli.ts case run <caseId> --case-repo /root/hwlab-case-registry`,第一阶段默认 compile-only 并把 evidence 写回 case registry repo,细则见 [docs/reference/spec-hwpod-harness.md](docs/reference/spec-hwpod-harness.md)。
|
||||
- D601 k3s 只读观测:legacy 回溯入口,仅在确认需要 D601 事故复盘时使用;当前 G14 运行面观察使用 UniDesk route `G14:k3s`。
|
||||
- DEV runtime hotfix 只读审计计划:`npm run dev-runtime:hotfix-audit`
|
||||
- Gateway 主动出站本地 smoke:`npm run gateway:demo:smoke`;经本地 edge-proxy 验证用 `npm run gateway:demo:edge-smoke`。
|
||||
|
||||
@@ -177,28 +177,28 @@ bun tools/hwpod-node.ts serve --host 127.0.0.1 --port 19678
|
||||
|
||||
## CaseRun 无服务阶段
|
||||
|
||||
第一阶段 CaseRun 不引入常驻调度服务,由 `hwlab-cli case` 组合 case repo、本地 `.state`、`hwpod-cli`、`hwpod-compiler-cli`、`hwlab-api` 和在线 `hwpod-node` 完成单次运行。case repo 提供 `cases/<caseId>/case.json` 与同目录 `hwpod-spec.yaml`;每次运行会把 spec 复制到 `.state/hwlab-cli/caserun/<runId>/.hwlab/hwpod-spec.yaml`,形成隔离的 run-local spec。
|
||||
第一阶段 CaseRun 不引入常驻调度服务,由 `hwlab-cli case` 组合 case registry repo、本地 `.state`、`hwpod-cli`、`hwpod-compiler-cli`、`hwlab-api` 和在线 `hwpod-node` 完成单次运行。标准 case registry repo 是 `pikasTech/hwlab-case-registry`,本地默认 checkout 路径是 `/root/hwlab-case-registry`;历史 `pikasTech/hwpod-cases` 只作为迁移前来源。case registry repo 提供 `cases/<caseId>/case.json` 与同目录 `hwpod-spec.yaml`;每次运行会把 spec 复制到 `.state/hwlab-cli/caserun/<runId>/.hwlab/hwpod-spec.yaml`,形成隔离的 run-local spec。
|
||||
|
||||
CaseRun 的 case repo 与实际 case 代码库必须分离。case repo 是 case registry 和 run evidence 仓库,只保存 `case.json`、HWPOD spec 或 spec 引用、source 引用、期望结果和 `runs/<caseId>/<runId>/` 审计产物;它不保存或替代实际固件、工程、测试样例或产品代码库。实际代码由 `case.json` 通过 `source` 字段引用独立 Git repo、ref 和 subdir;`case run` 准备阶段必须把 source 解析为固定 commit,复制或 checkout 到 run-local workspace,再从隔离副本执行 build/download/smoke。`branch` 或 `tag` 只能作为人工入口,`evidence.json` 必须记录 resolved commit、source repo、subdir 和 run-local workspace,避免把 floating ref 或外部脏 workspace 当作可审计证据。
|
||||
CaseRun 的 case registry repo 与 subject repo 必须分离。case registry repo 只保存 `case.json`、HWPOD spec 或 spec 引用、subject 引用、期望结果和 `runs/<caseId>/<runId>/` 审计产物;它不保存或替代实际固件、工程、测试样例或产品代码库。subject repo 是被开发、被测试、被编译或被下载验证的真实源码仓库,由 `case.json` 通过 `subject` 字段引用独立 Git repo、ref 和 subdir;`source` 作为旧字段名只用于迁移兼容,不再作为新 case 的标准命名。`case run` 准备阶段必须把 subject ref 解析为固定 subject commit,复制或 checkout 到 run-local workspace,再从隔离副本执行 build/download/smoke。`branch` 或 `tag` 只能作为人工入口,`evidence.json` 必须记录 subject repo、subject commit、subdir 和 run-local workspace,避免把 floating ref 或外部脏 workspace 当作可审计证据。
|
||||
|
||||
CaseRun 是强化学习 Harness 的最小执行单元,但它本身不是完整 epoch。完整 epoch 还需要样本选择、策略生成、奖励/评价、批量调度、跨 run 归因和自动训练闭环;第一阶段只要求一个 `caseId` 能从 case repo 进入真实 HWPOD 编译闭环,并把可审计产物稳定落盘。
|
||||
CaseRun 是强化学习 Harness 的最小执行单元,但它本身不是完整 epoch。完整 epoch 还需要样本选择、策略生成、奖励/评价、批量调度、跨 run 归因和自动训练闭环;第一阶段只要求一个 `caseId` 能从 case registry repo 进入真实 HWPOD 编译闭环,并把可审计产物稳定落盘。
|
||||
|
||||
最小入口:
|
||||
|
||||
```bash
|
||||
bun tools/hwlab-cli/bin/hwlab-cli.ts case prepare d601-f103-v2-compile --case-repo /root/hwpod-cases
|
||||
bun tools/hwlab-cli/bin/hwlab-cli.ts case build d601-f103-v2-compile --case-repo /root/hwpod-cases --run-dir .state/hwlab-cli/caserun/<runId>
|
||||
bun tools/hwlab-cli/bin/hwlab-cli.ts case collect d601-f103-v2-compile --case-repo /root/hwpod-cases --run-dir .state/hwlab-cli/caserun/<runId>
|
||||
bun tools/hwlab-cli/bin/hwlab-cli.ts case run d601-f103-v2-compile --case-repo /root/hwpod-cases
|
||||
bun tools/hwlab-cli/bin/hwlab-cli.ts case prepare d601-f103-v2-compile --case-repo /root/hwlab-case-registry
|
||||
bun tools/hwlab-cli/bin/hwlab-cli.ts case build d601-f103-v2-compile --case-repo /root/hwlab-case-registry --run-dir .state/hwlab-cli/caserun/<runId>
|
||||
bun tools/hwlab-cli/bin/hwlab-cli.ts case collect d601-f103-v2-compile --case-repo /root/hwlab-case-registry --run-dir .state/hwlab-cli/caserun/<runId>
|
||||
bun tools/hwlab-cli/bin/hwlab-cli.ts case run d601-f103-v2-compile --case-repo /root/hwlab-case-registry
|
||||
```
|
||||
|
||||
`case run` 默认按 compile-only 验收:prepare 后调用 `hwpod-cli build`,再通过 `cmd.run` 查询 Keil 异步 job-status,收集 `evidence.json` 到 run state,并把审计副本写入 case repo 的 `runs/<caseId>/<runId>/`。下载不作为 compile-only CaseRun 的隐式步骤;后续需要下载验收时,应作为独立 action 显式加入 case 定义和验收口径。
|
||||
`case run` 默认按 compile-only 验收:prepare 后调用 `hwpod-cli build`,再通过 `cmd.run` 查询 Keil 异步 job-status,收集 `evidence.json` 到 run state,并把审计副本写入 case registry repo 的 `runs/<caseId>/<runId>/`。下载不作为 compile-only CaseRun 的隐式步骤;后续需要下载验收时,应作为独立 action 显式加入 case 定义和验收口径。
|
||||
|
||||
当前标准 smoke case 是 `d601-f103-v2-compile`。它绑定已发现并预装的 `D601-F103-V2` HWPOD spec,目标是让 Code Agent 通过 Web 等价入口或 AgentRun runner 调用 `hwlab-cli case run d601-f103-v2-compile`,而不是由操作员手工编译后代替通过。通过结果必须至少包含:`status=succeeded`、Keil build job terminal success、`returnCode=0`、`compileOnly=true`、`downloadSkipped=true`,并记录 `.hex` 和 `.axf` artifact 路径。
|
||||
|
||||
产物归属按两条线分开:
|
||||
|
||||
- case repo 的 `runs/<caseId>/<runId>/` 是审计产物,PR 默认保持打开,不作为必须合并的训练改进。
|
||||
- case registry repo 的 `runs/<caseId>/<runId>/` 是审计产物,PR 默认保持打开,不作为必须合并的训练改进。
|
||||
- HWLAB repo 的 harness、`hwpod-cli`、`hwpod-ctl`、`hwpod-compiler-cli` 或文档改进可以按风险进入 `v0.2` 分支;单纯文档和轻量 CLI/helper 变更可直接提交,业务代码、运行面或发布链路变更走 PR 工作流。
|
||||
|
||||
当前边界:CaseRun 仍是无服务化短连接 CLI 编排,不负责排队、并发、评分、自动合并、长期 run retention 或 epoch 汇总;这些能力属于后续强化学习 Harness 层。AgentRun 私有 GitHub repo git transport 必须具备有界失败和可观测性后,才能把单次 CaseRun 扩展为批量 runner 或 epoch 系统。
|
||||
@@ -212,5 +212,5 @@ bun tools/hwlab-cli/bin/hwlab-cli.ts case run d601-f103-v2-compile --case-repo /
|
||||
3. `hwpod-cli --dry-run` 输出的 plan 不需要云端 spec,也不读取其他本地旧 profile authority。
|
||||
4. `hwlab-api` 的 node-ops 入口能接收 plan,返回 JSON result;无可用 node 时必须返回结构化 blocker,而不是静默伪造 DEV-LIVE。
|
||||
5. 真实 CLI 验收必须证明 `hwpod-cli -> hwpod-compiler-cli -> hwlab-api /v1/hwpod-node-ops -> hwpod-node` 全链路走通。
|
||||
6. CaseRun 验收必须能用 `hwlab-cli case run <caseId>` 从 case repo 读取 case 定义,产出 isolated run state 和 case repo evidence;compile-only case 的通过条件是 Keil build job terminal success,并明确记录 downloadSkipped。
|
||||
6. CaseRun 验收必须能用 `hwlab-cli case run <caseId>` 从 case registry repo 读取 case 定义,产出 isolated run state 和 case registry repo evidence;compile-only case 的通过条件是 Keil build job terminal success,并明确记录 downloadSkipped。
|
||||
7. CaseRun 的真实验收必须由 Code Agent 或 AgentRun runner 从用户入口发起;操作员直接运行 `hwpod-cli build`、直接调用 Keil 或只检查 node 侧 job,不等同于 CaseRun 通过。
|
||||
|
||||
Reference in New Issue
Block a user