Skip to content

fix(ci): restore unit tests - #3137

Merged
zackees merged 2 commits into
masterfrom
fix-3126-unit-tests
Jun 16, 2026
Merged

zackees merged 2 commits into
masterfrom
fix-3126-unit-tests

Conversation

@zackees

@zackees zackees commented Jun 16, 2026 •

Copy link
Copy Markdown
Member

Fixes #3126.

Summary

  • Downgrade expected JSON integer overflow conversion diagnostics from FL_ERROR to FL_WARN so fl_stl_json does not fail under --log-failures when tests intentionally exercise truncating overflow conversions.
  • Fix unsigned integer overflow range reporting so large unsigned targets are not formatted through a signed i64 cast as 0 to -1.
  • Update the ScreenMap JSON unit test to validate the current v2 version/groups/segments serializer output instead of the legacy map shape while preserving the parse round trip.
  • Disable Meson zccache rule injection on Windows, and strip stale injected prefixes from generated Ninja rules, because Windows hosted runners lose zccache daemon IPC under debug unit-test burst load.

Verification

  • python -m py_compile ci/meson/meson_markers.py
  • uv run python test.py fl/stl/json --clang --no-parallel --unit --verbose --debug --log-failures failures (passes 27/27)
  • Full local Windows debug unit run no longer hit zccache daemon failures after zccache was stripped from generated rules; local confirmation was interrupted by a Windows file lock on tests/runner.exe, so GitHub Actions Windows unit tests are the merge gate.

Summary by CodeRabbit

  • Bug Fixes

    • Improved integer overflow/range handling during JSON integer conversion, including clearer warning behavior when values fall outside the target range.
  • Chores

    • Updated build/CI behavior for Windows to prevent zccache wrapping from affecting targeted rules.
    • Adjusted unit test workflows to run on master pull requests with refined path filters and to block external-fork pull requests.
    • Updated JSON ScreenMap serialization test expectations to match the current output schema.

@coderabbitai

coderabbitai Bot commented Jun 16, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: a7cc637a-25b1-4e70-a981-408e3e8810be

📥 Commits

Reviewing files that changed from the base of the PR and between ba50aba and c5d0893.

📒 Files selected for processing (2)
  • .github/workflows/unit_test_macos.yml
  • .github/workflows/unit_test_windows.yml

📝 Walkthrough

Walkthrough

Three independent fixes address unit test failures across platforms and CI workflow triggers. ci/meson/meson_markers.py adds _ZCCACHE_WINDOWS_TARGET_RULES (empty tuple) to disable zccache wrapping on Windows, preventing linker daemon failures. src/fl/stl/json/types.h refactors i64 overflow detection into is_i64_out_of_range<Target> helpers that emit FL_WARN instead of FL_ERROR, allowing expected overflow tests to pass. tests/fl/stl/json.cpp updates ScreenMap assertions to the v2 schema. GitHub Actions workflows add pull_request triggers with fork-blocking conditions.

Changes

Unit test workflow restoration

Layer / File(s) Summary
Windows-specific zccache rule targeting and prefix removal
ci/meson/meson_markers.py
Declares _ZCCACHE_WINDOWS_TARGET_RULES = (), adds OS-conditional selection of target_rules in inject_zccache_wrapping(), and strips any previously injected zccache command prefixes for rules not in the target set before skipping wrapping for them.
is_i64_out_of_range<Target> helpers with signed/unsigned overloads
src/fl/stl/json/types.h
Adds template overloads that compute target min/max bounds, detect i64 overflow, and emit FL_WARN; replaces the prior inline range-check and FL_ERROR block in the i64 conversion path with calls to these helpers.
ScreenMap JSON test update to v2 schema
tests/fl/stl/json.cpp
Rewrites assertions to check version, groups (strip1/strip2), and segments array with id/x/y/diameter fields; updates the roundtrip assertion from map to segments.
GitHub Actions PR triggers with fork-blocking
.github/workflows/unit_test_macos.yml, .github/workflows/unit_test_windows.yml
Adds pull_request event triggers targeting master with the same path filters as push; introduces job-level if conditions that block external-fork pull requests.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related issues

  • #3126 (fix(ci): restore unit tests on linux, macos, and windows): This PR directly addresses all three acceptance criteria—changing FL_ERROR to FL_WARN with corrected unsigned range reporting fixes the fl_stl_json failure on Linux/macOS, and the empty _ZCCACHE_WINDOWS_TARGET_RULES prevents zccache daemon failures during Windows test DLL linking.

Possibly related PRs

  • FastLED/FastLED#2811: Directly extends the same inject_zccache_wrapping() logic in ci/meson/meson_markers.py, adding Windows-specific rule selection and prefix-stripping to the wrapping infrastructure that PR introduced.
  • FastLED/FastLED#3100: The updated tests/fl/stl/json.cpp ScreenMap assertions (version, groups, segments) validate the v2 ScreenMap::toJson schema introduced in that PR.

Poem

🐇 Hop-hop, the zccache won't crash on Windows today,
Overflow warnings whisper now, no loud FL_ERROR way.
ScreenMap's v2 segments dance where map once stood,
PR triggers march through CI, guarding forks like they should.
Three fixes in one commit—a test suite restored with care,
This bunny's code review hops without despair! 🎉

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix(ci): restore unit tests' directly addresses the main objective of the PR, which is to fix failing unit tests across platforms.
Linked Issues check ✅ Passed All coding requirements from issue #3126 are met: JSON overflow diagnostics downgraded [types.h], unsigned range reporting fixed [types.h], ScreenMap JSON test updated [json.cpp], and Windows zccache handling disabled [meson_markers.py].
Out of Scope Changes check ✅ Passed All changes directly address the four objectives outlined in issue #3126: JSON diagnostics, unsigned range reporting, ScreenMap test validation, and Windows zccache rule injection.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-3126-unit-tests

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 and usage tips.

@zackees
zackees merged commit b239334 into master Jun 16, 2026
8 of 9 checks passed
@zackees
zackees deleted the fix-3126-unit-tests branch June 16, 2026 03:05
@fastled-project-sync fastled-project-sync Bot moved this from Triage to Done in FastLED Tracker Jun 16, 2026
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.

fix(ci): restore unit tests on linux, macos, and windows

1 participant