Prompt file imported from akspa0/parp-tools (
.codex/prompts/wdl-spawn-chooser-runtime-triage.md). Copyright stays with the author.
Use this prompt when the map spawn chooser path is reported broken on real data.
Read First
- gillijimproject_refactor/memory-bank/activeContext.md
- gillijimproject_refactor/src/MdxViewer/memory-bank/activeContext.md
- gillijimproject_refactor/src/MdxViewer/ViewerApp_WdlPreview.cs
Goal
Determine why spawn chooser does not function and classify the failure stage:
- disabled before open (warm-state gate)
- open path falls back to default load
- chooser UI interaction does not set selection
- spawn commit does not apply selected tile
- cache state/error path is stale or inconsistent
Required Inspection Files
- gillijimproject_refactor/src/MdxViewer/ViewerApp.cs
- gillijimproject_refactor/src/MdxViewer/ViewerApp_WdlPreview.cs
- gillijimproject_refactor/src/MdxViewer/Terrain/WdlPreviewCacheService.cs
- gillijimproject_refactor/src/MdxViewer/Terrain/WdlPreviewRenderer.cs
- gillijimproject_refactor/src/MdxViewer/Terrain/WdlDataSourceResolver.cs
Required Triage Steps
- Verify map-row
Spawnenablement logic and exactWdlPreviewWarmStatetransitions. - Trace
OpenWdlPreview(...)and all fallback branches that call default spawn load. - Trace chooser selection state updates (
_selectedSpawnTile) and click hit logic. - Trace
LoadSelectedPreviewMapAtSpawn()and confirm camera/world spawn application. - Confirm whether warmup/cache failures are true data failures or stale state propagation.
- Keep build evidence separate from runtime evidence.
Deliverables
Return all items:
- exact failing stage
- likely root cause location (function + condition)
- smallest safe code slice to change first
- explicit runtime validation plan for Alpha-era and 3.x maps
- gaps where evidence is still missing
Validation Rules
- Do not claim fix based on build alone.
- If no automated tests were added or run, state it explicitly.
- If runtime validation was not performed, state it explicitly.
