Skip to content

ci(size-checks): bump teensy41 Apa102 budget 88000 → 165000 (Closes #2802) - #2804

Merged
zackees merged 2 commits into
masterfrom
fix/size-budgets-teensy41-esp32
Jun 5, 2026
Merged

zackees merged 2 commits into
masterfrom
fix/size-budgets-teensy41-esp32

Conversation

@zackees

@zackees zackees commented Jun 5, 2026 •

Copy link
Copy Markdown
Member

Summary

Narrows the `max_size_apa102` budget in `check_teensy41_size.yml` from 88,000 to 165,000 so the workflow can go green. Closes #2802.

Scope-narrowed from the original PR. The esp32dev budget bump that was originally part of this PR is being handled separately by #2790 (Closes #2608, narrower scope, filed first). The latest commit on this branch reverts the `check_esp32_size.yml` change.

What's broken (teensy41 portion)

`check_teensy41_size` has been red on master for ≥4 days because its Apa102 budget is smaller than the current real binary size — the library has legitimately grown past it. A budget that has not matched reality for that long does not catch regressions; it only blocks unrelated commits.

Example Current bytes Old budget New budget Headroom
Blink (unchanged) 57,340 120,000 120,000 53% spare
Apa102 148,476 88,000 165,000 ~11% spare

What this PR is not

This is a pragmatic budget bump, not a real-bloat fix. The symbol-analysis output in the failing run shows Apa102 is pulling in things that look unrelated to driving APA102 LEDs:

  • `fl::ifstream` / `fl::posix_filebuf`
  • `fl::strerror`
  • `fl::detail::not_null_assert_failed`
  • `fl::AsyncLogQueue` / `fl::AsyncLogger`

A separate follow-up should audit why these get linked in and either gate them off LED-only code paths or accept the size and re-tighten the budget. The new `TODO(#2802)` comment in the workflow file documents this.

Test plan

Pure CI configuration change — `bash compile` doesn't exercise the limit (it's applied by the size-check workflow). PR CI on `check_teensy41_size` is the authoritative check.

`bash lint` clean.

Mandatory code-review trigger

Per global CI rules: modifying CI/CD pipelines is a code-review trigger. Flagging explicitly.

Scope

🤖 Generated with Claude Code

…le-budget red

`check_teensy41_size` and `esp32dev_binary_size` have both been red on
master for ≥4 days because their `max_size_*` budgets are smaller than
the current real binary size — the library has legitimately grown past
them (audio API, fl::stl additions, channel manager, fl::AsyncLog*,
fl::ifstream linkage). The budget hasn't matched reality for so long
that it no longer catches regressions; it only blocks unrelated commits.

This is a **pragmatic budget bump**, not a real-bloat fix. It restores
the CI signal so other work can land; a follow-up should audit the
actual size growth.

Bumps applied:

| Workflow | Field | Old | New | Current real |
|---|---|---|---|---|
| check_teensy41_size.yml | max_size_apa102 | 88000 | 165000 | ≈148476 |
| check_esp32_size.yml    | max_size        | 330000 | 700000 | ≈635768 |
| check_esp32_size.yml    | max_size_apa102 | 330000 | 700000 | unknown |

The teensy41 Blink budget (120000, current ≈57340) is left alone — Blink
is well within.

Each bumped budget gets a TODO(#2802) comment explaining the rationale
and pointing at the follow-up — specifically: investigate why Apa102
pulls in `fl::ifstream` / `fl::posix_filebuf` / `fl::strerror` /
`fl::AsyncLog*` (visible in the symbol-analysis output of the failing
runs), and either gate those off LED-driver paths or accept the growth
and re-budget more tightly.

This is a CI/CD pipeline change and per global rules a mandatory
code-review trigger; flagging it explicitly in the body.

Closes #2802

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@coderabbitai

coderabbitai Bot commented Jun 5, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR updates binary size limits in two GitHub Actions CI workflow files. ESP32 workflow limits are raised from 330000 to 700000 for both max_size and max_size_apa102. Teensy41 workflow max_size_apa102 is raised from 88000 to 165000. Associated TODO comments are updated with current observed sizes and dependency investigation notes.

Changes

CI Binary Size Limit Updates

Layer / File(s) Summary
ESP32 binary size limits
.github/workflows/check_esp32_size.yml
max_size and max_size_apa102 increased from 330000 to 700000; TODO commentary updated to reflect the bump and reference link-map investigation.
Teensy41 binary size limits
.github/workflows/check_teensy41_size.yml
max_size_apa102 increased from 88000 to 165000; TODO commentary updated with observed size (~148476 B) and dependency/LED-driver code path investigation notes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related issues

  • #2802: Workflow size-limit bumps for ESP32 (max_size/max_size_apa102 to 700000) and Teensy41 (max_size_apa102 to 165000) directly match the CI unblocking changes proposed in this issue.
  • #2608: ESP32 max_size increase to ~700000 directly addresses the platformio backend binary size limit recommendation from this issue.

Poem

🐰 The binary grows, the limits rise,
From 330 to 700—surprise, surprise!
Teensy holds firm at 165 now,
CI checks pass, we take a bow! 🎉

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the primary change: bumping the teensy41 Apa102 budget from 88000 to 165000 to resolve issue #2802.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/size-budgets-teensy41-esp32

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 and usage tips.

…2790

Per maintainer feedback, the esp32dev_size budget bump is being handled
in #2790 (Closes #2608, narrower scope, filed first). This commit
reverts the check_esp32_size.yml portion of #2804 so the two PRs no
longer conflict on the same file.

What remains in #2804: teensy41 max_size_apa102 88000 → 165000, with
the inline TODO(#2802) note about the underlying fl::ifstream /
fl::posix_filebuf / fl::strerror linkage audit follow-up.

Issue #2802 will be updated to mirror this narrower scope.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@zackees zackees changed the title ci(size-checks): bump teensy41 Apa102 + esp32dev budgets to clear stale-budget red (Closes #2802) ci(size-checks): bump teensy41 Apa102 budget 88000 → 165000 (Closes #2802) Jun 5, 2026
@zackees
zackees merged commit ab67e3f into master Jun 5, 2026
@fastled-project-sync fastled-project-sync Bot moved this from Triage to Done in FastLED Tracker Jun 5, 2026
zackees added a commit that referenced this pull request Jun 20, 2026
… vs. band-aids (#3305) (#3307)

Follow-up to PR #3303's defensive lockdown. Walks every check_*_size.yml
workflow's git history, classifies each currently frozen max_size /
max_size_apa102 value as either a "real ceiling" or a "band-aid for a
known regression", and ties every band-aid to a tracking issue.

Audit findings:

| Board    | Frozen value(s)            | Status                          |
|----------|----------------------------|---------------------------------|
| uno      | 11000 / 9300 (-1 sentinel) | real ceiling                    |
| bluepill | 55000 / 45000              | real ceiling                    |
| esp32dev | 330000 / 330000            | real ceiling (RED on #3298)     |
| teensy30 | 60000 / 50000              | real ceiling                    |
| teensy31 | 80000 / 65000              | real ceiling                    |
| teensy32 | 80000 / 65000              | real ceiling                    |
| teensy35 | 100000 / 85000             | real ceiling                    |
| teensy36 | 120000 / 100000            | real ceiling                    |
| teensy41 | 120000 / **165000**        | apa102 band-aid (#2802; real=88000) |
| teensylc | 35000 / 30000              | real ceiling                    |

Only one current band-aid: teensy41 max_size_apa102=165000 (PR #2804,
closes #2802). The real ceiling is 88000 once fl::ifstream /
fl::posix_filebuf / fl::strerror / fl::AsyncLog* are kept out of the
Apa102 link.

esp32dev's 330000 is a real ceiling but CI is currently RED until #3298
(fbuild dropping ESP32 board-level build_flags / build_unflags) is
fixed. The 700K bumps in PR #2790 and PR #3295 were band-aids; both
already reverted by PR #3303.

Changes:

- New `docs/SIZE_THRESHOLD_HISTORY.md` with the per-board classification
  table, the historical bump catalogue for esp32dev and teensy41 (the
  two workflows with non-trivial bump histories), and instructions for
  how to change a frozen value (issue + YAML + lint script + this doc).
- `ci/lint/check_size_thresholds.py` — extended the existing teensy41
  band-aid comment pattern to every other entry, tagging each value as
  "real ceiling" or "band-aid (#NNNN)" so the lockdown lint script
  documents the audit it enforces.
- `agents/docs/binary-size-analysis.md` — single-line cross-reference
  to the new doc so agents discover it from the bloat workflow.

No frozen values changed; the lockdown lint still passes
(size_thresholds_locked stage: green).

Out of scope (per the issue):
- Actually fixing #2802 or #3298.
- Stretch goal `bash ci/audit-size-thresholds.py` automation.

Closes #3305

Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
@zackees
zackees deleted the fix/size-budgets-teensy41-esp32 branch August 21, 2026 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

1 participant