Skip to content

ci: audit history of size-check threshold changes for 'just bump to get green' anti-pattern #3305

Closed

Description

@zackees

Problem

Multiple times in recent history, CI agents (and sometimes humans) have responded to a red .github/workflows/check_*_size.yml workflow by raising the threshold cap instead of fixing the underlying regression. PR #3268 → #3295 (esp32 330KB → 700KB) is the most recent example.

PR #3303 added a defensive lockdown (ci/lint/check_size_thresholds.py + CodeRabbit rule on check_*_size.yml) that prevents this going forward. But two things remain:

  1. Audit the past. How many existing check_*_size.yml thresholds are "bumped to clear CI" values rather than real architectural ceilings? The teensy41 apa102 165000 (bumped from 88000 in broken build: check_teensy41_size — stale Apa102 budget ~60KB below current real size #2802) and the original Apa102 bumps in ci(esp32dev_size): bump max_size 330000 → 700000 to unblock master (Closes #2608) #2790 / esp32dev_binary_size: stale 330 KB budget vs 635 KB reality on platformio backend #2608 are known examples. There may be more.

  2. Tighten the canonical ceilings. For each "bumped" value, file a follow-up issue (or roll into existing tracker issues like broken build: check_teensy41_size — stale Apa102 budget ~60KB below current real size #2802 / fbuild: ESP32 board build_flags / build_unflags aren't propagating from ci/boards.py #3298) explaining the real ceiling and what regression must be fixed to restore it.

  3. Make the audit re-runnable. Add a bash ci/audit-size-thresholds.py (or similar) that walks git log --all for each check_*_size.yml, extracts every historical max_size value, and produces a report: "this threshold was bumped on commit X for reason Y; current value is N; lint's frozen value is also N — is N the real ceiling or a band-aid?"

Acceptance criteria

  • A markdown document (e.g. docs/SIZE_THRESHOLD_HISTORY.md or a section in agents/docs/binary-size-analysis.md) listing each check_*_size.yml threshold with:
    • Current frozen value
    • Whether it is a "real ceiling" or "band-aid for known issue #N"
    • The work needed to restore the real ceiling, if any
  • For each band-aid value: a linked open issue tracking the work to fix the regression and restore the real ceiling.
  • ci/lint/check_size_thresholds.py's frozen list updated with comments tagging band-aid entries (e.g. # 165000 — band-aid for #2802; real ceiling 88000).
  • The teensy41 apa102 165000 entry is already partially tagged; extend the pattern to every other band-aid.

Out of scope

Refs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions