Skip to content

ci: wire backend flag-drift detector into teensy40 (refs #3122 B4 / #2410 / #2413) - #3155

Merged
zackees merged 1 commit into
masterfrom
feat/3122-b4-flag-drift-ci
Jun 16, 2026
Merged

zackees merged 1 commit into
masterfrom
feat/3122-b4-flag-drift-ci

Conversation

@zackees

@zackees zackees commented Jun 16, 2026 •

Copy link
Copy Markdown
Member

B4 of meta #3122. Wires the existing ci/check_backend_flag_drift.py (shipped in #2801, refs #2410) into a dedicated GitHub Actions workflow for teensy40 — the canonical broken case cited in #2413 ("fbuild silently drifted from PlatformIO and broke Teensy 4.x for 50+ consecutive master CI runs ... the .progmem section-type conflict in colorpalettes.h:23").

What the workflow does

  • Triggers on pushes to master + PRs touching the script, compile orchestrator, T4 platform code, or the workflow itself.
  • Drives both backends to build Blink for teensy40, runs the drift script.
  • Writes a report to .build/drift/teensy40_drift.txt, surfaces it in the workflow summary, uploads as an artifact (30-day retention).

Drift gating

continue-on-error: true — drift surfaces visibly but does not block merges yet. The right next step is gating merges on drift after a clean-slate run confirms the existing flag set is the intended one. Today's PR makes drift legible, not mandatory.

Why single-board scope

Doing all 5+ envs at once would obscure which board the drift came from in the summary view. Starting with teensy40 closes the original reported bug; future PRs can add per-board workflows or refactor to a matrix once the contract is proven.

Validation

  • bash lint — clean.
  • Workflow won't actually execute until merged + master is hit; first execution will populate the artifact + summary that prove the contract end-to-end.

Refs #3122 B4, #2410, #2413, #2801.

Summary by CodeRabbit

  • Chores
    • Added automated compiler-flag drift verification for Teensy 40 board during continuous integration.

…2410 / #2413)

B4 of meta #3122. Closes the canonical-board-coverage gap on #2410 by
wiring the existing ci/check_backend_flag_drift.py (shipped in #2801,
refs #2410) into a dedicated GitHub Actions workflow for **teensy40** —
the canonical broken case cited in #2413 ("fbuild silently drifted
from PlatformIO and broke Teensy 4.x for 50+ consecutive master CI runs
... the `.progmem` section-type conflict in `colorpalettes.h:23`").

Workflow contract:
- Triggers on pushes to master + PRs that touch the flag-drift script,
  the compile orchestrator, T4 platform code, or the workflow itself.
- Drives both backends to build `Blink` for teensy40, captures
  build_info_*.json from each, runs the drift script.
- Writes a report to .build/drift/teensy40_drift.txt, surfaces it in
  the workflow summary (so reviewers see drift inline on the PR), and
  uploads as an artifact (30-day retention) for later analysis.

Drift gating:
- `continue-on-error: true` for now — drift surfaces visibly but does
  not block merges. The right next step is to gate merges on drift
  *after* a clean-slate run confirms the existing flag set is the
  intended one; today's PR makes drift legible, not mandatory.

Reasoning behind the single-board scope:
- Doing all 5+ envs at once would obscure which board the drift came
  from in the summary view. Starting with teensy40 closes the original
  reported bug; future PRs can add per-board workflows (or refactor to
  a matrix) once the contract is proven.

Validation:
- `bash lint` — clean (Python pipeline, ESLint, TypeScript, C++,
  meson, platformio-internal-usage all pass).
- Workflow won't actually run until the PR is open and master is
  hit; first execution will populate the artifact + summary that
  prove the contract end-to-end.

Refs #3122 B4, #2410, #2413, #2801 (script).
@coderabbitai

coderabbitai Bot commented Jun 16, 2026 •

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 5a025c66-1c0b-4d7c-931c-467b1cd21e86

📥 Commits

Reviewing files that changed from the base of the PR and between aa163d9 and d501564.

📒 Files selected for processing (1)
  • .github/workflows/backend_flag_drift_teensy40.yml

📝 Walkthrough

Walkthrough

A new GitHub Actions workflow file is added for the Teensy 40 board that runs ci/check_backend_flag_drift.py to detect compiler-flag drift between fbuild and PlatformIO. It triggers on path-filtered push/pull_request events and manual dispatch, with results saved to .build/drift/ and uploaded as a 30-day artifact.

Changes

Teensy 40 Backend Flag Drift Workflow

Layer / File(s) Summary
Workflow metadata, concurrency, and triggers
.github/workflows/backend_flag_drift_teensy40.yml
Names the workflow, sets a per-ref concurrency group with in-progress cancellation for PRs, and configures path-filtered push/pull_request triggers plus workflow_dispatch.
drift-check job: execution, reporting, and artifact upload
.github/workflows/backend_flag_drift_teensy40.yml
Adds the drift-check job with continue-on-error: true on Ubuntu/Python 3.12, runs ci/check_backend_flag_drift.py --board teensy40 --example Blink, writes output to .build/drift/teensy40_drift.txt, appends a structured Full Report to the step summary, and uploads .build/drift/ as a 30-day artifact.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related issues

Poem

🐇 Hoppity-hop through the YAML land,
A new workflow sprouts, drift check in hand!
Teensy 40 compiles, flags compared with care,
.build/drift/ reports float into the air.
The rabbit checks flags so no surprises remain! 🎉

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/3122-b4-flag-drift-ci

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.

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