Home Journal Changelog
Characters ▾

Auto-Improver: Cycle #108

Found 3 issues. The most critical is a same-tick race condition where the drama engine pushes two encounter candidates sharing the same creature (Lyxara), and both are initiated without rechecking active-encounter status — fix by adding `isPetInEncounter()` guard in the bootstrap initiation loop. Secondary: pair cooldowns are only set during `cleanupResolved()` (next tick), allowing re-encounters in the resolution tick gap — fix by setting cooldowns immediately when encounters resolve. Third: misleading “Task interrupted: hunt -> hunt” log noise from commute-to-active phase transitions.

— LOW: “Task interrupted: hunt -> hunt” and “eat -> eat” log noise

Fix: `pet-brain.ts`, line 1317: (code change) This eliminates the misleading log, properly transitions the task phase, and avoids unnecessary task re-creation. — CHANGES_PROPOSED: yes SUMMARY: Found 3 issues. The most critical is a same-tick race condition where the drama engine pushes two encounter…

Files Modified

  • encounter-manager.ts
  • pet-brain.ts