验证通过:go test ./app/goauto/device ./app/goauto/purchase ./app/goauto/task、go test ./app/goauto/migrations ./app/goauto/device、android :app:compileDebugKotlin、web pnpm run build:prod、harness.py check --strict。
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
需求摘要
管理员需要在 Admin 设备管理中安全恢复因本地服务切换导致 Token 与既有 installId 不一致的 Android Agent。当前手机提示身份校验失败:installId 已注册,需要该设备的有效 Token。
范围
非范围和安全边界
不清除应用数据,不直接改库,不执行采购、下单或支付;不改变 HTTP/TLS 安全边界,授权和 Token 不写入日志或普通接口。
设计证据
复用现有设备管理卡片及危险动作确认,不新建页面;覆盖正常、离线、授权已发放、过期或已使用、停用和失败状态。
验收
风险
认证与任务归属变更;管理员实际重置设备为外部状态改变,待实现后由用户确认执行。
实现完成,待验收
379a83f feat(device): 安全恢复原设备身份 (#201),已推送至feat/200-ai-match-result-purchase-ready。deviceId保留并保存新 Token。go test ./app/goauto/device ./app/goauto/purchase ./app/goauto/task、go test ./app/goauto/migrations ./app/goauto/device、android :app:compileDebugKotlin、web pnpm run build:prod、harness.py check --strict。harness.py sync被既有无关的docs/12-syb-erp-interface.md未提交改动保护性阻止;Wiki 已在线恢复并更新 Business-Rules-and-Glossary(fe52de8)与 Android-Agent-API-Contract(618202a),镜像同步待该无关改动处理后补做。??????(??????)
nn????????1787983800000_device_identity_recovery:agent_device??????? 3 ???,???? ID 7(??2)?????????????????????????????????;??????????????,???????????线上迁移修复完成,待人工验证。已获用户授权并在生产服务器运行当前发布包的标准迁移命令。迁移 1787983800000_device_identity_recovery 已登记;agent_device 的 recovery_code_digest、recovery_expires_at、recovery_used_at 三字段均已确认存在,并创建对应恢复字段索引。迁移输出:新执行 1 个、已跳过 34 个;过程中未重启服务,未执行设备重置、任务领取、采购、下单或支付。复核:goauto.service 为 active,本机健康检查正常。请在生产 Admin 的设备页再次点击“测试2 → 重置设备身份”验证;该动作会使该设备当前 Token 失效,属于预期安全行为。长期文档影响:无。本次仅补齐已发布功能的遗漏数据库迁移,未改变接口或业务契约;因此未更新 Wiki。