Skip to content

test: accept TM1908 encoder flash cost - #4143

Merged
zackees merged 1 commit into
masterfrom
fix/issue-4142-esp32s3-bloat-baseline
Sep 3, 2026
Merged

zackees merged 1 commit into
masterfrom
fix/issue-4142-esp32s3-bloat-baseline

Conversation

@zackees

@zackees zackees commented Sep 3, 2026 •

Copy link
Copy Markdown
Member

Unblocks the bloat regression check, red on master and on every branch cut from it.

Closes #4142.

The regression is not from #4140

#4142 attributed the +198 B to #4140 (fixed-point minimp3) on the strength of timing — that PR merged with the gate already red. That attribution is wrong. There is no minimp3 symbol in the Blink ELF at all; the decoder is not linked into the example the gate measures.

Symbol-diffing report.json across the two commits, Blink/esp32s3:

commit total_flash
f9909d5b7c — pre-TM1908, post-OSTW2020C1E 341,055 B
8d2a841c66 — master 341,259 B
+204 B
  +161  fl::PixelIterator::writeTM1908<vector_psram<u8>>        [fl.channels+.cpp.o]
   +28  fl::Channel::showPixels(PixelController<GRB,1,~0ul>&)   [fl.channels+.cpp.o]
    +8  fl::ChannelManager::waitForReady(unsigned long)         [fl.channels+.cpp.o]
    +4  fl::ChannelManager::addDriver(int, shared_ptr<IChannelDriver>)
    +2  fl::encodeLPD6803<...>
    +1  fl::RxDevice::lastBeginError() const

Every byte is in fl.channels+.cpp.o. The cause is 3a61ded84c (TM1908, Closes #1441): adding a case to the Channel::showPixels switch force-links the encoder into every clockless build whether or not the sketch names the chipset. Same mechanism, same fix as TM1812 in #3945 (+277 B).

The remaining 15 B is alignment and codegen shift in neighbouring symbols in the same object — not independent growth.

Why the gate never caught it

TM1908's own bloat run on 3a61ded84c was concurrency-cancelled after 19 s. The next master run (f8d9ae642) died inside uv sync:

Building running-process==4.10.10
× Failed to build `running-process==4.10.10`

— the breakage #4141 fixed. The job never reached the measurement, so the regression only surfaced once the dependency cap landed.

The number

Pinned to CI's figure, 341250, not this machine's 341259. CI reported 341,250 on two independent runs with the identical tree (the 8d2a841c6 master push and PR #4141's job), so the exact pin is deterministic and carries no slack — matching the previous three bumps, which all pinned exactly.

The local/CI 9 B gap is pre-existing and not introduced here; the local build is otherwise identical (4533 symbols, ram=38,592 B in both).

Alternative not taken

A FASTLED_DISABLE_TM1908 opt-out alongside the existing FASTLED_DISABLE_UCS7604 gate a few lines up in the same switch would reclaim the 161 B for sketches that do not use it. Rejected: per-chipset flags do not scale, and #3947 already tracks tree-shaking unused Channels encoders as the general fix. This PR does not spend the budget quietly — it records what the chipset costs so #3947 has a number to reclaim.

Scope

master remains red on audit (fixed-point SIMD at 0.935x scalar on x86-64). That is #4138 — different cause, different owner, separate PR. This change does not touch it.

Verification is this PR's own bloat regression job: the gate cannot be checked locally because this host reads 341,259.

Refs #1441, #3945, #3947, #4140, #4138

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests
    • Updated the ESP32-S3 size baseline used for validation.

The ESP32-S3 bloat gate has been red on master since #4141 unblocked it.
The regression is not from #4140 (minimp3 fixed-point), as #4142 assumed:
there is no minimp3 symbol in the Blink ELF at all. It is the TM1908
encoder from 3a61ded (Closes #1441).

Measured on this machine, Blink/esp32s3, symbol-diffing report.json across
the two commits:

    f9909d5 (pre-TM1908)   341,055 B
    8d2a841 (master)       341,259 B
    delta                        +204 B

    +161  fl::PixelIterator::writeTM1908<vector_psram<u8>>   [fl.channels+.cpp.o]
     +28  fl::Channel::showPixels(PixelController<GRB,1,~0ul>&) [fl.channels+.cpp.o]
      +8  fl::ChannelManager::waitForReady(unsigned long)      [fl.channels+.cpp.o]
      +4  fl::ChannelManager::addDriver(int, shared_ptr<IChannelDriver>)
      +2  fl::encodeLPD6803<...>
      +1  fl::RxDevice::lastBeginError() const

Every byte lands in fl.channels+.cpp.o. Adding a `case` to the
`Channel::showPixels` switch force-links the encoder into every clockless
build whether or not the sketch names the chipset -- the same mechanism
that cost 277 B for TM1812 in #3945, which this change mirrors.

The baseline is pinned to CI's number, not this machine's. CI measures
341,250 B; this host measures 341,259 B, and CI reported 341,250 on two
independent runs (the master push of 8d2a841 and PR #4141), so the exact
pin is safe and carries no slack, as the previous three bumps did not.

Why it slipped: TM1908's own bloat run on 3a61ded was concurrency-
cancelled after 19 s, and the next master run (f8d9ae6) died in `uv sync`
building running-process 4.10.10 -- the breakage #4141 fixed. The gate
never measured the regression until the dependency cap landed.

Not done here: a FASTLED_DISABLE_TM1908 opt-out alongside the existing
FASTLED_DISABLE_UCS7604 gate in the same switch. Per-chipset flags do not
scale, and #3947 already tracks tree-shaking unused Channels encoders as
the general fix.

master remains red on `audit` (fixed-point SIMD at 0.935x scalar on
x86-64). That is #4138 -- separate cause, separate PR.

Closes #4142
Refs #1441, #3945, #3947, #4140
@coderabbitai

coderabbitai Bot commented Sep 3, 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: Team

Run ID: 19064341-bb67-49a9-9a7e-bcc774ab4fee

📥 Commits

Reviewing files that changed from the base of the PR and between 8d2a841 and 624c242.

📒 Files selected for processing (1)
  • tests/data/esp32s3_bloat_baseline.txt

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


📝 Walkthrough

Walkthrough

The ESP32-S3 bloat regression baseline was updated from 341052 to 341250 in the test data.

Changes

ESP32-S3 Bloat Baseline

Layer / File(s) Summary
Update bloat regression baseline
tests/data/esp32s3_bloat_baseline.txt
The recorded ESP32-S3 baseline changes from 341052 to 341250.

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

Merge Risk: ⚪ Minimal · up to 624c2

This updates the ESP32-S3 flash-size regression baseline to the measured CI value, accepting the documented 198-byte increase. No current merge-blocking risk is identified.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The change satisfies #4142 by updating the ESP32-S3 baseline from 341052 to 341250 to accept the intentional 198-byte increase. It does not add or modify TM1908 support requested by #1441; the PR only… Either include the TM1908 support implementation required by #1441, or remove #1441 from the linked issues if it is included only as historical context. Keep the baseline update for #4142 if the flash increase is intentional and verified by…
✅ 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 identifies the test change and the intentional TM1908 encoder flash-cost acceptance. It accurately describes the primary change.
Out of Scope Changes check ✅ Passed The PR changes only tests/data/esp32s3_bloat_baseline.txt. This change directly supports the #4142 objective and records the intentional TM1908 flash cost. No unrelated changes are present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Full details: Linked Issues check

Explanation

The change satisfies #4142 by updating the ESP32-S3 baseline from 341052 to 341250 to accept the intentional 198-byte increase. It does not add or modify TM1908 support requested by #1441; the PR only records the cost of support that already exists.

Resolution

Either include the TM1908 support implementation required by #1441, or remove #1441 from the linked issues if it is included only as historical context. Keep the baseline update for #4142 if the flash increase is intentional and verified by CI measurements.

Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/issue-4142-esp32s3-bloat-baseline

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 d5e7205 into master Sep 3, 2026
6 of 7 checks passed
@fastled-project-sync fastled-project-sync Bot moved this from Triage to Done in FastLED Tracker Sep 3, 2026
@zackees
zackees deleted the fix/issue-4142-esp32s3-bloat-baseline 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.

ci: master is red on bloat regression — esp32s3 is +198 B over the baseline since #4140 Support for TM1908

1 participant