Dashboard › Code › curator.ts applyOps(): create op missin…
019e6a1b-3408-7609-ba6b-d4ba9d552afd| Project | Hits | Last recalled |
|---|---|---|
| opencode-lore | 1 | 14h ago |
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.