Skip to content

ci(compiled_size): _override_prog_path_for_fbuild misses fbuild --quick (debug/) builds #2852

Closed

Description

@zackees

Symptom

ci/compiler/build_config.py::_override_prog_path_for_fbuild (landed in #2823) rewrites build_info.prog_path to the fresh fbuild ELF so downstream symbol/size analysis doesn't accidentally read a stale .pio/build/<env>/firmware.elf. It only checks one fbuild artifact path:

fbuild_elf = fbuild_root / env_name / "release" / "firmware.elf"

But fbuild lays out artifacts under .fbuild/build/<env>/<release|debug>/firmware.elf, and the build mode comes from how it was invoked:

  • fbuild build (default) -> release/firmware.elf
  • fbuild build --release (explicit) -> release/firmware.elf
  • fbuild build --quick (debug-equiv) -> debug/firmware.elf

When a user (or a CI script) runs fbuild build --quick and then re-runs symbol analysis, the override silently no-ops because release/firmware.elf doesn't exist, leaving prog_path pointing at whatever stale .pio/build/<env>/firmware.elf is on disk. Same failure mode #2823 was fixing, just for the other build mode.

Reproduction (sketch)

  1. Wipe the project's .fbuild build tree via bash test --clean or by removing only the .fbuild subtree.
  2. Invoke uv run fbuild .build/pio/esp32dev build -e esp32dev --quick — writes .fbuild/build/esp32dev/debug/firmware.elf.
  3. Run uv run python -m ci.compiled_size --board esp32dev --example Blink.
  4. Observed: reports size of stale .pio/build/<env>/firmware.elf or fails with FileNotFoundError, NOT the just-built debug ELF.

Fix

Probe both subdirs and prefer the newer one. Roughly:

candidates = [
    fbuild_root / env_name / "release" / "firmware.elf",
    fbuild_root / env_name / "debug"   / "firmware.elf",
]
existing = [c for c in candidates if c.exists()]
if not existing:
    return
fbuild_elf = max(existing, key=lambda p: p.stat().st_mtime)

This keeps the existing newer-than-PIO comparison; it just adds debug/ as a candidate.

Scope

Part of a small infra sweep tracked at #2855.

🤖 Filed by Claude Code via /goal session

Activity

  1. moved this from Triage to Done in FastLED Trackeron Jun 6, 2026
  2. added a commit that references this issue on Jun 6, 2026
    4c31af9
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