Repository navigation
docs(ci): correct stale esp32 size-ceiling attribution (#3298) - #3743
Conversation
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]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe 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. ChangesESP32 size threshold
Estimated code review effort: 1 (Trivial) | ~2 minutes Possibly related issues
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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
📒 Files selected for processing (1)
.github/workflows/check_esp32_size.yml
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]>
Summary
check_esp32_size.ymlcurrently 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 Blinkand inspected.build/pio/esp32dev/.fbuild/build/release/compile_commands.json(58 translation units):-Os-fno-exceptions-fno-rtti-fno-unwind-tables-ffunction-sections-fdata-sectionsAnd
build_unflagsworks — a token-exact scan across all entries finds no-g*at all and no-Oother than-Os. Both-Ogand-gare correctly stripped.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_sizeandmax_size_apa102are untouched at 330000, so theci/lint/check_size_thresholds.pymirror lock still passes — confirmed: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 KBcriterion 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