✨feat(e2e): 接入 Host E2E 与真机 HIL 分层门禁 - #340
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Issue 1024XEngineer#288 要求将 Host E2E、受控 HIL、证据安全和发布验收分层,避免公共 Runner 接触硬件与长期凭据。\n\n本次新增统一的 Host/HIL 编排、设备矩阵、失败分类、租约清理、evidence 校验和发布文档,并在应用刷写前校验构建分区表与实板布局一致。\n\n80 个 C++ 测试、193 个 Python 测试和 SparkBot 真实 HIL readiness/pairing 已通过。 Refs 1024XEngineer#288
3a5d7ea to
0d83299
Compare
将设备租约冲突独立归类,确保 HIL 结果不会被误判为设备或产品失败。公开 artifact 仅在 evidence 校验成功后上传,并在 PR Host 门禁中验证受控产品失败证据。 手工触发的设备描述符名称经环境变量传递和格式校验,避免将自由输入直接插入 shell。 验证:run_checks、Ruff、actionlint 与 E2E 定向测试通过。 Refs 1024XEngineer#288
当前没有匹配的受控 self-hosted Runner,继续保留 schedule 会产生长期排队的 HIL job。 改为仅允许 workflow_dispatch,保留 SparkBot/PCB 矩阵、设备选择和 evidence 门禁,待 Runner 就绪后再手工执行;同步更新分层门禁与发布清单,避免将手工结果误写为 nightly。 验证:actionlint 与 git diff --check 通过。 Refs 1024XEngineer#288
There was a problem hiding this comment.
已检查固定提交范围内的 Host E2E、恢复矩阵、HIL 编排、证据校验和设备布局变更。恢复矩阵的详细 JSON 与新的脱敏校验器之间存在契约冲突,导致成功的恢复任务被标记失败;同样的问题也出现在 .github/workflows/ci.yml 的 Host recovery 校验路径。其余变更未发现达到报告阈值的独立问题。
验证:python3 -m unittest discover -s tests/python -p 'test_e2e*.py'(51 tests passed)。本地未安装 actionlint。
| - name: 校验恢复矩阵脱敏 evidence | ||
| id: validate-recovery-evidence | ||
| if: always() | ||
| run: python3 scripts/check_e2e_artifacts.py artifacts/im-gateway-recovery |
There was a problem hiding this comment.
[P1] Do not scan raw recovery details as public artifacts
run-recovery-e2e.mjs writes recovery-<run_id>.json into this directory, and each snapshot row always contains the action_token field (even when its value is null). check_e2e_artifacts.py scans every JSON file, treats that key as sensitive, and therefore exits 1 after an otherwise successful recovery run; the subsequent upload is skipped and the nightly job is reported failed. The same directory-level validation was added to .github/workflows/ci.yml, so the PR Host recovery gate is affected too. Validate only the generated evidence-*.json files, or sanitize/allowlist the detailed diagnostic file before running this check.
There was a problem hiding this comment.
审查结论
已按固定提交范围审查 Host E2E、手工 HIL 编排、evidence 脱敏与汇总、租约分类,以及分区布局/应用刷写保护。工作流触发与 secret 边界、runner/evidence schema、失败分类和 HIL 分区契约保持一致,未观察到需要阻止合并的可操作回归。
验证
python3 -m unittest tests.python.test_e2e_artifact_tools tests.python.test_e2e_hil_adapter tests.python.test_e2e_hil_device tests.python.test_e2e_runner tests.python.test_run_e2e:56 项通过。git diff --check b9e1c796f1789e62655a148ab6328060c64f807b...559b1fd4c7e4c8dc94f65b6113a572958a979b68:通过。- 当前 PR 的工作流语法、格式/静态检查、Host 测试、IM Gateway、ESP-IDF、覆盖率与 CodeQL 检查均成功;本地环境未安装
actionlint,未重复执行该工具。
5dbcc5a to
f7c71b7
Compare
串口测试任务在有限时间内等待 PCM 租约归还,避免 TLS 短暂背压制造输入丢帧;MCP tools/list 的工具项补齐 Linx 文档要求的 type=0。 Host 格式检查、mcp_server_test、mcp_json_writer_coverage_test、linx_mcp_bridge_test 已通过。 Refs 1024XEngineer#349
变更摘要
workflow_dispatch,按 Profile/device/journey 手工执行,不产生无人消费的 nightly 排队任务。lease;设备描述符自由输入通过环境变量传递并校验,避免直接插入 shell。product分类与脱敏校验。验证结果
./scripts/run_checks.sh通过:80 个 C++ 测试、195 个 Python 测试。git diff --check通过。hardware_verified=true。Closes #288
Refs #283 #132