When an attacker publishes a longer chain, does Bitcoin Core emit a warning? I tried answering a question about a majority-attacker's power to change the blockchain yesterday.

There is one thing I haven't been able to get a clear picture on, yet:
When a previously unknown chain fork of at least 7 blocks length is published, how does Bitcoin Core react?

main.h: CheckForkWarningConditions appears to emit a warning stating "Chain state database corruption likely".

Would Bitcoin Core accept the chain fork if it had the most work? How prominent is the warning to the user? Does Bitcoin Core need manual intervention to decide which fork to accept?
When a previously unknown chain fork of at least 7 blocks length is published, how does Bitcoin Core react?


It reorganizes to that chain, any transactions that were lost are returned to the nodes mempool. 


  Would Bitcoin Core accept the chain fork if it had the most work?


Any valid chain with the most work will be reorganised to. 


  How prominent is the warning to the user?


That warning isn't shown to a user in a reorganisation. Users are shown a warning when there is a significantly higher chain than them with valid proof of work but invalid contents, or alternatively when a soft fork takes the block version number higher than their client is aware of. When a warning is shown to a uiser through the alert system, it is either in the alerts field of the RPC output or in a small yellow bar in the GUI client. 




  Does Bitcoin Core need manual intervention to decide which fork to accept?


The code has the rules, if users made their own decisions about what constituted "valid" the network would fragment. There is no concept of an "evil" chain or an "attacking" chain, only the best chain.