[Phase 3.0] Scaffold chaotic_protocol Wire Crate & CardManifestHash Handshake #27

Open
opened 2026-11-17 08:14:14 +00:00 by john4064 · 0 comments
Owner

Goal

Create crates/chaotic_protocol defining Serde wire messages (ClientMatchIntent, ServerMatchDelta, ProjectedMatchState) and the connection handshake enforcing CardManifestHash parity.

Metadata

  • Phase / Step: Phase 3.0
  • Depends On: #22, #25
  • Unlocks: #11, #12, #13, #14, #31, #32, #34
  • Target Crates / Paths: Cargo.toml, crates/chaotic_protocol/Cargo.toml, crates/chaotic_protocol/src/lib.rs
  • Line Budget Plan: Production .rs <= 400 lines, test .rs <= 600 lines, mod.rs < 80 lines (AGENTS.md Section 2.3)

Acceptance Criteria

  • Add crates/chaotic_protocol to workspace members (pure Serde + chaotic_core types; zero Bevy render/window deps).
  • Define versioned handshake carrying CHAOTIC_CORE_VERSION and CardManifestHash so client/server mismatch fails cleanly.
  • Define strictly-masked ProjectedMatchState, ProjectedCreature, ProjectedZoneCounts, and MatchDomainEvent packets.
  • Unit tests verify serialization roundtrips and size bounds.
## Goal Create `crates/chaotic_protocol` defining Serde wire messages (`ClientMatchIntent`, `ServerMatchDelta`, `ProjectedMatchState`) and the connection handshake enforcing `CardManifestHash` parity. ## Metadata - **Phase / Step:** Phase 3.0 - **Depends On:** #22, #25 - **Unlocks:** #11, #12, #13, #14, #31, #32, #34 - **Target Crates / Paths:** `Cargo.toml`, `crates/chaotic_protocol/Cargo.toml`, `crates/chaotic_protocol/src/lib.rs` - **Line Budget Plan:** Production `.rs` <= 400 lines, test `.rs` <= 600 lines, `mod.rs` < 80 lines (`AGENTS.md` Section 2.3) ## Acceptance Criteria - [ ] Add `crates/chaotic_protocol` to workspace members (pure Serde + `chaotic_core` types; zero Bevy render/window deps). - [ ] Define versioned handshake carrying `CHAOTIC_CORE_VERSION` and `CardManifestHash` so client/server mismatch fails cleanly. - [ ] Define strictly-masked `ProjectedMatchState`, `ProjectedCreature`, `ProjectedZoneCounts`, and `MatchDomainEvent` packets. - [ ] Unit tests verify serialization roundtrips and size bounds.
Sign in to join this conversation.
No description provided.