Skip to content

feat(acceptance): #205 AC#2 teensy30 AnalogOutput .dmabuffers gate#227

Merged
zackees merged 1 commit intomainfrom
feat/205-ac2-teensy30-analog-output-gate
May 10, 2026
Merged

feat(acceptance): #205 AC#2 teensy30 AnalogOutput .dmabuffers gate#227
zackees merged 1 commit intomainfrom
feat/205-ac2-teensy30-analog-output-gate

Conversation

@zackees
Copy link
Copy Markdown
Member

@zackees zackees commented May 10, 2026

Summary

Closes the last unimplemented acceptance criterion of fbuild issue #205 (AC#2 from the issue body):

fbuild build teensy30 AnalogOutput -- link succeeds, .dmabuffers <= 1 KB.

Why it matters

DMAMEM-tagged statics in FNET, Snooze, RadioHead and mbedtls pull DMA descriptor pools and frame buffers into the .dmabuffers section. The Teensy 3.0's 16 KB SRAM can't absorb them, so if the Phase 4/5 resolver (PR #217) regresses to linking those libraries into a simple analogWrite sketch, this gate fails the build immediately. Complements teensyLC's .bss <= 3 KB gate (#220) by exercising a second forbidden ELF section on a different MCU.

Design notes

Files

  • crates/fbuild-build/tests/teensy30_acceptance.rs (new, 132 LOC)
  • .github/workflows/acceptance-205.yml (+4 lines: new matrix gate + paths entry)

Test plan

  • uv run soldr cargo build -p fbuild-build --tests -- clean
  • uv run soldr cargo clippy --workspace --all-targets -- -D warnings -- clean
  • uv run soldr cargo fmt --all -- --check -- clean
  • Local Windows release-mode run: deferred to CI (unrelated Windows host issue with zstd-sys / redb release builds; dev profile builds clean)
  • CI Ubuntu nightly + workflow_dispatch run via the new teensy30 AnalogOutput matrix entry -- this is the canonical verification

Refs #205 -- this is one criterion of a META; AC#5 and AC#6 perf anchors remain.

Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com

Summary by CodeRabbit

  • Tests
    • Expanded continuous integration testing for Teensy 3.0 devices by adding automated acceptance tests for analog output functionality, verifying compliance with hardware constraints and library dependency requirements.

Review Change Stack

Adds a third acceptance gate to the #205 matrix that enforces AC#2 from
the issue body verbatim: `fbuild build teensy30 AnalogOutput` must link
successfully with `.dmabuffers <= 1 KB`. DMAMEM-tagged statics in FNET,
Snooze, RadioHead and mbedtls each pull DMA descriptor pools and frame
buffers into `.dmabuffers`, and the Teensy 3.0's 16 KB SRAM can't
absorb them — so a regression in the Phase 4/5 resolver (PR #217) would
fail this gate. Complements teensyLC's `.bss <= 3 KB` gate from #220 by
exercising a second forbidden ELF section on a different MCU, while
mirroring the stm32-style inline-tempdir project_dir so the committed
`tests/platform/teensy30/` fixture is untouched and no scratch
`compile_commands.json` / `.fbuild/` artifacts can ever land in the
repo. Same LTO-symbol caveat applies as in #226: section size and
forbidden-symbol substrings are the meaningful signals, not setup/loop
probes.

Refs #205

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 10, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 0e9540b4-0930-483e-812c-b28ed9750cc0

📥 Commits

Reviewing files that changed from the base of the PR and between a23d855 and 2414779.

📒 Files selected for processing (2)
  • .github/workflows/acceptance-205.yml
  • crates/fbuild-build/tests/teensy30_acceptance.rs

📝 Walkthrough

Walkthrough

This PR adds a new Teensy 3.0 acceptance test for issue #205 AC#2 that validates builds using analogWrite stay within a 1 KB .dmabuffers RAM budget, contain no forbidden symbols, and exclude forbidden libraries. The CI workflow is updated to trigger and run this test on pull requests.

Changes

Teensy 3.0 AnalogOutput Acceptance Gate

Layer / File(s) Summary
Test Documentation & Context
crates/fbuild-build/tests/teensy30_acceptance.rs
Introduces acceptance test with documentation of AC#2 RAM budget gate (.dmabuffers section ≤ 1 KB) and AC#1 regression guards (forbidden symbols and libraries).
Project & Sketch Fixture
crates/fbuild-build/tests/teensy30_acceptance.rs
Creates temporary PlatformIO project directory with platformio.ini for Teensy 3.0 environment and generates minimal Arduino sketch using analogWrite.
Build Configuration & Execution
crates/fbuild-build/tests/teensy30_acceptance.rs
Configures BuildParams for Teensy orchestrator in Release mode with clean build, compile database generation, and verbose output; invokes build.
Memory & Symbol Validation
crates/fbuild-build/tests/teensy30_acceptance.rs
Validates ELF .dmabuffers section is ≤ 1 KB, verifies absence of forbidden symbols (fnet_, snooze_, RadioHead, mbedtls), and checks compile_commands.json contains no forbidden libraries.
Workflow Configuration
.github/workflows/acceptance-205.yml
Adds path trigger for test file and new job matrix entry (gate: teensy30 AnalogOutput) to run teensy30_analog_output_meets_205_ac2 test function.

Estimated Code Review Effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 A little bunker in the CI, now guards the Teensy's signal high,
No forbidden symbols creep or crawl, just analogWrite within its thrall,
One kilobyte of memory's grace—a perfect RAM budget for this place! 🎶

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and specifically describes the main change: adding a new Teensy30 AnalogOutput acceptance test gate for issue #205 AC#2 that validates .dmabuffers constraints, matching the PR's primary purpose.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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.

✏️ 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 feat/205-ac2-teensy30-analog-output-gate

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.

@zackees zackees merged commit 0240d9e into main May 10, 2026
82 of 84 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant