Step flashing gap detail (roof to wall)

Wanted to inquire as to the gap you leave between the vertical leg of step flashing and the shingles. I am not talking about a 1 inch gap between siding and the roof, but specifically if you leave any gap (1/8-1/4 inch) between shingle edge and leg of flashing against the wall? Similar concept to leaving a channel between a roofing boot and shingles so water does not get trapped. I see multiple examples online, some have a small gap for a channel while others butt them up flush. I tend to leave about 1/8-1/4. My thought is that the siding will end up being above that portion (with its own gap, of course) - only water that will get there will be in stormy windy rain and will have an easy way to escape down through kickout flashing, while the gap will prevent shingle buckling during expansive hot season. Not sure if I am doing a disservice with that. Or if the gap is negligible detail that will do no good and is unnecessary. Will it do any harm?

Another point, since I use copper step flashing, I also use copper nail (2 of them) at the very top of flashing to nail to roof. Those nails will also penetrate the top of the shingle below. The next shingle and layer of flashing will overlap the nails, so leaks are unlikely. I use 5 inches for both planes (roof and wall) with steps of 8 inches up the roof. Since I do not nail the shingle to the step flashing, I end up running last shingle nail right next to where the step flashing should end, then run a couple above it, a few inches above the strip. To mitigate possibility of blow off (highly unlikely by the wall), I run a small bead of polyurethane sealant right under the shingle to seal it to the flashing. I do it vertically as to not trap any moisture. No horizontal caulking! This is about 1/2 from shingle edge, so you cannot see it is caulked. Anyone do this or have other suggestion for keeping shingle secure?

Thank you all for all the help throughout the years! I like to understand small details to produce great work. I am happy to be a part of this community!

I always cut my steps at 3"up - 5"out 2x shingle exposure, 1 nail high. On a high wind wall/low pitch, vertical caulk at the roof edge of the flashing for insurance. If you wanted to horizontal caulk, it would only be at the TOP of the flashing. Factory shingle cut against the wall, minimum 12", butted up snug. Seemed to me that if I left a gap, 1/8 or so, it would drain better, but if you look at it, there would be an open channel all the way up the wall and blowing rain would find it for sure. Fasten steps to the roof, counters to the wall.

I was trying to figure out the minimum shingle length I need when installing the shingles on top of the step flashing and found this quote above.

As I go up the wall/roof, 1st course starts with a full shingle and incrementally take off 6.5" for each course as I go up which mean the 12" minimum when butted up against the step flashing would be the 5th course. Then I would start the 6th course with a full shingle again correct?

Apologies if this is a stupid questions but I don’t want to F%$# it up. As I am sure you guys are well aware ;o) (Really joking here) The instructions say to do 6 courses before starting over again… but this would be an exception.

Had a lot of repairs where the butt edge of a shingle was close to or on a flashing. Don’t do it unless you want problems. A nail head takes a year or two to rust off. Check out the post “roof leaking at step flashing”…guess what He’s going to find.

I won’t! Rest assured… thank you!