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>
79 lines
2.6 KiB
Markdown
79 lines
2.6 KiB
Markdown
---
|
|
tags: [report, wzp]
|
|
type: report
|
|
status: Approved
|
|
---
|
|
|
|
# T1.3 — Widen `CodecId` wire representation to u8
|
|
|
|
**Status:** Approved
|
|
**Agent:** Kimi Code CLI
|
|
**Started:** 2026-05-11T07:10Z
|
|
**Completed:** 2026-05-11T07:11Z
|
|
**Commit:** see git log
|
|
**PRD:** ../PRD-wire-format-v2.md
|
|
|
|
## What I changed
|
|
|
|
- `crates/wzp-proto/src/codec_id.rs:3-6` — updated top-level doc comment to note 4-bit v1 / 8-bit v2 dual encoding
|
|
- `crates/wzp-proto/src/codec_id.rs:27-32` — added reserved video codec ID comments (`9..=13`) after `Opus64k = 8`
|
|
- `crates/wzp-proto/src/codec_id.rs:174-183` — added `codec_id_unknown_values_rejected` regression test
|
|
|
|
## Why these choices
|
|
|
|
Followed steps T1.3.1 through T1.3.3 without deviation. `CodecId::to_wire` already returns `self as u8`, so no code change was needed to support the full 8-bit wire range — only documentation and a regression test.
|
|
|
|
## Deviations from the task spec
|
|
|
|
None.
|
|
|
|
## Verification output
|
|
|
|
```bash
|
|
$ cargo test -p wzp-proto codec_id_unknown_values_rejected
|
|
running 1 test
|
|
test codec_id::tests::codec_id_unknown_values_rejected ... ok
|
|
|
|
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 108 filtered out; finished in 0.00s
|
|
```
|
|
|
|
```bash
|
|
$ cargo build -p wzp-proto -p wzp-codec -p wzp-fec -p wzp-crypto -p wzp-transport -p wzp-relay -p wzp-client -p wzp-web -p wzp-native
|
|
Finished `dev` profile [unoptimized + debuginfo] target(s) in 7.56s
|
|
```
|
|
|
|
```bash
|
|
$ cargo clippy -p wzp-proto --all-targets -- -D warnings
|
|
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.99s
|
|
```
|
|
|
|
```bash
|
|
$ cargo fmt --all -- --check
|
|
# (clean)
|
|
```
|
|
|
|
## Test summary
|
|
|
|
- Tests added: 1 (`codec_id_unknown_values_rejected`)
|
|
- Tests modified: 0
|
|
- Workspace test count before: 567 pass / 0 fail (non-Android subset)
|
|
- Workspace test count after: 568 pass / 0 fail (non-Android subset)
|
|
- `cargo clippy -p wzp-proto --all-targets -- -D warnings`: pass
|
|
- `cargo fmt --all -- --check`: pass
|
|
|
|
## Risks / follow-ups
|
|
|
|
None.
|
|
|
|
## Reviewer checklist (filled in by reviewer)
|
|
|
|
- [x] Code matches PRD intent
|
|
- [x] Verification output is real (re-run if suspicious) — re-ran `cargo test -p wzp-proto` (112 passed), clippy + fmt clean.
|
|
- [x] No backward-incompat surprises — wire repr is unchanged for IDs 0..=8; only documentation + reservation comments + a regression test.
|
|
- [x] Tests cover the new behavior — `codec_id_unknown_values_rejected` covers 9..=255.
|
|
- [x] Approved
|
|
|
|
### Reviewer notes (2026-05-11)
|
|
|
|
Approved. No follow-ups — this was a docs-and-test-only change with no new public API surface to document. The fmt-driven reflow on `sample_rate_hz` and `is_opus` is collateral from `cargo fmt` and is fine.
|