feat(agent): resume persisted Edge always-on sync scopes - #2032
Open
branarakic wants to merge 1 commit into
Open
feat(agent): resume persisted Edge always-on sync scopes#2032branarakic wants to merge 1 commit into
branarakic wants to merge 1 commit into
Conversation
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.
User impact
An Edge node can keep broad sync-on-connect disabled and still resume only the context graphs that the user explicitly persisted as
always-onbefore the process restarted.This is stacked on #2031 and should be reviewed after that parent.
Before
sequenceDiagram participant User participant Edge participant Reconciler participant Peer User->>Edge: Persist CG A as always-on Edge->>Edge: Restart and rehydrate CG A Reconciler->>Edge: Periodic retry alt Broad sync-on-connect is disabled Edge-->>Reconciler: Exit without resuming CG A else Broad sync-on-connect is enabled Edge->>Peer: Sync system graphs and configured scope endAfter
sequenceDiagram participant User participant Edge participant Reconciler participant Peer User->>Edge: Persist CG A as always-on Edge->>Edge: Restart and rehydrate explicit CG A Reconciler->>Edge: Branded periodic invocation Edge->>Edge: Revalidate live persisted intent Edge->>Peer: Durable sync for CG A only Edge->>Edge: Revalidate after durable work Edge->>Peer: Plan SWM for current live scope Edge->>Edge: Revalidate after planning alt CG A is still always-on Edge->>Peer: SWM sync for CG A only Edge-->>Reconciler: Record verified scoped evidence else User changed CG A to on-demand or unsubscribed Edge-->>Reconciler: Stop remaining work for CG A endVerification
pnpm --filter @origintrail-official/dkg-storage buildpnpm --filter @origintrail-official/dkg-agent buildpnpm --filter @origintrail-official/dkg-agent exec vitest run --config vitest.unit.config.ts test/sync-coverage-evidence-runtime.test.ts test/sync-on-connect-retry.test.tsgit diff --checkThe focused tests cover trigger forgery, runtime-only and on-demand exclusions, no system-graph bootstrap, and subscription demotion during protocol discovery, durable transfer, and SWM planning.