mirror of
https://github.com/Youzini-afk/ST-Bionic-Memory-Ecology.git
synced 2026-05-15 22:30:38 +08:00
fix: orphan accepted commit marker self-healing — auto-clear stale marker when no recoverable graph source exists
- Add maybeResolveOrphanAcceptedCommitMarker() for conservative orphan detection: - Chat-state sidecar rescue first (preserves marker, keeps mismatch diagnostic) - Only clears marker when ALL local sources confirmed absent - Guards: shadow-available, migration-failed, chat-switched all block clearing - Enhance clearCurrentChatCommitMarker() with resetAcceptedRevision option - Resets lastAcceptedRevision and acceptedStorageTier when marker is orphan - Integrate orphan resolution into loadGraphFromIndexedDb() empty+mismatch branch - Update onDeleteCurrentIdbController/onDeleteAllIdbController to resetAcceptedRevision - Update graph-persistence regressions: - Orphan marker scenario now auto-heals to EMPTY_CONFIRMED (was: permanently BLOCKED) - Add chat-state rescue guard test: sidecar data prevents marker clearing
This commit is contained in:
@@ -1196,6 +1196,7 @@ export async function onDeleteCurrentIdbController(runtime) {
|
||||
runtime.clearCurrentChatCommitMarker?.({
|
||||
reason: "manual-delete-current-idb",
|
||||
immediate: true,
|
||||
resetAcceptedRevision: true,
|
||||
});
|
||||
runtime.syncGraphLoadFromLiveContext?.({
|
||||
source: "manual-delete-current-idb",
|
||||
@@ -1252,6 +1253,7 @@ export async function onDeleteAllIdbController(runtime) {
|
||||
runtime.clearCurrentChatCommitMarker?.({
|
||||
reason: "manual-delete-all-idb",
|
||||
immediate: true,
|
||||
resetAcceptedRevision: true,
|
||||
});
|
||||
runtime.syncGraphLoadFromLiveContext?.({
|
||||
source: "manual-delete-all-idb",
|
||||
|
||||
Reference in New Issue
Block a user