Audit: - docs/AUDIT-2026-05-25.md: full protocol audit covering 8 findings (4 critical, 2 high, 5 medium, 4 low) with code references and fix effort estimates - vault/Audit/Tasks.md: Obsidian Tasks plugin file tracking all audit items with priorities, due dates, and per-step checklists Architecture docs updated for Wire format v2 and Wave 5/6 features: - ARCHITECTURE.md: adds wzp-video to dependency graph and project structure; wire format updated to v2 (16B header, 5B MiniHeader); relay concurrency section corrected (DashMap+RwLock is current, not a future optimization); test count 571→702; Android note - PROGRESS.md: Wave 5 and Wave 6 sections appended; test count 372→702; current status and open blockers as of 2026-05-25 - ROAD-TO-VIDEO.md: implementation status table inserted (✅/🟡/🔴/🔲 per phase); 6-step critical path to first video call - WZP-SPEC.md: MediaHeader updated to v2 (16B byte-aligned); MiniHeader updated to 5B with seq_delta; codec IDs 9-12 added (H.264/H.265/AV1); version negotiation section added Obsidian vault (vault/): - 114 files across Architecture/, PRDs/, Reports/, Android/, Reference/, Audit/ with YAML frontmatter - 00 - Home.md index note with wiki links - .obsidian/app.json config Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
94 lines
3.1 KiB
Markdown
94 lines
3.1 KiB
Markdown
---
|
|
tags: [report, wzp]
|
|
type: report
|
|
status: Pending Review
|
|
---
|
|
|
|
# T5.1.1 — PriorityMode default = AudioFirst, QualityProfile backward-compat JSON, SetPriorityMode roundtrip
|
|
|
|
**Status:** Pending Review
|
|
**Agent:** Kimi Code CLI
|
|
**Started:** 2026-05-12T17:25Z
|
|
**Completed:** 2026-05-12T17:40Z
|
|
**Commit:** e34c40d
|
|
**PRD:** ../PRD-video-quality-priority.md
|
|
|
|
## What I changed
|
|
|
|
- `crates/wzp-proto/src/priority_mode.rs:40-48` — Added `priority_mode_default_is_audio_first` test verifying `PriorityMode::default() == AudioFirst`.
|
|
- `crates/wzp-proto/src/codec_id.rs:251-264` — Added `quality_profile_backward_compat_old_json` test: deserializes pre-T5.1 JSON (no `priority_mode`, no video fields) and asserts defaults (`AudioFirst`, `None`, `None`, `None`).
|
|
- `crates/wzp-proto/src/packet.rs:1380-1394` — Added `set_priority_mode_roundtrip` test: writes `SignalMessage::SetPriorityMode` to a buffer, reads it back, asserts equality.
|
|
|
|
## Why these choices
|
|
|
|
Followed the T5.1.1 task description verbatim. The backward-compat test uses a raw JSON string that mirrors the serialized form emitted before T5.1 landed, confirming `#[serde(default)]` on the new fields works as intended. Roundtrip test uses the existing `SignalMessage` wire-format test helpers for consistency.
|
|
|
|
## Deviations from the task spec
|
|
|
|
None.
|
|
|
|
## Verification output
|
|
|
|
```bash
|
|
$ cargo test -p wzp-proto -- priority_mode_default_is_audio_first
|
|
Finished `test` profile [unoptimized + debuginfo] target(s) in 0.19s
|
|
Running unittests src/lib.rs (target/debug/deps/wzp_proto-b3c44d45b5c05506)
|
|
|
|
running 1 test
|
|
test priority_mode::tests::priority_mode_default_is_audio_first ... ok
|
|
|
|
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 127 filtered out
|
|
```
|
|
|
|
```bash
|
|
$ cargo test -p wzp-proto -- quality_profile_backward_compat_old_json
|
|
Finished `test` profile [unoptimized + debuginfo] target(s) in 1.03s
|
|
Running unittests src/lib.rs (target/debug/deps/wzp_proto-b3c44d45b5c05506)
|
|
|
|
running 1 test
|
|
test codec_id::tests::quality_profile_backward_compat_old_json ... ok
|
|
|
|
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 128 filtered out
|
|
```
|
|
|
|
```bash
|
|
$ cargo test -p wzp-proto -- set_priority_mode_roundtrip
|
|
Finished `test` profile [unoptimized + debuginfo] target(s) in 0.19s
|
|
Running unittests src/lib.rs (target/debug/deps/wzp_proto-b3c44d45b5c05506)
|
|
|
|
running 1 test
|
|
test packet::tests::set_priority_mode_roundtrip ... ok
|
|
|
|
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 127 filtered out
|
|
```
|
|
|
|
```bash
|
|
$ cargo fmt --all -- --check
|
|
# pass
|
|
```
|
|
|
|
```bash
|
|
$ cargo clippy -p wzp-proto --all-targets -- -D warnings
|
|
# pass
|
|
```
|
|
|
|
## Test summary
|
|
|
|
- Tests added: 3
|
|
- Tests modified: 0
|
|
- Workspace test count before: 127 / after: 130 (wzp-proto)
|
|
- `cargo clippy -p wzp-proto --all-targets -- -D warnings`: pass
|
|
- `cargo fmt --all -- --check`: pass
|
|
|
|
## Risks / follow-ups
|
|
|
|
None. These are pure test additions; no production code changed.
|
|
|
|
## 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
|