Totally DM discretion. In general, I have no issue with a Ready Action "interrupting" the trigger, but I would examine everything in a case by case basis. To consider your examples:
- When a rogue tries to run for cover, an archer Readied to 'shoot him if he tries to move'
I'd be okay with the archer making the attack. Remember, the entire round takes place in 6 seconds, so unless the rouge is directly adjacent to the cover, this will take time to do (giving the archer time to take the shot.
- When a mage attempt to cast an Invisibility spell, a player Readied to 'cast Magic Missile on him if he attempts a spell'.
Assuming this a spellcaster with Invisibility on their spell list, I'd be fine with it. The mage begins casting, as does the player, the target is already set once the missiles being to fly. The missiles fly true and strike the Mage (causing a Concentration check, because IIRC it's a Concentration spell). If the player doesn't have Invisibility, I'd require an Intelligence/Arcana check to know that a spell is being cast (rather than just random movements).
- When a caster attempts to cast Magic Missile on a player that has used the Ready action to 'run through the door and out of line-of-sight if the mage starts casting a spell"
My answer is a combination of my above answers. The target is set, and it will take time to get out of the way. Also, unless the character is a spellcaster with the spell on their spell list, I'd require an Intelligence/Arcana check.
- When a dragon starts to use its breath attack, a tightly packed group of goblins that have used Readied actions to "run if the dragon tries to breath fire on us"
This gets tricky. I'd require each to give a location they're going to run to (because Ready requires specifics), so some would probably escape the flames.
Something to consider when adjudicating a Ready Action is the loss of the Action. IME if someone Readies, they usually can't actually perform the action until the trigger occurs. If someone could already perform the Action, but doesn't (as in every example you gave), there should probably be a reason (the archer has ordered the Rogue to surrender, for example). I can't understand why someone would Ready to run out of line of sight from the mage, when they could take an Action (such as an attack), then run out of the room. Same thing with the dragon.
The other thing to consider is how you describe a Readied Action as a DM. When I have a monster or NPC Ready, I tell the players something to describe the action. For the Archer, it would be the bow aimed at the Rogue. For the Mage (both examples), the player would be staring intently at the mage (possibly also looking at the door). In the case of the Dragon, the goblins would be tense and looking at their chosen run space. This can help players and NPCs make intelligent decisions, and might prevent the Readied Action from happening (depending on the intelligence and goals of the NPC, as well as the specific situation; in the Dragon example, it might not use it's breath weapon, buy rip them apart in melee).