Skip to content

META: cross-backend build verification — fbuild ↔ PlatformIO ↔ arduino-cli drift detection #2413

Open

Description

@zackees

Meta-issue: cross-backend build verification

Why this exists

PR #2395 ("ci: make fbuild the default for board builds") gave us a single canonical build backend, but we've already seen the cost: fbuild is silently drifting from PlatformIO, and we have no programmatic way to detect that drift before it breaks a board.

Concrete fallout: Teensy 4.x has been red on master for 50+ consecutive CI runs since 2026-04-18 when commit cafcfb3493 switched it from PlatformIO to fbuild. Sibling Teensy boards (3.0/3.1/LC) that stayed on PlatformIO continued going green throughout the same window. The proximate failure was a GCC .progmem section-type conflict that only fbuild's flag set surfaces:

colorpalettes.h:23:35: error: 'RainbowColors_p' causes a section type
                              conflict with 'fl::sinCosPairedLut'

Tracing it required manual archaeology of CI history, hand-comparing PlatformIO build_info_*.json against fbuild's reference config, and writing a workaround (FASTLED_USE_PROGMEM=0 for Teensy 4.x, currently uncommitted on branch pr-2395). That workaround masks the real bug — fbuild's flag set differs from PlatformIO's in ways that include -flto=auto -fno-fat-lto-objects, missing -fpermissive, missing CORE_TEENSY define, and several other items.

We don't know how many other boards have similar latent drift.

What this meta-issue tracks

A coordinated three-issue effort to give us cross-backend build verification:

Sub-issue: #2410 — fbuild ↔ PlatformIO compiler-flag drift detection

Foundation. A workflow that, for every supported board, extracts the actual compile commands from both backends, normalizes them, diffs them, and fails CI on unexpected drift. Configurable allowlist for intentional differences.

Sub-issue: #2411 — standardized smoke sketches + opt-in PlatformIO comparison job

Layer on top of #2410. Defines a canonical sketch set under tests/platforms/_standard/ that every board must compile, and adds a default-disabled also_build_with_platformio input to build_template.yml so contributors can flip on a PlatformIO comparison build for any platform with a label or workflow_dispatch. Agent docs updated to point future debuggers at this option.

Sub-issue: #2412 — investigate adding arduino-cli as a third backend

Research-only follow-up. Adds arduino-cli as an independent third reference implementation, converting the two-way comparison into three-way. Deliverable is a feasibility report covering 3+ representative boards (e.g. teensy41, esp32s3, uno), with a yes/no recommendation before any implementation begins.

Dependency order

#2410 (foundation: drift detection script + workflow)
   │
   ├──> #2411 (standardized sketches + opt-in PIO job, uses #2410's drift report)
   │
   └──> #2412 (research: extend two-way to three-way with arduino-cli)

#2410 must land first — both #2411 and #2412 build on its drift-detection plumbing. #2411 and #2412 can proceed in parallel after #2410 is in.

Success criteria for the meta-effort

  • We can answer "is this an fbuild-only failure?" within 5 minutes for any board, not 5 hours
  • CI surfaces unexpected flag drift between backends as a workflow summary, before someone has to reverse-engineer it from a section-conflict error
  • Default per-PR build matrix is not slowed down — opt-in mechanisms only
  • Agent docs explain the diagnostic workflow so future investigations don't repeat the manual archaeology done for Teensy 4.x

Background context

  • Discovery thread: investigating uncommitted Teensy 4.x PROGMEM workaround on branch pr-2395
  • Symptom commit: cafcfb3493 (2026-04-18) — switched teensy40/41 to fbuild
  • First red teensy41 master run: 0639db4e1e (2026-04-18 14:36 UTC)
  • Last green teensy41 master run before the switch: 5502276087 (2026-04-18 14:35 UTC)
  • Sibling Teensy boards still on PlatformIO continuing to go green proves it's a backend regression, not a source-code regression

Activity

  1. added
    status: triage
    type: feature
    priority: high
    area: ci
    on Apr 25, 2026
  2. zackees commented on Jun 5, 2026

    @zackees
    MemberAuthor

    /loop status update — three sub-items now have PRs

    Sub-issue Status PR
    #2410 flag-drift detection (fbuild ↔ PlatformIO) first-board prototype shipped #2801 (refs #2410) — script detected real drift on teensy41 (-flto=auto, -std=gnu11, framework version-stamp mismatches) using existing build_info.json snapshots. Matrix over all boards + CI gate deferred to follow-ups per PR body.
    #2411 standardized smoke sketches + opt-in PIO comparison Part A shipped (manifest + reader + tests) #2803 (refs #2411) — tests/platforms/_standard/SMOKE_SKETCHES.txt plus ci/standardized_smoke_sketches.py reader; Part B (opt-in also_build_with_platformio in build_template.yml) deferred.
    #2412 arduino-cli as third backend investigation comment posted #2412 (comment) — 38/64 boards covered by 1st-party cores; arduino-cli largely tracks PlatformIO; recommend opt-in third axis via workflow_dispatch, NOT default gate.

    Also adjacent:

    What's NOT addressed by this batch:

    — Automated status consolidation from /loop iteration.

  3. zackees commented on Jun 16, 2026

    @zackees
    MemberAuthor

    Triage pass: all three sub-issues (#2410 / #2411 / #2412) still OPEN with no PR activity since filing 10 days ago. The motivating concrete fallout (Teensy 4.x red on master for 50+ CI runs since 2026-04-18, the .progmem section-type conflict in colorpalettes.h:23) is real and worth fixing — but the meta's structure as "a coordinated three-issue effort" hasn't translated into anyone picking one up.

    Recommendation: the value here is in #2410 specifically — "is this an fbuild-only failure?" within 5 minutes. The other two (#2411 smoke sketches + opt-in PIO job, #2412 arduino-cli third backend) are nice-to-haves on top.

    A 1-2 day implementation of #2410 would be:

    1. Add a CI matrix job that runs the same per-board sketch under both fbuild and PlatformIO.
    2. Dump compiler invocations from both (-v or build_info_*.json) to artifacts.
    3. Add a script that diffs the flag sets and reports drift.
    4. Don't fail the build on drift initially — just expose it in the workflow summary.

    That alone would close the "how many other boards have similar latent drift" worry. Standing by — happy to take #2410 as an off-bench piece, but it touches CI workflow YAML + would benefit from your nod on the right matrix entry to pin it to.

  4. added
    deferred
    on Aug 20, 2026
  5. zackees commented on Aug 20, 2026

    @zackees
    MemberAuthor

    Deferred after a current-master audit. PRs #2801, #2803, and #3155 are partial foundations, but the meta issue still spans all-board flag drift, allowlists/baselines, generic opt-in dual-backend CI, an Arduino CLI third backend, and diagnostic documentation. Nightly parity compares representative ELF outputs rather than compiler flags. Resume as an owned cross-backend CI program after the individual #2410–#2412 workstreams are staffed.

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

    area: cideferredpriority: highstatus: triagetype: feature

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions