I've been struggling to get a good solution for this problem: Connecting a PCB to the slotted enclosure it sits in. Sounds simple enough, right?
This is the profile of the type of enclosure I'm talking about:

The PCB slots in horizontally.
Since the enclosure is going to be anodized, I think I can not rely on putting copper on the edges and pulling back the solder mask, as this should be a connection reliable enough to provide a return path for the occasional ESD current spikes.
....
Have you faced a similar design challenge yourself in the past? How did you tackle it?
I have run into a similar problem several times with low noise amplifier cases for RF and had a long discussion about a related problem with some enclosures here the other day. The theme was avoiding problems caused by improper grounding and ground loops in RF enclosures. Maybe your issue is similar enough that this might help you.
Two ideas that came out of it were,
LNAs and bias tees already often use a feed through capacitor or more recently combo feed throughs that incorporate an inductor as well, to route the DC power line out of the enclosure. Typically they will have a tinned solder post on their exterior to connect the DC ground to. But because of the skin effect, this may not always be enough to provide the lowest impedance ground return for
RF grounding. Because the RF travels along the skins (outside surface) of conductors and DC goes through those same conductors. This may seem counter intuitive and breaking the rules of RF construction but it makes sense to me because Ive observed this happening in low noise (less than 0.7 db) amplifiers ive used for VHF/UHF reception. (which are a very good way to learn about RF enclosure issues because they amplify mistakes!)
1.) An additional ground, going more directly to the active device ground may help make the LNA quieter.
This involves, counter intuitively making an additional (to the connection to the case outside) separate connection via a thick soldered wire to the most important spot on the PCB ground (backplane, sides of board) and route that ground out of the box in the shortest possible manner via a feedthrough capacitor of adequate enough value (Adding this: one that does not have a built in choke-some do incorporate an inductor and one doesn't want to use them in this specific use.) This provides a good both case-and PCB connected ground with both low DC and RF resistance. One should take care to make it short and direct and I would also suggest running it to the back of the PCB, right underneath the multiple vias that connect the ground pads - the ground pins of the RF-active device to the back of the PCB which is a solid continuous ground. The edges of that PCB should also be sonnected via soldering to the case -
2.) a surface which can be provided in the case of an aluminum case- which is un-solderable- is makable by lining the interior of the case with (if possible) a single large piece of the thickest practicable conductive copper tape* that also makes contact with the exit holes for the RF connectors or screws that make direct contact to the aluminum as well, ideally using lock washers and additional pressure. This way you have multiple redundant grounding. Solder can improve on this.
*line the
inside (of a non-slot containing aluminum enclosure) with copper tape and solder the edges of the PCB to that.