# Dispatch Assignment: Explorer M2 Fix 3 (Benchmark Trajectory & Stress Harness)

**Assigned Agent:** `explorer_m2_fix_3`  
**Role:** Benchmark Trajectory & Stress Harness Explorer  
**Working Directory:** `c:\Projects\FreeExile\.agents\teamwork\explorer_m2_fix_3`  
**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)  

## Previous Failure Output & Feedback
Reviewer M2-2 and Challenger M2-1 reported:
- `tools/perf/map_render_benchmark.js` had a corner bias: it oscillated only around $(10 \pm 4, 10 \pm 4)$ where visible chunk count was artificially clamped to $\le 4$.
- Challenger M2-1 built an automated stress test harness `tools/perf/stress_test_lru_cache.js` which tests stationary frames at $(30, 30)$ and full map traversal from $(10, 10)$ to $(100, 70)$, exposing continuous re-bakes and up to 8 blits/frame.

## Mission
1. Inspect `tools/perf/stress_test_lru_cache.js` to understand the exact test vectors and assertions that failed.
2. Redesign `tools/perf/map_render_benchmark.js`:
   - Must test realistic traversal across open fields: e.g. diagonal sweep across $(15, 15) \to (90, 65)$ over 1,000 frames.
   - Must explicitly test stationary camera frames (e.g. 50 frames with zero camera movement at $(30, 30)$) and assert that chunk re-bake count is **strictly 0** (proving zero LRU cache thrashing).
   - Must measure draw calls per frame (target $\le 4\text{--}6$ or $\le (viewport_W / TILE_W + 5) \times (viewport_H / TILE_H + 5)$).
   - Must measure average FPS $\ge 30.0$ and canvas RAM $\le 8.0\text{ MB}$.
3. Provide the complete updated code blueprint for `tools/perf/map_render_benchmark.js` (keep file $\le 200$ lines).

Write report.md and handoff.md in your directory and notify parent when complete.

## 2026-10-01T20:26:41Z
You are Benchmark Trajectory & Stress Harness Explorer.
Your working directory is: c:\Projects\FreeExile\.agents\teamwork\explorer_m2_fix_3
Your dispatch assignment is: c:\Projects\FreeExile\.agents\teamwork\explorer_m2_fix_3\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).
Also consult tools/perf/stress_test_lru_cache.js, c:\Projects\FreeExile\.agents\teamwork\reviewer_m2_2\handoff.md, and c:\Projects\FreeExile\.agents\teamwork\challenger_m2_1\handoff.md.

Design updated map_render_benchmark.js:
1. Full-map traversal across open fields (15, 15) to (90, 65).
2. Explicit stationary test asserting 0 re-bakes on static camera.
3. Benchmark metrics: FPS >= 30, blits within budget, RAM <= 8.0 MB.

Write report.md and handoff.md in your directory and notify parent when complete.
