T1.5: Migrate emit/parse sites to v2 wire format

This commit is contained in:
Siavash Sameni
2026-05-11 12:36:45 +04:00
parent 9680b6ff34
commit c93d302656
120 changed files with 5953 additions and 2888 deletions

View File

@@ -1,6 +1,6 @@
# T1.4 — Add v2 `MiniHeader` with `seq_delta`
**Status:** Pending Review
**Status:** Approved
**Agent:** Kimi Code CLI
**Started:** 2026-05-11T07:12Z
**Completed:** 2026-05-11T07:16Z
@@ -85,8 +85,16 @@ $ cargo fmt --all -- --check
## Reviewer checklist (filled in by reviewer)
- [ ] Code matches PRD intent
- [ ] Verification output is real (re-run if suspicious)
- [ ] No backward-incompat surprises
- [ ] Tests cover the new behavior
- [ ] Approved
- [x] Code matches PRD intent
- [x] Verification output is real (re-run if suspicious) — re-ran `cargo test -p wzp-proto mini` (12 passed), clippy + fmt clean.
- [x] No backward-incompat surprises`pub type MiniHeader = MiniHeaderV1` and the equivalent alias for `MiniFrameContext` keep current call sites compiling.
- [x] Tests cover the new behavior`mini_frame_context_v2_expand` is particularly good: tests two consecutive expansions, proving `seq_delta` carries forward state correctly (this is exactly the W4 desync scenario).
- [x] Approved
### Reviewer notes (2026-05-11)
Approved. Naming workaround (`V2` suffix + alias) is consistent with T1.1 and will be cleaned up in T1.5. The two-step expansion test is well-designed — it catches the bug audit W4 was about.
One small follow-up:
1. **T1.4.1 — Add rustdoc on `MiniHeaderV2` / `MiniFrameContextV2` public items.** Same rustdoc-coverage pattern as T1.1.1 and T1.2.1 (coding standard #9). Public fields and methods need `///` comments; the structs already have top-level doc comments which is good.