Skip to content

fix(boards): catch up tinyuf2 partition rename + whitelist cmsis_dsp_lib (clears 27/39 drift)#318

Merged
zackees merged 2 commits into
mainfrom
fix/board-drift-partitions-rename
May 30, 2026
Merged

fix(boards): catch up tinyuf2 partition rename + whitelist cmsis_dsp_lib (clears 27/39 drift)#318
zackees merged 2 commits into
mainfrom
fix/board-drift-partitions-rename

Conversation

@zackees
Copy link
Copy Markdown
Member

@zackees zackees commented May 30, 2026

Summary

Validate Board Definitions workflow has been failing with 39 boards drifted from PlatformIO. The two largest categories are pure schema drift that this PR resolves; the remaining ~14 are configuration-choice differences that need maintainer review.

Fixed in this PR

1. tinyuf2 partition CSV rename (18 boards)

Upstream Adafruit / the espressif32 platform's Adafruit board defs renamed tinyuf2-partitions-<size>.csvpartitions-<size>-tinyuf2.csv. Our bundled board JSONs still pointed to the old name.

Renamed in:

  • adafruit_feather_esp32s2{,_reversetft,_tft}
  • adafruit_feather_esp32s3{,_nopsram,_reversetft,_tft}
  • adafruit_funhouse_esp32s2
  • adafruit_magtag29_esp32s2
  • adafruit_matrixportal_esp32s3
  • adafruit_metro_esp32s2, adafruit_metro_esp32s3
  • adafruit_qtpy_esp32s2
  • adafruit_qtpy_esp32s3_n4r2, adafruit_qtpy_esp32s3_nopsram
  • adafruit_qualia_s3_rgb666
  • featheresp32-s2
  • wt32-sc01-plus

All swaps are mechanical s/tinyuf2-partitions-<N>MB.csv/partitions-<N>MB-tinyuf2.csv/.

2. 4d_systems_esp32s3_gen4_r8n16 partitions

esp_sr_16.csvdefault_16MB.csv per upstream.

3. Validator whitelist for cmsis_dsp_lib (8 teensy boards)

build.cmsis_dsp_lib was added by fbuild#300 (PR #313) as an intentional fbuild-only schema extension — Teensyduino's makefile picks the matching arm_cortexM*_math archive at link time, but fbuild needs it declared statically. The validator was flagging all 8 teensy variants because diff_dicts treats every key present in the actual asset that's missing in the expected (PIO) side as drift.

Added FBUILD_EXTENSION_BUILD_FIELDS whitelist (currently just cmsis_dsp_lib) and strip those from the actual side before diffing. Documented in-place so future fbuild-only extensions have a place to land with a one-line note.

Not in scope

Remaining ~14 boards have configuration-choice drift that needs a real decision:

  • arduino_nano_esp32: BOARD_HAS_PIN_REMAP (upstream) vs BOARD_USES_HW_GPIO_NUMBERS (ours)
  • um_feathers3, um_nanos3, um_pros3, um_tinys3: ours have -DARDUINO_USB_MODE=1 extra
  • seeed_xiao_esp32c6: XIAO_ESP32C6 variant + USB defines + PID drift
  • m5stack_core family: m5stack_core (ours) vs m5stack_core_esp32 (upstream)
  • um_tinys2: extra memory_type + partitions
  • labplus_mpython, lolin_s3_mini: similar one-offs

Each requires a maintainer decision about which value is correct for fbuild's compile path — not auto-resolvable by a snapshot rebase. Leaving those for a separate sweep.

Test plan

  • ci/validate_boards.py count after fix: down from 39 → ~14 (the configuration-choice drifts).
  • CI Validate Board Definitions check: still RED (real drift remains) but the categories that are mechanical schema drift are cleared. A follow-up PR per maintainer review closes the rest.

Refs fbuild#300, fbuild#313.

Summary by CodeRabbit

  • Bug Fixes

    • Board validation process now correctly handles and excludes build-specific configuration extensions from drift detection.
  • Chores

    • Updated partition scheme references for multiple supported boards including Adafruit Feather, Metro, and compatible variants to improve build consistency.

Review Change Stack

zackees added 2 commits May 30, 2026 13:28
…pawn lint

After f86817a (refactor lib.rs → submodules) the four
std::process::Command::new sites in fbuild-python/daemon.rs ended up
inside `match` arms two lines below their `allow-direct-spawn:`
comment. The detector in ci/find_direct_subprocess.py only looks at
"same line or the line immediately above", so the annotation no longer
covered the actual call sites and CI started reporting:

  NEW direct spawns without an `allow-direct-spawn: <reason>` marker:
    crates/fbuild-python/src/daemon.rs:96
    crates/fbuild-python/src/daemon.rs:97
    crates/fbuild-python/src/daemon.rs:247
    crates/fbuild-python/src/daemon.rs:248

This blocks every PR's "Lint subprocess spawns" check (e.g. #306 for
fbuild#304, which is the actual FastLED-vs-PIO size regression we
need to land).

Fix: add an inline `// allow-direct-spawn:` annotation immediately
above each of the four arms. Behavior unchanged.
…ist cmsis_dsp_lib

`Validate Board Definitions` workflow has been failing 39 boards
drifted from PlatformIO. The two largest categories are pure schema
drift that this PR resolves; the remaining ~14 are configuration-
choice differences that need maintainer review.

## Fixed: tinyuf2 partition CSV rename (18 boards)

Upstream Adafruit (and the espressif32 platform's Adafruit board
defs) renamed `tinyuf2-partitions-<size>.csv` ->
`partitions-<size>-tinyuf2.csv`. Our bundled board JSONs still pointed
to the old name. Renamed in:

  adafruit_feather_esp32s2{,_reversetft,_tft}
  adafruit_feather_esp32s3{,_nopsram,_reversetft,_tft}
  adafruit_funhouse_esp32s2
  adafruit_magtag29_esp32s2
  adafruit_matrixportal_esp32s3
  adafruit_metro_esp32s2
  adafruit_metro_esp32s3
  adafruit_qtpy_esp32s2
  adafruit_qtpy_esp32s3_n4r2
  adafruit_qtpy_esp32s3_nopsram
  adafruit_qualia_s3_rgb666
  featheresp32-s2
  wt32-sc01-plus

All swaps are mechanical s/tinyuf2-partitions-<N>MB.csv/partitions-<N>MB-tinyuf2.csv/.

## Fixed: 4d_systems_esp32s3_gen4_r8n16 partitions

`esp_sr_16.csv` -> `default_16MB.csv` per upstream.

## Fixed: validator whitelist for cmsis_dsp_lib (8 teensy boards)

`build.cmsis_dsp_lib` was added by fbuild#300 (PR#313) as an
intentional fbuild-only schema extension — Teensyduino's makefile
picks the matching `arm_cortexM*_math` archive at link time, but
fbuild needs it declared statically. The validator was flagging all
8 teensy variants because the diff treats every extra key in the
actual asset as drift.

Added `FBUILD_EXTENSION_BUILD_FIELDS` whitelist (currently just
`cmsis_dsp_lib`) and strip those from the actual side before diffing.
Documented in-place so future fbuild-only extensions have a place to
land with a one-line note.

## Not in scope

Remaining ~14 boards have configuration-choice drift (UM boards
`-DARDUINO_USB_MODE=1` difference, m5stack variant rename, seeed_
xiao_esp32c6 USB defines, arduino_nano_esp32 BOARD_USES_HW_GPIO_NUMBERS
vs BOARD_HAS_PIN_REMAP, um_tinys2 extras). Each requires a real
decision about which value is correct for fbuild's compile path —
not auto-resolvable by a snapshot rebase. Leaving those for a
separate maintainer-driven sweep.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 30, 2026

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: a309f1bc-e398-406d-a19c-7de904c3ed77

📥 Commits

Reviewing files that changed from the base of the PR and between b7560aa and d9f2320.

📒 Files selected for processing (21)
  • ci/validate_boards.py
  • crates/fbuild-config/assets/boards/json/4d_systems_esp32s3_gen4_r8n16.json
  • crates/fbuild-config/assets/boards/json/adafruit_feather_esp32s2.json
  • crates/fbuild-config/assets/boards/json/adafruit_feather_esp32s2_reversetft.json
  • crates/fbuild-config/assets/boards/json/adafruit_feather_esp32s2_tft.json
  • crates/fbuild-config/assets/boards/json/adafruit_feather_esp32s3.json
  • crates/fbuild-config/assets/boards/json/adafruit_feather_esp32s3_nopsram.json
  • crates/fbuild-config/assets/boards/json/adafruit_feather_esp32s3_reversetft.json
  • crates/fbuild-config/assets/boards/json/adafruit_feather_esp32s3_tft.json
  • crates/fbuild-config/assets/boards/json/adafruit_funhouse_esp32s2.json
  • crates/fbuild-config/assets/boards/json/adafruit_magtag29_esp32s2.json
  • crates/fbuild-config/assets/boards/json/adafruit_matrixportal_esp32s3.json
  • crates/fbuild-config/assets/boards/json/adafruit_metro_esp32s2.json
  • crates/fbuild-config/assets/boards/json/adafruit_metro_esp32s3.json
  • crates/fbuild-config/assets/boards/json/adafruit_qtpy_esp32s2.json
  • crates/fbuild-config/assets/boards/json/adafruit_qtpy_esp32s3_n4r2.json
  • crates/fbuild-config/assets/boards/json/adafruit_qtpy_esp32s3_nopsram.json
  • crates/fbuild-config/assets/boards/json/adafruit_qualia_s3_rgb666.json
  • crates/fbuild-config/assets/boards/json/featheresp32-s2.json
  • crates/fbuild-config/assets/boards/json/wt32-sc01-plus.json
  • crates/fbuild-python/src/daemon.rs

📝 Walkthrough

Walkthrough

Board validation now recognizes fbuild-only build extensions and filters them during PlatformIO drift comparison. Eighteen board JSON configurations update partitions CSV naming conventions. Daemon spawn logic includes clarifying comments on intentional direct spawns.

Changes

Board Configuration and Validation

Layer / File(s) Summary
Board validation extension support
ci/validate_boards.py
New FBUILD_EXTENSION_BUILD_FIELDS constant identifies fbuild-only fields like cmsis_dsp_lib. Validation logic filters these extensions from actual board JSON before comparing against PlatformIO definitions. JSON output formatting for missing_by_source is also adjusted.
Board partitions CSV reference updates
crates/fbuild-config/assets/boards/json/*.json (18 files)
Eighteen board configuration files update build.arduino.partitions to use renamed CSV filenames: partitions-{SIZE}MB-tinyuf2.csv instead of tinyuf2-partitions-{SIZE}MB.csv. One board (4d_systems_esp32s3_gen4_r8n16) uses default_16MB.csv. Changes are isolated to the partitions field only.

Daemon Spawn Documentation

Layer / File(s) Summary
Daemon spawn allow-direct-spawn comments
crates/fbuild-python/src/daemon.rs
Both Daemon::ensure_running and AsyncDaemon::ensure_running match arms now include "allow-direct-spawn" comments to document intentional direct spawn behavior under subprocess-lint enforcement. No code logic is changed.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • FastLED/fbuild#200: Establishes the subprocess-lint/hold-out scheme for intentional direct spawns that this PR documents with clarifying comments.

Poem

🐰 Partitions dance in rename parade,
Extension fields no drift cascade,
Eighteen boards in sync align,
Comments gleam on spawn's design,
Validation flows with fbuild's sign!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: tinyuf2 partition rename across multiple boards and cmsis_dsp_lib whitelist for drift reduction.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ 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 fix/board-drift-partitions-rename

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 872a291 into main May 30, 2026
78 of 83 checks passed
zackees added a commit that referenced this pull request May 30, 2026
Bundles four user-facing fixes merged since 2.2.9:

- #319, #320: SAMD51 cores/arduino fallback + variant include
  injection (Build SAMD51J was 100% red)
- #321, #322: nRF52 nRF52DK -> pca10056 variant alias for Adafruit
  framework (Build nRF52840 DK was 100% red)
- #298 (already shipped 2.2.9, board JSON drift cleanup): #318 catches
  up the tinyuf2 partition renames + adds cmsis_dsp_lib validator
  whitelist (Validate Boards was failing on 39 boards, now 14)
- #317: daemon.rs Command::new annotations (Lint subprocess spawns
  was red — blocked every PR)

Downstream FastLED bumps fbuild==2.2.9 to fbuild==2.2.10 to pick up
these fixes.
zackees added a commit to FastLED/FastLED that referenced this pull request May 30, 2026
…de paths per compile (#2617)

## fbuild pin: 2.2.9 -> 2.2.11

2.2.11 republishes 2.2.10's content with the full wheel set (win_amd64
+ manylinux_x86_64 were missing from 2.2.10's PyPI upload — that
release was effectively unusable on Windows and Linux x64). Content
otherwise identical to 2.2.10. Brings in:

- SAMD51 cores/arduino fallback + include-path injection
  (FastLED/fbuild#319/#320). Build SAMD51J was 100% red.
- nRF52 nRF52DK -> pca10056 variant alias for the Adafruit framework
  (FastLED/fbuild#321/#322). Build nRF52840 DK was 100% red.
- Board JSON tinyuf2 partition rename (18 Adafruit boards) + 4d_systems
  esp_sr_16.csv -> default_16MB.csv + cmsis_dsp_lib validator whitelist
  (FastLED/fbuild#318). Validate Boards drift drops 39 -> 14.
- daemon.rs Command::new subprocess-spawn lint annotations
  (FastLED/fbuild#317). Unblocked every PR's Lint subprocess spawns
  check.

## ci/meson/compile.py: re-normalize strict-path includes before each build

zccache strict-paths rejects relative + backslash include flags. The
build_config helper normalizes once at setup, but ninja silently
regenerates build.ninja when build files change, which re-introduces
the relative form (e.g. -Ici/.../fastled.dll.p with a backslash). The
next compile then dies with zccache --strict-paths violation.

Fix: call normalize_meson_private_include_paths(build_dir) at the top
of compile_meson, right after the stale-PCH check. Costs ~5-20 ms and
is idempotent when nothing changed. KBI001-compliant (KeyboardInterrupt
handler calls handle_keyboard_interrupt(ki) before re-raise; module
already imports it at line 25).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant