fix: avoid history reclamation during structure-only upgrades
Ordinary database schema upgrades previously ran VACUUM on free pages and showed misleading history-cleanup progress. Separate structure upgrades from required legacy conversions, retaining reclamation intent only for retries within the same startup. Preserve released data without new schema versions or persistent migration markers; Agent and normal writes remain unchanged. Add real SQLite and Worker regressions, bilingual operation-specific startup copy, and migration documentation. Synchronize native Electron drag input with actual resize state without weakening layout assertions. Validation: 47 focused migration tests passed; typecheck, lint and diff checks passed. Final full suite: 5137 passed, 74 skipped, 2 unrelated Electron failures. Both failing Electron tests passed an isolated rerun; full CI remains unverified. Release note: 修复普通数据库结构升级再次整理历史和回收空间的问题;仅在需要转换旧数据时执行相关处理,启动页准确显示当前升级操作。
This commit is contained in:
@@ -7,6 +7,25 @@
|
||||
修正复发缺陷时,优先建立一条能覆盖整类问题的机制(共享选择器、共享函数、能发现全部实例
|
||||
的测试),而不是逐个点名修补。逐个修补正是这些条目反复出现的原因。
|
||||
|
||||
## 普通结构升级再次触发历史回收
|
||||
|
||||
**症状**:历史已经转换完成,后续升级仍显示清理历史并执行耗时的全库回收。
|
||||
|
||||
**原因**:只修复启动检测不够;普通旧 schema 仍会进入升级 Worker,若共享升级方法
|
||||
把任意空闲页当作回收依据,就会在以后每次结构升级时重现。
|
||||
|
||||
**规则**:共享启动决定分别描述内容转换与回收,普通结构升级默认不回收。只有具体
|
||||
旧内容转换允许回收,同次启动重试沿用内存决定;下一次启动重新检测,不增加持久标记。
|
||||
具体规则见[迁移指南](../development/database-migrations.md)。
|
||||
|
||||
**防复发**:schema 45/46 的真实 SQLite fixture 保留正常写入产生的空闲页,断言
|
||||
无历史转换、无 `VACUUM`、内容与完整性保留;真实 Worker 验证取消及重试,
|
||||
启动调度测试分别覆盖允许和禁止回收的决定在重试中不变。
|
||||
|
||||
**历史**:`8dce1d7` 和 `38d0923` 先后修正启动检测,后者随 0.13.9 发布;
|
||||
2026-09-26 检查 0.13.15 的 schema 46→47 路径发现共享 Worker 仍无条件按空闲页回收。
|
||||
本次修复在共享操作层分离结构升级与回收,而非给 46→47 增加特例。
|
||||
|
||||
## 异步界面测试只等待部分状态
|
||||
|
||||
**症状**:本地通过的界面测试在完整 CI 中找不到预期控件,或在前一步更新后立即读取到旧状态。
|
||||
@@ -15,11 +34,15 @@
|
||||
按请求完成和最终可见状态同步,不以另一个元素出现或消失代替完整操作结束。
|
||||
测试请求重试时显式控制后一次响应,分别断言等待中和响应完成后的状态;
|
||||
同一异步操作的多个最终断言放入同一个 `waitFor`。不要只延长全局超时或放宽断言。
|
||||
Electron 原生拖拽测试应确认窗口焦点、拖拽状态建立、宽度更新及拖拽结束后再断言;
|
||||
移动事件明确携带左键按下状态,不用固定睡眠代替输入处理完成。
|
||||
|
||||
**历史**:2026-09-26 检查 Desktop 0.13.14 标签 CI `36165805814` 与
|
||||
main CI `36164698647`:原生能力重试用例在启动状态未稳定时打开选项,
|
||||
浏览器关闭用例只等待页签消失便同步断言错误已清除。两处测试改用上述已有同步机制;
|
||||
是否消除 CI 失败以修复提交的 Linux CI 结果为准。
|
||||
同日 Windows 全量测试及独立复跑中,Magic Notes 原生拖拽分别停在索引列 168 和
|
||||
AI 列 280。测试同步原生输入与实际状态后独立复跑通过,保留原有宽度和持久化断言。
|
||||
|
||||
## 整窗遮罩与原生拖动区域
|
||||
|
||||
|
||||
Reference in New Issue
Block a user