Skip to content

fix(test): harden long-running Python supervision - #3917

Merged
zackees merged 1 commit into
masterfrom
docs/999-show-isr-safety
Aug 20, 2026
Merged

zackees merged 1 commit into
masterfrom
docs/999-show-isr-safety

Conversation

@zackees

@zackees zackees commented Aug 20, 2026 •

Copy link
Copy Markdown
Member

Summary

  • document that FastLED.show() is blocking and must not be called from an ISR
  • keep the Python worker, process-group timeout, and outer watchdog alive beyond the bounded fbuild QEMU smoke-test deadline
  • tolerate quiet verbose subprocesses, emit suite-aware rerun guidance, and keep filtered pytest runs out of the full-suite fingerprint cache

Validation

  • bash lint
  • bash test --cpp (279 unit tests and 84 examples passed)
  • unfiltered bash test --py --verbose aggregate completed and wrote a success fingerprint after 919 tests were collected
  • focused fbuild ESP32 QEMU smoke retry passed in 276.16s
  • focused timeout, quiet-process, failure-guidance, and fingerprint-cache regressions passed
  • clud-review: clean (review agents launched: 1)

Closes #999
Closes #3913
Closes #3914
Closes #3915
Closes #3916

Summary by CodeRabbit

  • Bug Fixes

    • Improved test execution when custom pytest options are active by preventing incorrect cache reuse.
    • Improved monitoring of quiet processes during parallel test runs.
    • Updated timeout handling for Python and integration tests.
    • Added more specific rerun guidance for different test failure types.
    • Adjusted CI watchdog timeouts for more reliable test execution.
  • Documentation

    • Added warnings that LED updates may not be interrupt-safe on ESP32 and could cause deadlocks or watchdog resets.

Document that FastLED.show() must not run in interrupt context.

Let the Python worker, quiet-process monitor, and top-level watchdog outlive the bounded fbuild QEMU smoke test; preserve actionable rerun guidance and prevent filtered pytest runs from contaminating full-suite fingerprints.

Closes #999

Closes #3913

Closes #3914

Closes #3915

Closes #3916
@fastled-project-sync fastled-project-sync Bot moved this to Triage in FastLED Tracker Aug 20, 2026
@zackees
zackees merged commit 5910be3 into master Aug 20, 2026
9 of 17 checks passed
@fastled-project-sync fastled-project-sync Bot moved this from Triage to Done in FastLED Tracker Aug 20, 2026
@coderabbitai

coderabbitai Bot commented Aug 20, 2026 •

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: e33a3c38-886c-426e-85b6-1b675d1dfacb

📥 Commits

Reviewing files that changed from the base of the PR and between 2da7f13 and 051817b.

📒 Files selected for processing (9)
  • ci/early_exit_cache.py
  • ci/tests/test_fbuild_qemu.py
  • ci/tests/test_fingerprint_cache.py
  • ci/tests/test_run_breakdown.py
  • ci/tests/test_running_process.py
  • ci/util/running_process_group.py
  • ci/util/test_runner.py
  • src/FastLED.h
  • test.py

📝 Walkthrough

Walkthrough

The CI runner now disables fingerprint caching when pytest options are active, aligns test timeout layers, tolerates quiet processes, and emits category-specific failure guidance. FastLED documents interrupt-safety restrictions for both show overloads.

Changes

CI test execution safeguards

Layer / File(s) Summary
Pytest cache eligibility
ci/early_exit_cache.py, test.py, ci/tests/test_fingerprint_cache.py
Non-empty PYTEST_ADDOPTS bypasses cache reuse, forces Python tests to run, and prevents full-suite fingerprint updates.
Test timeout hierarchy
ci/util/test_runner.py, test.py, ci/tests/test_fbuild_qemu.py
Python, global, top-level, and fbuild QEMU timeouts are derived and tested as an ordered hierarchy.
Quiet process monitoring
ci/util/running_process_group.py, ci/tests/test_running_process.py
Verbose polling treats TimeoutError as a quiet interval and continues monitoring the process.
Process failure guidance
ci/util/running_process_group.py, ci/util/test_runner.py, ci/tests/test_run_breakdown.py
Failure records use friendly names, and Python, integration, and C++ failures receive distinct rerun guidance.
Interrupt-safety documentation
src/FastLED.h
Both CFastLED::show overloads warn against calls from interrupt service routines.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant test.py
  participant pytest_addopts_active
  participant RunningProcessGroup
  participant fbuild_QEMU

  test.py->>pytest_addopts_active: Check PYTEST_ADDOPTS
  pytest_addopts_active-->>test.py: Return cache eligibility
  test.py->>RunningProcessGroup: Start Python test worker with derived timeouts
  RunningProcessGroup->>fbuild_QEMU: Monitor quiet QEMU process
  fbuild_QEMU-->>RunningProcessGroup: Complete or remain quiet
  RunningProcessGroup-->>test.py: Return result or classified failure guidance
Loading

Possibly related issues

Possibly related PRs

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/999-show-isr-safety

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 deleted the docs/999-show-isr-safety branch August 21, 2026 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

1 participant