Skip to content

Bench: decode-count regression gate (fixtures + GHA workflow)#88

Merged
kevinelliott merged 1 commit into
masterfrom
bench-gate
Jun 11, 2026
Merged

Bench: decode-count regression gate (fixtures + GHA workflow)#88
kevinelliott merged 1 commit into
masterfrom
bench-gate

Conversation

@kevinelliott

@kevinelliott kevinelliott commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

What

The off-air benchmarks become a permanent regression gate:

  • bench/run.sh — decodes the fixtures through xng decode and fails when any count drops below its floor in bench/baselines.json (current: adsb_modes1 213 ≥ 200, ais_offair 36 ≥ 32). Floors get raised when demod improvements land; lowering one requires a documented tradeoff.
  • Fixtures: modes1.cu8 (canonical dump1090 ADS-B capture, 700 KB, BSD) vendored in-repo; the 5-minute AIS off-air capture (115 MB, our own recording) is an asset on the bench-fixtures-v1 release, fetched by CI with gh release download and gitignored locally.
  • .github/workflows/bench.yml — runs the gate on every PR and master push. No untrusted event inputs are used in run commands.
  • Oracle calibration + methodology stays in docs/notes/BENCHMARKS.md; bench/README.md cross-links.

This PR's own CI run is the first live execution of the gate.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Added automated regression testing infrastructure with baseline metrics to monitor demodulator decode performance.
    • Configured continuous integration workflow to validate build quality on pull requests and releases.

- bench/run.sh decodes the fixtures and fails when counts drop below
  bench/baselines.json (adsb_modes1 >= 200, ais_offair >= 32; current
  213 / 36)
- bench/data/modes1.cu8 vendored (canonical dump1090 test capture,
  BSD); the 115 MB AIS off-air capture lives on the
  bench-fixtures-v1 release and is fetched by CI
- .github/workflows/bench.yml runs the gate on every PR and master
  push

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

This PR introduces a decode-count regression gate for benchmark fixtures. The gate runs xng decode on ADS-B and AIS fixture files, extracts decoded frame counts, compares them against baseline thresholds, and integrates into CI to fail the build if counts drop below established minimums.

Changes

Decode-count regression gate for benchmark fixtures

Layer / File(s) Summary
Documentation and baseline specification
bench/README.md, bench/baselines.json
Benchmark README documents the regression gate purpose and fixture sources; baseline JSON defines the minimum acceptable decode counts (adsb_modes1: 200, ais_offair: 32).
Regression gate script
bench/run.sh
Bash script with count() and check() functions; runs xng decode on fixtures, parses "session complete" output to extract frame counts, loads baselines from JSON, compares counts against thresholds, reports REGRESSION or ok, and conditionally benchmarks AIS only if the fixture file exists.
CI workflow and fixture management
.github/workflows/bench.yml, .gitignore
GitHub Actions workflow builds the project in release mode, downloads ais_96k.cs16 from GitHub Releases into bench/data/, runs the regression gate on pull_request and push to master; .gitignore prevents the downloaded fixture from being committed.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • airframesio/xng#65: Modifies VDL2 demod decoding logic (noise estimator gating and burst-length sanity cap) that directly affects the decoded frame counts checked by this regression gate.

Poem

🐰 Benchmarks now stand guard with care,
Baseline thresholds everywhere,
When frames drop low, the gate will cry,
"REGRESSION!" before we pass on by.
Decode counts safe, regression walls tight,
The CI pipeline shines so bright!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. 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 concisely summarizes the main change: adding a decode-count regression gate with benchmark fixtures and a GitHub Actions workflow.
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 bench-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.

@kevinelliott
kevinelliott merged commit 2b08f0e into master Jun 11, 2026
1 of 3 checks passed
@kevinelliott
kevinelliott deleted the bench-gate branch June 11, 2026 17:30
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