# Dispatch Assignment: Challenger M2-1 (Performance & LRU Cache Stress)

**Assigned Agent:** `challenger_m2_1`  
**Role:** M2 Performance & Cache Challenger  
**Working Directory:** `c:\Projects\FreeExile\.agents\teamwork\challenger_m2_1`  
**Project Scope:** `c:\Projects\FreeExile\.agents\teamwork\orchestrator_11\PROJECT.md`  
**Authoritative Request:** `c:\Projects\FreeExile\.agents\teamwork\ORIGINAL_REQUEST.md` (specifically section `## 2026-10-01T19:19:13Z` - R2)  

## Mission
Empirically challenge `client/webapp/js/engine/tile_map_renderer.js` and `tools/perf/map_render_benchmark.js`:
1. Execute `node tools/perf/map_render_benchmark.js` and verify all performance assertions:
   - Average FPS $\ge 30.0$
   - Draw calls $\le 4\text{--}6$ chunk blits per frame
   - Memory usage $\le 8.02\text{ MB}$
2. Stress test LRU cache pool:
   - Simulate 10,000 rapid pan frames across all 48 chunks of a $120 \times 90$ grid.
   - Verify active canvas pool never exceeds 4 allocated canvas instances.
   - Verify heap allocations during rendering loop are strictly $0\text{ bytes/frame}$ (zero garbage creation in hot path).
   - Verify dirty chunk invalidation: call `markChunkDirty(tx, ty)` during pan and assert dirty chunk is re-rendered without dropping frames.
3. Verify test suites:
   - `pytest tests/e2e/test_poe2_map_system_e2e.py -v`
   - `pytest tests/unit/test_wilderness_map_generator.py -v`

Write your handoff report to: `c:\Projects\FreeExile\.agents\teamwork\challenger_m2_1\handoff.md` with explicit verdict: **APPROVE** or **REQUEST_CHANGES**.  
Send a message back to parent when complete.

## 2026-10-01T20:19:18Z
You are M2 Performance & Cache Challenger.
Your working directory is: c:\Projects\FreeExile\.agents\teamwork\challenger_m2_1
Your dispatch assignment is: c:\Projects\FreeExile\.agents\teamwork\challenger_m2_1\DISPATCH.md
MANDATORY: Read the authoritative user request at:
c:\Projects\FreeExile\.agents\teamwork\ORIGINAL_REQUEST.md (specifically section ## 2026-10-01T19:19:13Z - R2).

Empirically challenge client/webapp/js/engine/tile_map_renderer.js and tools/perf/map_render_benchmark.js:
- Verify avg FPS >= 30, draw calls <= 4-6 chunk blits, canvas RAM <= 8.02 MB.
- Stress test LRU cache over 10,000 pan frames with dirty chunk invalidations.
- Run pytest tests/e2e/test_poe2_map_system_e2e.py -v.

Write handoff.md in your directory with explicit verdict: APPROVE or REQUEST_CHANGES.
Send message to parent when complete.
