Skip to content

test(memory): enforce measured ESP32-S3 flash and RAM savings - #4754

Merged
zackees merged 1 commit into
masterfrom
fix/memory-4741-esp32s3
Oct 7, 2026
Merged

zackees merged 1 commit into
masterfrom
fix/memory-4741-esp32s3

Conversation

@zackees

@zackees zackees commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

Summary

Refs #4741 and #4737. Parent #4737 must remain open.

  • Reproduce ESP32-S3 3.10.3 and original/current master with matched published Blink and controlled RGB workloads, fbuild bloat and physical-section ledger.
  • Ratchet the existing image baseline367407→366603 and enforce attributed-RAM38323 through the existing S3 gate with a scoped budget.
  • Retain the reductions already landed in shared RMT/HTTP/SPI and configuration fixes. This patch changes budget enforcement; it introduces no additional driver behavior or feature removal.

Measurements

All board values are flash / physical RAM bytes; current master003083fa285de400e5fc1f52a547df338f066716, original meta master0c2e9f730007e52758d4abc2b9ba356fb581d923, 3.10.3 at20667c3a6413ed46a828f78ec95fb57e58d753f8.

workload 3.10.3 matched original master current saved vs matched original
published Blink 371515 / 75863 407716 / 78216 407068 / 78008 648 / 208
controlled RGB 371515 / 75863 407488 / 78216 406840 / 78008 648 / 208

Published remaining gap to3.10.3:35553flash/2145RAM; control35325/2145. Frozen parent published407732/78216 differs from fresh matched407716/78216 by16flash; record the bridge without inventing its cause. Current savings below frozen table664/208; use648/208 for matched performance accounting.

Original published image367279/attributedRAM38503→current366603/38323, saving676/180. AttributedRAM includes aliases/IRAM and differs from physical boardRAM. For example timingfallbacksEmpty20bytes is already .flash.rodata despite nm classifying it asram; no false physicalRAM saving is claimed.

Local validation

  • fbuild2.5.37, Arduino-ESP32 3.3.11 / IDF5.5.5 / Xtensa GCC14.2.0, normal default flags/no slim opt-in; same cache directory and generated-TU fingerprints for source changes. Historical source compatibility stub ::delay(0); current normalstub. Exact GPIO3 one-NEOPIXEL red/black1000ms control without Serial. Published sketches restored and separately measured.
  • Original master fails proposed scopedbudget by676image/180attributedRAM (retrospective regression evidence for earlier shared fixes). Current scopedbudget passes.
  • Existing gate initially fails804bytes unclaimedheadroom; updated baseline and RAM enforcement pass the actual current ELF with zeroheadroom. Earlier shared fixes retain their focused preimplementation RED/GREEN in completed sibling issues; no claim that this new gate preceded those fixes.
  • Full lint PASS; selected Python budget/gate inventory through PYTEST_ADDOPTS and bash test --py PASS; three-file manual review PASS; git diff --check PASS.
  • Shared native strict test and actual ESP-IDF RMT accounting/HTTP lifecycle/SPI ownership evidence are recorded in PR4753. Fresh S3 SDK source compilation passes; this budget-only patch changes no native source. No physical waveform claim.
  • Logging audit retains genuine warnings; no logging fl::printf in measured ESPplatform path. Narrow strategy counters/resource lifetime changes were rejected where they could alter custom defaults or concurrency/lifetime behavior. All runtime driver/output/network features retained.
  • Everything local and sequential in existing checkout, no gitworktrees/newworkflow/CI Full. Artifacts under .build/memory-4737/esp32s3/.

After merge, verify fresh landed S3 gate, publish cumulative parent diff, then close only #4741. Parent stays open; remaining Teensy40/Teensy41/RP2040 children follow sequentially.

Summary by CodeRabbit

  • Tests
    • ESP32-S3 build regression checks now enforce both flash-size and attributed-RAM budgets for the default Blink example.
    • The recorded image size is 366,603 bytes, with an attributed RAM budget of 38,323 bytes. The baseline also notes the comparison with the master build.

@coderabbitai

coderabbitai Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: FastLED/FastLED/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 52130bcd-1d1e-4082-93a3-202bf62ad4b7
📥 Commits

Reviewing files that changed from the base of the PR and between 003083f and dbb1c55.

📒 Files selected for processing (3)
  • tests/data/esp32s3_bloat_baseline.txt
  • tests/data/esp32s3_bloat_budget.json
  • tests/test_esp32s3_bloat_regression.py

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.


📝 Walkthrough

Walkthrough

The ESP32-S3 bloat regression test now passes an explicit flash and RAM budget. The baseline record and comparison note reflect the updated image size.

Changes

ESP32-S3 bloat regression

Layer / File(s) Summary
Define and enforce the bloat budget
tests/data/esp32s3_bloat_budget.json, tests/test_esp32s3_bloat_regression.py, tests/data/esp32s3_bloat_baseline.txt
The budget record sets image-flash and total-RAM values. The regression test passes the budget file to the bloat command. The baseline records an image size of 366,603 bytes and compares it with prior builds.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to dbb1c

The ESP32-S3 Blink regression gate enforces the recorded flash and attributed-RAM budgets, with the flash baseline aligned to its ceiling. No actionable merge-blocking risk is established.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (2 skipped: 2 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ 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 clearly and concisely describes the main change: enforcing measured ESP32-S3 flash and RAM savings through updated regression budgets.
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.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (2 skipped: 2 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@zackees
zackees merged commit 0c2e784 into master Oct 7, 2026
119 checks passed
@zackees
zackees deleted the fix/memory-4741-esp32s3 branch November 5, 2026 05:52
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.

1 participant