Skip to content

✨feat(e2e): 接入 Host E2E 与真机 HIL 分层门禁 - #340

Open
JunLang-7 wants to merge 26 commits into
1024XEngineer:mainfrom
JunLang-7:dev/288-host-hil-gates
Open

✨feat(e2e): 接入 Host E2E 与真机 HIL 分层门禁#340
JunLang-7 wants to merge 26 commits into
1024XEngineer:mainfrom
JunLang-7:dev/288-host-hil-gates

Conversation

@JunLang-7

@JunLang-7 JunLang-7 commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

变更摘要

  • 新增确定性的 Host E2E,以及 SparkBot/PCB self-hosted HIL 手工分层门禁。
  • HIL workflow 仅保留 workflow_dispatch,按 Profile/device/journey 手工执行,不产生无人消费的 nightly 排队任务。
  • 新增 evidence 脱敏校验、Job Summary、失败分类、设备租约和 14 天 artifact 保留策略。
  • 租约冲突独立归类为 lease;设备描述符自由输入通过环境变量传递并校验,避免直接插入 shell。
  • PR Host 门禁包含受控故意失败,用于验证失败 evidence 的 product 分类与脱敏校验。
  • 应用分区刷写前校验构建分区表与实板布局一致,阻止不兼容固件写入设备。

验证结果

  • ./scripts/run_checks.sh 通过:80 个 C++ 测试、195 个 Python 测试。
  • Ruff 0.12.7、actionlint、提交描述检查和 git diff --check 通过。
  • SparkBot HIL 成功:运行 #32456818246
  • PCB HIL 成功:运行 #32458411051
  • 两次 HIL 均完成真实 journey、脱敏 evidence 校验和 artifact 上传;PCB evidence 确认 hardware_verified=true
  • 上游 PR CI 的 workflow 语法、格式、Host 测试、ESP-IDF 构建、覆盖率和 CodeQL 检查均通过。

Closes #288
Refs #283 #132

@JunLang-7 JunLang-7 changed the title feat(e2e): add layered Host and HIL gates feat(e2e): 增加分层 Host 与 HIL 门禁 Aug 21, 2026
@codecov

codecov Bot commented Aug 21, 2026

Copy link
Copy Markdown

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
@JunLang-7
JunLang-7 force-pushed the dev/288-host-hil-gates branch from 3a5d7ea to 0d83299 Compare August 21, 2026 05:57
@JunLang-7 JunLang-7 changed the title feat(e2e): 增加分层 Host 与 HIL 门禁 ✨feat(e2e): 增加分层 Host 与 HIL 门禁 Aug 21, 2026
将设备租约冲突独立归类,确保 HIL 结果不会被误判为设备或产品失败。公开 artifact 仅在 evidence 校验成功后上传,并在 PR Host 门禁中验证受控产品失败证据。

手工触发的设备描述符名称经环境变量传递和格式校验,避免将自由输入直接插入 shell。

验证:run_checks、Ruff、actionlint 与 E2E 定向测试通过。

Refs 1024XEngineer#288
@JunLang-7 JunLang-7 changed the title ✨feat(e2e): 增加分层 Host 与 HIL 门禁 接入 Host E2E 与真机 HIL 分层门禁 Aug 21, 2026
@JunLang-7 JunLang-7 changed the title 接入 Host E2E 与真机 HIL 分层门禁 ✨feat(e2e): 接入 Host E2E 与真机 HIL 分层门禁 Aug 21, 2026
当前没有匹配的受控 self-hosted Runner,继续保留 schedule 会产生长期排队的 HIL job。

改为仅允许 workflow_dispatch,保留 SparkBot/PCB 矩阵、设备选择和 evidence 门禁,待 Runner 就绪后再手工执行;同步更新分层门禁与发布清单,避免将手工结果误写为 nightly。

验证:actionlint 与 git diff --check 通过。

Refs 1024XEngineer#288
@JunLang-7 JunLang-7 changed the title ✨feat(e2e): 接入 Host E2E 与真机 HIL 分层门禁 接入 Host E2E 与真机 HIL 分层门禁 Aug 21, 2026
@JunLang-7
JunLang-7 marked this pull request as ready for review August 21, 2026 06:43
@JunLang-7 JunLang-7 changed the title 接入 Host E2E 与真机 HIL 分层门禁 ✨feat(e2e): 接入 Host E2E 与真机 HIL 分层门禁 Aug 21, 2026

@fennoai fennoai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已检查固定提交范围内的 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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.

@JunLang-7
JunLang-7 marked this pull request as draft August 21, 2026 07:33
@JunLang-7 JunLang-7 changed the title ✨feat(e2e): 接入 Host E2E 与真机 HIL 分层门禁 接入 Host E2E 与真机 HIL 分层门禁 Aug 21, 2026
@JunLang-7 JunLang-7 changed the title 接入 Host E2E 与真机 HIL 分层门禁 ✨feat(e2e): 接入 Host E2E 与真机 HIL 分层门禁 Aug 21, 2026
@JunLang-7
JunLang-7 marked this pull request as ready for review August 21, 2026 07:40

@fennoai fennoai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

审查结论

已按固定提交范围审查 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,未重复执行该工具。

View job run

@JunLang-7
JunLang-7 force-pushed the dev/288-host-hil-gates branch from 5dbcc5a to f7c71b7 Compare August 21, 2026 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CI] 接入 Host E2E 与真机 HIL 分层门禁

2 participants