3.5 KiB
3.5 KiB
M03-RND-SCHEDULER-001 — Bounded render budget scheduler
Ownership
- Target: M03
- Program: RND
- Owner/Agent ID: sindo-main-codex
- Branch:
work/sindo-main-codex/m03-render-budget-scheduler - Lease expires UTC: 2026-07-18
- Integrator: M03 milestone integrator
Outcome
Extract the streamer's per-frame main-thread operation quotas into a scene-free
RenderBudgetScheduler, preserving existing queue priority and quota values and
stopping permit issuance after renderer teardown cancellation.
Non-goals
- Move queue, worker-task, cache, Node, Resource or RID ownership out of the streamer.
- Change queue ordering, concurrency limits, exported defaults or visual behavior.
- Add a generic job framework, priority graph, time-based adaptive budgeting or dependency.
- Change cache formats, renderer profiles or target milestone status.
Paths
- Exclusive:
src/render/streaming/render_budget_scheduler.gd,src/tools/verify_render_budget_scheduler.gd,docs/modules/render-budget-scheduler.md, this claim - Shared/hotspots:
src/scenes/streaming/streaming_world_loader.gd,docs/modules/world-renderer.md,docs/modules/README.md,RENDER.md,targets/03-renderer-facade.md - Generated/ignored:
.godot, native DLL, generated cache resources and proprietary renderer corpus
Contracts and data
- Input: immutable per-frame map from documented operation lane IDs to non-negative operation limits
- Output: boolean permits and remaining/consumed diagnostic snapshots
- Lifecycle:
begin_frameresets permits;cancelpermanently rejects permits for the current scheduler instance - Queue contents, ordering, task concurrency and schema/cache versions: unchanged
- Consumer:
StreamingWorldLoadermain-thread queue/finalize drains
Dependencies
- Requires: integrated M03 facade and streaming planner on master
650d584 - Blocks: renderer performance regression gate and per-service extraction
- External state: none; tests use synthetic lane limits and no world assets
Verification
- Commands: dedicated scheduler verifier, facade/planner/focus/coordinate regressions, renderer manifest/dry-run and repository gates
- Fixtures: shared lane priority, independent lanes, zero/negative limits, frame reset, unknown lane and cancellation
- Fidelity evidence: operation defaults and loop order are captured before migration; all seven renderer checkpoint plans remain valid
- Performance budget: permit checks are constant-time dictionary operations and create no Node, Resource, worker task, cache entry or RID
Documentation deliverables
- Inline API docs for scheduler lifecycle, permits and diagnostics
- New module specification with input/output table, data-flow, sequence and lifecycle diagrams
- Updated world-renderer flow/ownership/source map, module registry and renderer notes
Simplicity and naming
- Important name:
RenderBudgetScheduler - Simplest approach: one small main-thread service with named quota lanes
- Rejected complexity: generic job graph, callbacks, queue ownership, adaptive timing controller, service container or third-party dependency
- Unavoidable complexity: chunk removal and creation intentionally share one lane so removal retains priority while consuming the same historical budget
- Measured optimization evidence: no optimization claim; exact bounded extraction
Status
- State: active
- Done: claim and extraction contract defined
- Next: implement scheduler, migrate existing bounded loops and add verification/docs
- Blocked by: