beyond-all-reason / beyond-all-reason/RecoilEngine
Add floating point "kitchen sink" sync tests
- Dominant language
- C++
- Stars
- 679
- Forks
- 290
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 40
Description
# Task
Create a dedicated suite of "kitchen sink" sync tests that validate the engine's floating-point handling. This suite is intended to ensure deterministic math operations across different platforms and architectures to prevent multiplayer desyncs.
# Context
As we expand multi-platform support, particularly with architectures like ARM64, floating-point precision and arithmetic differences become a primary vector for multiplayer desyncs. Ensuring bit-exact determinism between architectures (such as ARM64 and x86_64 SSE) requires explicit, ongoing verification.
During the recent development of ARM64 support ([PR #2819](https://github.com/beyond-all-reason/RecoilEngine/pull/2819) and [PR #2857](https://github.com/beyond-all-reason/RecoilEngine/pull/2857)), bulk function calling tests were successfully used to verify deterministic floating-point behavior. We need to formalize this approach by extracting or recreating those tests into a permanent, reusable suite. This will allow us to continuously validate float handling and catch cross-platform regressions before they impact players.
# Acceptance Criteria
* A dedicated test suite is implemented that exercises a wide variety of floating-point operations and math functions within the engine.
* The tests can be executed in a multi-platform environment to compare outputs between architectures (e.g., x86_64 vs ARM64).
* The test suite reliably fails or flags discrepancies if floating-point results are not bit-exact across the tested platforms.
* Documentation is provided on how to run the float sync tests locally and how to interpret the results.
Contributor guide
Research direction
Start by reviewing the bulk function-calling tests from PR #2819 and PR #2857 to identify the floating-point operations and comparison approach worth preserving. Design a dedicated, reusable sync-test suite that runs across x86_64 and ARM64, documents local execution and result interpretation, and flags non-bit-exact outputs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- distributed-systems, testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100