Darktable discards all edits immediatelly as I edit a picture

When I open a picture (it’s a JPEG, as I was shooting a timelapse and didn’t want it to take too much space), any edits are discarded if I try to compress the history stack or if I leave the picture and ho back to photo list.

If I try to create a template from the edits it will tell me that it cannot make a preset from an unchanged picture.

I tried to delete all the .xmp files, but that had no effect.

Here is a video of what I am experiencing: https://youtu.be/m6ftvB9c7B4

Why is this happening?