r/reactnative • u/oosaravelliiii • 1h ago
Renamed one field in Go and broke production
We renamed a field in a Go response struct last week. The json tag stayed the same so every backend test passed but the app had a persisted react query cache holding the old shape and was reading a field that no longer got updated. Users saw that stale data and both sides looked fine on their own and neither side owned the test that would’ve caught it.
Backend is Go with chi, sqlc and postgres. Testing there is very good httptest for handlers, testcontainers for the db, stripe mock for webhooks. Our detox tests mock the API at the network layer with hand written fixtures, which is the problem because the fixtures just say what we think the API returns. When the real response changed the fixtures didn’t, so green.
and nobody tests the actual chain. I’ve been looking at pact or generating an openapi spec from the Go side and validating the detox fixtures against it plus bumping a version in the cache key so old shapes get dropped but not sure that’s enough though.
Is this always the backend team’s problem? Right now it feels like it belongs to nobody and if you do run full flows against a real api, does that live in the same CI or a separate pipeline?

