So Twitter finally did the thing Elon's been promising since basically the day he took over: on Friday they dropped the recommendation algorithm on GitHub, a repo called twitter/the-algorithm, licensed AGPL-3.0, free for anyone to clone and pick apart. I saw it going around Friday night and instead of doing literally anything else with my evening I made a pot of coffee at 9pm (bad idea, did not sleep great) and just started reading.
Here's my actual take after poking through it for a few hours: it's interesting, and it's also not really what "open source" is supposed to mean, and I don't think that's an accident.
The code itself has some genuinely cool stuff in it if you're into recommendation systems. There's a component called Home Mixer that assembles your timeline out of a bunch of candidate sources, and a clustering system called SimClusters that groups users into overlapping communities based on who follows who, and then a scoring model (people are calling it "the heavy ranker" in the docs) that takes all those candidates and decides what actually lands in front of your eyeballs. If you've ever wondered why your For You tab surfaces some rando's dunk tweet from an account you don't follow, this is the machinery doing it. Genuinely neat to see laid out, even in pieces.
But here's the thing that bugged me and apparently bugged a lot of other people who spent their Friday night the same sad way I did: the git history is basically gone. It's not decade of commits going back to whenever this stuff was built, its a handful of squashed commits that landed all at once with no real trail of who changed what or why. For a company that's spent the last few months insisting this release was about transparency and letting "everyone" see how the sausage gets made, scrubbing the history before you hand it over is a weird way to prove that. You can look at the current state of the code. You cannot see how it got there, which is honestly the more interesting question a lot of the time.
And it doesn't run. Not out of the box anyway. Big chunks of it depend on internal Twitter infrastructure that obviously isn't in the repo, so you can clone it, read it, maybe fork bits of the ranking logic into your own toy project, but you can't stand up your own little timeline algorithm on your laptop and watch it work end to end. Which, fine, I didn't really expect a Fortune 500 social network's entire backend to be laptop-runnable. But calling it "open source" when you can't build or run the thing feels like it's stretching the term past what it actually means. It's more like a very detailed diagram than a piece of open source software you can contribute to.
Speaking of contributing — I checked the issues tab the next morning and it was already a disaster. People renaming labels, joke PRs, someone had opened an issue just to ask why their follower count dropped, which has nothing to do with any of this and is definitely a support ticket, not a GitHub issue. I don't think anyone seriously expected outside contributions to get merged into Twitter's actual production ranking model, and the state of that repo by Saturday morning kind of confirms it was never really built for that.
None of this is a huge shock given how the last few months have gone over there. I'll say this much for it though: as a nerdy reading exercise it was worth the lost sleep. If you work anywhere near recommendation systems or ranking models it's worth an hour of your time just to see the shape of a real one, warts, squashed history, and all. Just don't go in expecting to actually run it, and don't take "open source" here as meaning quite what it usually means.
I've got the repo cloned locally still, mostly just sitting there. Might poke at the SimClusters stuff again this weekend if I'm bored. Might also just go outside for once.