Skip to content

fix(import): reconcile late predecessors with stored successors - #307

Merged
lipluscodex merged 3 commits into
mainfrom
luna-306-existing-successor-import
Oct 14, 2026
Merged

lipluscodex merged 3 commits into
mainfrom
luna-306-existing-successor-import

Conversation

@lipluscodex

@lipluscodex lipluscodex commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Codex Luna

Closes #306

遅れて取り込まれた前任を保存済みの active 後継へ原子的に接続し、旧判断を archived / superseded_by として扱う。後継の本文、provenance、既存 relation binding、履歴、使用 / feedback、学習済み projection を保持し、版競合・循環・別後継への claim を拒否する。差分計画は前任の取り込み後に reconcile_supersedes を実行する。

内部 scope_plan は指定判断と必要な既存後継の置換だけを選択し、必要な接続が解決できない場合は失敗する。schema / export format / 公開 MCP schema / installer は変更しない。

検証: domain / 差分取り込みの重点テスト、frozen v3 lifecycle gate、読み取り専用 online backup から作った使い捨て DB に対する3件の supersede + 1件の reconcile、全旧非 judgment 行と使用 / feedback の保全、integrity、2回目限定計画 no-op を確認。v0.3.0 source の独立 process で get / search / traverse / integrity が成功し、全 table hash が不変。

本番適用はこの PR の対象外。マージ後に issue を再開し、3判断と必要な後継関係の本番適用・実 MCP 検証が終わるまで開いたままにする。

— Luna

既存後継と遅れて取り込む前任の置換を原子的に同期し、既存本文・履歴・学習値を保持する。差分計画と限定範囲の検証を追加する。
@lipluscodex lipluscodex linked an issue Oct 14, 2026 that may be closed by this pull request
@lipluscodex lipluscodex self-assigned this Oct 14, 2026
@lipluscodex

Copy link
Copy Markdown
Member Author

Codex Luna

委任時の選択: 親モデルを継承(model 指定を省略)、reasoning_effort=high。置換の lifecycle・版検査・検索 projection の誤りが SQLite integrity を通過し得るため high を選択した。low での失敗後の昇格ではなく、委任時に選択した。

— Luna

単独 domain 呼び出しでも版検証前に書き込み lock を取得し、検証途中の別 writer による変更を防ぐ。競合 writer の再現で確認する。
追加した遅延前任の回帰テストを製品 suite に登録し、網羅的な inventory 検証を満たす。

@lipluscodex lipluscodex left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codex Luna

自己レビュー: #306 の要件を PR の差分と写しでの結果に照合し、問題は見つからなかった。既存後継への置換は両側の版・active状態・重複・循環・他後継の claim を書き込み前に検査し、一つの transaction で履歴版・canonical辺・projection辺・前任の lifecycle/pointer を更新する。既存の本文/provenance、辺の binding/作成日時、学習済み重み・factuality、node confidence は保持される。

限定計画は必要な後継への接続を含め、接続できなければ失敗する。写しへの3件の supersede + 1件の reconcile の後、旧上限は archived、既存の上限撤廃は active、2回目の限定計画は0件。既存行と使用/feedbackの保全、整合性、v0.3.0独立processのget/search/traverse/integrityを確認した。並行書き込みの版検査と失敗時の全体rollbackはテストで確認している。

範囲逸脱・workspace側の保留はない。schema/export/MCP公開schema、installer、凍結証跡に変更はない。autoモードでマージ後、issueを再開し、本番バックアップと同じ限定適用・実MCP検証を行うまで完了にはしない。別の8件の辺追加は今回実施しない。

— Luna

@lipluscodex
lipluscodex merged commit b340c36 into main Oct 14, 2026
9 checks passed
@lipluscodex
lipluscodex deleted the luna-306-existing-successor-import branch October 14, 2026 05:15
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.

fix(import): reconcile late predecessors with stored successors

1 participant