Skip to content

docs(color): bound temporal-dither accuracy to equal dwell - #4539

Merged
zackees merged 1 commit into
masterfrom
docs/4538-dither-contract
Sep 23, 2026
Merged

zackees merged 1 commit into
masterfrom
docs/4538-dither-contract

Conversation

@zackees

@zackees zackees commented Sep 23, 2026 •

Copy link
Copy Markdown
Member

Closes #4538\n\nAligns the live dither contract with the shipped accepted-frame phase behavior. The eight-phase accuracy bound now explicitly assumes equal visibility duration; unequal dwell is documented as unsupported without measured driver timing. A real managed-channel regression verifies the equal-dwell mean and demonstrates time-weighted bias with unequal dwell.\n\nValidation: bash lint; bash test color_managed_source; bash test color_managed_source --debug; bash test --cpp (309 unit, 95 examples). Local pre-push review clean.

Summary by CodeRabbit

  • Documentation
    • Clarified that dithering accuracy applies to equally timed accepted frames. Dropped submissions do not advance the dither phase, but accepted frames with unequal display times can skew the time-weighted output; refresh-rate checks do not measure display duration.
    • Updated the description of phase tracking for managed and legacy LED channels.
  • Tests
    • Added coverage showing how unequal display times can affect dithered color output.

@coderabbitai

coderabbitai Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: FastLED/FastLED/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 673c085e-f523-453e-8a94-c7c31aefb131

📥 Commits

Reviewing files that changed from the base of the PR and between b91ca94 and f5c12f3.

📒 Files selected for processing (3)
  • docs/color-pipeline-contracts.md
  • docs/color-ws2812-shaping-paths.md
  • tests/fl/channels/color_managed_source.cpp

Included review availability: Your plan provides up to 8 included reviews per hour; 5 remain after this review.


📝 Walkthrough

Walkthrough

The dither documentation now defines its accuracy guarantee for equally timed accepted presentations and describes the limits when frame dwell varies. A new test checks the equal-dwell mean and demonstrates how unequal dwell changes the time-weighted mean.

Changes

Temporal dither contract

Layer / File(s) Summary
Accepted-frame dither contract and regression test
docs/color-pipeline-contracts.md, docs/color-ws2812-shaping-paths.md, tests/fl/channels/color_managed_source.cpp
The documentation states that phases advance on driver acceptance, while acceptance does not measure visibility duration. It limits the accuracy guarantee to equally timed presentations and clarifies that the refresh-rate gate does not establish equal dwell. The test checks the equal-dwell mean against the expected code and demonstrates bias under unequal dwell.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to f5c12

The clarified guarantee and regression test present no established blocker to merging after normal checks.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The pull request updates the live contract and the P8 report. The new test covers the equal-dwell mean and unequal-dwell bias. Existing coverage still covers phase-correlated dropped submissions. No g… Update the #4156 and #4034 tracker wording to state that #4500 and #4517 were closed by scope decision, not completed by code, and link the #4538 resolution.
Docstring Coverage ⚠️ Warning 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. (2 skipped: 2 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: limiting the documented temporal-dither accuracy guarantee to equal dwell.
Out of Scope Changes check ✅ Passed The changed contract, P8 report, and managed-channel regression test directly implement #4538. The phase-state clarification supports the accepted-frame contract. No unrelated implementation or generi…
Full details: Linked Issues check

Explanation

The pull request updates the live contract and the P8 report. The new test covers the equal-dwell mean and unequal-dwell bias. Existing coverage still covers phase-correlated dropped submissions. No generic timing API was added. However, the whole-pull-request diff contains no update to the #4156 or #4034 tracker wording. This leaves the explicit #4538 requirement to identify #4500/#4517 as closed by scope decision and link this resolution unmet.

Full details: Docstring Coverage

Explanation

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. (2 skipped: 2 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@zackees
zackees merged commit 3324adc into master Sep 23, 2026
6 checks passed
@fastled-project-sync fastled-project-sync Bot moved this from Triage to Done in FastLED Tracker Sep 23, 2026
@zackees
zackees deleted the docs/4538-dither-contract branch September 23, 2026 06:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

docs(test): align temporal-dither contract with accepted-frame, equal-dwell behavior

1 participant