✅ test(e2e): 增加日程提醒消费旅程 - #375
Conversation
There was a problem hiding this comment.
本次审阅覆盖了新增的 Host/HIL runner、设备 descriptor、启动包装器和 Python fixtures。Host 的现有断言测试及共享 runner 测试通过,但 HIL 路径和 Issue #351 的完整场景覆盖仍存在会影响实际验收的正确性问题。
验证:python3 -m unittest tests/python/test_schedule_reminder_e2e.py -v、python3 -m unittest tests/python/test_e2e_runner.py tests/python/test_e2e_hil_adapter.py -v、python3 -m py_compile scripts/schedule_reminder_e2e.py scripts/run_schedule_reminder_e2e.py tests/python/test_schedule_reminder_e2e.py。
| ) from error | ||
| if completed.returncode != 0: | ||
| raise RunnerFailure(FailureCategory.DEVICE, "reminder_voice_failed") | ||
| return {"status": "passed", "voice_report": "sanitized"} |
There was a problem hiding this comment.
[P1] Make the HIL result satisfy its own assertions
ReminderHilAdapter inherits ReminderHostAdapter.assert_result, which requires terminal, single_consume, concurrent_winner, snooze, and no_attempt_four to be true. However, this run() method returns only status and voice_report, so any successful voice subprocess reaches the assert phase with five mismatches and is reported as product/assert journey_assertion_failed; a mocked successful subprocess reproduces this. The HIL command therefore cannot ever produce a passing run until it returns the reminder-chain facts or overrides the assertions with checks for the actual HIL journey.
| str(max(30, int(context.phase_budget()))), | ||
| ] | ||
| try: | ||
| completed = subprocess.run( |
There was a problem hiding this comment.
[P1] Pass the descriptor port to the voice runner
The adapter validates and leases descriptor.port, but this subprocess call does not pass that path through. run_bailian_sparkbot_test.sh selects SPARKBOT_SERIAL (or its hard-coded default) and the adapter does not set that environment variable, so --device can lease one board while the voice test talks to another port or fails because the default is absent. This also makes the PCB and SparkBot descriptor templates ineffective for selecting the target hardware; propagate self.descriptor.port into the subprocess environment or command arguments.
| return "restored" if self.task.status == "pending" else "terminal" | ||
|
|
||
|
|
||
| def run_host_matrix() -> dict[str, Any]: |
There was a problem hiding this comment.
[P1] Exercise all required Host journey scenarios
run_host_matrix() only drives attempts, acknowledge, concurrent acknowledge, and snooze, then returns passed based only on terminal state and delivery count. The declared scenarios for restart recovery, outbox/Gateway retry without false success, and voice-output failure are never run or asserted, so the Host evidence can be green while the Issue #351 acceptance criteria for those failure and recovery paths remain completely unverified. Add those cases to the matrix and include their results in the pass condition/evidence before treating this runner as coverage for the issue.
PCB HIL 执行记录(2026-08-26)
|
结论
增加 Issue #351 的 Host/HIL 提醒链用户旅程 runner、夹具、板卡 descriptor 模板和证据测试。
背景
Issue #351 要求验证最多三次提醒、IM/语音单侧与并发消费、snooze、Gateway 不可用重试、设备重启恢复以及 attempt 4 不产生。
改动范围
scripts/schedule_reminder_e2e.py与scripts/run_schedule_reminder_e2e.py。接口与依赖影响
复用现有统一 E2E Runner、设备租约、公开提醒动作和百炼语音脚本;不改变运行时接口、数据模型或依赖版本。
测试与构建证据
Host 矩阵和 Python 测试随 PR 提供;真实 HIL 结果需在目标板卡和 Gateway 可达时单独生成,未执行部分不会标记为通过。
已知风险
当前 HIL 路径需要设备 ready、Gateway 和
BAILIAN_KEY_FILE;外部 Gateway 故障应分类为 external/retryable,不得误报发送成功。兼容窗口与回退
只新增测试 runner、fixture 和 descriptor 模板,不改变既有产品路径。回退本 PR 即可删除新增文件。
Refs #351