Skip to content

Harden core update loops and primitives - #57

Merged
S1mplector merged 2 commits into
stablefrom
agent/core-loop-hardening
Jul 28, 2026
Merged

Harden core update loops and primitives#57
S1mplector merged 2 commits into
stablefrom
agent/core-loop-hardening

Conversation

@S1mplector

Copy link
Copy Markdown
Owner

What changed

  • bounded engine, tween, timeline, particle, and physics catch-up work after lag spikes
  • made scene, tween, and physics callback mutations deterministic and exception-safe
  • hardened camera, rigid-body, timing, and vector primitives against non-finite inputs and overflow
  • reused physics broadphase buckets, pairs, bounds, and collision scratch state to reduce hot-path allocation
  • added regression coverage for extreme deltas, callback mutation, stale cue catch-up, invalid numeric state, and particle caps

Why

Several core loops could perform unbounded work after a debugger pause or accept NaN/infinite values that poisoned subsequent frames. Scene and physics callbacks could also mutate live collections mid-traversal, producing skipped work or inconsistent state.

Impact

Runtime updates now remain bounded and structurally consistent under lag spikes, callback failures, and malformed numeric inputs, while common physics and geometry paths allocate less memory.

Validation

  • ./gradlew :core:clean :core:test --tests 'com.jvn.core.tween.*' --tests 'com.jvn.core.physics.*' --tests 'com.jvn.core.engine.*' --tests 'com.jvn.core.math.*' --tests 'com.jvn.core.graphics.Camera2DTest' --tests 'com.jvn.core.animation.TimelineRunnerTest' --tests 'com.jvn.core.scene2d.*StabilityTest'
  • git diff --check

@S1mplector
S1mplector merged commit 9984275 into stable Jul 28, 2026
5 checks passed
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