🐛 Fix broken change detection
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 25 Oct 2021 19:28:11 +0000 (21:28 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 25 Oct 2021 19:28:11 +0000 (21:28 +0200)
Wow, this was a mess. Two days after the last deploy with a working change
detection I changed some code around the triggers and broke the detection. I
didn’t realize until over a year later because I have never deployed the broken
version until I made some unrelated changes.

I never liked the particular solution around the triggers keeping state and not
being pure functions. So now there are no more triggers; instead, the merging
of the states (which was done by the triggers — great misnomer there) is now
done by a merger, and the state is responsible for exposing whether it contains
a noteworthy change. The Merger and the State for a particular thing (like a
comic, or a torrent file) have to work together hand in hand here but they also
needed to do that before and it’s not really like you would use an X-Merger
with a Y-State.

The resulting changes touch pretty much everything but due to the Watcher
“shortcut” of chain creation, all .json files that only reference a Watcher do
not need to be touched which should make transition rather seamless.


No differences found