feat(device): 无障碍保护存活心跳检测 + 掉线后置检测(pull) #65

Merged
marco merged 6 commits from feat/a11y-liveness-pull into main 2026-06-23 17:33:39 +08:00
No description provided.
Ghost added 2 commits 2026-06-22 10:38:12 +08:00
- device 表 + 心跳/注册/liveness 查询/ack 端点 + heartbeat_monitor_worker
  (扫描超时设备置 kill_alert_pending, 客户端进 App 拉取弹自启动引导)
- 本期只做 pull 后置检测, 不接推送(不含 jpush)
- 迁移: device_table → device_kill_alert_pending(接 main head ceb286289426, 线性单 head)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- ComparisonResultIn 加 status / store_closed, 记录页按平台显示异常文案
- platform_results 声明为 dict(pricebot 按 platform_id 键的 dict), 修成功记录 422 被拒

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Ghost added 2 commits 2026-06-23 00:28:17 +08:00
- 信息流发奖:一条广告 = 一个 calculate_ad_reward_coin(因子2 按账号累计条数),不再逐份累加
- 新增 GET /api/v1/ad/feed-reward/units 返回累计已发条数,供前端算因子2 做实时金币进度条
- 比价记录金币:feed_ad_reward 加 trace_id 列(迁移)按 trace_id 归属到比价记录;记录接口聚合金币
- chore: HEARTBEAT_TIMEOUT_MINUTES 测试值 2 回 10
Ghost added 2 commits 2026-06-23 10:20:09 +08:00
- 表/类改名 device→device_liveness / Device→DeviceLiveness:该表记的是无障碍存活监控状态
  (心跳/liveness_state/kill_alert_pending/推送目标),非设备信息(品牌/型号),原名误导。同步改
  建表迁移表名/索引/约束(未部署→直接改建表迁移,非加 rename);API 路径 /api/v1/device 不变。
- GET /device/liveness 的 LivenessOut 只返 kill_alert_pending 一个布尔(原返回 liveness_state/
  ever_protected/last_heartbeat_at 等设备详情);前端本就只读 kill_alert_pending,不受影响。
marco merged commit a6f55a00b8 into main 2026-06-23 17:33:39 +08:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: WonderableAI/shaguabijia-app-server#65