Fix thread-local flavour_cache memoization to ensure room description diversity #59

Open
opened 2026-03-14 23:57:24 +00:00 by freemo · 0 comments
Owner

Metadata

  • Commit Message: fix(worldgen): remove thread-local flavour_cache memoization for unique room descriptions
  • Branch: feature/m3-v11-fix-flavour-cache

Background

flavour_cache uses ||= per thread per terrain, so every room of a terrain type in a thread gets the same description.

Expected Behavior

Each room gets an independent random sample from its terrain's description pool.

Acceptance Criteria

  • Thread-local flavour_cache memoization removed
  • Each room samples independently from the description pool
  • Consecutive rooms of the same terrain have different descriptions (probabilistically)

Subtasks

  • Replace flavour_cache with per-room random sampling
  • Tests: Unit test verifying two consecutive rooms have different descriptions
  • Run bundle exec rake unit, fix any errors

Definition of Done

This issue is complete when all subtasks are done, commit created on the specified branch, PR submitted and merged.

## Metadata - **Commit Message**: `fix(worldgen): remove thread-local flavour_cache memoization for unique room descriptions` - **Branch**: `feature/m3-v11-fix-flavour-cache` ## Background `flavour_cache` uses `||=` per thread per terrain, so every room of a terrain type in a thread gets the same description. ## Expected Behavior Each room gets an independent random sample from its terrain's description pool. ## Acceptance Criteria - [ ] Thread-local `flavour_cache` memoization removed - [ ] Each room samples independently from the description pool - [ ] Consecutive rooms of the same terrain have different descriptions (probabilistically) ## Subtasks - [ ] Replace `flavour_cache` with per-room random sampling - [ ] Tests: Unit test verifying two consecutive rooms have different descriptions - [ ] Run `bundle exec rake unit`, fix any errors ## Definition of Done This issue is complete when all subtasks are done, commit created on the specified branch, PR submitted and merged.
freemo added this to the v1.1.0 milestone 2026-03-14 23:57:24 +00:00
freemo self-assigned this 2026-03-15 04:25:22 +00:00
freemo modified the milestone from v1.1.0 to v1.2.0 2026-03-16 00:28:10 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference: aethyr/Aethyr#59
No description provided.