novolis-governance / imports-todo/internal-novolis-audit/math-bcl-refactor-publish-wave.md
Math BCL refactor — publish wave and consumer sweep
Policies that keep the org coherent
dotnetgovernancenovolis
What
Complete the coordinated refactor started in the math BCL plan:
- Ship `Novolis.Math.Topology` on GPR (
2026.1.*) alongside updated Arrays and Geometry. - Confirm all stack consumers use `Ray`, `Sphere`, `AxisAlignedBox` (no
*3public names). - Verify shared `BvhRaycast`, `AxisAlignedBox.RayInterval`, `TriangleBvhBuilder` are the only BVH/slab/triangle paths on CPU (Physics + Rendering CPU backend).
Already landed in repo (audit 2026-05-25):
- Topology project extracted; Geometry references it.
BvhStaticWorlddelegates toTriangleBvh/TriangleBvhBuilder(no localBvhNodecopy).PathTracerEngineusesBvhRaycast.Traverse+TriangleRay.TryHit.CompiledScenestoresTriangleBvhNode(no duplicateBvhNode.cs).
Still open:
- Cross-repo `Directory.Packages.props` pins do not list
Novolis.Math.Topologyexplicitly (transitive via Geometry is fine; add pin only where a project references polygon APIs directly). - `verify-nuget-only.ps1` + full `dotnet test` on Math, Physics, Rendering solutions after pack.
- Release notes: breaking rename table, Topology install guidance.
Why
- Agents and consumers read governance/docs that forbid
Ray3; shipped packages and stale READMEs must match or migrations stall. - Duplicate BVH/slab code was a source of shadow-ray and physics/render drift; centralizing in Geometry is only valuable if every consumer is on the new packages.
- NuGet-only policy requires a publish-before-bump order; partial waves leave ProjectReference temptation.
How
- Math repo
dotnet build/dotnet testonNovolis.Math.slnx.- Pack
Novolis.Math.Arrays,Novolis.Math.Topology,Novolis.Math.Geometryto local feed or GPR.
- Governance gate
pwsh -File novolis-governance/scripts/verify-nuget-only.ps1(exit 0).
- Consumers (bump
Novolis.Math.Geometryto published version; addNovolis.Math.Topologyonly if direct polygon use):
novolis-physics/Directory.Packages.propsnovolis-rendering/Directory.Packages.propsnovolis-simulation/Directory.Packages.propsnovolis-dogfooding/Directory.Packages.props- MonoGame template content if it references
Polygonwithout Geometry transitively.
- Build matrix
novolis-physicsslnxnovolis-renderingslnxnovolis-simulationslnx- Dogfood apps: DoomLite3D, RaytraceHello, SilkTrace*, BouncingBall, ArtillerySimulator.
- Docs
- Refresh any packed README still showing
Ray3underartifacts/nuget-packages-pack/after repack.
Breaking-change policy: Do not add a public Ray3 obsolete alias. List renames in release notes only.
Acceptance
- Zero
Ray3/Sphere3/AxisAlignedBox3in consumer.cs(except obsoleteRay3dshim package — see physics-numerics-package-sunset.md). - Physics raycast and Rendering CPU path trace share Math BVH traversal tests (existing
BvhRaycastTestsgreen). - All consumers restore/build with PackageReference only.