Arial Black
Adventurer
That's a fine ruling, but in the rules, the player doesn't declare their action until their turn. There's no "declare an action" step in the RAW before Surprise is determined by the DM. There's no "trigger" for surprise that must happen regardless of the initiative roll.
That's because there are no 'Actions In Combat'...outside of Combat Rounds and Initiative order.
By definition, before the first round of combat, you are not in combat! You don't 'declare Actions' at all, because 'Actions' is short for 'Actions In Combat' and they are not required, nor do they exist, outside combat rounds.
So, how does anything get done outside of combat rounds?
Well, you just tell the DM what you are doing!
You can tell the DM that your PC is opening a door, casting a spell, running as fast as he can, anything that the PC is able to do. No 'declarations', no 'Actions In Combat', you just tell the DM what you're doing and the DM adjudicates it.
So how do we switch from this 'narrative time' to 'combat rounds/initiative' where Actions In Combat are required in order to do stuff?
Simples! When you say you are doing something that the DM rules counts as combat (or when his NPCs do), he then uses the rules to adjudicate what you are doing.
If what you are doing is lying in wait to shoot the goblin and hope to use your Assassinate class ability, then you don't tell the DM when combat rounds start or when they don't start! You just tell the DM that you are shooting the goblin from hiding (you rolled Stealth checks because the DM told you to because out of combat you said you were hiding).
You have already shot the arrow! You said you were doing this. If you hadn't have said you were shooting the goblin, the DM would not have moved from narrative time to combat rounds.
You can say, "My PC is thinking about shooting the goblin". Think away! Combat hasn't started yet.
"My PC nocks an arrow and draws his bow, aiming at the goblin". Aim away! Combat hasn't started yet.
"My PC shoots the goblin". Roll initiative. We are now in combat.
Remember, the initiative roll does not represent Stealth. The fact that the goblin rolls a higher initiative does not mean that his Perception beat your Stealth; it just means that his reactions are faster than yours this time!
You shoot the arrow. Initiative is rolled.
If you roll higher, then the creature is still 'surprised' at that moment. Your class ability means that you have advantage on the attack roll and, if it hits, it is a critical hit. Good for you! All those resources spent on getting high initiative and advantage on initiative checks to aid in your assassinations has not gone to waste.
If the goblin rolls higher, then unbeknownst to you his reactions are faster than yours this combat. He still doesn't see you though. His turn comes first, but because he is surprised then he cannot move or take any Actions. So, from your POV, nothing has happened! Your PC cannot tell the difference between having a higher initiative or a lower initiative than the goblin just by looking! The player might have an idea, having seen his own initiative total, but remember that at this point the arrow has already been shot, just not resolved yet. The goblin may take a reaction if he has one that helps, but he can only react to things he can see. He cannot see you, but he can see the arrow in enough time to cast shield just in time, or use Uncanny Dodge to roll with the punch, so to speak. Because his reactions were just that fast this time!
Oh, well, you can't win them all!
This is how the RAW is written in terms of the relationship between out of combat/in combat and stealth/reaction time. This is why 5E doesn't not have 'surprise rounds'; it doesn't need them.