Progressive boot pipeline: evaluate debug staging and add halt-on-failure startup#1191
Conversation
Move pre-loop initialization into progressive-startup.ts and introduce runBootStage() with dependency checks, boot presets, and critical-stage halts. Unifies debug staging with a sandbox→full progression path. Co-authored-by: Noah Cohn <noahc42@gmail.com>
|
Warning Review limit reached
More reviews will be available in 48 minutes and 28 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more credits in the billing tab to continue. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (9)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Evaluates the existing debug staging (
?debug=1+StageLoader) vs limited/full world modes (CORE / FULL / FAST_FULL start buttons), then begins migrating initialization into a progressive boot pipeline that loads subsystems in order, skips dependents with clear logs, and halts on critical failures.Evaluation (what worked / what didn't)
Worked well
DEBUG_STAGESdefault correctly disabled heavy paths (shader warmup, world gen, WASM)Gaps addressed in this PR
?debug=1or?halt=1halts on critical stage failureSTAGE_REGISTRYskips dependents with⏭️ SKIPPED (dependency "x" failed)sandbox → limited → standard → fullmain.tsprogressive-startup.tsStill TODO (follow-up)
deferredVisualsstill duplicated (DeferredLoader + background processor)New usage
Console helpers:
window.__bootPipeline.summary(),.state(),.preset('full')Recommended progression: sandbox → enable
shaderWarmup→worldGeneration→postProcessing/wasm/ deferred stages one at a time.Architecture
src/debug/boot-registry.ts— stage order, dependencies, presetssrc/debug/progressive-bootstrap.ts—runBootStage(), halt, dependency skipsrc/core/progressive-startup.ts— pre-loop boot (core → wasm)src/core/main.ts— shader warmup, Enter world, deferred queues (now viarunBootStage)Testing
npm run test:startup— 19 passednpm run test:progressive-boot— 5 passed (new)npm run build:wasm && npx vite build— succeedsDocs
docs/PROGRESSIVE_BOOT.md— full evaluation + usage guide