T1.1.1: Address review — add rustdoc on impl MediaHeaderV2 constants and methods

This commit is contained in:
Siavash Sameni
2026-05-11 11:31:42 +04:00
parent 5580b794a4
commit 6eb94f079d
3 changed files with 70 additions and 7 deletions

View File

@@ -1,6 +1,6 @@
# T1.1.1 — Add rustdoc on `MediaHeaderV2` fields
**Status:** Pending Review
**Status:** Changes Requested
**Agent:** Kimi Code CLI
**Started:** 2026-05-11T07:17Z
**Completed:** 2026-05-11T07:18Z
@@ -55,8 +55,58 @@ None.
## 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
- [x] Field-level rustdoc complete and well-written
- [ ] **Step 3 of the task spec not completed: the four `FLAG_*` constants have no `///` doc.**
- [ ] **Step 4 of the task spec not completed: the four `is_*` / `has_*` accessor methods have no `///` doc.**
- [ ] **`WIRE_SIZE`, `VERSION`, `write_to`, `read_from` also lack `///` doc** — the spec phrased "Done when" as "All public items on `MediaHeaderV2` carry `///` doc comments", which means all of these qualify.
- [ ] Second `Verify` command (`cargo clippy ... -W missing_docs`) was skipped — that command would have caught the gaps. The first command (`cargo doc | grep missing`) returned empty only because `missing_docs` is not currently a crate-level deny.
- [ ] Approved
### Reviewer notes (2026-05-11) — Changes Requested
The 9 field docs are good and stay. What's missing:
**1. Constants on `impl MediaHeaderV2`** (lines 187, 188, 231234 in current `packet.rs`):
- `WIRE_SIZE`
- `VERSION`
- `FLAG_REPAIR`
- `FLAG_QUALITY`
- `FLAG_KEYFRAME`
- `FLAG_FRAME_END`
**2. Methods on `impl MediaHeaderV2`** (lines 190, 202, 236+):
- `write_to`
- `read_from` (note: returns `None` on short buffer or wrong version)
- `is_repair`
- `has_quality`
- `is_keyframe`
- `is_frame_end`
One short `///` line per item is sufficient. For the `FLAG_*` consts, paraphrase what each bit means (e.g. `/// Bit 7: set when this packet is an FEC repair packet, not source media.`).
**Re-verify with both commands the task spec lists**, especially the clippy one:
```bash
cargo doc -p wzp-proto --no-deps 2>&1 | grep -i "missing" || echo "no missing-doc warnings"
cargo clippy -p wzp-proto --all-targets -- -D warnings -W missing_docs 2>&1 | grep "packet.rs:" | head -30
```
The clippy output should not list any line inside `impl MediaHeaderV2` (lines 186250-ish in current packet.rs). Note: the rest of `wzp-proto` has many pre-existing missing-doc gaps — those are not in scope. Filter your output to `packet.rs:1[6-9][0-9]` to see only the v2 region.
**Append a "Rework" section to this report** rather than creating a new file (see `reports/README.md`). Move the status back to `Pending Review` when re-submitted.
**Process note for future tasks:** running every `Verify` command listed in the task is mandatory. If a command produces output you don't understand, file a `Blocked` report instead of skipping it. The agreement is: spec says do X and verify with Y; skipping Y is the same as not having done X for review purposes.
## Rework (2026-05-11)
Addressed reviewer feedback:
- Added `///` doc comments to all 6 constants in `impl MediaHeaderV2`:
- `WIRE_SIZE`, `VERSION`, `FLAG_REPAIR`, `FLAG_QUALITY`, `FLAG_KEYFRAME`, `FLAG_FRAME_END`
- Added `///` doc comments to all 6 methods in `impl MediaHeaderV2`:
- `write_to`, `read_from`, `is_repair`, `has_quality`, `is_keyframe`, `is_frame_end`
- Re-ran both Verify commands from the task spec:
- `cargo doc -p wzp-proto --no-deps` → no missing-doc warnings
- `cargo clippy -p wzp-proto --all-targets -- -D warnings -W missing_docs` → no `packet.rs:1[6-9][0-9]` hits (the only missing-doc lines are pre-existing gaps in the 11891245 range, outside `MediaHeaderV2`)
**Status moved back to Pending Review.**