Repository navigation
Description
Phase tracker (meta)
- Phase 1a — Port PARLIO IRAM flags to
ci/boards.py— issue esp32: CONFIG_PARLIO_TX_ISR_HANDLER_IN_IRAM=1 should be a boards.py default on all PARLIO-capable boards #3271 — PR fix(esp32/parlio): CONFIG_PARLIO_TX_ISR_HANDLER_IN_IRAM=1 default in boards.py #3276 - Phase 1b — Port
monitor_filters+check_tooltoBoarddataclass — PR feat(boards.py): port monitor_filters + check_tool from root platformio.ini (#3274 Phase 1) #3277 - Phase 2 — Sever root
platformio.inimerge from CI compile path — issue Sever root platformio.ini merge from CI compile path (#3274 Phase 2) #3278 - Phase 3+4 — Deprecate
PioCompileras fallback + cleanup (delete merge fn, revert PR fix(ci/size): esp32dev overrides generic-esp debug flags (restore 330KB ceiling) #3268 overrides, close bash compile --backend platformio silently discards root platformio.ini build_flags #2664) — issue Deprecate PioCompiler as build fallback + Phase 4 cleanup (#3274 Phase 3) #3279
Each phase is gated on the previous landing. Phase 2 is blocked on Phase 1 PRs merging; Phase 3 is blocked on Phase 2 landing.
Problem statement
Root ./platformio.ini is silently merged into every firmware build via PioCompiler._init_platformio_build → get_root_platformio_build_flags (ci/compiler/pio.py:155, ci/compiler/build_config.py:33-89). This was added in PR #2794 (closing #2664) to fix a real interactive-dev pain — flags edited in root [env:<board>] were silently discarded by bash compile --backend platformio. But the fix was implemented at the wrong layer: at the shared setup function that every firmware build flows through (fbuild, PIO, size-check, bloat, autoresearch, bash debug, regression tests). There is no opt-out.
Critically, the leak is not PioCompiler-specific. fbuild reads the synthesised .build/pio/<env>/platformio.ini that PioCompiler's setup writes. So even though BOARD_BUILDS_USE_FBUILD = True is already the default (ci/compiler/compilation_orchestrator.py:25), fbuild still inherits the merge. Severing the coupling requires touching the setup function, not the backend selection.
Symptom of record: PR #3268 (esp32dev size-check). Inherited debug flags from [env:generic-esp] (build_type = debug, -g, -Og, CORE_DEBUG_LEVEL=5, FASTLED_DEBUG=1) silently doubled the esp32dev binary and forced manual -UDEBUG / -DNDEBUG / -Os / -fno-exceptions / -fno-rtti / build_type = release overrides inside [env:esp32dev] to defeat the merge.
Target architecture
| Surface | Reads root platformio.ini? |
Backend |
|---|---|---|
bash autoresearch |
optional / direct (not via boards.py merge) | fbuild only |
bash debug |
optional / direct | fbuild + optional pio for parity comparison |
bash compile |
NO | fbuild only; PioCompiler retained as --backend platformio comparison opt-in |
bash bloat, size-check, regression tests |
NO | fbuild only |
| WASM | NO (already true) | wasm-direct |
| CI workflows | NO | fbuild only |
boards.py becomes the single source of truth for everything that compiles in CI. Root platformio.ini is retained only as developer scaffolding for interactive dev sessions (and is on a path to retirement once bash debug / bash autoresearch no longer need it).
PioCompiler is retained but deprecated as a build fallback. Its only sanctioned use is --backend platformio invoked explicitly to compare fbuild output and surface gaps. It must never be the default and must never be selected silently.
Phase 1 — Migrate flags that exist only in root
Audit found these blocking gaps in ci/boards.py that the merge is invisibly covering today. These MUST be ported before the merge can be removed:
monitor_filters = esp32_exception_decoderlives only in[env:generic-esp](platformio.ini:16-18). Inherited by every ESP32 board for crash-trace decoding. Addmonitor_filters: list[str]to theBoarddataclass inci/boards.py, emit it fromBoard.to_platformio_ini(), and set it on the ESP32 board definitions (or a shared ESP32 base).check_tool = clangtidy(platformio.ini:41). Lower priority — affectspio check, not compile. Port or document as wontfix.-D CONFIG_PARLIO_TX_ISR_HANDLER_IN_IRAM=1and-D CONFIG_PARLIO_TX_ISR_CACHE_SAFE=1onesp32c6— tracked separately in esp32: CONFIG_PARLIO_TX_ISR_HANDLER_IN_IRAM=1 should be a boards.py default on all PARLIO-capable boards #3271 (must land before Phase 2).
Run a full diff: every flag in every [env:*] section of root vs the corresponding boards.py board's build_flags / defines. Anything that exists only in root and isn't dev-only (debug flags, monitor filters for serial sessions, etc.) must be migrated.
Phase 2 — Add deprecation telemetry, then sever the merge
- Log merged flags loudly for one release cycle:
[DEPRECATION] Root platformio.ini contributed N build_flags to <board>: [...] These will stop being merged in vX.Y. Move them to ci/boards.py. - Add a
FASTLED_FAIL_ON_ROOT_MERGE=1env var that CI workflows set; under it the merge raises instead of merging silently. Catches any missed migration in CI before flipping the default. - Add a
merge_root_platformio: bool = Falseparameter toPioCompiler.__init__(defaultFalse). Plumb through_init_platformio_buildsoget_root_platformio_build_flagsis only called when the parameter isTrue. - Flip the call sites:
ci-compile.py(interactivebash compile): passmerge_root_platformio=Falsealways. The merge is killed for the primary entry point.ci/debug_attached.py(bash debug): passTrueonly if user invokes a "use my root config" mode (e.g.bash debug --use-root-ini); defaultFalse. Current behavior already reads only the synthesised ini for compile.ci/autoresearch/build_driver.py: passFalse. AutoResearch is 100% boards.py-driven today; no behavior change.compile_board_examples(CI orchestrator): passFalse.- CI workflows under
.github/workflows/: no change needed — all route throughbash compile/ci-compile.py.
Phase 3 — Deprecate PioCompiler as a build fallback
- Remove silent fallback.
BOARD_BUILDS_USE_FBUILD = Trueis the default; tighten souse_fbuild=Falseonly takes effect when the user passes--backend platformioexplicitly. Reject programmatic callers that flip it without the explicit flag. - Mark
--backend platformioas a comparison tool. Update--helptext and CLAUDE.md / build-system docs: "Use only to compare fbuild output and find gaps." - Add a CI nightly job (low cost) that runs
bash compile <small set of boards> --backend platformioand compares ELF sizes / symbol counts vs fbuild. Failures filed as gap-tracking issues, not merge-blockers. - Eventual removal: track usage telemetry for one release cycle. If
--backend platformiois unused outside the comparison nightly, removePioCompilerentirely.
Phase 4 — Cleanup
- Delete
get_root_platformio_build_flags, the merge call inpio.py:155-161, andci/tests/test_root_platformio_flag_merge.py. - Add a header comment to root
platformio.ini: "This file is consumed only bybash autoresearchandbash debug. CI compile, size-check, bloat, and tests readci/boards.py. Flags added here will NOT affect those builds." - Revert PR fix(ci/size): esp32dev overrides generic-esp debug flags (restore 330KB ceiling) #3268's manual debug-flag overrides in
[env:esp32dev]— they exist only to defeat the merge, which no longer fires. - Close bash compile --backend platformio silently discards root platformio.ini build_flags #2664 with a note: the original fix is being replaced by the documented separation in the header comment;
bash compileno longer reads root, by design.
Risks and migration order
- Phase 1 must complete before Phase 2's flip. Removing the merge without porting
monitor_filterssilently breaks serial crash decoding on every ESP32 board. - The
FASTLED_FAIL_ON_ROOT_MERGE=1gate in CI is the safety net — makes any forgotten flag a loud failure during the migration window instead of a silent regression after. bash debugalready routes compile through the synthesised ini (ci/debug_attached.pyusesPioCompilerwithuse_fbuild=True). Its dependency on root is weaker than implied — Phase 2 keeps an opt-in for it, but in practice may not need root at all once Phase 1 ports the monitor filters.--backend platformioparity comparisons (Phase 3) are how the "fbuild has a gap" feedback loop stays alive oncePioCompilerstops being a fallback. Don't skip the nightly.
Labels / refs
- Labels: area:build, area:ci, breaking-change, tech-debt
- Supersedes: bash compile --backend platformio silently discards root platformio.ini build_flags #2664 (the root-merge fix being replaced)
- Symptom that prompted this: PR fix(ci/size): esp32dev overrides generic-esp debug flags (restore 330KB ceiling) #3268
- Blocked on (Phase 1): esp32: CONFIG_PARLIO_TX_ISR_HANDLER_IN_IRAM=1 should be a boards.py default on all PARLIO-capable boards #3271 (PARLIO IRAM flag default)
- Linked PRs (future): one PR per phase, gated on the previous phase landing
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
fix(esp32/parlio): make CONFIG_PARLIO_TX_ISR_HANDLER_IN_IRAM=1 a boar…
feat(boards.py): add monitor_filters + check_tool; auto-default ESP32…
chore(lockdown): require justification on every change to root platfo…
feat(autoresearch): synthesise platformio.ini from boards.py, drop ro…
ci(workflows): retire FASTLED_FAIL_ON_ROOT_MERGE tripwire post Phase 4
fix(ci/boards): port esp32dev size-strip flags to ESP32DEV definition
feat(ci): deprecate PioCompiler backend + Phase 4 cleanup (#3279) (#3295
zackees commentedon Jun 19, 2026
All four phases complete and merged:
fix(esp32/parlio): CONFIG_PARLIO_TX_ISR_HANDLER_IN_IRAM=1 default in boards.pyfeat(boards.py): port monitor_filters + check_tool from root platformio.inichore(lockdown): require justification on every change to root platformio.inifix(ci/pio): sever root platformio.ini merge from CI compile pathfeat(ci): deprecate PioCompiler backend + Phase 4 cleanupSub-issue
bash autoresearchmigration (#3281) also landed via PR #3290 — autoresearch now synthesises its own platformio.ini from ci/boards.py instead of consuming the root file.Closing as completed.