Uh oh!
There was an error while loading. Please reload this page.
fix(storage): serialize operational schema migrations - #2445
Conversation
c87604f to
bb810a0Compare@likun666661@zhiiw Could you please review this replacement for #2363? The implementation has been reduced to two storage-only commits: one transaction for every operational scope and the registry, plus a lifetime shared lock for every live owner with exclusive migration. Please focus on whether the result is optimal from first principles and Occam's razor, whether the migration and cross-process locking model is correct, whether the tests are sufficient, and whether any remaining complexity can be removed or refactored into a cleaner solution. |
zhiiw
left a comment
There was a problem hiding this comment.
Two blocking correctness issues are noted inline.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
bb810a0 to
0c90963CompareAstro-Han
commented
Aug 8, 2026
@likun666661@zhiiw Could you please review the latest revision? The previously identified migration-turn race and v0.1.6 backup restoration issue have been fixed. The latest head is Please re-evaluate the complete PR for correctness, first-principles simplicity, locking and migration behavior, test quality, and any remaining unnecessary complexity. |
zhiiw
left a comment
There was a problem hiding this comment.
Four remaining correctness and cross-platform test issues are noted inline.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
d2814b3 to
eb4f1afCompare
zhiiw
left a comment
There was a problem hiding this comment.
Three remaining durability, fail-closed consumer, and Windows test issues are noted inline.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
3601d6c to
7c168dfCompareAstro-Han
commented
Aug 9, 2026
@likun666661@zhiiw All previous review threads are now addressed and resolved, and the PR history and body reflect the final six-commit design. Could you re-review the latest head, focusing on the complete upgrade and restore lifecycle and any remaining removable complexity? |
Uh oh!
There was an error while loading. Please reload this page.
Astro-Han
commented
Aug 10, 2026
@likun666661@zhiiw All previous review threads are addressed and resolved. The latest fix at AI assistance disclosure: This automated request was prepared by OpenAI Codex on behalf of Astro-Han. |
593085e to
28af3ceCompareGenerated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
c786848 to
5d17f72CompareAstro-Han
commented
Aug 13, 2026
@M4n5ter@likun666661 Could you please perform the final review of the rebased head The rebase integrates #2922 at the existing ownership boundary:
Focused Storage and Runtime Host validations pass. Required CI is still running. OpenAI Codex materially assisted with the rebase, conflict resolution, tests, and analysis. I reviewed the resulting changes and own the submission. 中文对照: @M4n5ter@likun666661,麻烦对 rebase 后的最新 HEAD 本次 rebase 已在现有 owner 边界内整合 #2922:
Storage 和 Runtime Host 的聚焦验证均已通过。Required CI 仍在运行。 OpenAI Codex 对 rebase、冲突处理、测试和分析提供了实质协助。我已审阅最终改动,并对本次提交负责。 |
There was a problem hiding this comment.
English
Re-reviewed the rebased head 5d17f72. The Session metadata v22 → v23 migration is correctly integrated into the unified operational transaction, including target-schema verification and rollback. Backup consistency checks and compatibility epoch 20 are also preserved.
No remaining blocking issues. Approved.
中文
已重新审查 rebase 后的 5d17f72。Session metadata v22 → v23 迁移已正确纳入统一的 operational transaction,包括目标 schema 验证和失败回滚;backup 一致性校验与 compatibility epoch 20 也均得到保留。
没有剩余阻塞问题,可以批准。
AI assistance disclosure: OpenAI Codex assisted with this review. I reviewed the analysis and own the final review decision.
Uh oh!
There was an error while loading. Please reload this page.
Summary
Refs #2357.
Released operational databases need one migration owner: classify every schema scope, recheck under the write lock, migrate, and publish the new registry as one SQLite transaction.
This PR:
BEGIN IMMEDIATEtransaction and rolls back every scope on failure;The upgrade is one-way after a successful migration. It does not restore historical backups, preserve Automation as a second authority, convert legacy Automation into Scheduled Tasks, or support an old process continuing to write after migration.
Verification
@maka/core,@maka/storage,@maka/runtime,@maka/runtime-host, Desktop main, and@maka/uifrom clean artifacts.npm run windows:inventory.npm run format:check.Coverage includes concurrent initialization, transaction rollback, a frozen real v0.1.6 database, successful Reminder migration and reopen, Automation fail-closed behavior, unrepresentable Reminder history preservation, legacy Automation message recovery, canonical closure of an orphaned legacy admission, Candidate failure transport, and single actionable CLI/Desktop presentation.
Review focus
Please verify the released database lifecycle from classification through migration or rollback and reopen. In particular:
Checklist
Does this PR entail a change in behavior?
AI assistance
OpenAI Codex materially assisted implementation, tests, analysis, and review. A human contributor must review the final diff and commit messages and owns the submission and merge decision.