refactor(simulation): drop PROTOCOL_VERSION from bridge handshake (#874, D-192)
Removes the PROTOCOL_VERSION lockstep handshake across the bridge transports. HandshakeMessage is now an empty marker indicating the server is ready; the client sends StartupMessage next. Field-presence and roundtrip behavioral tests are retained — tautological version-literal assertions were deleted in Sprint 36. After this lands, genuine schema drift surfaces as MessagePack missing-field errors downstream, which is the intended signal per D-192. Client ticket #875 is blocked by this commit and will ride the same wave; server schema changes in #878 (character_archetype removal) also depend on PROTOCOL_VERSION already being gone. types.rs changes are bundled with the broader #877/#878 dead-code sweep in the following commit, since they share the same file. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -33,7 +33,6 @@ fn snapshot_roundtrip_over_unix_socket() {
|
||||
let bridge = LocalBridge::accept(&server_path).expect("failed to accept");
|
||||
|
||||
let snapshot = ObserverSnapshot {
|
||||
version: PROTOCOL_VERSION,
|
||||
tick: 42,
|
||||
game_time: GameTime {
|
||||
day: 0,
|
||||
|
||||
@@ -19,7 +19,6 @@ fn snapshot_roundtrip_over_tcp() {
|
||||
let bridge = TcpBridge::accept_on(listener).expect("failed to accept");
|
||||
|
||||
let snapshot = ObserverSnapshot {
|
||||
version: PROTOCOL_VERSION,
|
||||
tick: 42,
|
||||
game_time: GameTime {
|
||||
day: 0,
|
||||
|
||||
@@ -99,13 +99,9 @@ fn ipc_round_trip_latency() {
|
||||
let handshake_bytes = read_framed(&mut reader)
|
||||
.expect("read handshake")
|
||||
.expect("server closed before sending HandshakeMessage");
|
||||
let handshake: HandshakeMessage =
|
||||
// D-192: HandshakeMessage carries no version field. Verify it deserialises cleanly.
|
||||
let _handshake: HandshakeMessage =
|
||||
rmp_serde::from_slice(&handshake_bytes).expect("deserialize HandshakeMessage");
|
||||
assert_eq!(
|
||||
handshake.protocol_version, PROTOCOL_VERSION,
|
||||
"handshake version mismatch: server={}, client={}",
|
||||
handshake.protocol_version, PROTOCOL_VERSION
|
||||
);
|
||||
|
||||
let make_input = |tick: u64| PlayerInput {
|
||||
tick,
|
||||
|
||||
Reference in New Issue
Block a user