Sub of #13755. Confirmed regression, traced to code.
Root cause
#13358 (06-15) added DEFAULT_COMPATIBLE_HEAVY_MAINTENANCE_TASK_PAIRS = [['kbSync','memory-summary-backfill']], letting them run concurrently by passing the parent's lease token to the child via NEO_HEAVY_MAINTENANCE_LEASE_INHERITED_TOKEN.
withHeavyMaintenanceLease (HeavyMaintenanceLeaseService.mjs:526-552):
- inherited token matches active lease → runs the task (intended concurrency). ✅
- inherited token set but doesn't match → falls through to
acquireHeavyMaintenanceLease → if another heavy task holds the lease, returns {status:'held'} → the task never runs. ⚠️
memory-summary-backfill is short — it usually releases the lease before the kb-sync child finishes booting (~148ms to connect ChromaDB). By then the inherited token is stale → fall-through → another task holds the lease → kb-sync skips syncDatabase: a 148ms "completed" no-op where syncDatabase's first log ("Starting full database synchronization") never fires.
Evidence
- kb-sync embedded daily through 06-16 (06-15: 43 batches, 06-16: 6) → zero 06-17→06-20 → 2566-chunk accumulated delta when force-run 06-21.
- #13358 is the most-recent
INHERITED_TOKEN change; timing tracks the decline exactly.
- 06-17 log:
Starting kb sync 06:12:25.686 → completed successfully 06:12:25.834 (148ms), ChromaDB connected, no sync body, no "⏸️ Deferred".
Consequence
New items never embed → not in graph → Golden Path recommends months-old #9xxx → swarm-wide derailment.
Fix
- Remove
['kbSync','memory-summary-backfill'] from DEFAULT_COMPATIBLE_HEAVY_MAINTENANCE_TASK_PAIRS → serialize again (restores the pre-#13358 behavior that worked for weeks). The concurrency optimization can be re-introduced later with a race-free handshake.
- Harden
withHeavyMaintenanceLease: a set-but-mismatched inherited token must not silently fall through to a task-skip — log it (the race becomes visible) so a future recurrence is observable, not a silent multi-day stall.
AC
Sub of #13755. Confirmed regression, traced to code.
Root cause
#13358 (06-15) added
DEFAULT_COMPATIBLE_HEAVY_MAINTENANCE_TASK_PAIRS = [['kbSync','memory-summary-backfill']], letting them run concurrently by passing the parent's lease token to the child viaNEO_HEAVY_MAINTENANCE_LEASE_INHERITED_TOKEN.withHeavyMaintenanceLease(HeavyMaintenanceLeaseService.mjs:526-552):acquireHeavyMaintenanceLease→ if another heavy task holds the lease, returns{status:'held'}→ the task never runs. ⚠️memory-summary-backfillis short — it usually releases the lease before the kb-sync child finishes booting (~148ms to connect ChromaDB). By then the inherited token is stale → fall-through → another task holds the lease → kb-sync skipssyncDatabase: a 148ms "completed" no-op wheresyncDatabase's first log ("Starting full database synchronization") never fires.Evidence
INHERITED_TOKENchange; timing tracks the decline exactly.Starting kb sync06:12:25.686 →completed successfully06:12:25.834 (148ms), ChromaDB connected, no sync body, no "⏸️ Deferred".Consequence
New items never embed → not in graph → Golden Path recommends months-old #9xxx → swarm-wide derailment.
Fix
['kbSync','memory-summary-backfill']fromDEFAULT_COMPATIBLE_HEAVY_MAINTENANCE_TASK_PAIRS→ serialize again (restores the pre-#13358 behavior that worked for weeks). The concurrency optimization can be re-introduced later with a race-free handshake.withHeavyMaintenanceLease: a set-but-mismatched inherited token must not silently fall through to a task-skip — log it (the race becomes visible) so a future recurrence is observable, not a silent multi-day stall.AC
syncDatabase(the full embed) on its cadence even right aftermemory-summary-backfillheld the lease.MaintenanceBackpressureServiceno longer treats the kbSync/backfill pair as compatible; regression test for the skip.PrimaryRepoSyncService.mjs:564(sameINHERITED_TOKENread) audited for the same skip.