Skip to content

A5 — delta sync activation (flagged off)#1149

Closed
Jurij89 wants to merge 1 commit into
integration/issue-1138from
codex/issue-1138-a5-delta-sync
Closed

A5 — delta sync activation (flagged off)#1149
Jurij89 wants to merge 1 commit into
integration/issue-1138from
codex/issue-1138-a5-delta-sync

Conversation

@Jurij89

@Jurij89 Jurij89 commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Wires the already-plumbed sinceBatchId delta sync into production callers behind a flag (DKG_SYNC_DELTA, default OFF), with full-scan anti-entropy guard rails (every 8th round per peer/CG and after any round with rejected KCs).
  • Conservative by design: the watermark is emitted only after a per-CG batchId-monotonicity check, which is itself an open question (verify against the registry contract before defaulting on).

Related

Files changed

File What
agent/src/dkg-agent-lifecycle.ts sinceBatchIdFor wiring + anti-entropy guard rails (flagged)
agent/src/dkg-agent-base.ts Delta watermark state

Plus 1 test file.

Test plan

  • pnpm -F dkg-agent test
  • Flag OFF (default): behavior identical to today (full scan)
  • Flag ON: delta narrows correctly; anti-entropy forces periodic full scans and after rejected KCs
  • pnpm build + lint

Wave 2 — opened as draft. Gated behind the Wave-1 live-node checkpoint (#1138, Verification): A1-A4 + B0-B2 must merge into integration/issue-1138 and pass the field repro (sustained CPU < 1 core, VM publish < 1 s) before this is un-drafted/merged. Targets integration/issue-1138.

@Jurij89

Jurij89 commented Jun 15, 2026

Copy link
Copy Markdown
Contributor Author

Closing without merging — A5 (delta/incremental sync) is not needed and can't be safely activated in V10:

  1. Not needed — the sync-responder CPU peg (Online node sustains ~9 CPU cores from per-message/per-CG _meta policy queries scaling with peers × discovered CGs (separate from the fixed R6 idle scan) #1127 / VM publish fails validating contextGraphId when /api/context-graph/list stalls #1136) is already fixed by the un-peg gate (A1–A4 + B0–B2, merged via Issue #1138 — un-peg sync-responder CPU: A1–A4 + B0–B2 (§7 checkpoint PASS) #1164). The §7 field-repro checkpoint confirmed ~10–15 cores → ≤0.38 cores. Delta sync was only an incremental optimization on top of an already-cheap path, not part of the cure.
  2. Can't safely activate — incremental sync needs a reliable per-CG cursor; in V10 dkg:batchId is a KA id, not a safe per-CG delta cursor (no sound 'give me everything since X' marker). This branch's own guard already refuses to activate (DKG_SYNC_DELTA=1 warns and stays full-scan).

Deferred to #1174 (revive when V10 has a per-CG ordinal/version cursor; the plumbing + guard here can be revived from this branch). Part of #1138.

@Jurij89 Jurij89 closed this Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant