Repository navigation
feat: 實作離線跨 backend 搬移與完整性預檢 - #29
Merged
Merged
Conversation
This was referenced Oct 14, 2026
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.
提供 SQLite、JSON、MySQL 六種方向的明確離線搬移流程,保留來源、要求相同 anti-abuse 密鑰及備份,完整驗證後才發布目的地。管理員須先停止所有實例,再手動切換
storage.yml。Refs #26。來源存在孤立紀錄時,現在會在預檢階段拒絕,不再先顯示成功後才於正式匯入失敗。SQLite 使用完整性與外鍵檢查;MySQL 依目前 schema 的外鍵及業務表白名單檢查孤立資料。檔案目的地採 staging 與不覆寫發布;MySQL 透過 advisory lock 與持久 transfer guard 協調啟動,失敗後保留目的地供調查。
驗收 HEAD:
418c8298e8deb6c7fdef66d6e0ff67f78d807a89;使用者已驗收並授權 push/建立 PR。目標為develop,尚未授權合併。驗證:Java
1.8.0_501,mise exec java@local-8 -- .\gradlew.bat check shadowJar --console=plain通過;55 suites/244 tests,零失敗、零錯誤、零跳過。隔離 MySQL 8.4.11 驗證六方向搬移、PENDING/UNCERTAIN 與冪等鍵保留、孤立資料拒絕、trigger 匯入回滾、guard 阻擋重開及新資料庫重試。Java 8 bytecode、插件 JAR 與git diff --check通過。完整證據與限制見
docs/testing/evidence/2026-10-02-issue-26-transfer-retest.md;操作與復原文件見docs/operations/cross-backend-transfer.md。本輪故障驗證在 transaction/重新開啟邊界執行,未模擬作業系統斷電或 kill CLI;MySQL dump fixture 未驗證實際還原能力。--stopped仍須由操作者保證所有寫入者停止。真人驗收沿用既有延後安排。