I have built 4 tiny trailers and I have used a half lap rabbett joint and cut a pocket in my wall to recieve it. The 1 1/2 by 1 1/2 spars are always cut from 2x12's which are southern yellow pine rather than spruce pine fir grade stock. The SYP is about 50% stronger than the SPF.
I will dig up a few pictures to help make it clearer how they go together
In the picture above you will notice the spar on the far left is rabbetted 3/4" deep and cut back 1/2 " (the thickness of the osb). In the reinforced areas the rabbett is still cut 3/4" deep but the tongue is now 1 1/4" long (the thickness of 1/2 osb plus the 3/4 thick 1x4)
This one shows the spar glued and screwed in place. I used a single 3" construction screw and it is angled in to allow it to cross the grain of the wood for more holding power. DO NOT place it straight in . A screw into end grain of wood has a very limited amount of holding power
The spar before and after installation
This is my 3x5 motorcyle tear cargo trailer. I install the stationary hatch spar the same way but use a full 2x4 releaved the same way and set in a pocket cut into the wall also. This allows for 2 or 3 screws to be installed to help resist the twisting motion and strengthen this final roof spar
This is the latest project. My dedicated chuck wagon It share the same technique in its roof