refactor(sync): extract graph mutation gate + live-state projection (Phase 5c)

This commit is contained in:
youzini
2026-05-31 12:51:58 +00:00
parent ddc62213e2
commit 459ce12f9b
3 changed files with 969 additions and 565 deletions

View File

@@ -177,6 +177,15 @@ import {
retryPendingGraphPersistImpl,
saveGraphToIndexedDbImpl,
} from "../sync/graph-persistence-io.js";
import {
assertRecoveryChatStillActiveImpl,
buildPanelOpenLocalStoreRefreshPlanImpl,
ensureGraphMutationReadyImpl,
getGraphMutationBlockReasonImpl,
getGraphPersistenceLiveStateImpl,
getPanelRuntimeStatusImpl,
readRuntimeDebugSnapshotImpl,
} from "../sync/graph-mutation-gate.js";
import {
consumeRerollRecallReuseMarker,
createRerollRecallReuseMarker,
@@ -748,6 +757,7 @@ async function createGraphPersistenceHarness({
recordAuthorityAcceptedRevision,
AUTHORITY_GRAPH_STORE_KIND,
AUTHORITY_GRAPH_STORE_MODE,
AUTHORITY_DIAGNOSTICS_MANIFEST_LIMIT: 20,
AuthorityGraphStore: HarnessAuthorityGraphStore,
isAcceptedLegacyPersistenceTier,
isRecoveryOnlyLegacyPersistenceTier,
@@ -813,6 +823,13 @@ async function createGraphPersistenceHarness({
queueGraphPersistToIndexedDbImpl,
retryPendingGraphPersistImpl,
saveGraphToIndexedDbImpl,
assertRecoveryChatStillActiveImpl,
buildPanelOpenLocalStoreRefreshPlanImpl,
ensureGraphMutationReadyImpl,
getGraphMutationBlockReasonImpl,
getGraphPersistenceLiveStateImpl,
getPanelRuntimeStatusImpl,
readRuntimeDebugSnapshotImpl,
consumeRerollRecallReuseMarker,
createRerollRecallReuseMarker,
createRecallMessageUiController() {