Skip to content

META: adversarial review of this session's work — six defects, four of them half-finished fixes #4027

Closed

Description

@zackees

Summary

An adversarial pass over the work landed in this session (#4015, #4019, and the WASM embedded-FS branch). Every finding below is a defect I introduced or left behind, verified against the tree rather than suspected.

The pattern worth naming up front: four of the six are half-finished fixes. In each case the first half was implemented, tested, and reported as done, while the symmetric second half was never checked — because the test that would have shown it was the one I had just written to pass.

Sub-issues

# Defect Shape
#4021 FASTLED_SAMD51_HW_SPI violates the FL_ macro standard, already on master same mistake caught on one PR, missed on another
#4022 ESP32 SPI pin defaults still land on GPIO 1 (U0TXD) clockless fixed, clocked not — sweep only built Blink
#4023 Embedded asset fetch has no timeout, so a stalled URL hangs setup() forever traded a correctness bug for a liveness bug
#4024 Completeness check skips itself when size is unknown verification absent exactly where truncation is likeliest
#4025 Declared sha256/fallback never used — assets trusted unverified data present, ignored
#4026 verify_wasm_assets.py not wired into CI unrun test reads as coverage while decaying

The recurring failure

Two are enforcement gaps rather than logic errors: a rule with no linter (#4021) and a test with no runner (#4026). Both were caught by review or by writing a test once, and neither is caught continuously.

Plan

Fix in dependency order, since several touch the same files:

  1. FASTLED_SAMD51_HW_SPI violates the FL_ macro standard and is already on master #4021 — mechanical rename, unblocks nothing but is on master now.
  2. ESP32 SPI pin defaults still land on GPIO 1 (U0TXD) — only the clockless half was fixed #4022 — declare ESP32 SPI pins; extend the sweep to Apa102 so the clocked path is covered.
  3. WASM: embedded asset fetch has no timeout, so a stalled URL hangs setup() forever #4023 + WASM: completeness check skipped entirely when an asset's size is unknown #4024 + WASM: declared sha256 and fallback are never used — assets are trusted unverified #4025 — one pass over resolveManifestAssets/processFile: timeout, size-unknown handling, digest verification, fallback on failure.
  4. verify_wasm_assets.py is not wired into CI and will rot #4026 — wire the verifier into CI so the above stays true.

Acceptance: bash lint clean, bash test --cpp green, verify_wasm_assets.py passing, and a WASM + ESP32 + SAMD compile of both Blink and Apa102.

Activity

  1. zackees commented on Sep 10, 2026

    @zackees
    MemberAuthor

    Audit: all six verified against the tree, not against their closure state

    All six sub-issues are closed. Given this issue's own theme is fixes reported as done that were not, I re-verified each against the current tree rather than trusting the closures.

    # claim verified
    #4021 FASTLED_SAMD51_HW_SPI renamed ✅ renamed in ba8cef0d0c, and the guard was later dropped entirely — no non-conforming macro remains
    #4022 ESP32 SPI pins declared ✅ FL_PIN_SPI_DATA_1_DEFAULT / _CLOCK_1_DEFAULT per chip (35/36, 11/12, 7/6, 19/18, 11/10) — none is GPIO 1 or 3
    #4023 fetch timeout ✅ AbortSignal.timeout(30000) on both fetch paths, with TimeoutError reported distinctly
    #4024 completeness when size unknown ✅ cleanEnd from a resolved arrayBuffer(), deliberately independent of Content-Length
    #4025 sha256 / fallback used ✅ digest checked before the bytes are handed on, and it fails closed when SubtleCrypto is unavailable
    #4026 verifier wired into CI ✅ ci/tests/verify_wasm_assets.py, run at build_wasm.yml:123 after an AudioUrl build

    The sweep gap that caused #4022 is closed too

    That defect's root cause was "the compile sweep built Blink only, so nothing exercised the clocked path". Checked:

    • SAMD: samd21, samd21_zero, samd51j, samd51p all build Blink,Apa102
    • ESP32: build.yml builds esp32dev, esp32c3, esp32s3 with Blink,Apa102, and the per-chip workflows build all

    So the regression that motivated it would now be caught.

    The one thing that was genuinely still open

    This issue says it plainly:

    Two are enforcement gaps rather than logic errors: a rule with no linter (#4021) and a test with no runner (#4026). Both were caught by review or by writing a test once, and neither is caught continuously.

    #4026 got its runner. #4021's linter never got built — its own checkbox "Consider a linter rule for new FASTLED_* definitions" was still unticked.

    #4256 builds it: a name ratchet over the ~490 existing macros, failing on any new one, wired into bash lint.

    Worth recording one thing from that work, because it is the same failure pattern this issue is about. My first version scanned #define only — and FASTLED_SAMD51_HW_SPI was a user-supplied opt-in that appears solely as #if defined(...) and is never defined in this repo. A definitions-only checker would have passed the exact defect it was written to prevent. I found that by replaying the historical case against the checker rather than assuming it worked; the shipped version matches any preprocessor line, and the definitions-only shape is now a killed mutation in its test suite.

    Acceptance

    bash lint clean, bash test --cpp 300/300 unit + 84/84 examples. The WASM/ESP32/SAMD Blink+Apa102 compiles run in CI on every PR, which is the durable form of that criterion.

    Closing: all six defects are fixed and verified in the tree, and the last enforcement gap is in flight as #4256.

  2. moved this from Triage to Done in FastLED Trackeron Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions