Conversation
- process: 新增向指定 PID 可见顶层窗口发送 WM_CLOSE 的辅助(user32/Add-Type) - codebuddy_cn_ide: Windows 关闭改为 WM_CLOSE 优雅退出,残留仍持窗口时提示用户而非直接强杀,避免未保存内容丢失;启动后新增存活校验,避免单例锁秒退仍提示切换成功 - vscode_cn_inject: 写库前等待 DB 释放独占句柄、用 VACUUM INTO 生成一致快照备份、写后解密回读校验并在失败时回滚备份
|
O(∩_∩)O要不要连Trae系一起收编了省的还得开2插件 |
wh-1
added a commit
to wh-1/workbuddy-switch
that referenced
this pull request
Sep 16, 2026
- backup_workbuddy_db 原来用 `let _ = fs::copy()` 吞掉错误,无论成败都返回路径, 上层报告照抄该路径 ⇒ 备份没落盘时用户仍以为有回滚点 - 抽出 backup_db_files(db, root) 使其可测:主库拷贝失败、或伴随文件存在却拷不动 (备份不完整)都判为 None;-wal/-shm 缺失属正常,不报错 - slim / projects 报告新增 backupDb 字段;copy_sessions_for_switch 的 backup 字段 由「目录路径」改为「真实文件路径或 null」 - 补 2 例单测覆盖落盘与缺主库两条路径 注:本项来自上游 PR changexbc#29 的启发(VACUUM INTO + 写后校验),但核查后我们的备份 发生在 close_workbuddy 之后,时机本身安全,故不动拷贝方式,只修静默失败。
wh-1
added a commit
to wh-1/workbuddy-switch
that referenced
this pull request
Sep 16, 2026
- backup_workbuddy_db 原来用 `let _ = fs::copy()` 吞掉错误,无论成败都返回路径, 上层报告照抄该路径 ⇒ 备份没落盘时用户仍以为有回滚点 - 抽出 backup_db_files(db, root) 使其可测:主库拷贝失败、或伴随文件存在却拷不动 (备份不完整)都判为 None;-wal/-shm 缺失属正常,不报错 - slim / projects 报告新增 backupDb 字段;copy_sessions_for_switch 的 backup 字段 由「目录路径」改为「真实文件路径或 null」 - 补 2 例单测覆盖落盘与缺主库两条路径 注:本项来自上游 PR changexbc#29 的启发(VACUUM INTO + 写后校验),但核查后我们的备份 发生在 close_workbuddy 之后,时机本身安全,故不动拷贝方式,只修静默失败。
wh-1
added a commit
to wh-1/workbuddy-switch
that referenced
this pull request
Sep 16, 2026
- backup_workbuddy_db 原来用 `let _ = fs::copy()` 吞掉错误,无论成败都返回路径, 上层报告照抄该路径 ⇒ 备份没落盘时用户仍以为有回滚点 - 抽出 backup_db_files(db, root) 使其可测:主库拷贝失败、或伴随文件存在却拷不动 (备份不完整)都判为 None;-wal/-shm 缺失属正常,不报错 - slim / projects 报告新增 backupDb 字段;copy_sessions_for_switch 的 backup 字段 由「目录路径」改为「真实文件路径或 null」 - 补 2 例单测覆盖落盘与缺主库两条路径 注:本项来自上游 PR changexbc#29 的启发(VACUUM INTO + 写后校验),但核查后我们的备份 发生在 close_workbuddy 之后,时机本身安全,故不动拷贝方式,只修静默失败。
wh-1
added a commit
to wh-1/workbuddy-switch
that referenced
this pull request
Sep 16, 2026
- backup_workbuddy_db 原来用 `let _ = fs::copy()` 吞掉错误,无论成败都返回路径, 上层报告照抄该路径 ⇒ 备份没落盘时用户仍以为有回滚点 - 抽出 backup_db_files(db, root) 使其可测:主库拷贝失败、或伴随文件存在却拷不动 (备份不完整)都判为 None;-wal/-shm 缺失属正常,不报错 - slim / projects 报告新增 backupDb 字段;copy_sessions_for_switch 的 backup 字段 由「目录路径」改为「真实文件路径或 null」 - 补 2 例单测覆盖落盘与缺主库两条路径 注:本项来自上游 PR changexbc#29 的启发(VACUUM INTO + 写后校验),但核查后我们的备份 发生在 close_workbuddy 之后,时机本身安全,故不动拷贝方式,只修静默失败。
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.
背景
针对 Windows 平台处理 CodeBuddy CN IDE(桌面客户端)时的三个安全问题/缺陷:
改动内容(仅 Windows,wb-switch-core)
验证