Benchmark
Measured on real API history.
Breakra run on real version pairs of GitHub's and Stripe's published API descriptions, plus small curated scenarios with expected outcomes. Deterministic: reproduce it with bun run benchmark from the same public sources.
7
GitHub API version pairs
2 · 4 · 1
block · review · safe
15/15
curated scenarios as expected
Real API history
| Source | Versions | Changed paths (compared / skipped) | Verdict | Breaking | Potentially breaking | Unknown | Compatible | Docs-only |
|---|---|---|---|---|---|---|---|---|
| github | 17.0.0..18.0.0 | 666 (25 / 0) | review | 0 | 4 | 0 | 46 | 16 |
| github | 18.0.0..19.0.0 | 683 (25 / 0) | review | 0 | 39 | 6 | 32 | 34 |
| github | 19.0.0..20.0.0 | 721 (25 / 0) | review | 0 | 6 | 0 | 15 | 14 |
| github | 20.0.0..21.0.0 | 745 (25 / 0) | block | 1 | 0 | 0 | 50 | 2 |
| github | 21.0.0..22.0.0 | 753 (25 / 0) | safe | 0 | 0 | 0 | 1 | 1 |
| github | 22.0.0..23.0.0 | 832 (25 / 0) | block | 2 | 4 | 0 | 82 | 13 |
| github | 23.0.0..24.0.0 | 828 (25 / 0) | review | 0 | 0 | 4 | 8 | 2 |
| stripe | v2400..v2450 | 419 (0 / 419) | not assessed | — | ||||
| stripe | v2450..v2500 | 0 (0 / 0) | no changes | — | ||||
| stripe | v2500..v2550 | 431 (0 / 431) | not assessed | — | ||||
| stripe | v2550..v2602 | 0 (0 / 0) | no changes | — | ||||
All 382 changes found: breaking 3 (1%), potentially breaking 53 (14%), unknown 10 (3%), compatible 234 (61%), docs-only 82 (21%).
Curated scenarios: expected vs Breakra
| Scenario | Expected | Got | Pass | Why it matters |
|---|---|---|---|---|
| API-key authentication becomes required for every operation. | review | review | ✓ | Unauthenticated callers will be rejected (Breakra is stricter than oasdiff here, by design). |
| Only a description changes. | safe | safe | ✓ | Documentation doesn't change the contract. |
| A new operation GET /customers. | safe | safe | ✓ | Additive. |
| An operation (POST /orders) is removed. | block | block | ✓ | Callers of a removed operation fail: the only certain break. |
| The response schema becomes an external $ref. | review | review | ✓ | External refs are never fetched; the change can't be cleared as safe. |
total keeps its name but changes from number to string. | review | review | ✓ | A same-name field with a new type breaks typed clients (raised on X by @sreecharantwts). |
| The new contract is not a valid OpenAPI document (paths is a list). | error INVALID_SPECIFICATION | error INVALID_SPECIFICATION | ✓ | Must fail closed: an error, never a verdict (raised on X by @Steven7FGC). |
OpenAPI 3.1: request qty gains exclusiveMinimum: 5 (minimum 1 removed). | review | review | ✓ | A tightened bound: the case rule set 0.1.0 missed (fixed in 0.2.0). |
OpenAPI 3.1: response email may now be null. | review | review | ✓ | Clients that assume a string may crash on null. |
An optional request field note is added. | safe | safe | ✓ | Additive and optional: existing callers are unaffected. |
Request qty gains maximum: 10. | review | review | ✓ | Callers sending larger values may now be rejected. |
| A new required query parameter on GET /orders/{id}. | review | review | ✓ | Existing calls don't send it and may be rejected. |
Response enum status gains cancelled. | review | review | ✓ | Exhaustive switch statements may not handle the new value. |
Response field email removed. | review | review | ✓ | Consumers that read it may break. |
| The new contract is Swagger 2.0. | error UNSUPPORTED_OPENAPI_VERSION | error UNSUPPORTED_OPENAPI_VERSION | ✓ | Unsupported input is an error, never 'safe'. |
How it's measured
- Sources: consecutive major versions of GitHub's REST API description (
@octokit/openapion npm, MIT) and tagged versions of Stripe's OpenAPI spec (MIT). - What counts as changed: a path counts as changed if it, or any schema it references, changed.
- Sampling: for each pair, an evenly spaced sample of up to 25 changed paths, so no alphabetical slice dominates.
- Limits: paths that exceed Breakra's limits (1 MB, 75,000 expanded nodes) are counted as skipped, never reported as safe.
- Reproducible: results.json records each input's SHA-256.
Hand-checked findings
| Pair | Finding | Check | Result |
|---|---|---|---|
| GitHub 20→21 | operation_removed: GET /users/{user_id}/projectsV2/{project_number}/fields/{field_id} | Absent from the full v21 spec? | ✓ Confirmed |
| GitHub 22→23 | operation_removed: GET and PATCH /organizations/{org}/dependabot/repository-access | Absent from the full v23 spec? | ✓ Confirmed (both) |
| GitHub 18→19 | response.property_removed inside oneOf branches of GET /orgs/{org}/rulesets | Real removal, or reordered variants? | ⚠ Likely over-reporting: variants are compared by position. It errs toward "review", never toward "safe". |
Known limits
- Very large APIs (Stripe) are not assessed. Every changed Stripe operation expands past 75,000 nodes once
$refs are resolved. Breakra refuses such input rather than risk a timeout. Higher limits for the local CLI are a roadmap candidate. oneOf/anyOfvariants are compared by position, so reordered variants can be over-reported. Matching by content is a roadmap candidate.- Curated expectations are written by the maintainer, so they test intended behaviour. For real pairs, only hand-checked findings are claimed as correct.
Found a wrong finding? Report it with a minimal before/after pair.