Skip to content

ci: seed CodSpeed baseline on main pushes and workflow_dispatch#67

Merged
sedghi merged 1 commit into
mainfrom
fix/codspeed-baseline-dispatch
May 20, 2026
Merged

ci: seed CodSpeed baseline on main pushes and workflow_dispatch#67
sedghi merged 1 commit into
mainfrom
fix/codspeed-baseline-dispatch

Conversation

@sedghi
Copy link
Copy Markdown
Member

@sedghi sedghi commented May 20, 2026

Summary

  • Fixes the chicken-and-egg blocking PR test(bench): inject fake CPU regression to validate detection pipeline #66's codspeed-bench from posting a real regression report: CodSpeed has no baseline data because the workflow was configured to skip main entirely.
  • Two changes:
    1. Drop branches-ignore: main so every commit landing on main triggers build/test/bench → future merges auto-seed.
    2. In detect-changes, treat workflow_dispatch or any push to refs/heads/main as a "baseline run" that forces the full package list. The existing git diff origin/main..HEAD check vacuously returns empty when HEAD is main, which is why my earlier gh workflow run pr-checks.yml --ref main finished in 14s and ran nothing.

Why the existing setup didn't work

detect-changes did this on main:

No packages changed since 728def44352ac5b5ac293a368c19fc3d7cc73f06.

So any=falsebuild, test, codspeed-bench all skipped (each gated on needs.detect-changes.outputs.any == 'true'). The CodSpeed dashboard for main therefore stayed empty: list_runs(branch="main") => {"runs":[]}.

After merge

Test plan

🤖 Generated with Claude Code

The current detect-changes job short-circuits when HEAD === origin/main:
git diff origin/main..HEAD is empty, so any=false and every downstream job
(including codspeed-bench) is skipped. That left CodSpeed with no baseline
data on main after #64 merged, so every PR comment stays stuck on
"Congrats! CodSpeed is installed" with no before/after deltas.

Two fixes:
- Drop branches-ignore: main so every commit landing on main triggers a
  build/test/bench run. Future merges will auto-seed the baseline.
- In detect-changes, treat workflow_dispatch or any push to refs/heads/main
  as a "baseline run" and force the full package list, bypassing the diff
  check that vacuously returns empty when HEAD is main.

After this lands, dispatching pr-checks against main (or just pushing this
fix to main) will populate the CodSpeed baseline, and PR #66's
codspeed-bench will start producing a real regression report on re-run.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@sedghi sedghi merged commit 04c3e87 into main May 20, 2026
8 checks passed
@sedghi sedghi deleted the fix/codspeed-baseline-dispatch branch May 20, 2026 14:04
sedghi added a commit that referenced this pull request May 20, 2026
#67 landed on main and produced the first CodSpeed baseline (run
26167789689). Re-running codspeed-bench on this PR so the sticky
comment can flip from "Congrats!" to a real before/after table with
the fake-regression deltas highlighted on every codec.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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