arkavo-org / arkavo-org/VRMMetalKit
Cloth-fidelity post-merge cleanups (from final review)
- Dominant language
- Swift
- Stars
- 6
- Forks
- 2
- Avg merge
- 18h 51m
- Merged PRs (30d)
- 26
Description
Non-blocking follow-ups identified during the final whole-branch review of cloth-collision-fidelity (fix/stagger-collision). Terse list, one issue so they don't scatter:
- **Oracle build caching across frames**: `SkinMeshOracle.build(model:)` is rebuilt 375 times per gate run (~15 min of suite cost); the underlying skinned mesh doesn't change per query within a pass — cache/reuse across frames where safe.
- **`humanoidBone(ofNode:)` map hoist**: same shape of cost as the above — a map built once and reused instead of recomputed per lookup.
- **Bust chains skin the body surface**: the flag perturbs oracle ground truth between flag-off/flag-on passes because Bust spring joints skin body-surface geometry; freeze Bust during oracle build so the ground truth doesn't shift between the two passes being compared.
- **Dual-sabotage repeatability**: the two independent sabotage halves (measurement-stubbed, segment-disabled) in the oracle gate should be re-runnable via env-gated toggles rather than one-off manual scratch builds.
- **`dominantVertexCount` post-filter semantics**: needs a clearer contract for what counts as "dominant" when weights are close/tied.
- **Grid tie-break epsilon below Float ulp**: `SkinMeshOracle.SpatialGrid`'s `1e-12` tie-break constant is below `Float`'s ulp at the magnitudes involved and should be revisited.
- **Large-ring diagonal path untested**: the diagonal-query gap noted in `SpatialGrid.nearest`'s comments (ring growth beyond `fallbackRingThreshold` via the Euclidean-vs-Chebyshev distinction) has no dedicated test.
- **Excluded-inventory vertex-count pins**: `BodySurfacePredicateTests`' excluded-material assertions don't pin vertex counts the way the included set does — drift there is currently silent.
- **Dead asserts and nil==nil grid queries** in `SkinMeshOracleMathTests` — cleanup pass needed.
Reference #381.
Contributor guide
Research direction
Start by reading SkinMeshOracle.build(model:), humanoidBone(ofNode:), SpatialGrid.nearest, BodySurfacePredicateTests, and SkinMeshOracleMathTests, then identify which follow-ups can be isolated. The work is done when the listed caching, Bust/oracle, repeatability, semantics, epsilon, coverage, inventory-pin, and assertion cleanups are implemented and the relevant tests cover them.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- computer-graphics, performance, testing-qa
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100