fix(sync): wake Core coverage after scope expansion - #2046
Open
branarakic wants to merge 2 commits into
Open
Conversation
branarakic
force-pushed
the
codex/rfc64-m1-core-discovery-wakeup
branch
from
August 3, 2026 08:12
35d0d3b to
87cc005
Compare
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
Core nodes no longer leave a newly discovered public Context Graph outside automatic RFC-64 coverage until the ordinary peer-staleness window expires.
The automatic set remains bounded by
syncCorePublicBatchSize. Edge behavior is unchanged: Edge nodes still synchronize only explicitly selected graphs. This PR does not increase concurrency, rescan the catalogue on every tick, or broaden private-CG admission.Problem
A peer round freezes its bounded automatic scope before fetching
ontology. If that fetch materializes a new public CG, discovery admits it to the Core scheduler only after the frozen plan has already run. The same round could then stamp the peer fresh, suppressing the follow-up round that would actually request the new graph.A count-based in-round check was also insufficient: peer A could finish an old-scope round after peer B expanded the catalogue and incorrectly restore freshness for A.
The formal three-node M1 gate reproduced the original symptom as
timed out waiting for core automatic journal entry: the Core possessed the public definitions but had no automatic coverage journal entry for the new corpus.Before
sequenceDiagram participant A as "Core peer round A" participant B as "Core peer round B" participant C as "Coverage scheduler" A->>C: Freeze bounded old scope B->>C: Freeze bounded old scope B->>C: Discover and admit new public CG C-->>B: Catalogue expanded B->>B: Avoid freshness stamp A->>A: Finish later and stamp old scope fresh Note over A,C: New CG can remain uncovered on peer AAfter
sequenceDiagram participant A as "Core peer round A" participant B as "Core peer round B" participant C as "Coverage scheduler" participant R as "Core reconciler" A->>C: Plan at coverage epoch N B->>C: Plan at coverage epoch N B->>C: Discover and admit new public CG C->>C: Advance to epoch N plus 1 B->>C: Complete with planned epoch N C-->>B: Stale epoch; do not refresh A->>C: Complete later with planned epoch N C-->>A: Stale epoch; do not refresh R->>C: Retry peers against epoch N plus 1Implementation
Validation
sync-on-connect-retry.test.ts,sync-on-connect-churn.test.ts, andcore-public-coverage-scheduler.test.ts: 92 passeddiscovery-subscription-boundary.test.ts: 20 passedpnpm --filter @origintrail-official/dkg-agent build: TypeScript, type tests, and package-root test passedgit diff --check: passedStack
codex/rfc64-m1-on-demand-lifetime)