Repository navigation
Recording and replay (#149, second part) - #161
Merged
Merged
Conversation
A world records every call that changes it (160 kinds, field by field, a create's record with the id it made, a state hash after every step, the geometry once each), and a player replays it into a world it restores in place (dynamics.reset_world, snapshot.restore_world), with keyframes under a budget, bodies in creation order, a pre-step pause, the recording's info, and the reference's failure and divergence rules. Calling every recorded function from the dispatcher, and ae check on every module (now in the gate), found three latent errors in code no test reached: body_apply_force, body_get_local_point_velocity, and mesh calling hull without importing it (aether#2613, aether#2614). Aether 0.796.0.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The second part of #149: recording and replay, as the reference's
recording.candrecording_replay.chave them. The world queries and the name cache are the third part, so #149 stays open.Recording
aephysics.recording:create_recording,start_recording,stop_recording,save_recording_to_file,load_recording_from_file,destroy_recording._internalbody.Replay
The player matches the reference's
b3RecPlayerfunction for function: step, sub-step, restart, seek, info, worker count, keyframe policy, body ordinals and validate.dynamics.reset_world, the reference's deserialize-into-shell, andsnapshot.restore_worldon top of it. Workers, callbacks, filters and user data are kept.Bugs found on the way
ae buildtype-checks only what the program reaches. Calling every recorded function from the dispatcher exposed one latent error, and runningae checkon every module found two more:body_apply_forceadded aVec3to theVec3fforce accumulator, so it never compiled. It had no caller until now.body_get_local_point_velocityreadBodyStatefields that do not exist.meshcalledhull.hull_proxywithout importinghull; it only worked becausemanifoldimports it.All three are fixed and now tested.
scripts/test.shrunsae checkon every module first, and a warning fails it too. The Aether side is filed as aether#2613 (uncalled functions in imported modules are never checked) and aether#2614 (ae buildandae checkdisagree about calls into a module that isn't imported).Tests
test_recording.ae, 116 checks:test_snapshot.ae, 63 checks: restore in place keeps the id, workers and user data, steps on alike and saves to the same bytes; a refused restore leaves the world empty and whole, and leaks nothing.test_dynamics.ae: a force at a point equals a force at the centre plus its arm's torque, bit for bit; local and world point velocities agree on a turned body.Pins
Aether 0.796.0 (latest release) and aeb v0.325 (latest). The whole gate, golden trace included, passed locally on 0.796.0.