test(simulation): update protocol fixtures and golden for Sprint 18

Regenerated MsgPack fixtures for protocol v14 (examine_result and
character_pressure fields). Updated golden test, serialization
assertions, and cross-language fixture generator.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-25 09:50:48 +01:00
co-authored by Claude Opus 4.6
parent 276538cde1
commit 31ae462cb2
16 changed files with 20 additions and 3 deletions
+1
View File
@@ -183,6 +183,7 @@ pub fn setup_gauntlet(app: &mut App) {
profile,
profile.initial_stance(),
PlayerMoveCooldown::default(),
crate::simulation::pressure::CharacterPressure::default(),
))
.id();
registry.register(player);
+2
View File
@@ -66,6 +66,8 @@ fn snapshot_roundtrip_over_unix_socket() {
conversation_events: vec![],
conversation_ended: vec![],
follow_state: None,
examine_result: None,
character_pressure: None,
rng_seed: None,
};
+2
View File
@@ -52,6 +52,8 @@ fn snapshot_roundtrip_over_tcp() {
conversation_events: vec![],
conversation_ended: vec![],
follow_state: None,
examine_result: None,
character_pressure: None,
rng_seed: None,
};
+4
View File
@@ -41,6 +41,8 @@ fn fixture_snapshot(tick: u64, entities: Vec<VisibleEntity>) -> ObserverSnapshot
conversation_events: vec![],
conversation_ended: vec![],
follow_state: None,
examine_result: None,
character_pressure: None,
rng_seed: None,
}
}
@@ -227,6 +229,8 @@ fn generate_msgpack_fixtures() {
conversation_events: vec![],
conversation_ended: vec![],
follow_state: None,
examine_result: None,
character_pressure: None,
rng_seed: None,
};
write_fixture(
+3 -1
View File
@@ -2,6 +2,7 @@
"blocked_entities": [
2
],
"character_pressure": null,
"conversation_ended": [],
"conversation_events": [],
"current_monologue": null,
@@ -38,6 +39,7 @@
"z": 0
}
],
"examine_result": null,
"follow_state": null,
"game_time": {
"day": 0,
@@ -71,7 +73,7 @@
"scan_events": [],
"sound_events": [],
"tick": 8,
"version": 13,
"version": 14,
"visible_tiles": [
{
"tile_kind": "Wall",
+8 -2
View File
@@ -30,6 +30,8 @@ fn test_snapshot(tick: u64, entities: Vec<VisibleEntity>) -> ObserverSnapshot {
conversation_events: vec![],
conversation_ended: vec![],
follow_state: None,
examine_result: None,
character_pressure: None,
rng_seed: None,
}
}
@@ -275,6 +277,8 @@ fn snapshot_v2_fields_roundtrip() {
conversation_events: vec![],
conversation_ended: vec![],
follow_state: None,
examine_result: None,
character_pressure: None,
rng_seed: None,
};
@@ -330,7 +334,7 @@ fn protocol_version_constant_matches_snapshot() {
let snapshot = test_snapshot(0, vec![]);
assert_eq!(snapshot.version, PROTOCOL_VERSION);
assert_eq!(
PROTOCOL_VERSION, 13,
PROTOCOL_VERSION, 14,
"bump this assertion when protocol version changes"
);
}
@@ -374,6 +378,8 @@ fn all_facing_direction_variants_roundtrip() {
conversation_events: vec![],
conversation_ended: vec![],
follow_state: None,
examine_result: None,
character_pressure: None,
rng_seed: None,
};
let bytes = rmp_serde::to_vec_named(&snapshot).expect("serialize");
@@ -1379,7 +1385,7 @@ fn serde_default_fields_fill_in_when_missing_from_wire() {
// `tell_state`, `follow_state`, `rng_seed`, `zone_id`, `object_type`, etc.
// are all `#[serde(default)]` — they must default to None/empty when absent.
let minimal_json = serde_json::json!({
"version": 13,
"version": 14,
"tick": 42,
"game_time": {
"day": 0,