I'm not sure you can say "the discard is the attack" or "the topdeck is the attack". It's both. The effect, as a whole, increases the green density of your remaining deck. THAT'S the attack, and to do it requires both the discard part and the topdeck part.
...
Rabble's attack is precisely the part where it discards the cards. If you reveal three Estates, it doesn't do literally anything.
Correct, and correct. That's exactly the point I make in my postscript.
It seemd to me you are confusing ex ante and ex post.
To be clear, that's not my mistake, that's the mistake made by people I have played with who lament the "lost" or "skipped" cards that Rabble turns up, even in a scenario in which the Estates are already gone and all players are in pure building phase. In that scenario, Rabble is similar to Millstone, except that in a vacuum, milling cards in Dominion helps players by cycling their deck more quickly.
The ex-ante analysis tells you that Rabble, in a game with no VP cards in decks, is a benefit to the "attacked" player, as stated above. If Rabble mills a desirable card, an ex-post analysis of that one play tells you that Rabble harmed the "attacked" player.
However, ex-post analysis is only useful if applied statistically across a large sample of actual events, and it would have to take into account times when it skipped cards you didn't want to draw in favor of ones you did want to draw. In the absence of VP cards, all randomized cards are equal in the eyes of Rabble, which means that an ex-post analysis with a large enough sample size would come out in favor of the attacked player, since the subsequently drawn post-attack cards would be more likely to contain shuffled-in cards purchased in the previous turn due to increased cycling.
In other words, anyone who has ever said anything like "Argh! Rabble skipped my Grand Market!" and factored that into their thought process about how good an attack Rabble is is working from a fundamental misunderstanding. Counting the hits is one of the oldest statistical fallacies in the book and leads to all kinds of unfortunate belief systems.
I sometimes ask them to imagine that Rabble took the top three cards, shuffled them without looking, and placed them at the bottom of the deck. Would that be an effective attack, or is that just changing the order of already-randomized cards? Does it change just because you looked at them first?
There have been a number of discussions about this phenomenon before. What's especially interesting is that early cycling is so beneficial that there is some argument that Rabbling early, even with three Estates in the deck, is still beneficial to the attacked player in the long run. Anyone remember where that thread is? When Rabble really starts hurting is during the greening process, and when engines can play multiples per turn so that attacked players end up with a stack of three green cards on top almost every turn.