Repository navigation
fix(hardware): 修复固件升级占用与设备操作审查问题 - #65
Merged
Merged
Conversation
cuimmm
approved these changes
Nov 18, 2026
mingtaojin
approved these changes
Nov 18, 2026
5 tasks done
KyleHuangFromHZ
added a commit
that referenced
this pull request
Nov 20, 2026
## 改了什么,为什么 / What changed and why 修复停采失败后升级误放行、上传取消后后端持续占用、取消失败无反馈和重开详情丢失成功结果。停止状态未确认时继续拦截升级;上传按任务取消并限制转发时长;错误和完成结果保存在设备会话状态中。 ```text 停止失败 → 保留设备/通道故障 → 真实停止或成功断开后解除 上传任务 → 有限等待 / 按任务取消 → HTTP 结束 → 释放升级占用 升级结果 → 设备会话状态 → 关闭重开详情后恢复 ``` Refs #36. Follow-up to #65. ## 怎么验证的 / How it was verified - [x] 已合入 main `4731cb53`,无冲突。当前提交 `06e48d5e`,PR 相对 main 仍仅包含本次固件故障恢复的 15 个文件。 - [x] 合并后后端 95 项、前端硬件和状态相关 38 项定向回归全部通过;完整前端测试类型检查通过(6 GB Node 堆);框架依赖检查和 docs-policy 通过。后端使用 JDK 21 增量编译,未执行 clean。 - [x] 2026-11-19 真机验证:windows-huang(192.168.5.224),物理 SonoDAQ Pro(192.168.5.157,设备 51),配套 native 材料和 SonoDAQ SDK 1.4.0,用户提供的 V1.2.8 / 64,200,304 字节固件。后端、前端生产构建及改动文件 ESLint/格式检查也在该轮通过。本次合并未修改固件生产源码;没有把之前的真机结果描述为合并后重新实测。 - **Before → After:**真实采集启动后注入停止失败,升级从可准入变为拒绝;真实停止成功后恢复。真实上传校验响应被代理暂扣,取消后从长期占用变为可以启动真实采集;临时设定 8 秒超时后,连接在 8003 毫秒结束,随后真实采集成功。取消请求网络故障从无反馈变为行内错误;真实确认成功响应在详情关闭重开后送达,从结果丢失变为版本行显示成功。 - 真机执行与人工故障注入分别记录,未伪造设备成功响应,未在刷写期间断电。测试后恢复默认超时、取消设备待确认包、停止代理并完整重启清除测试 agent。详见[验证记录](docs/verification/hardware-device-actions.zh-CN.md#固件故障恢复复测)。 - 当前提交的 CodeQL 和 docs-policy 已通过;新一轮前后端完整 CI 仍在运行。AI 审查服务连续两次返回 HTTP 524,未生成代码意见。旧基线的 CI 失败记录不作为新提交的结果。 ## 影响 / Impact - [x] 用户可见的改动,已更新中英文规格和验证记录。 - 新增宿主上传取消入口和可选上传标识头,保留旧调用兼容;设备端协议与确认成功判据沿用原逻辑。无产品数据库迁移;真机测试环境仅在备份后补执行已有缺失字段迁移。 - **Door:** two-way,应用代码可回退。 - **Blast Radius:** hardware,影响固件 HTTP 转发和采集停止后的升级准入。 ## 贡献授权 / Contribution license - [x] 沿用本任务 PR #63 中已确认的 OpenTest 社区许可协议第 11 条“社区贡献”授权声明。 Co-authored-by: 黄凯 <huangkai@huangkaideMacBook-Air.local>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
改了什么,为什么 / What changed and why
固件上传和确认原先在空闲检查通过后仍可能与采集或播放启动重叠。本改动用同一设备占用登记覆盖检查与 HTTP 转发,采集、有限播放和持续播放启动都检查该占用,转发结束或失败后释放。
补充处理 PR #63 的其余 AI 建议:等价升级路径和确认大小写统一校验;取消继续放行;错误 JSON 返回参数错误;清空响应丢失后刷新设备和通道;版本查询增加诊断;内层动作改为 Upload;还原无关语言文件排版,修复受入口变化影响的旧测试。
Refs #36. Follow-up to #63.
怎么验证的 / How it was verified
404f249c的 CI 完全一致;本地完整前端测试类型检查仍有同基线的 9 处既有错误。完整 CI 未通过。影响 / Impact
贡献授权 / Contribution license