It cuts the other way, too, though. If the Eminians knew that Starfleet ships are more resilient to attack if alerted, they'd certainly fire without trying subterfuge - they couldn't be sure the subterfuge would work, either, and if that failed, then the enemy would be alerted.
Depending on what they said, it could be taken more than one way. But it's hard to interpret a lethal attack on the ship as anything other than hostile.
It appears the ship would have gone up in a fireball if Scotty had not kept the shields up. What we don't know is whether the shields ever were down. First Kirk orders them raised before they even approach the planet. Then Kirk beams down. Then Scotty says he's taking standard precautions, and then DePaul says the ship is shielded.
Naturally Kirk goes in with shields up. But we should assume, I think, they dropped them to beam down even if not explicitly told. Later after the landing party is out of contact and a false message is given, the shields are put up again. Later, after they orbit out of range of the sonic cannons, they beam down Fox and never mention being hit again. In fact they say below the ship is now out of range. While every thing is not explicitly spelled out, that's how I always assumed it was working, and it keeps my faith in the belief you can't beam through shields either way (normally).
Did Kirk lower the shields for beaming down, and did Scotty only re-raise them when stating he's taking the precautions? In that case, the Eminians were idiots for not firing immediately, but merely unlucky, rather than idiotic, in firing at a shielded ship - they aimed at an unshielded one but ten seconds later hit shields anyway.
I never saw once their ability to detect if the ship's shields were up or not. Considering the shields have sometimes been said to virtually cloak the ship from primitive tech, it may not be that easy to see if they are up with lesser tech, even if you can still see the ship's position.
I just don't think it would have been wise to open fire on the ship the instant they were declared dead and just hope your weapons tech (that hasn't been improving much for hundreds of years) would outclass what was probably the largest war ship ever to visit the planet. And their own mind set was working against them. Declared dead – voluntarily kill yourself – it's the civilized thing to do. We can only speculate exactly what happened to the Valiant. I think they probably got them with their sonic disrupters after they were declared dead but didn't report – not being as suspicious as Scotty, and so since that worked before, it would work again. They were just wrong.
Did Kirk beam down through shields, like Fox later apparently did? It is only in that case that the Eminian choice of not firing immediately gets justification, especially if they know for a fact that their superguns can't hurt shields.
There was no reason to fire on them when Kirk beamed down – they hadn't been killed yet. And when Fox beams down, they had already orbited out of range, it seems to me.
But trying to appear non-hostile is failure-prone in all cases, and if it fails, it's irrelevant whether firing at the ship failed or whether luring the people in failed.
I think a lure is easier to explain as a mistake – depending on the lure. Even an overt attack is explainable – opps, our old systems can't discern if you are our enemy or a friendly – which is why you were told to stay away, so it's not really our fault.
Oh, they do know where to start - at the beam-down spot. And it's told multiple times the ship has the entire planet under surveillance. So what Scotty is specifically worried about here must be that he lost sensor contact with the Captain (not surprising, considering the adventure takes place in a bunker!) and considers the worst-case scenario that he has been whisked to some other location on the planet.
They missed their check in time, and they don't know where they are. They might start looking at the beam down point, but if they have transporter tech on the planet, or other rapid transit, they could have gone from there to anywhere on the planet. They even say it's a large planet. But even assuming they are still in the main city with a population of millions, that's a huge place to look compared to a relatively tiny space ship.
Having the planet under surveillance doesn't mean much. It certainly doesn't mean they were maintaining a transporter lock on the landing party or even tracking them in any way. And they admit they don't know where they are, so I'm satisfied the place is too big, there are too many security screens or features or natural barriers, so finding them in an emergency isn't likely, and hunting for them with sensors would take hours or even days.
But barring active hiding measures, locating somebody is generally trivial in TOS. Spock among Romulans aboard a hostile starship? Two and a half lines of dialogue, if we include the command to start searching!
A tiny ship of 400 compared to a city of millions, and it still took Chekov considerable time to find Spock. Remember, the whole point is to beam them up for emergencies, but if hours of scanning have to be done first, what's the point? Emergency over – landing party already dead.
I mean, we need a bona fide example of heroes going missing without having been whisked to another dimension altogether. Does TOS have any to offer? In "Bread and Circuses", Scotty doesn't say he lost track of Kirk, only that he can't interfere - OTOH, he can "pinpoint" all sorts of stuff down on the planet. In pretty much every other adventure, the starship is prevented from doing either scanning or beaming, typically because she's under attack (say, "Return of the Archons") but sometimes because she's under orders ("Mark of Gideon").
Pin pointing power sources is child's play. In Bread, Kirk and the communicator had Scotty tell how many were in the area around the active communicator. I didn't get the impression he could tell which one was Kirk or which ones were alien (though with time, they may have been able to). In Dove, they could sort out the Klingons well enough, but they had an active communicator again and knew right where to look, so it was quick. I think in
TOS you can find and discern certain things, but it usually takes a lot of time if you don't have active communicator/transponder assistance, so for most emergencies, you have already lost the men by the time to get a transporter lock.
There are quite a few TNG, DS9 and VOY eps where they don't specifically mention dropping the shields, but those eps don't actually spell out that the shields could not have been dropped. Say, "Relics" has plenty of time windows for briefly dropping the Jenolan shields even at the risk of letting the big doors trundle a bit closer to crushing the ship (indeed, most of the necessarily multi-minute flight of the E-D away from the central star is cut for brevity). Or "Dragon's Teeth" has ample opportunity for Tuvok to drop the shields even in the middle of combat, as the hero ship isn't in much danger even if getting hit unshielded a couple of times.
Even when they don’t explicitly mention dropping shields, if somebody is beaming up through them, you can be pretty sure they are dropping them for at least the fraction of a second it takes to do this. It's usually only when continuous fire is upon them, or a high tech opponent can detect split second stuff and already has weapons armed, they need to keep shields up 100% of the time. I'd rather it took several seconds or the better part of a minute to transport since it seems like it should, but however fast they do it, they don't do it through shields, so one should assume they were dropped long enough to do it.
"A Taste of Armageddon" is different in that dropping of shields should spell immediate doom. It's possible that there was an unseen maneuver in which the ship left the range of the Eminian guns first, but this would be a strange thing for Scotty to do - because afterwards, he explicitly executed departure to the maximum range of the ship's own guns. Why would he first order a lesser withdrawing?
Actually, though Spock ordered him out to maximum phaser range, for all he knew Scotty was already there. Or he may have been out of range of the sonic weapons, but could still go farther out. I'm pretty sure to beam down Fox Scotty had already moved out of range of the sonic weapons. There is nothing to say he didn't, and he sure should have the second they started firing at him. Though it is less dramatic then since he should have told Fox he'd lower the screens, fine, but first orbit out of range. My guess is they weren't sure what the range was at that point, but determined it later and went there and discovered it was still in transporter range, so poppin' Jay could go, and did.
No explication in the dialogue, at any rate. The one reason one might need a traitor in the mix is because a Mission: Impossible plot needs advance intel to work, and Starfleet can't get advance intel on the Star Empire without traitors. But one might instead see the adventure as utter ad hoc, in which case it really becomes Impossible to swallow but at least can remain traitor-free...
There may have been "traitors" or just spies feeding them intelligence reports on the cloaking tech, but I don't see the need for an active traitor on the Romulan ship. It was risky, sure, but if caught, Kirk would take the blame, and the Enterprise would be blown up rather than captured. Huge risk, but they needed the cloaking device to prevent war since we all know what Romulans do when they think they have the upper hand. Risk one ship to prevent war? Yet bet.