Repository navigation
Conversation
10 of 18 tasks
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 文件操作,保留出错时可供检查的数据文件。
Related: iOfficeAI/AionUi#4339
该 issue 记录了重启后模型、CSS、聊天记录不可见,以及主数据库与 WAL 组合后的逻辑不一致。目前没有确定性复现,也没有证明某个 SQLite 竞态、认证失败或本 PR 修复的单一代码路径就是事故根因。 因此这里关联 issue,保留其后续调查状态。
配套 AionUi PR:iOfficeAI/AionUi#4342。
修复内容
数据库与模型配置
quick_check后才发布,不覆盖已有目标。旧目标的孤立日志文件也先保留,不直接丢弃。UPDATE … RETURNING,按实际写入时的行合并字段,避免并发更新用旧快照覆盖彼此;保留“未传入”和“显式清空”可空字段的区别。内置 SQLite
libsqlite3-sys0.30.1 接口的前提下,编译官方 SQLite 3.51.3 amalgamation。vendor/libsqlite3-sys/AIONUI-PATCH.md记录来源、下载哈希、官方 source ID 和核验过的sqlite3.cSHA3-256。SQLite C 源码保持官方原样;SQLCipher 部分保持包装库原版,本项目没有启用它。sqlite_version()并断言版本至少为 3.51.3,以检测意外链接回旧版本。较大的 diff 主要来自完整 vendor 源码;后续可随 SQLx/rusqlite 协同升级替换此兼容补丁。Windows 兼容性
symlink_metadata检查链接本身;Windows 目录符号链接/junction(包括目标已不存在的情况)使用非递归remove_dir移除链接,保留真实目标目录及文件。/;绝对路径字段保持原语义,Unix 文件名中的字面反斜杠不被改写。验证
测试提交:
c74eb28488f77392bbfcf3eb8ba4b03973631dac,基于 AionCorev0.2.2(47e66d0);Windows x64,Rust 1.95.0。just push全部检查成功:migration guard、Cargo fix、Clippy(-D warnings)、format、全工作区 nextest。cargo build --release -p aionui-app --bin aioncore -j2 --target-dir target-release完整优化构建成功。为控制本机编译资源,全工作区测试使用 release 依赖缓存,工作区包通过外部 CLI 配置设为
opt-level=0,第三方依赖仍为 release 优化;nextest 使用 16 个测试线程、无测试过滤。上述正式程序构建没有使用该测试配置。测试配置和本机诊断资料未写入仓库。文件型回归测试覆盖带已提交 WAL 的旧库快照、无效源库拒绝发布、日志归档/恢复中断及并发提供方局部更新;目录链接测试核对目标内容不变。
边界与审阅提示
c421a24(持久化及 SQLite)、c74eb28(Windows 文件操作及测试可移植性)。本次按仓库汇总提交,维护者可分别审阅。AuthManager的凭据刷新逻辑。