DashboardCodeconsolidationUser() batchTarget frame-o…

consolidationUser() batchTarget frame-of-reference mismatch: global target vs batch count produces negative excess

Category: gotcha
Confidence: 1.00
ID: 019e6a44-dbf1-7df6-ba60-94f75c21b81d
Project ID: ffa98226-3908-4f0c-936b-969018c62abf
Cross-project: No
Recalled in other projects: 2
Source session: (none)
Created: 2026-06-11 21:49:18
Updated: 2026-06-12 00:15:06

Cross-Project Recalls

ProjectHitsLast recalled
opencode-lore 3 2d ago
opencode 1 9d ago

Content

Trap: batchTarget in batched consolidation was computed globally (e.g. 1118 for 1143 entries) but consolidationUser() computed excess = batchCount - batchTarget → negative excess → LLM returns empty ops → idle scheduler enters 1h cooldown, system never converges. Fix: batchTarget must be batch-relative — Math.ceil(CONSOLIDATION_BATCH_SIZE / 2) so excess = 50 - 25 = 25. Fixed in e8a73f9. CONSOLIDATION_BATCH_SIZE=50. Non-batched path correctly uses cfg.curator.maxEntries. consolidate() NEVER creates entries — only 'update' and 'delete' ops; includeCross=false excludes cross-project entries.

Move to: