Comment by bluefirebrand
1 hour ago
> you can't write an assertion like ("does this image look like a downscale of this other image"
You can though. Maybe not exactly what you are thinking but there are some pretty good image similarity algorithms like dhash out there that do stuff like this. Mostly they get used to check for duplicate uploads, copyright materials, or "does this look like porn" style filters
This isn't something that needs image models to accomplish really.
The actual problem is that no-one had considered that this (desync between front and backend) COULD happen. Once it was realized that it was possible (and worth testing) the bug was practically solved already.
Such is true for many bugs. Even if you have unit tests, they only test on things you've thought of. It's usually the stuff you haven't thought of that gets you.
No reason not to unit test of course, but don't get a false sense of complacency or assume testing is easy either. That's why it's great to do things very carefully (and probably not with AI Agents).