That's an interesting scenario, and while I'm not sure how it would be received from an on-topic perspective, I do think it is at least partially answerable. Questions like this often come up as a result of IRS Form 8300, which is the vehicle by which FinCEN is alerted of possible money laundering transactions. Filings of this form are sometimes called CTRs (currency transaction reports). People seem interested in knowing how or why transactions are reported.
However, the thing people often forget is that only cash transactions are required to be reported via form 8300 - and only if they are over $10,000, or multiple transactions are made that total over $10,000. The goal of this regulation is to provide a method to capture transactions which involve moving funds in to or out of the (electronic) financial system. Changing funds back and forth between electronic and physical currency is often an important step in money laundering operations (because - while electronic funds leave a trail, paper money can be hard to track). Hence, the government needs a reporting mechanism in order to allow tracking of these transfers.
Your scenario of an electronic transfer would not, by default, strictly require reporting on a CTR.
That said, financial institutions are also required to report to FinCEN anything they consider suspicious. This type of reporting is often referred to as a SAR (suspicious activity report). This is somewhat open ended and there are not perfectly strict rules around what counts as suspicious, but generally most institutions look at patterns of behavior to determine what to report. Some even have automated reporting tools that pull potential transactions. A married couple with typical middle-class-American transaction volumes on a checking account (say, paychecks deposited every two weeks and several thousand dollars of debit card swipes, bill pays, etc to spend it back down) who received an 8-figure electronic transfer would almost certainly trigger any automated or human-decision flagging as suspicious activity. So, the answer to your question about when the IRS would know is almost certainly "immediately."
Perhaps the more important question, though, is what would the IRS do once they had that information. Based on my exposure to filing SARs, there is visible follow up on only a very small fraction of them. There are legitimate reasons to receive a large transfer which might not be illegal or even result in any tax burden (taking out a loan, receiving a gift).
As a slightly related footnote, in addition to the above, banks in the US are required to keep specific types of records about some electronic transfers (which would easily include your example), but these records are only required to be retained by the institution, not automatically supplied to the IRS. So these requirements don't directly impact your specific question.