Skip to content

ci(color): actually run P9's TINY symbol check, and fail if it cannot (#4043) - #4401

Merged
zackees merged 1 commit into
masterfrom
ci/4043-run-tiny-symbol-check
Sep 12, 2026
Merged

zackees merged 1 commit into
masterfrom
ci/4043-run-tiny-symbol-check

Conversation

@zackees

@zackees zackees commented Sep 12, 2026 •

Copy link
Copy Markdown
Member

P9 (#4043) asks for the TINY tier's link-time property — no float helpers, no solver symbols — to be verified by symbol-level inspection. The test for it has existed since #4390 and has never executed a single assertion.

Why it never ran

It reads an ATtiny85 ELF and skips when the build is absent, following test_elf.py. Nothing ever built an ATtiny85 before it ran:

  • pytest ci/tests collects it in a job with no AVR build → skips
  • neither build_attiny85.yml nor check_attiny85.yml invokes it — grep for tiny_links across .github/ and ci/ returns nothing but the file itself

A deliverable asserted by a test that always skips is not asserted.

The fix

check_attiny85.yml already builds attiny85 Blink to check its size, so the ELF is right there. The test now runs in that job, immediately after the Blink build and before the Apa102 one.

FL_REQUIRE_TINY_ELF=1 is as much the point as the wiring. Without it, the first thing to move the ELF would return this file to passing vacuously and nothing would say so — the exact failure being fixed, reintroduced. With it set, a missing build fails and names the roots it searched.

Scope is tight: guarded on board == 'attiny85' && extra_args == ''. The sibling job compiles with FASTLED_NO_FORCE_INLINE, whose link-time symbol set is a separate question this does not claim to answer. The other ten boards using the template are untouched.

The hardcoded path went too

ci/compiled_size.py documents two fbuild layouts and two build roots. The test pinned one spelling of one of them:

.build/pio/attiny85/.fbuild/build/release/firmware.elf

so the other layout produced a silent skip. It now globs both roots for .fbuild/build/**/firmware.elf and takes the newest match — the rule ci/bloat.py settled on in #4386, for the same reason.

Verification

All four states, locally:

state result
ELF present, variable unset 3 passed
ELF present, variable set 3 passed
ELF absent, variable set 3 failed
ELF absent, variable unset 3 skipped

Plus: with the ELF moved to the alternate <env>/release layout it is still found — where the old hardcoded path found nothing.

bash lint clean. uv run pytest ci/tests — 1502 passed, 41 skipped, 3215 subtests.

Known limit, stated rather than implied

Both attiny85 workflows trigger on push to master, not on pull_request. So this catches a regression one merge after it lands rather than blocking it. Making it a PR gate means paying for an AVR build on every PR — a cost decision for the maintainer, not something to slip in here.

🤖 Generated with Claude Code

https://claude.ai/code/session_01MLhWkMfzLjrnLTDMBE6Fj9

Summary by CodeRabbit

  • Tests

    • Improved validation for unmodified ATtiny85 builds by checking the latest generated ELF output across supported build layouts.
    • CI now treats missing ELF artifacts or required tooling as failures, while preserving skip behavior for local runs.
    • Added coverage to ensure TINY-tier builds continue to meet link-symbol requirements.
  • Documentation

    • Clarified how the test runs in CI and which build workflow is required.

…#4043)

P9 asks for the TINY tier's link-time property -- no float, no solver
symbols -- to be verified by symbol-level inspection. The test for it has
existed since #4390 and has never executed a single assertion.

It reads an ATtiny85 ELF and skips when the build is absent, following
`test_elf.py`. Nothing ever built an ATtiny85 before it ran: `pytest
ci/tests` collects it in a job with no AVR build, so it skips there, and
the two attiny85 workflows never invoke it. A deliverable asserted by a
test that always skips is not asserted.

`check_attiny85.yml` already builds attiny85 Blink to check its size, and
that job is where the ELF is. The test now runs there, immediately after
the Blink build and before the Apa102 one, with FL_REQUIRE_TINY_ELF=1.

That variable is the point of the change as much as the wiring is. Without
it the first thing to move the ELF would return this file to passing
vacuously and nothing would say so -- the same failure being fixed,
reintroduced. With it set, a missing build fails and names what it
searched.

Only the unmodified job: the sibling compiles with FASTLED_NO_FORCE_INLINE,
whose link-time symbol set is a separate question this does not answer.
Every other board using the template is unaffected -- the step is guarded
on board and on empty extra_args, and attiny85 has one such caller.

The hardcoded ELF path is gone too. `ci/compiled_size.py` documents two
fbuild layouts and two build roots; the test pinned one spelling of one of
them, so the other produced a silent skip. It now globs both roots and
takes the newest match, the rule `ci/bloat.py` settled on in #4386.

Verified locally, all four states: ELF present passes with and without the
variable; ELF absent skips without it and fails with it; and the
alternate `<env>/release` layout is found where the old path was not.

Known limit, stated rather than implied: both attiny85 workflows trigger
on push to master, not on pull_request, so this catches a regression one
merge after it lands rather than blocking it. Making it a PR gate means
paying for an AVR build on every PR, which is a cost decision for the
maintainer, not something to slip in here.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01MLhWkMfzLjrnLTDMBE6Fj9
@coderabbitai

coderabbitai Bot commented Sep 12, 2026 •

Copy link
Copy Markdown

Review Change StackReview 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: Advanced

Run ID: 4b71ea98-3b01-4e90-9bc2-fa6d79f542f8

📥 Commits

Reviewing files that changed from the base of the PR and between aa166a9 and 1bf331c.

📒 Files selected for processing (2)
  • .github/workflows/build_template_binary_size.yml
  • ci/tests/test_tiny_links_no_float.py

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


📝 Walkthrough

Walkthrough

The test now discovers the newest ATtiny85 ELF across supported build layouts. An environment variable controls whether missing ELF or avr-nm results fail or skip. The build workflow runs this validation for unmodified ATtiny85 builds.

Changes

ATtiny85 ELF validation

Layer / File(s) Summary
ELF discovery and required validation
ci/tests/test_tiny_links_no_float.py
The test searches two supported build roots and selects the newest firmware ELF. Required mode changes missing ELF or avr-nm results from skips to failures.
CI validation wiring
.github/workflows/build_template_binary_size.yml
The workflow runs the TINY-tier test for attiny85 builds without extra arguments and sets FL_REQUIRE_TINY_ELF=1.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 1bf33

The ATtiny85 validation step correctly consumes the normal build artifact; no merge-blocking risk was identified.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 1 files. (1 skipped: 1… 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 specifically summarizes the main change: CI now runs P9's TINY symbol check and fails when the check cannot run.
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 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 1 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/4043-run-tiny-symbol-check

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 0692e63 into master Sep 12, 2026
27 of 29 checks passed
@fastled-project-sync fastled-project-sync Bot moved this from Triage to Done in FastLED Tracker Sep 12, 2026
@zackees
zackees deleted the ci/4043-run-tiny-symbol-check branch November 5, 2026 05:51
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