# M03-RND-WMO-SCENE-RESOURCE-CACHE-001 — WMO cached-scene resource state ## Ownership - Target: M03 - Program: RND - Owner/Agent ID: sindo-main-codex - Branch: `work/sindo-main-codex/m03-wmo-scene-resource-cache` - Lease expires UTC: 2026-07-20 - Integrator: M03 milestone integrator ## Outcome Extract cached-WMO `PackedScene`, negative-cache and asynchronous request state from the loader while preserving loader-owned file limits, I/O and scene-cache version validation. ## Non-goals - Call `ResourceLoader`/`FileAccess`, construct `.tscn` paths or measure files. - Instantiate scenes or validate WMO builder cache metadata/version. - Own live WMO prototypes, placement/build jobs, instantiated Nodes or RIDs. - Change missing/oversize/request-error fallback behavior or debug output. - Claim asset-backed WMO fidelity, leak acceptance or traversal p95/p99. ## Paths - Exclusive: `src/render/wmo/wmo_scene_resource_cache_state.gd`, `src/tools/verify_wmo_scene_resource_cache_state.gd`, `docs/modules/wmo-scene-resource-cache-state.md`, this claim - Shared/hotspots: `src/scenes/streaming/streaming_world_loader.gd`, `src/tools/verify_render_runtime_cache_shutdown.gd`, `docs/modules/wmo-render-resource-cache-state.md`, `docs/modules/world-renderer.md`, `docs/modules/README.md`, `RENDER.md`, `targets/03-renderer-facade.md` - Generated/ignored: `.godot`, native DLL, generated ADT/WMO resources, caches and proprietary renderer corpus ## Contracts and data - State keys are loader-normalized relative WMO paths copied as `String`. - Cached values are loader-validated `PackedScene` references. - Pending values are `.tscn` paths for loader-owned threaded requests. - Missing state accepts absent file, oversize, request-start, load and validation failures. - Terminal pending removal precedes validated-scene or missing adoption. - Transient clear retains accepted scenes; full clear releases all state. - Cache metadata/version, file-size limit, profile and fallback rules are unchanged. ## Dependencies - Requires: current master `e690756`; accepted WMO render Resource cache state - Blocks: further WMO I/O/fallback and materialization decomposition - External state: none; verification uses synthetic PackedScenes and paths ## Verification - Commands: dedicated lifecycle/request/missing/reset/diagnostics/source/timing verifier; WMO render-cache/queue/planner/registry/resolver/material/shutdown plus adjacent renderer/streaming/coordinate/documentation/coordination gates - Fixtures: synthetic PackedScene instances and normalized relative/cache paths - Fidelity evidence: exact current cached-scene/missing/request transitions preserved - Performance budget: 100 cycles over 256 scene/request keys under 1 second ## Documentation deliverables - Inline public API docs - Module specification with inputs/outputs, ownership and source map - Data-flow, lifecycle/state and loader interaction sequence diagrams - World-renderer, module registry, render-cache and RENDER status updates ## Simplicity and naming - Important names introduced: `WmoSceneResourceCacheState` - Simplest considered solution: one RefCounted around three Dictionaries - Rejected complexity/abstractions: generic cache hierarchy, callbacks, signals, mutexes, ResourceLoader wrapper, persistence layer or render/scene cache merger - Unavoidable complexity and justification: missing can be recorded without a pending request, and partial reset must retain validated PackedScenes - Measured optimization evidence: bounded synthetic store/request/reset loop ## Status - State: claimed - Done: lifecycle and four negative-cache sources identified - Next: implement state holder, migrate loader adapters, verify and document - Blocked by: ## Handoff - Commit: - Results: - Remaining risks: - Documentation updated: