✨ feat(im): 接入语音提醒动作状态同步 - #356
Conversation
按 reminderTriggerId 执行 IM 动作,避免最近提醒窗口误操作其他提醒链。 持久化 operationId、动作终态和 nextTriggerAt,使设备任务重启后复用已提交结果。 主机测试、Gateway 门禁和 SparkBot 固件构建已通过;acknowledge 多仓储写入仍沿用现有非事务边界。 Closes 1024XEngineer#179
Linx 启动与提醒到点时,TLS、MCP 和音频初始化可能让内部 RAM 不再有连续任务栈空间。将唤醒控制、串口测试及提醒动作任务栈迁移到已启用的 PSRAM,并保持 WithCaps 创建与删除配对。 Refs 1024XEngineer#179
WakeTask 会在加载本地模型时调用关闭 cache 的分区映射,不能使用 PSRAM 栈。保持其内部栈属性,并在 VoiceSession 启动 TLS、MCP 与音频初始化前完成分配。 Refs 1024XEngineer#179
IM 与语音同时启用后,I2S 播放任务创建时内部堆最大连续块可能不足 16 KiB,导致 VoiceSession 启动失败。 将播放任务栈迁移到 PSRAM,并配对使用 WithCaps 创建和删除接口;ESP-IDF 6.0 构建已通过,真机复测继续进行。 Refs 1024XEngineer#179
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## main #356 +/- ##
=======================================
Coverage 88.70% 88.71%
=======================================
Files 215 215
Lines 27129 27151 +22
Branches 8577 8533 -44
=======================================
+ Hits 24066 24087 +21
- Misses 1434 1435 +1
Partials 1629 1629
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
0c0c0d3 to
046c4f1
Compare
|
标题不符合规范 |
28a2a78 to
b48d819
Compare
|
@fennoai /review |
Review Complete
|
There was a problem hiding this comment.
Reviewed the fixed b85f3f50f72b86cb519463b9f2409514dde38736...30287d977981b7ad9484d69a5aa2a61b2845c33e diff. The voice-first H5 lookup correctly uses the device/trigger fact, exposes only the voice source enum, preserves nextTriggerAt, and routes succeeded voice actions to a read-only terminal page without reusable controls. I found no actionable correctness, security, or compatibility issue introduced by this PR.
Validation: git diff --check passed. The gateway build/tests and lint/format checks could not run because dependencies are not installed and tsc is unavailable in the workspace.
目标
完成 #214 的最后一个跨入口展示缺口:当设备已通过语音完成提醒动作时,用户首次打开或刷新微信公众号 H5 不应再看到可操作按钮,而应看到语音终态及最终结果。
实现
deviceId + reminderTriggerId查询设备侧最新动作事实。提醒已通过语音处理;acknowledge 与 snooze 均不再渲染操作按钮,snooze 同时展示设备上报的nextTriggerAt。voice,不暴露设备 Token、Action token 或语音原文。需求对照
eventId/operationId、网络恢复重试、Gateway 认证与幂等、跨入口冲突收口、correlationId链路:已由 ✨ feat(schedule): 完成提醒动作精确执行与持久化重放 #353 提供。验证
npm test(services/im-gateway):355 通过,5 个依赖 PostgreSQL 的测试按环境跳过。python3 scripts/firmware.py validate:7 个 Firmware Profile 全部通过。cmake -S tests/host -B build/host -DCMAKE_BUILD_TYPE=Debug && cmake --build build/host -j 4 && ctest --test-dir build/host --output-on-failure:94/94 通过。待验
真机断网恢复、公众号投递与脱敏关联日志仍需按 #214 的实板验收步骤执行。
Refs #214