Skip to content

Progressive boot pipeline: evaluate debug staging and add halt-on-failure startup#1191

Merged
ford442 merged 1 commit into
mainfrom
cursor/progressive-boot-startup-c037
Jun 11, 2026
Merged

Progressive boot pipeline: evaluate debug staging and add halt-on-failure startup#1191
ford442 merged 1 commit into
mainfrom
cursor/progressive-boot-startup-c037

Conversation

@ford442

@ford442 ford442 commented Jun 11, 2026

Copy link
Copy Markdown
Owner

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

  • Per-stage colored console logs made isolation practical
  • Sandbox DEBUG_STAGES default correctly disabled heavy paths (shader warmup, world gen, WASM)
  • CORE / FULL buttons gave a user-facing fast path without debug URLs
  • Error boundary + loading-screen race guard prevented silent 0% hangs

Gaps addressed in this PR

Gap Fix
Failed stages logged but boot continued ?debug=1 or ?halt=1 halts on critical stage failure
No dependency awareness STAGE_REGISTRY skips dependents with ⏭️ SKIPPED (dependency "x" failed)
Debug staging vs world modes unrelated Boot presets: sandbox → limited → standard → full
Init logic embedded in 900-line main.ts Pre-loop pipeline extracted to progressive-startup.ts

Still TODO (follow-up)

  • Panel checkbox toggles still require reload
  • deferredVisuals still duplicated (DeferredLoader + background processor)
  • World mode buttons (CORE/FULL) not yet mapped to boot presets automatically

New usage

?debug=1&boot=sandbox     # Minimal playable scene, halt on critical failure
?debug=1&boot=standard    # Through game loop; Enter triggers world
?halt=1                   # Halt without debug panel

Console helpers: window.__bootPipeline.summary(), .state(), .preset('full')

Recommended progression: sandbox → enable shaderWarmupworldGenerationpostProcessing / wasm / deferred stages one at a time.

Architecture

  • src/debug/boot-registry.ts — stage order, dependencies, presets
  • src/debug/progressive-bootstrap.tsrunBootStage(), halt, dependency skip
  • src/core/progressive-startup.ts — pre-loop boot (core → wasm)
  • src/core/main.ts — shader warmup, Enter world, deferred queues (now via runBootStage)

Testing

  • npm run test:startup — 19 passed
  • npm run test:progressive-boot — 5 passed (new)
  • npm run build:wasm && npx vite build — succeeds

Docs

  • docs/PROGRESSIVE_BOOT.md — full evaluation + usage guide
Open in Web Open in Cursor 

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>
@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@ford442, we couldn't start this review because you've reached your PR review rate limit.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 823b268d-5e2d-4f32-a7e0-5e3a330374bd

📥 Commits

Reviewing files that changed from the base of the PR and between 5272057 and 9b33cdd.

📒 Files selected for processing (9)
  • docs/PROGRESSIVE_BOOT.md
  • package.json
  • src/core/main.ts
  • src/core/progressive-startup.ts
  • src/debug/boot-registry.ts
  • src/debug/index.ts
  • src/debug/panel.ts
  • src/debug/progressive-bootstrap.ts
  • tests/progressive-boot.test.mjs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cursor/progressive-boot-startup-c037

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ford442 ford442 marked this pull request as ready for review June 11, 2026 07:50
@ford442 ford442 merged commit b9ac390 into main Jun 11, 2026
2 of 4 checks passed
@ford442 ford442 deleted the cursor/progressive-boot-startup-c037 branch June 11, 2026 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants