fix(agent): back off failed VM reconcile sweeps - #1682
Merged
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.
Summary
Mainnet evidence
10.0.6 cores repeatedly report 30-second Blazegraph deadlines while reconciling the same on-chain graphs (
foodie-networkon Gnosis andsportson Base). Several nodes produced roughly 15 VM timeout warnings in a 15-minute sample.runVmReconcileForCgcurrently catches the timeout and resolves normally. The coalescer therefore cannot distinguish failure from success: a KACG event queued during the expensive scan immediately launches the trailing scan, and later live events can keep retriggering it despite the periodic safety net.After this change, a failed CG is cooled down for
DKG_VM_RECONCILE_INTERVAL_MS(10 minutes on the inspected mainnet units). The periodic sweep retries when that window expires. Successful live-event reconciliation is unchanged and remains immediate.This is orchestration-only: it does not delete subscriptions or graph data and does not advance a failed reconciliation cursor.
Verification
pnpm --filter @origintrail-official/dkg-agent exec vitest run --config vitest.unit.config.ts test/chain-reconciler.test.tspnpm --filter @origintrail-official/dkg-agent exec tsc --noEmitpnpm --filter @origintrail-official/dkg-agent test:unit(52 files, 593 tests)