Preferred approach for testing internal logic

i was investigating writing some tests for an internal type within the Runtime module, and found my desired strategy of doing @internal import Runtime unfortunately did not work. i first got a number of complaints about not being able to locate various dependencies, and then some issues with not having cxx interop set up properly in the compilation command for the test target. ultimately i gave up when i hit the 'Runtime module was not compiled for testing' error, and hacked in some @_spi stuff to verify the code i wanted to test (unfortunately having to modify & rebuild the module under test each time i changed anything).

i see little usage of @testable across the existing test suite, and i know people have varying philosophies on whether non-public API should even be tested, but it made me wonder whether this is something that could be supported. if so, any ideas what would be needed (i assume some build system support)? if not, what's the least-bad approach for testing logic of internal types?