Ground truth for Govee Flow Plus Light Bars (H6056): phantom segments, bar-to-segment mapping, API auth and rate limits.
100
100%
Does it follow best practices?
Impact
100%
3.84xAverage score across 6 eval scenarios
Passed
No known issues
A software team uses two Govee H6056 light bars mounted above their shared monitor wall to give the whole office an at-a-glance view of their CI pipeline health. They want the top bar to reflect the status of their frontend builds and the bottom bar to reflect their backend builds. Each bar should show a color gradient from red (failing) to green (passing) based on a confidence score (0.0–1.0) provided by their build system.
The team's previous attempt used a simple loop that sent one API call per bar per update, but it kept triggering HTTP 429 errors during busy push windows when both pipelines report status updates at the same time. They need a smarter solution. Additionally, they want the implementation to be maintainable and close to the reference patterns used by the team for this device — so future contributors understand which physical bar corresponds to which pipeline at a glance.
Your task is to write a Python script that, given two confidence scores (one for each pipeline), updates the two light bars to the appropriate gradient colors. The script must handle rate-limit responses gracefully without losing the update. It must work in mock mode when GOVEE_API_KEY is not set.
Produce a single Python file named build_status.py. The script must:
__main__ block showing example usage.GOVEE_API_KEY is absent.Also produce a design_notes.md file explaining your mapping of pipeline → physical bar and the approach taken for API call efficiency.
A reference client exists in the project at scripts/govee_control.py. Import and use it as your starting point — do not reimplement the API client from scratch.