Skip to content

docs: 2026-07-16 full audit - sync every doc to as-built engine reality#117

Merged
proggeramlug merged 2 commits into
mainfrom
docs/audit-2026-07-16
Jul 16, 2026
Merged

docs: 2026-07-16 full audit - sync every doc to as-built engine reality#117
proggeramlug merged 2 commits into
mainfrom
docs/audit-2026-07-16

Conversation

@proggeramlug

@proggeramlug proggeramlug commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Full audit of docs/ (plus CLAUDE.md, README.md, bloom-renderer-spec-v2.md) against the current code and git history. Eight parallel audit passes; every verified discrepancy fixed. 35 files, +462/-184.

Headline corrections

  • HW-GI opt-in (66dad5b) was reflected in zero docs. PT docs, perf README, lumen-roadmap, and the renderer spec now state: SW GI is the shipping default; HW ray query is opt-in via BLOOM_HW_GI=1 / BLOOM_PT / --pt (measured +20 ms/frame on the 760M, b34c1f3).
  • watchOS docs said 'No 3D' / CLAUDE.md said 'README only' — the crate is a full validated backend (SwiftUI Canvas 2D + SceneKit 3D + own .glb loader). Both rewritten; visionos/ added to the architecture tree.
  • Stale statuses: perf 003/004/007/007a/007b/013 said 'open' for landed features; 005 said 'prototype failed' but was revived and landed as EN-044; 014 claimed the SDF disk cache never landed (it did — sdf_cache.rs); 011 now documents the define_core_ffi! consolidation.
  • tickets.md: EN-054 marked shipped (d30fba9), EN-040 registered retroactively, EN-021/022/023 'pending merge' cleared, EN-058(c) struck as measured, EN-060/EN-062 numbering note.
  • RFCs: 0001 'Draft' → implemented (ABI v3) + new §10 as-built map (real node names, 8/256 light arrays, no aliasing/pass-merging); 0002 gains as-built notes — notably setSunDirection does not drive the directional light.
  • Verified counts/signatures: ~470 FFI functions (121 physics), joint UBO 1024×mat4 (64 KB), Vertex3D stride 96 (tangent field), updateModelAnimation 8-arg with rotY in radians, EN-028 mixer + EN-055 instantiateAnimation documented, web glue is wrapFfiForI64 pass-through (__perryToJsValue never existed in the glue).
  • Two stale code comments fixed alongside (comment-only): graph.rs 'NOT yet wired' and pt_pass.rs à-trous count — the array runs six iterations (1/2/4/8/16/1); PT-3b corrected to match.

Audited clean, no changes needed: crash-triage-windows.md, ios-target.md, world-format.md.

Note: build-web is red on main independently of this PR — EN-055 (323a6c9) introduced ungated anim_mixer/gltf/StagedModel references in models.rs that break --no-default-features --features web. Every main run since PR #107 fails the same job; now registered as EN-063 in tickets.md (second commit) with root cause and fix sketch.

Summary by CodeRabbit

  • Documentation
    • Updated platform guidance for watchOS, Web/WASM, physics, animation, and cross-platform APIs.
    • Added Scene, VFX, World, Mobile, and Physics modules to the product overview.
    • Clarified supported physics features, animation mixer and root-motion APIs, and Web asset handling.
    • Updated performance and rendering documentation to reflect landed depth prepass, shadow caching, SSR, SDF, and visibility improvements.
    • Documented software GI as the default, with hardware ray-query GI available through explicit opt-in settings.
    • Marked multiple renderer and material RFCs as implemented, including known as-built differences.

Eight parallel audits of docs/ (+ CLAUDE.md/README/spec) against the code
and git history; every verified discrepancy fixed:

- HW-GI opt-in (66dad5b) reflected everywhere it was missing: PT docs,
  perf README, lumen-roadmap, renderer spec. SW GI is the documented
  shipping default; BLOOM_HW_GI=1 / BLOOM_PT / --pt is the opt-in.
- Stale statuses: perf 003/004/007/007a/007b/013 'open' -> landed;
  005 'prototype failed' -> revived and landed as EN-044; 014's SDF disk
  cache 'not landed' -> landed (sdf_cache.rs); 011 notes the ffi_core
  define_core_ffi! consolidation that replaced per-platform copies.
- tickets.md: EN-054 marked shipped (d30fba9), EN-040 registered (it
  shipped unregistered), EN-021/022/023 'pending merge' cleared,
  EN-058(c) struck as measured, EN-060/EN-062 numbering note added.
- RFC 0001 'Draft' -> implemented (ABI v3) with a new §10 as-built map;
  RFC 0002 gains as-built notes (setSunDirection does NOT drive the
  directional light; equirect IBL, CPU-baked LUTs, real signatures).
- watchOS docs rewritten: SceneKit 3D + glb loader exist ('No 3D' was
  false); CLAUDE.md's 'README only' line replaced; visionos added.
- Counts and signatures verified against source: ~470 FFI functions
  (121 physics), joint UBO 1024 not 128, Vertex3D stride 96 with
  tangent, updateModelAnimation 8-arg with rotY in radians, mixer API
  (EN-028) + instantiateAnimation (EN-055) documented, web glue is
  wrapFfiForI64 pass-through (no __perryToJsValue).
- Two stale code comments fixed alongside: graph.rs no longer claims
  the render graph is unwired; pt_pass.rs a-trous comment says six
  iterations (1/2/4/8/16/1) - PT-3b doc corrected to match.

Full audit trail in the session; crash-triage-windows.md, ios-target.md
and world-format.md audited clean, no changes needed.
@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The PR aligns architecture, platform, FFI, renderer, physics, animation, performance, RFC, and ticket documentation with current as-built behavior, including Web/WASM and watchOS integration details and opt-in hardware GI behavior.

Changes

Engine documentation alignment

Layer / File(s) Summary
Platform, FFI, and runtime integration
CLAUDE.md, README.md, docs/design-api.md, docs/physics.md, docs/watchos-target.md, docs/web-target.md, docs/migration-0.5.md
Updates platform descriptions, Physics FFI generation, Web/WASM argument routing, watchOS rendering, physics support, and API examples.
Renderer, GI, and performance status
bloom-renderer-spec-v2.md, docs/perf/*, docs/pt/*, native/shared/src/renderer/*
Records landed renderer work, revised module paths, SW GI defaults, opt-in HW ray query, shadow/depth implementations, SDF caching, and six-pass SVGF filtering.
Material graph and atmospheric sky audits
docs/rfc/0001-material-render-graph.md, docs/rfc/0002-atmospheric-sky.md
Marks implemented RFC phases and documents ABI, render-graph, atmospheric-sky, baking, and API divergences.
Animation instancing and skinning documentation
docs/skeletal-animation.md
Documents shared animation clips, per-instance mixers, root motion, updated joint buffers, motion vectors, and the expanded TypeScript API.
Shipped ticket ledger corrections
docs/tickets.md
Updates shipped ticket records for rendering, GI, animation, cloud shadows, SDF caching, measured HW costs, numbering, and the web build issue.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related issues

  • Issue 30 — The PR updates documentation for the landed bind-group caching work associated with this issue.

Possibly related PRs

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning The description is relevant, but it does not follow the required template sections for Summary, Test plan, and Notes for reviewers. Rewrite it with the repo template: add a Summary, a Test plan with relevant checkboxes, and Notes for reviewers with any risks or follow-ups.
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly summarizes the audit-style docs sync and matches the main change.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/audit-2026-07-16

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/perf/013-lumen-surface-cache.md`:
- Line 3: Update the 013-lumen-surface-cache document’s approach and cost-model
references from 256×256 cards to the landed 64×64 resolution, and recalculate
the associated bandwidth and VRAM estimates consistently. Keep the as-built
64×64 summary and other unrelated performance details unchanged.

In `@docs/perf/014-lumen-mesh-sdfs.md`:
- Around line 117-120: Rename the “Disk cache for MDFs” row in the feature table
to use SDF terminology consistently, while preserving its existing plan and
landed details.

In `@docs/skeletal-animation.md`:
- Line 186: Update the legacy API example’s updateModelAnimation call to define
the rotation value before use, either by passing 0.0 directly or declaring const
rotY = 0.0 immediately beforehand.

In `@docs/web-target.md`:
- Line 39: Update the architecture and “How It Works” references in
docs/web-target.md to use the generated artifact name bloom_web_bg.wasm
consistently, matching the wasm-pack output; alternatively, explicitly document
any rename before referring to bloom_web.wasm.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: b38a3689-8e88-4e85-b6be-e3a6c56a4f6f

📥 Commits

Reviewing files that changed from the base of the PR and between 39f4eaa and 715e0cd.

📒 Files selected for processing (35)
  • CLAUDE.md
  • README.md
  • bloom-renderer-spec-v2.md
  • docs/design-api.md
  • docs/migration-0.5.md
  • docs/perf/003-stochastic-ssr.md
  • docs/perf/004-cached-shadow-maps.md
  • docs/perf/005-depth-prepass.md
  • docs/perf/006-shadow-pass-culling.md
  • docs/perf/007-prep-wgpu-upgrade.md
  • docs/perf/007a-lumen-screen-probes-sw.md
  • docs/perf/007b-lumen-screen-probes-hw.md
  • docs/perf/008-visibility-buffer.md
  • docs/perf/009-gpu-driven-rendering.md
  • docs/perf/010-async-compute.md
  • docs/perf/011-cross-platform-ffi.md
  • docs/perf/012-remaining-bind-group-caches.md
  • docs/perf/013-lumen-surface-cache.md
  • docs/perf/014-lumen-mesh-sdfs.md
  • docs/perf/016-lumen-importance-sampling.md
  • docs/perf/README.md
  • docs/perf/lumen-roadmap.md
  • docs/physics.md
  • docs/pt/PT-1-progressive-megakernel.md
  • docs/pt/PT-3b-svgf-denoiser.md
  • docs/pt/PT-5-integration-and-restir.md
  • docs/pt/pt-roadmap.md
  • docs/rfc/0001-material-render-graph.md
  • docs/rfc/0002-atmospheric-sky.md
  • docs/skeletal-animation.md
  • docs/tickets.md
  • docs/watchos-target.md
  • docs/web-target.md
  • native/shared/src/renderer/graph.rs
  • native/shared/src/renderer/pt_pass.rs

# 013 — Lumen Surface Cache (Mesh Cards)

**Effort:** 1-2 weeks · **Expected gain:** HW bounce reaches full Lumen quality · **Status:** open
**Effort:** 1-2 weeks · **Expected gain:** HW bounce reaches full Lumen quality · **Status:** landed (V3 — as-built: 64×64 cards in a 4096² atlas, per-frame drained capture queue; see the [README](README.md) 013 row for the landed summary)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Synchronize the card-resolution details.

The new as-built summary says cards are 64×64, but this document still specifies 256×256 cards in the approach and cost model. Update the stale 256×256 references and related bandwidth/VRAM estimates before treating this as the authoritative landed record.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/perf/013-lumen-surface-cache.md` at line 3, Update the
013-lumen-surface-cache document’s approach and cost-model references from
256×256 cards to the landed 64×64 resolution, and recalculate the associated
bandwidth and VRAM estimates consistently. Keep the as-built 64×64 summary and
other unrelated performance details unchanged.

Comment on lines 117 to +120
| Sub-feature | Plan | Landed |
|-------------------------------|-------------------|------------------------------------|
| Per-mesh MDFs | GPU jump-flood | Brute-force point-triangle (V1) |
| Disk cache for MDFs | Yes | **Not landed** (in-memory only) |
| Disk cache for MDFs | Yes | Landed post-V15 (`sdf_cache.rs`, issue #22) |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Use SDF terminology consistently.

The table says “Disk cache for MDFs,” while the ticket, implementation path, and later text refer to per-mesh SDFs. Rename this row to avoid documenting a different or nonexistent artifact.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/perf/014-lumen-mesh-sdfs.md` around lines 117 - 120, Rename the “Disk
cache for MDFs” row in the feature table to use SDF terminology consistently,
while preserving its existing plan and landed details.

// In your game loop:
const time = getTime(); // seconds since start
updateModelAnimation(animHandle, 0, time, 1.0, playerX, playerY, playerZ);
updateModelAnimation(animHandle, 0, time, 1.0, playerX, playerY, playerZ, rotY);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect the relevant section of the documentation with line numbers.
sed -n '150,210p' docs/skeletal-animation.md | cat -n

Repository: Bloom-Engine/engine

Length of output: 3856


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Print the relevant section and search for any rotY definition in the file.
echo "== relevant section =="
sed -n '150,210p' docs/skeletal-animation.md | cat -n

echo
echo "== rotY occurrences =="
rg -n '\brotY\b' docs/skeletal-animation.md || true

Repository: Bloom-Engine/engine

Length of output: 4352


Define rotY in the legacy API example. The snippet passes rotY without declaring it, so the example is incomplete as written. Use 0.0 directly or add const rotY = 0.0 before the call.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/skeletal-animation.md` at line 186, Update the legacy API example’s
updateModelAnimation call to define the rotation value before use, either by
passing 0.0 directly or declaring const rotY = 0.0 immediately beforehand.

Comment thread docs/web-target.md

This runs:
1. `wasm-pack build` to compile `native/web/` → `bloom_web.wasm` + JS bindings
1. `wasm-pack build` to compile `native/web/` → `pkg/bloom_web_bg.wasm` + `pkg/bloom_web.js` bindings

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== file list =="
git ls-files 'docs/web-target.md' 'build.sh' 'native/web' 2>/dev/null || true

echo
echo "== docs/web-target.md outline =="
ast-grep outline docs/web-target.md --view expanded || true

echo
echo "== docs/web-target.md relevant lines =="
nl -ba docs/web-target.md | sed -n '1,220p'

echo
echo "== search for bloom_web file names =="
rg -n 'bloom_web(_bg)?\.wasm|bloom_web\.js|wasm-pack build|rename|mv .*\.wasm' docs build.sh native -S || true

Repository: Bloom-Engine/engine

Length of output: 649


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== build-related files =="
fd -a 'build.sh|.*\.sh$' . | sed -n '1,120p'

echo
echo "== search for wasm rename/copy behavior =="
rg -n 'bloom_web_bg\.wasm|bloom_web\.wasm|mv .*wasm|cp .*wasm|rename' . -S

echo
echo "== docs/web-target.md around the cited lines =="
nl -ba docs/web-target.md | sed -n '30,170p'

Repository: Bloom-Engine/engine

Length of output: 2634


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== docs/web-target.md lines 1-170 =="
sed -n '1,170p' docs/web-target.md | cat -n

echo
echo "== native/web/build.sh lines 1-180 =="
sed -n '1,180p' native/web/build.sh | cat -n

Repository: Bloom-Engine/engine

Length of output: 12041


Use the generated wasm name consistently. The architecture and “How It Works” steps still reference bloom_web.wasm, but the build outputs pkg/bloom_web_bg.wasm and copies it unchanged. Update those references, or document a rename, so readers load the correct artifact.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/web-target.md` at line 39, Update the architecture and “How It Works”
references in docs/web-target.md to use the generated artifact name
bloom_web_bg.wasm consistently, matching the wasm-pack output; alternatively,
explicitly document any rename before referring to bloom_web.wasm.

@proggeramlug
proggeramlug merged commit 57de189 into main Jul 16, 2026
9 of 10 checks passed
@proggeramlug
proggeramlug deleted the docs/audit-2026-07-16 branch July 16, 2026 20: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.

1 participant