✨feat(e2e): 接入 Host E2E 与真机 HIL 分层门禁 - #340
Conversation
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## main #340 +/- ##
==========================================
+ Coverage 88.58% 88.77% +0.18%
==========================================
Files 213 213
Lines 25891 25832 -59
Branches 8060 8082 +22
==========================================
- Hits 22936 22932 -4
+ Misses 1433 1368 -65
- Partials 1522 1532 +10
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 6 files with indirect coverage changes 🚀 New features to boost your workflow:
|
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
3164dee to
ee5db45
Compare
a45efb7 to
330f161
Compare
IM provisioning reader 与串口语音 reader 直接读取同一 USB-Serial/JTAG RX 时会互相消费帧,导致凭据写入和语音注入随机失败。 新增单一帧解码器与按协议分流队列,统一 IM provisioning、配对和 VLVT 语音输入;同步保留 PCB/SparkBot 播放队列、唤醒词和 HIL 首句配置。 主机 92 项 CTest 与 PCB ESP-IDF 构建通过;真实 PCB HIL 的 provisioning、readiness 和唤醒确认通过,但 Gateway WebSocket 对端重置仍阻断第一轮音频,未宣称完整 HIL 通过。 Refs 1024XEngineer#288
Linx 启动与提醒到点时,TLS、MCP 和音频初始化可能让内部 RAM 不再有连续任务栈空间。将唤醒控制、串口测试及提醒动作任务栈迁移到已启用的 PSRAM,并保持 WithCaps 创建与删除配对。 Refs 1024XEngineer#179
WakeTask 会在加载本地模型时调用关闭 cache 的分区映射,不能使用 PSRAM 栈。保持其内部栈属性,并在 VoiceSession 启动 TLS、MCP 与音频初始化前完成分配。 Refs 1024XEngineer#179
Linx 与 IM 的网络初始化会碎片化内部堆,导致 I2S 双工通道偶发无法分配 DMA 描述符。先预留唤醒任务内部栈并预开固定 PCM 端口,再启动 Wi-Fi、TLS 和 Gateway;失败路径按双工设备顺序关闭预开端口。 Refs 1024XEngineer#179
变更摘要
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