feat(session): reject movement a client could not have made - #154
Open
xRookieFight wants to merge 1 commit into
Open
feat(session): reject movement a client could not have made#154xRookieFight wants to merge 1 commit into
xRookieFight wants to merge 1 commit into
Conversation
xRookieFight
force-pushed
the
feat/movement-validation
branch
from
September 3, 2026 10:39
f687fc4 to
013f976
Compare
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.
Description
Movement was taken at face value: a client could report any position at all and the server would accept it, so flying and cross-world teleports cost nothing to fake. Attack reach was also a flat eight blocks regardless of game mode.
on_player_movealready sent is now shared with the rejection path, since the client has to be put back either way.Some existing movement tests moved players several blocks in a single report to exercise scheduling and coalescing. Those distances were never the point of the tests, so they now use steps a player could actually take; every assertion they make is unchanged.
Related issue
Part of #146
Not in this PR: server-side collision resolution, so clipping through blocks is still not caught. That needs the block collision shapes to be complete enough to trust, and a wrong answer there teleports legitimate players into walls. Break-time verification, placement reach and the per-connection packet rate limit already existed and are untouched.
Checklist
v -check .is cleanv testgreen formovement_validation_test.v,movement_test.v,world_movement_test.v,world_switch_movement_test.v,combat_test.v,world_combat_test.v,effective_position_test.v,world_soak_test.v,world_concurrency_test.vpub/capitalized exports, no import cycles, minimal comments)world_call/wr.submit/WorldTx), never through a global Hub actor