T1.5.2: Workspace clippy hygiene + document pre-existing debt
This commit is contained in:
62
docs/PRD/reports/T1.5.2-report.md
Normal file
62
docs/PRD/reports/T1.5.2-report.md
Normal file
@@ -0,0 +1,62 @@
|
||||
# T1.5.2 — Workspace clippy hygiene + document pre-existing debt
|
||||
|
||||
**Status:** Pending Review
|
||||
**Agent:** Kimi Code CLI
|
||||
**Started:** 2026-05-11T10:15Z
|
||||
**Completed:** 2026-05-11T10:20Z
|
||||
**Commit:** d8f8935
|
||||
**PRD:** ../PRD-wire-format-v2.md (process)
|
||||
|
||||
## What I changed
|
||||
|
||||
- `docs/PROTOCOL-AUDIT.md` — Added **"Known pre-existing clippy debt (as of T1.5.2)"** section. Documents 9 errors in `wzp-codec` (6 categories: implicit saturating sub, needless range loop, manual div_ceil, manual clamp, manual ASCII case-cmp, same-item push) and 3 errors in `warzone-protocol` submodule (clone_on_copy, new_without_default ×2). References commit `c93d302`.
|
||||
- `docs/PRD/TASKS.md` — Updated report template's "Test summary" section: changed `cargo clippy ...: pass / fail` to `pass / fail (or N known-debt errors in <crate>; see PROTOCOL-AUDIT.md)`.
|
||||
- `docs/PRD/TASKS.md` — Updated coding standard #3 and environment-setup conventions to clarify that pre-existing debt in untouched crates is not the agent's problem.
|
||||
|
||||
## Why these choices
|
||||
|
||||
The debt is pre-existing (verified against `HEAD~1`) and lives in crates not touched by Wave 1. Rather than forcing every agent to rediscover and re-discuss the same errors, we document them once and update the report template so agents can acknowledge them concisely. The submodule errors (`warzone-protocol`) are explicitly called out as out-of-scope since they're in a dependency.
|
||||
|
||||
## Deviations from the task spec
|
||||
|
||||
None. Skipped the optional `tools/` script (step 4) — the `PROTOCOL-AUDIT.md` table is sufficient for human agents to verify at a glance, and the verify commands in the task already pass without it.
|
||||
|
||||
## Verification output
|
||||
|
||||
```bash
|
||||
$ grep -c "Known pre-existing clippy debt" docs/PROTOCOL-AUDIT.md
|
||||
1
|
||||
```
|
||||
|
||||
```bash
|
||||
$ grep -c "or N known-debt errors" docs/PRD/TASKS.md
|
||||
3
|
||||
```
|
||||
|
||||
```bash
|
||||
$ cargo clippy --workspace --all-targets -- -D warnings 2>&1 | grep -E "^error\b" | wc -l
|
||||
12
|
||||
```
|
||||
|
||||
(12 errors — 9 in `wzp-codec`, 3 in `warzone-protocol` — all pre-existing and documented.)
|
||||
|
||||
## Test summary
|
||||
|
||||
- Tests added: 0
|
||||
- Tests modified: 0
|
||||
- Workspace test count before: 572 / after: 572
|
||||
- `cargo clippy -p wzp-proto --all-targets -- -D warnings`: pass
|
||||
- `cargo fmt --all -- --check`: pass
|
||||
|
||||
## Risks / follow-ups
|
||||
|
||||
- A dedicated hygiene sprint should fix the 9 `wzp-codec` errors — they're all mechanical replacements (`saturating_sub`, `.div_ceil()`, `.clamp()`, `for x in &mut arr` instead of index loop, etc.).
|
||||
- The `warzone-protocol` submodule errors should be fixed upstream in `deps/featherchat`.
|
||||
|
||||
## 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
|
||||
Reference in New Issue
Block a user