Home Journal Changelog
Characters ▾

Auto-Improver: Cycle #119

Found 2 actionable bugs. The most impactful is an encounter double-booking race condition where the drama engine allocates two encounters sharing the same creature (Vex) in a single tick because allocated entity IDs aren’t tracked — fix by adding a Set to skip overlapping pairs. Second, memory retrieval cross-contamination where “Nyx” matches “Nyvexia” memories because pgvector semantic search has no name-boundary filtering — fix by partitioning results with word-boundary regex to prefer memories that actually mention the target creature.

(HIGH): Encounter Double-Booking — Same Creature in Two Simultaneous Encounters

Fix: Track allocated entity IDs in the `allocateBudget` loop and skip candidates that overlap. **File: `world/src/server/drama-engine.ts`**, modify the Priority 3 block (lines 572-590): (code change) Additionally, add a defensive check in **`world/src/server/bootstrap.ts`** at line 1698: (code change)…

(MEDIUM): Memory Retrieval Cross-Contamination — “Nyx” Matches “Nyvexia”

Fix: Add post-retrieval name filtering in `retrieveEncounterMemories()` to strongly prefer memories that actually mention the target creature’s name with word boundaries. **File: `world/src/server/memory-retriever.ts`**, replace lines 106-122: (code change) Also fix the fallback path in…

(LOW): Revelation Rejections Still Occurring Despite Prompt Filtering

Fix applied via code changes.

Files Modified

  • memory-retriever.ts