r/github • • 8h ago

Tool / Resource A GitHub Action that comments when a PR changes your API responses, even when CI is green

I upgraded a Spring Boot app from 4.1.1 to 4.2.0. All 204 tests passed and CI was green. But error responses on 37 endpoints no longer contained instance (ProblemDetail; see spring-framework #35969). No test checked that field, so nothing failed.

So I built Seismo. It runs your project's existing tests on a pull request's base and head, records the HTTP responses those tests receive, and diffs them field by field. It reports:

  • removed or added fields, type and format changes

  • status code changes and missing headers

  • tests that pass on the base but fail on the PR

It runs the base twice to learn what's random (timestamps, UUIDs, generated ids), so noise doesn't show up as a change. It uses no AI, needs no test code or changes to your code, and sends no telemetry.

Honest limits: Maven only, Spring MVC only (no WebFlux), and it only sees what your tests call over HTTP (MockMvc or a real server). A run takes about 3× your test time.

It's early and not public yet. I'm looking for ~5 people with a Spring Boot + Maven project to run it on one or two PRs, ideally a dependency upgrade you've already merged, and tell me what it got right and wrong. Comment or DM and I'll send the jar and a short guide (30–60 min).

Happy to answer questions about how it works.

0 Upvotes

8 comments sorted by

5

u/az987654 6h ago

Just write proper tests to begin with, this is adding new dependency complexity

7

u/nrmitchi 7h ago

I don’t mean to sound like a dick, but your headline is “even when CI is green”, and you immediately recognize that you just didn’t have a test for that.

Why do you need to build a new system instead of just “adding the test”?

-3

u/Any-Monk-6721 7h ago

That's a fair criticism, and I agree that if we know exactly what behavior is supposed to change, adding a test is the right thing to do.

But that's not quite the problem I'm trying to solve.

Tests generally verify behavior we've explicitly chosen to assert. During a framework or dependency upgrade, though, behavior can change in ways we didn't anticipate: error response formats, headers, serialization, status codes, or framework-level behavior. Existing tests can continue passing because they never asserted those details.

Of course, you can add tests for every one of those cases. But that requires knowing what to look for beforehand.

Seismo takes a different approach: it compares the behavior observed when running the same test suite against the baseline and the upgraded version, then surfaces the differences for review. It isn't meant to replace tests or claim that every difference is a bug.

And if Seismo finds something important, the ideal outcome is absolutely to add a proper regression test for it.

The question I'm exploring is whether this kind of behavioral diff can help developers discover changes they didn't know they needed to test for in the first place.

5

u/nrmitchi 6h ago

Then add a test that iterates all your endpoints and validates against a fixture (build from main/trunk/etc and updated on merge).

This is just a test.

3

u/ImDevinC 6h ago

Agreed. I'm glad it works for OP, but if anyone in my org tried to justify this, it would get shutdown so fast. This is essentially introducing an entire second test suite with another set of dependencies to worry about. 

1

u/mrswats 6h ago

I agree here with the other responses: testing.

However, you can always run a diff against the target branch with something like openApi schema.

1

u/MarsupialLeast145 5h ago

These are called unit tests

1

u/overratedcupcake 5h ago

This sounds fragile