Skip to content

chore(lint): clear pre-existing bash-lint baseline failures - #2684

Merged
zackees merged 1 commit into
masterfrom
chore/lint-baseline-cleanup
Jun 2, 2026
Merged

zackees merged 1 commit into
masterfrom
chore/lint-baseline-cleanup

Conversation

@zackees

@zackees zackees commented Jun 2, 2026 •

Copy link
Copy Markdown
Member

Summary

After PR #2683 landed, the Stop hook surfaced 4 pre-existing master-baseline lint failures that the python_pipeline's short-circuit-on-first-fail had been hiding. None caused by recent commits, but per CLAUDE.md's "fix all encountered errors" rule, sweeping them.

File Linter Fix
ci/meson/src_metadata_cache.py KBI002 bare `except KeyboardInterrupt: raise` now calls `_thread.interrupt_main()` first
ci/meson/src_metadata_cache.py ty possibly-missing-attribute `assert cache is not None` narrows `CacheEntry | None` after the sys.exit guard
src/platforms/esp/32/drivers/lcd_spi/channel_driver_lcd_clockless.cpp.hpp LoggingInIramChecker swap one FL_WARN for esp_rom_printf inside `FL_IRAM` ISR
src/platforms/esp/32/drivers/lcd_spi/lcd_spi_peripheral_esp.cpp.hpp LoggingInIramChecker swap three FL_WARN for esp_rom_printf inside `FL_IRAM` transmit()
examples/AutoResearch/AutoResearchParlioStream.h PlatformIncludesChecker `// ok platform headers` suppression on the intentional deep PARLIO driver include
src/platforms/esp/32/drivers/parlio/parlio_engine.cpp.hpp StdintTypeChecker two `uint32_t` → `fl::u32` + add `#include "fl/stl/int.h"`
src/platforms/esp/32/drivers/usb_serial_jtag_esp32_idf.hpp StdintTypeChecker one `uint32_t` → `u32` (already in scope)

Test plan

  • `bash lint` clean on host (Windows) after this PR.
  • No behaviour change: KBI handler still re-raises, FL_IRAM paths still log on error (via the ROM-resident esp_rom_printf), `fl::u32` aliases the same underlying type.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes

    • Enhanced keyboard interrupt handling during build cache operations with improved thread signal propagation
    • Added diagnostic error messages for LCD SPI driver transmission failures to aid debugging
    • Improved error reporting for ESP32 USB Serial JTAG peripheral read operations
  • Chores

    • Updated internal type consistency across ESP32 drivers for better code maintainability and alignment with framework conventions

After PR #2683 landed, the Stop hook surfaced 4 pre-existing
master-baseline lint failures that the python_pipeline's
short-circuit-on-first-fail had been hiding. None of them are caused
by recent commits — they pre-date PR #2683 — but per CLAUDE.md's
"fix all encountered errors" rule, sweeping them here:

* `ci/meson/src_metadata_cache.py`
  - KBI002: bare `except KeyboardInterrupt: raise` now calls
    `_thread.interrupt_main()` first per repo convention.
  - `ty` possibly-missing-attribute: add an `assert cache is not None`
    after the `if cache is None: sys.exit(1)` guard so `ty` narrows
    `CacheEntry | None` -> `CacheEntry` for the subsequent attribute
    access at lines 213/215.

* `src/platforms/esp/32/drivers/lcd_spi/channel_driver_lcd_clockless.cpp.hpp`
  and `src/platforms/esp/32/drivers/lcd_spi/lcd_spi_peripheral_esp.cpp.hpp`
  - LoggingInIramChecker: `FL_WARN` is not safe inside an `FL_IRAM`
    function (the macro pulls in the logging machinery which is not
    IRAM-resident). Swap the four call sites for `esp_rom_printf` —
    same pattern other IRAM-resident error paths already use, marked
    with the canonical `// ok esp_rom_printf` suppression comment.

* `examples/AutoResearch/AutoResearchParlioStream.h`
  - PlatformIncludesChecker: AutoResearch is the canonical ESP32
    PARLIO live-driver scratch sketch and intentionally pulls a deep
    driver header for streaming diagnostics. Suppress with the
    documented `// ok platform headers` marker.

* `src/platforms/esp/32/drivers/parlio/parlio_engine.cpp.hpp`
  and `src/platforms/esp/32/drivers/usb_serial_jtag_esp32_idf.hpp`
  - StdintTypeChecker: three `uint32_t` references swapped for
    `fl::u32`. The parlio file gains `#include "fl/stl/int.h"`; the
    JTAG file already had `u32` in scope.

`bash lint` is now clean against master HEAD on host (Windows).
@zackees
zackees merged commit c19281d into master Jun 2, 2026
4 of 7 checks passed
@coderabbitai

coderabbitai Bot commented Jun 2, 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

Run ID: b69ec6be-56df-44b9-a3f0-bba5edc43ef1

📥 Commits

Reviewing files that changed from the base of the PR and between 47a65b0 and d5cd0f9.

📒 Files selected for processing (6)
  • ci/meson/src_metadata_cache.py
  • examples/AutoResearch/AutoResearchParlioStream.h
  • src/platforms/esp/32/drivers/lcd_spi/channel_driver_lcd_clockless.cpp.hpp
  • src/platforms/esp/32/drivers/lcd_spi/lcd_spi_peripheral_esp.cpp.hpp
  • src/platforms/esp/32/drivers/parlio/parlio_engine.cpp.hpp
  • src/platforms/esp/32/drivers/usb_serial_jtag_esp32_idf.hpp

📝 Walkthrough

Walkthrough

This PR enhances ESP32 driver diagnostics with error logging, standardizes integer types to fl::u32 across platform drivers, improves KeyboardInterrupt signal propagation in build scripts, and clarifies inline documentation. Total changes span 6 files with 14 lines modified.

Changes

Diagnostics & Type Consistency Updates

Layer / File(s) Summary
Build script signal handling and type assertions
ci/meson/src_metadata_cache.py
load_cache() now properly signals the main thread when catching KeyboardInterrupt by calling _thread.interrupt_main() before re-raising. main() adds assert cache is not None after the --check guard for type narrowing.
Type standardization to fl::u32
src/platforms/esp/32/drivers/parlio/parlio_engine.cpp.hpp, src/platforms/esp/32/drivers/usb_serial_jtag_esp32_idf.hpp
Adds fl/stl/int.h include and replaces uint32_t with fl::u32 for heap capability constants in parlioDmaPsramAvailable() and parlioCanAllocateInternalDmaRing(), and casts read-byte count to u32 in fillRxCache().
ESP32 driver diagnostic logging
src/platforms/esp/32/drivers/lcd_spi/channel_driver_lcd_clockless.cpp.hpp, src/platforms/esp/32/drivers/lcd_spi/lcd_spi_peripheral_esp.cpp.hpp
Adds esp_rom_printf error messages in LcdSpiPeripheral::transmit() for semaphore timeout, panel IO recreation failure, and transaction failure, plus error logging in ChannelDriverLcdClockless::isrChunkDone() when peripheral transmit fails.
Inline documentation clarification
examples/AutoResearch/AutoResearchParlioStream.h
Adds specific comment to ESP32 PARLIO engine header include, clarifying its requirement for AutoResearch streaming diagnostics.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 Errors now whisper their tales to the console,
With types unified in the fl::u32 whole,
Signals bounce to the main thread with care,
Diagnostics blooming—FastLED's debugger's prayer! 🌟

✨ 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 chore/lint-baseline-cleanup

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.

@fastled-project-sync fastled-project-sync Bot moved this to Triage in FastLED Tracker Jun 2, 2026
@fastled-project-sync fastled-project-sync Bot moved this from Triage to Done in FastLED Tracker Jun 2, 2026
zackees added a commit that referenced this pull request Jun 2, 2026
…2685)

Filed root-cause report upstream: forge-ci/zccache#619 (Windows PCH
path-spelling mismatch defeats `#pragma once` across the PCH boundary).
This PR ships the targeted workarounds needed to unblock host-build
tests against the current Stop-hook policy while the upstream fix lands.

Symptom:
  error: redefinition of 'LogLevel'
  note: 'C:/.../src\fl/stl/cstdio.h' included multiple times,
        additional include site here

The same physical cstdio.h header was reached via two different
canonical path spellings — one with mixed slashes (the literal
backslash inserted by clang-on-Windows when joining the `-I` root with
the relative include) and one resolved through the PCH cache — and
`#pragma once` failed to dedupe.

Changes:

1. `ci/meson/shared/meson.build` — replace meson's `/` path-join operator
   with literal `+ '/' +` concatenation. The `/` operator emits the
   native separator on Windows (backslash) even when both operands are
   forward-slash-spelled, which was injecting a trailing backslash into
   every `-IC:/.../src\` flag and feeding zccache an inconsistent
   spelling. This is a real bug in our build setup and gets fixed
   regardless of the upstream zccache work; it just isn't sufficient on
   its own to clear the dedup failure.

2. Six SOURCE-tree files (`src/fl/...`) — remove redundant direct
   `#include "fl/stl/cstdio.h"` lines where cstdio.h was already
   reachable transitively through ostream.h via the PCH. Two of these
   (istream.h, serial.h) actually used cstdio.h symbols; istream.h
   forward-declares the one symbol it needs (`fl::available`), serial.h
   keeps relying on the strstream.h -> ostream.h -> cstdio.h chain that
   is already in scope.

3. Six TEST-tree files — same fix: remove the redundant direct include.
   Each gets an explanatory comment referencing zccache#619 so future
   maintainers can revert the workaround once the upstream fix lands.

4. `src/platforms/esp/32/drivers/lcd_spi/channel_driver_lcd_clockless.cpp.hpp`
   — gate the `esp_rom_printf` call that PR #2684 added under
   `#ifndef FASTLED_STUB_IMPL`. The function compiles on host stub
   (where FASTLED_STUB_IMPL is set) and `esp_rom_printf` is undeclared
   there; the host stub doesn't run the ISR anyway.

Verified: `bash test --cpp` -> 249/249 passed on Windows host with
zccache 1.11.9 + clang 21.1.5.
@zackees
zackees deleted the chore/lint-baseline-cleanup 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

Development

Successfully merging this pull request may close these issues.

1 participant