Repository navigation
docs(fled): separate "mandatory" from "absent" for rgb16_linear (#4156 R10) - #4272
Conversation
…R10) R10 was the last of the three findings the triage left unchecked. Two of its three parts have been overtaken; one is real and is fixed here. **Resolved already — the fallback policy.** R10 read the landed mirror as permitting fallback on unresolvable advisory RGB metadata against #4034's strict-by-default requirement. `FLED_FORMAT.md` now says the opposite of what R10 read: "FastLED playback is strict by default; an application may explicitly select best-effort only for advisory `rgb8` color metadata, and that path emits a warning." That is #4034's contract verbatim. **Resolved already — dark output on rejection.** R10 warned that "merely skipping `show()` can leave the preceding LED frame latched". `Video::draw` writes `CRGB::Black` across the whole span when an error is recorded, before returning false. Nothing is left latched. **Real, and fixed — the contradiction.** The format table gives `rgb16_linear` a default tuple, `defaultVideoColor()` implements it, and a test pins it. The forward-compatibility section three screens down said the format is "meaningless without its declaration". Both cannot be true. R10's own resolution says which way to settle it: keep the default tuple, rewrite the prose. So the prose now separates the two states the old wording ran together. **Absent** is resolvable -- the pixel-format value has already pinned linear-light samples, and BT.709 at full range is the rest of the historical reading -- and `declared` is false on that result, so a consumer can still tell an inherited tuple from an author's claim. **Unresolvable** is a refusal: where an unrecognized name on `rgb8` may fall back with a diagnostic, the same name on `rgb16_linear` may not. That is what "mandatory" means here, and it is about fallback rather than about absence. The `declared == false` flag is the whole distinction, so it is now asserted for `rgb16_linear` rather than only for `rgb8`, alongside a case that the refusal half still refuses. Not addressed: R10 also asks for identical contract fixtures in ledmapper. That is the other repo's half and is not something this PR can land. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01MLhWkMfzLjrnLTDMBE6Fj9
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 8 included reviews per hour; 4 remain after this review. 📝 WalkthroughWalkthroughThe FLED format documentation now distinguishes absent ChangesFLED color resolution
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This change clarifies the FLED color-resolution contract and adds coverage for inherited defaults and invalid declarations. No current merge-blocking risk is identified. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Refs #4156 (R10).
R10 was the last of the three findings the triage left unchecked. Two of its three parts have been overtaken by the tree; one is real.
Resolved already — the fallback policy
R10 read the landed mirror as permitting fallback on unresolvable advisory RGB metadata, against #4034's strict-by-default requirement.
FLED_FORMAT.mdnow says the opposite of what R10 read:That is #4034's contract verbatim, including the explicit opt-in.
Resolved already — dark output on rejection
Video::draw(now, leds)writesCRGB::Blackacross the whole span when an error is recorded, before returning false. Nothing is left latched.Real, and fixed — the contradiction
The format table gives
rgb16_lineara default tuple,defaultVideoColor()implements it, and a test pins it. Three screens down, the forward-compatibility section said the format is "meaningless without its declaration". Both cannot be true.R10's own resolution says which way to settle it — "Keep the already implemented linear16 default tuple if absence is intended, and rewrite the contradictory prose" — so the prose now separates the two states the old wording ran together:
declaredis false on that result, so a consumer can still tell an inherited tuple from an author's claim.rgb8may fall back to the default tuple with a diagnostic, the same name onrgb16_linearmay not. That is what "mandatory" means here — it is about fallback, not about absence.The
declared == falseflag is the entire distinction, so it is now asserted forrgb16_linearrather than only forrgb8, alongside a case checking that the refusal half still refuses.Not addressed
R10 also asks for identical contract fixtures in ledmapper. That is the other repo's half and is not something this PR can land.
Verification
bash test --cpp— 299/299 unit, 84/84 examplesbash lint— 0 errorsdeclared, and dropping thergb16_linearrecognition, each fail🤖 Generated with Claude Code
https://claude.ai/code/session_01MLhWkMfzLjrnLTDMBE6Fj9
Summary by CodeRabbit
Documentation
rgb16_linearcolor declarations.Tests