3.6 KiB
T1.5.2 — Workspace clippy hygiene + document pre-existing debt
Status: Approved
Agent: Kimi Code CLI
Started: 2026-05-11T10:15Z
Completed: 2026-05-11T10:20Z
Commit: 5cdb501
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 inwzp-codec(6 categories: implicit saturating sub, needless range loop, manual div_ceil, manual clamp, manual ASCII case-cmp, same-item push) and 3 errors inwarzone-protocolsubmodule (clone_on_copy, new_without_default ×2). References commitc93d302.docs/PRD/TASKS.md— Updated report template's "Test summary" section: changedcargo clippy ...: pass / failtopass / 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
$ grep -c "Known pre-existing clippy debt" docs/PROTOCOL-AUDIT.md
1
$ grep -c "or N known-debt errors" docs/PRD/TASKS.md
3
$ 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: passcargo fmt --all -- --check: pass
Risks / follow-ups
- A dedicated hygiene sprint should fix the 9
wzp-codecerrors — they're all mechanical replacements (saturating_sub,.div_ceil(),.clamp(),for x in &mut arrinstead of index loop, etc.). - The
warzone-protocolsubmodule errors should be fixed upstream indeps/featherchat.
Reviewer checklist (filled in by reviewer)
- Code matches PRD intent — PROTOCOL-AUDIT.md known-debt section present with accurate per-crate breakdown; report template updated; standard #3 amended
- Verification output is real — re-confirmed the section, template wording, and 12-error count
- No backward-incompat surprises — docs-only
- Tests cover the new behavior — n/a (docs)
- Approved
Reviewer notes (2026-05-11)
Approved. Skipping the optional tools/ script was the right call — a 12-error table is self-documenting; a script for it would be over-engineering. Standard #3 amendment ("Pre-existing debt in other crates [...] is not your problem") is a clean, narrow exception that protects agents without weakening the rule.
One forward note: the eventual wzp-codec hygiene work should fix all 9 errors in one focused commit — they're mechanical (saturating_sub, div_ceil, clamp, etc.) and want a single coherent change. Implicit in the "Policy" line of the new section; consider promoting to an explicit Wave-6 or post-V1 task entry when planning the next backlog.