docs(remote): a null in a track correction is a removal, never an omission - #607
Conversation
…ssion
The server is changing PATCH /tracks/{id} from wholesale to a partial
patch in three states: absent leaves a correction alone, null removes
it, a value sets it (InstaZDLL/waveflow-server#177).
What this client sends keeps its meaning. drain.rs already spells every
field out, null included, so an emptied field still reaches the server
as a removal. What changes is what the comments tell the next reader.
They justified the explicit nulls and the absent clear_* verbs by
wholesale semantics, and read that way they permit an optimisation —
skip the None fields — that would now silently keep a correction the
user had just emptied.
The comments now say why the nulls are load-bearing under the new
contract, and that the three fields the editor has no input for are
left alone rather than erased, which is the bug the server change
fixes. The explicit nulls behave the same against a server from before
it.
Comment-only. No behaviour changes against either server version.
Claude-Session: https://claude.ai/code/session_019coGCzcX775GmG9kYz8fft
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: 8 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 10 reviews per hour. 📝 WalkthroughWalkthroughLa documentation de ChangesMétadonnées de piste
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~5 minutes Change: Other Merge Risk: ⚪ Minimal · up to This documentation update does not change runtime behavior and accurately describes the existing metadata patch contract. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Summary
PATCH /tracks/{id}becomes a partial patch in three states (fix(api): a track correction leaves alone what it does not mention waveflow-server#184, fixing bug: a track PATCH drops every correction it does not mention waveflow-server#177): a field absent leaves its correction alone,nullremoves it, a value sets it.remote/drain.rsalready spells every field out,nullincluded, so an emptied field still reaches the server as a removal — against the new server and an older one alike. The server PR replays this client's request exactly asdrain.rssends it.Nonefields — which against the new server would silently keep a correction the user had just emptied. They now say the nulls are load-bearing, and that the three fields the editor has no input for (sort_title,comment,musicbrainz_recording_id) are left alone rather than erased.How I tested
//line out ofgit diffleaves nothing.rustfmt --edition 2021 --checkon both files, with the repository'srustfmt.toml: exit 0, so the doc-comment syntax is valid and the formatting unchanged.Checklist
type(scope): subject, kebab-case scope)bun run lint+bun run typecheck— not run: no TypeScript touchedcargo check --manifest-path src-tauri/Cargo.toml --all-targets— not run locally: comment-only change, syntax checked withrustfmt --checkinstead; CI runs the full checkCLAUDE.mdanddocs/— not applicable, no cross-cutting pattern changedLinked issues
Refs InstaZDLL/waveflow-server#177
Refs InstaZDLL/waveflow-server#184
Best merged after InstaZDLL/waveflow-server#184: until then the comments describe server semantics that are not deployed yet. The rule they state — never omit a
Nonefield — is safe against either.Summary by CodeRabbit