Files
open-wc/coordination/claims/M03-RND-WMO-SCENE-RESOURCE-CACHE-001.md
T

5.4 KiB

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: accepted
  • Done: state holder implemented; loader lookup/request/drain/reset/metrics adapters migrated; shutdown regression and required documentation updated
  • Next: WMO I/O/live fallback or liquid service extraction
  • Blocked by:

Handoff

  • Commit: c839294
  • Results: scene cache-state PASS (cases=11, iterations=100, elapsed_ms=40.768; initial direct cold run 43.636ms); render cache-state, WMO queue/planner/registry/resolver/material/shutdown plus 18 adjacent M2/terrain/facade/scheduler/streaming/coordinate regressions PASS; documentation and coordination gates PASS; checkpoint dry-run PASS 7/7.
  • Remaining risks: accepted PackedScenes remain strongly referenced until full shutdown release; ResourceLoader/FileAccess I/O, cache-validation probes and live fallback remain in loader; no proprietary stale/oversize fixture, asset-backed traversal/leak run, p95/p99 or original-client paired evidence. The extracted scene state passed cold; full loader cold execution still needs editor class registration for pre-existing focus/coordinate global classes.
  • Documentation updated: inline public API; new docs/modules/wmo-scene-resource-cache-state.md; render-cache spec, module registry, world renderer and RENDER.md; data-flow/state/sequence diagrams, ownership, threading, file-size/cache-version boundary, failure/recovery and source map included.
  • Integration: merged as ada0fd9; post-merge scene state (cases=11, iterations=100, elapsed_ms=40.113), render state (43.434ms), shutdown, WMO queue/resolver, facade, internal-access (private_symbols=40), 7/7 manifest, documentation and coordination gates passed.