Skip to content

docs(ci): correct stale esp32 size-ceiling attribution (#3298) - #3743

Merged
zackees merged 2 commits into
masterfrom
fix/3298-stale-size-ceiling-comment
Jul 27, 2026
Merged

zackees merged 2 commits into
masterfrom
fix/3298-stale-size-ceiling-comment

Conversation

@zackees

@zackees zackees commented Jul 27, 2026 •

Copy link
Copy Markdown
Member

Summary

check_esp32_size.yml currently tells readers the 330 KB ceiling is red because "fbuild does not propagate ESP32 board-level build_flags/build_unflags to the toolchain — fix #3298".

That is no longer true. The flag plumbing works. Anyone following that comment would go hunting for a bug that is already fixed, which is worse than no comment at all.

Evidence

Built bash compile esp32dev --examples Blink and inspected .build/pio/esp32dev/.fbuild/build/release/compile_commands.json (58 translation units):

flag present in
-Os 58/58
-fno-exceptions 58/58
-fno-rtti 58/58
-fno-unwind-tables 58/58
-ffunction-sections 58/58
-fdata-sections 58/58

And build_unflags works — a token-exact scan across all entries finds no -g* at all and no -O other than -Os. Both -Og and -g are correctly stripped.

Method note: a substring grep for -g initially reported it surviving in 58/58. That was a false positive from matching inside longer flags. Anyone re-checking this should tokenize rather than substring-match, or they will "confirm" a bug that isn't there.

What's actually left

With the flags fully applied, esp32dev Blink is 391543 bytes (382 KB) — down from the 401240 recorded in #3298, but still ~52 KB over the ceiling.

So the redness is now a genuine code size gap, which belongs to the ongoing per-symbol bloat work (#2974 / #2886 and children), not to flag plumbing. The comment now says that, so the next person reads an accurate pointer.

Scope

Comment-only. max_size and max_size_apa102 are untouched at 330000, so the ci/lint/check_size_thresholds.py mirror lock still passes — confirmed:

✅ Size-thresholds lockdown: all 10 check_*_size.yml workflow(s) match frozen values.

Note on #3298

This PR does not close #3298 — I've posted the measurements there separately. Its first acceptance criterion (flags reach the compile commands) is met; the ≤ 330 KB criterion is not, and that part is really the bloat metas' scope. Worth a maintainer call on whether to close it as "propagation fixed" and track the remainder under #2974, rather than me deciding unilaterally.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Expanded and date-stamped the ESP32 CI size-check guidance to clarify why the current failure is due to remaining code-size overage, not unresolved build-flag propagation.
    • Included verification details (via compile command inspection) and updated Blink size figures relative to the 330 KB ceiling.
    • Reaffirmed that no size thresholds or workflow behavior were changed.

check_esp32_size.yml told readers the ceiling was red because fbuild does
not propagate ESP32 board-level build_flags/build_unflags, and to "fix
#3298" to resolve it. That is no longer true and actively misdirects: the
flag plumbing works, so anyone following the comment would go looking for a
bug that is already fixed.

Verified against
.build/pio/esp32dev/.fbuild/build/release/compile_commands.json:

  -Os -fno-exceptions -fno-rtti -fno-unwind-tables
  -ffunction-sections -fdata-sections     present in 58/58 TUs

and build_unflags strips both -Og and -g -- a token-exact scan finds no
-g* and no -O other than -Os. (A substring grep initially suggested -g
survived in all 58; that was a false positive from matching inside longer
flags. Worth noting because it is an easy way to mis-diagnose this.)

With the flags fully applied, esp32dev Blink is 391543 bytes (382 KB) --
down from the 401240 recorded in #3298, but still ~52 KB over the 330 KB
ceiling. The remainder is per-symbol code size (#2974 / #2886 and
children), not flag plumbing.

Comment-only change: max_size / max_size_apa102 are untouched, so the
ci/lint/check_size_thresholds.py mirror lock still passes.

Co-Authored-By: Claude <[email protected]>
@coderabbitai

coderabbitai Bot commented Jul 27, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 0aad534f-8046-4010-a332-b7e0f2cf7416

📥 Commits

Reviewing files that changed from the base of the PR and between 31eb9a3 and 7ff7468.

📒 Files selected for processing (1)
  • .github/workflows/check_esp32_size.yml

📝 Walkthrough

Walkthrough

The ESP32 size-check workflow comments now explain the dated code-size gap, compiler-flag verification, and Blink measurements. Workflow logic and configured thresholds remain unchanged.

Changes

ESP32 size threshold

Layer / File(s) Summary
Document frozen size threshold
.github/workflows/check_esp32_size.yml
Expanded the threshold comments with verified flag observations and updated Blink size measurements relative to the 330 KB ceiling; configuration values and workflow logic are unchanged.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related issues

  • #3305 — Updates documentation around the ESP32 size-check threshold and reinforces avoiding unjustified threshold increases.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning [3298] The PR only updates comments and does not change ESP32 flag propagation or reduce the binary to the 330 KB ceiling. Implement or verify the actual ESP32 build-flag propagation and size reduction, then tighten the ceiling only if the binary meets the target.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the PR’s comment-only fix for the stale ESP32 size-ceiling attribution.
Out of Scope Changes check ✅ Passed The change stays within scope as a documentation-only update to the ESP32 size-check workflow comment.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/3298-stale-size-ceiling-comment

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/check_esp32_size.yml:
- Around line 49-52: Correct the size-gap comment near the ESP32 Blink size
reference to state the accurate difference between 391,543 bytes and the
330,000-byte ceiling: approximately 61.5 KB (or 60.1 KiB), replacing the
incorrect ~52 KB figure.
- Around line 40-42: Update the comment near the ESP32 size check to state that
only the board-level build_flags/build_unflags propagation portion of `#3298` is
fixed, while the overall issue remains open until the 330 KB target is met.
Avoid wording that implies `#3298` itself is fully resolved.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 2bcb83f2-6d13-4c74-aea9-9f4fd53f2373

📥 Commits

Reviewing files that changed from the base of the PR and between 7c35979 and 31eb9a3.

📒 Files selected for processing (1)
  • .github/workflows/check_esp32_size.yml

Comment thread .github/workflows/check_esp32_size.yml Resolved
Comment thread .github/workflows/check_esp32_size.yml Resolved
Review follow-up. Two fixes, both mine to own.

1. Arithmetic error: 391543 - 330000 = 61543 bytes (~61.5 KB), not the
   ~52 KB I wrote. That came from mixing units -- comparing 382 KB
   (391543/1024) against the ceiling read as 330 KB decimal. State the gap
   in bytes so the unit can't drift again.

2. "#3298 ... is FIXED" read as though the whole issue were resolved. Only
   the flag-propagation half is; the ceiling criterion is still unmet.
   Reworded to say so explicitly.

Co-Authored-By: Claude <[email protected]>
@zackees
zackees merged commit a87f15c into master Jul 27, 2026
9 of 10 checks passed
@fastled-project-sync fastled-project-sync Bot moved this from Triage to Done in FastLED Tracker Jul 27, 2026
@zackees
zackees deleted the fix/3298-stale-size-ceiling-comment branch August 21, 2026 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

fbuild: ESP32 board build_flags / build_unflags aren't propagating from ci/boards.py

1 participant