Skip to content

清理 SQLite 化后无用的旧布局测试实现 - #23

Merged
zilorn merged 1 commit into
mainfrom
codex/cleanup-sqlite-legacy
Oct 12, 2026
Merged

zilorn merged 1 commit into
mainfrom
codex/cleanup-sqlite-legacy

Conversation

@zilorn

@zilorn zilorn commented Oct 11, 2026 •

Copy link
Copy Markdown
Owner

解决的问题 / Problem

Fixes #22。SQLite 化后,book_store.rs 仍保留一组仅由旧布局测试调用的转换、同步、章节补丁、删书及 digest.json 写入实现,容易与当前实现混淆。

改动后的行为 / Resulting behavior

  • 删除旧布局专用的 16 个函数、旧扫描与指纹文件结构,以及 11 个仅测试旧路径的用例;测试夹具不再写 digest.json。
  • 保留 SQLite 首次导入、未迁移书籍读回退、原子写入及旧布局夹具。旧 digest.json 的归档文件名移入 sqlite.rs;章节插图引用提取仍由 SQLite 生产写入使用。
  • 新增当前 SQLite 路径的回归测试:同步元信息只更改指定字段、缺书跳过;删书清理独占图、保留共享图与无法确认引用时的图片。
  • 影响平台:Android、Linux、Windows。无 UI 变化。

验证 / Validation

  • 类型检查 / Type check:未运行,未改前端。
  • 文案检查 / i18n check:未运行,未改文案。
  • 前端构建 / Frontend build:未运行,未改前端。
  • Rust 测试 / Rust tests:尝试 cargo test -p readerx --lib book_store,本地环境没有 cargo(command not found);PR CI 的 cargo check --locked --workspace --all-targets 已通过。完整 book_store 单测仍需在具备 Rust 工具链的环境执行。
  • 手动验证 / Manual verification:git diff --check 通过;核对被移除符号引用、SQLite 迁移和插图写入依赖。

数据与兼容性 / Data and compatibility

数据库格式与生产迁移行为不变。旧 digest.json 仍在首次 SQLite 导入时归档,失败迁移与未迁移书籍的读取回退继续保留。

提交前检查 / Checklist

  • 已阅读 CONTRIBUTING.md 与 AGENTS.md / I read CONTRIBUTING.md and AGENTS.md.
  • 仅包含本次任务相关文件 / Changes are limited to this task.
  • 已核对相关文档与文案无需变更 / Relevant docs and locales require no changes.
  • 已说明已执行与未验证的检查 / Checks run and unverified areas are documented.

@zilorn zilorn added the enhancement New feature or request label Oct 12, 2026
@zilorn zilorn self-assigned this Oct 12, 2026
@zilorn
zilorn merged commit 7738a42 into main Oct 12, 2026
3 checks passed
@zilorn
zilorn deleted the codex/cleanup-sqlite-legacy branch October 12, 2026 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

去除现版本无用的迁移代码:清理 SQLite 化后无生产用途的旧布局实现

1 participant