They basically are, the algorithm is something like:

At the beginning of january and july, observe the difference between UT1 and UTC. If the difference is >= 0.6s, a leap second will be inserted at the end of june/december. Publish the results here: https://hpiers.obspm.fr/eoppc/bul/bulc

This is true. They look at how much the earth spun, and whether it was more or less than 86400 seconds/day average. This can't be done without external data. It's not a pure mathematical algorithm.

Waiting until Trump discovers that the earth rotation service exists and forces them to insert a negative leap second just because he can.

Oh thank God I thought I was going to make it through a thread on leap seconds without a political discussion

Then, when the stock market crashes due to software failures and timing inconsistencies, he'll want to undo it and thereby cause even more chaos ;)