Devlog #7: Deletion and Other Adventures
Hey everyone! Remember when I said testing environment by end of week? Well, we hit an unexpected roadblock.
Turns out we were blocked by WikiData. Literally blocked. But we’ll get to that story in a minute.
The Delete Button Philosophy
So we made some important architectural choices. The first one: implementing a proper deletion strategy.
Here’s how it works: When someone evaluates a statement negatively, we now actually delete it. We only actually delete it after deleting from WikiData, ensuring we maintain data integrity on both sides.
We’re keeping all the positive evaluations, and now storing every single statement ID we get back from the WikiData API, again maintaining data integrity. This is new, before, we didn’t expect to need these since we were only inserting new data. Turns out, we definitely need them.
The Statement ID Saga
During testing, we discovered something interesting: we often get new dates for positions where we’d want to merge the new data with existing database entries. So we added statement ID importing and deletion for existing entities, so we could accept new entries and discard existing ones.
However, dates can be wrong, but other metadata might be accurate, like which party someone belongs to or the context of their position.
The Hidden Metadata Problem
Our import system was only capturing dates from Wikidata position statements, but these statements often have much more metadata: political party, electoral district, jurisdiction, and more.
When evaluators see a existing position in our interface, they’re only seeing the partial data we captured. If they reject it, they could unknowingly delete a Wikidata statement that has way more information than what they’re seeing. We could be destroying valuable metadata without anyone realizing it.
So we’ll have to import all position properties during import, not just dates. Make sure users can see exactly what they’re about to modify or delete.
The Leaderboard Question
With our new deletion strategy, we only track positive evaluations. That would support only part of a potential “Top accepted edits” leaderboard. Soft deletes would make this possible in the future, but honestly, there’s a lot to be done before we get to a leaderboard. It’s a possibility we’re keeping open, but not a priority right now.
The WikiData Block Resolution 
Remember that testing environment I promised? Here’s what actually happened:
We deployed to production, everything looked good, then discovered we couldn’t push any evaluations to WikiData. We were getting rest-write-denied errors with no clear explanation.
After some detective work (and help from the WikiData community on Phabricator), we discovered the issue: our entire IP range (148.251.0.0/16 - that’s 65,534 hosts!) was blocked as an “Open proxy” on the Hetzner network.
The journey to resolution:
- Filed a bug report on Phabricator (T404727)
- Appealed through the Open Proxies Stewards Block Wizard
- Submitted an unblock request following WikiData’s IP block exemption procedure
- Worked with WikiData administrators who found a clever solution
Big thanks to the WikiData admin team for helping us navigate this.
The Small Improvements That Add Up
While communicating with the admins, we haven’t been idle. We’ve:
- Dramatically improved the position and birthplace mapping by importing lots of extra relations and building short descriptions for the reconciliation step
- Improved authentication to handle token expiration and error states better
- Redesigned the UI to show grouped statements, handle edge cases in the Wikidata statements more cleanly and allow for deletion of existing statements
- Did part of the work to support multiple languages
What’s Next?
The testing environment is live!
Check it out at https://loom.everypolitician.org/
Right now I’m working on multilingual support, which is a bigger undertaking than it sounds. We’re:
- Importing all languages and countries from WikiData
- Linking those to politicians based on their citizenship
- Using those links to ensure we import the correct Wikipedia content in the right languages
- Building UI for you to choose your preferred languages for evaluating and will allow you to filter for politicians from your country.
This should dramatically improve our coverage for non-English politicians and make the tool truly international.
We’ve successfully implemented a robust deletion system that maintains data integrity across both our platform and WikiData. Getting there’s been quite the journey, but we’re now reliably processing and validating politician data.
Let’s see how this works across multiple languages!?
P.S. - If you find any issues or have feedback on the testing environment, please let us know!



