feat(SDK): 支持 SD 卡 FAT32 异步格式化与进度反馈 - #29
Open
orulink-wugui wants to merge 5 commits into
Open
Conversation
新增 Daemon 维护接口,将已明确确认的可移动 SD 卡格式化为 FAT32,并在完成后重新读取卷信息和新的卷序列号。 格式化流程拒绝系统盘和维护任务进行中的卡;桌面端可使用返回的新 volume_id 自动继续官方资源安装。补充格式化命令、FAT32 重检和 REST 接口测试。
Daemon 格式化接口仅接受 FAT、FAT12、FAT16 文件系统;FAT32 保持不变,exFAT、NTFS 和未知格式将被拒绝。 补充非 FAT 文件系统拒绝测试,防止直接调用维护接口误格式化不受支持的存储介质。
格式化接口立即返回维护任务,由任务实际完成 Windows 格式化、重新识别和 FAT32 校验后才报告成功,不再依赖固定请求超时。
orulink-wugui
marked this pull request as ready for review
August 11, 2026 03:42
异步 FAT32 格式化接口新增 202 响应时,误将读取 SD 作品和查询当前维护任务两个同步接口的既有断言一并改为 202,导致所有 Python 依赖矩阵测试失败。 本提交将这两个无关接口恢复为 200 断言,并保留格式化任务接口的 202 语义。已在项目虚拟环境中通过 620 项 pytest 和完整 mypy 检查。
Linux CI 中即使模拟 win32 平台,tmp_path 仍以 /tmp 开头,导致格式化逻辑无法提取 Windows 盘符,三个新增用例在全部 Python 矩阵中失败。 本提交使用明确的 E:\\ 卷根并模拟目录存在,使测试真实覆盖 Windows 盘符解析、FAT32 幂等处理和非 FAT 文件系统拒绝,同时不依赖运行器操作系统。已通过 620 项 pytest 与完整 mypy 检查。
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.
变更说明
验证
配套变更