Skip to content

迁移到 SQLite 事实源并加入原生备份 - #1

Merged
ApeCodeLab merged 1 commit into
mainfrom
feat/sqlite-authoritative-backups
Sep 15, 2026
Merged

ApeCodeLab merged 1 commit into
mainfrom
feat/sqlite-authoritative-backups

Conversation

@ApeCodeLab

Copy link
Copy Markdown
Contributor

Summary

  • Treat SQLite as FinSight's authoritative local store during normal use.
  • Add finsight backup create and finsight backup verify for native SQLite recovery copies.
  • Make doctor read-only for SQLite health checks.
  • Prevent init --demo from replacing an already populated portfolio database.
  • Keep the plain-text ledger only as explicit, lossy legacy interoperability.
  • Update public English/Chinese docs, CLI docs, examples, and Agent skill to match.

Privacy boundary

  • No personal account data, real holdings, 九坤 material, internal endpoints, or private OCR scripts are included.
  • The existing public ApeCode/BytePass history is intentionally unchanged.

MVP boundary

This PR is for a single-user, local-only, Agent-first MVP. It does not add multi-user auth, distributed transactions, hostile-process hardening, or ABA/TOCTOU defenses.

Verification

  • pnpm -r test
  • pnpm typecheck
  • pnpm -r build
  • CI skill-drift check
  • git diff --check
  • Isolated temporary-DB smoke test: init → doctor → backup create → backup verify

Review boundary

Please review this as one migration slice. Do not merge unrelated FX, screenshot/OCR, personal-data, package-release, or security-hardening work into this PR.

本次变更:
- 将 SQLite 明确为正常运行时的本地事实源
- 新增 backup create / verify 与完整性检查
- doctor 改为只读检查数据库,init 防止 demo 覆盖已有组合
- 将 ledger 降级为显式、有损的旧版互操作导出/导入
- 同步更新 CLI、README、中文文档、Skill 和合成 demo

验证:
- pnpm -r test(63 core + 4 connector-yzyx + 11 CLI tests passed)
- pnpm typecheck
- pnpm -r build
- CI skill-drift check
- git diff --check
- 隔离临时数据库上的 init / doctor / backup create / backup verify smoke test

范围:
- 单用户、本地 MVP;不引入多用户、分布式事务或高强度安全模型
- 未包含个人账户、九坤资料、内部 endpoint 或真实数据
@ApeCodeLab
ApeCodeLab merged commit 2171bc8 into main Sep 15, 2026
1 check passed
@ApeCodeLab
ApeCodeLab deleted the feat/sqlite-authoritative-backups branch September 15, 2026 04:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant