test coverage on stable surfaces before beta.1

Author: DennisSmolekCreated Jul 27, 2026Updated Sep 30, 2026
Labelsv10beta

Several files that ship as stable in 10.0 are less covered than the surfaces that ship experimental.

Measured on origin/v10@ca63ccdb, line coverage:

File Line coverage Ships as
packages/fiber/src/core/components/Environment/Environment.tsx 42.68% stable
packages/fiber/src/core/hooks/useEnvironment.tsx 54.68% stable
packages/fiber/src/core/visibility.ts 53.78% stable
packages/fiber/src/webgpu/hooks/useBuffers.tsx 65.74% experimental

Package-wide lines are 78.65%, so these sit well below the average — and below the hooks that carry an explicit "this API may change" banner. The experimental surfaces make no compatibility promise; these three do.

visibility.ts is worth prioritising: two real defects were recently found in onOccluded handler registration — stale closures behind a handler-count gate, and spurious re-fires after rebuild — both in code paths this coverage gap left unguarded.

Not an alpha.3 blocker. Proposed as a beta.1 gate.

Acceptance: meaningful behavioural coverage on all three, not just line coverage.

Source: pmndrs/react-three-fiber