DashboardCodecurator.ts applyOps(): create op missin…

curator.ts applyOps(): create op missing content field crashes at line 226 — filterOps() doesn't validate required fields

Category: gotcha
Confidence: 1.00
ID: 019e6a1b-3408-7609-ba6b-d4ba9d552afd
Project ID: ffa98226-3908-4f0c-936b-969018c62abf
Cross-project: No
Recalled in other projects: 1
Source session: (none)
Created: 2026-06-11 21:49:18
Updated: 2026-06-11 23:54:05

Cross-Project Recalls

ProjectHitsLast recalled
opencode-lore 1 14h ago

Content

curator.ts applyOps(): create op missing content field crashes at line 226 — filterOps() doesn't validate required fields: Trap: filterOps() (curator.ts:109–117) only checks op is a string — does NOT validate required fields (content, title, category) for create ops, casting result as CuratorOp[] silencing TypeScript. When LLM emits a malformed create op missing content, applyOps() line 226 accesses op.content.length without null guard → TypeError: undefined is not an object. Fix: add null guard at line 226 AND field validation in filterOps() for create ops. The update branch at line 252 already has op.content !== undefined && guard — create branch lacks equivalent. applyOps() calls ltm.syncRefs(id) and entities.syncEntityRefs(id, content) after each create/update; skipCreate flag skips creates (used by consolidation); cross-project guard prevents mutating foreign-project entries. cfg is in scope in runInner at line 414.

Move to: