No I think you are right actually. I was just checking in Bloomberg for you and fonud empirically that there any short front stub less than 7 days gets folded into the first coupon period. I then found that this is what opengamma strata call smart_initial. Have a look
http://strata.opengamma.io/apidocs/com/ ... ntion.html.
It's kind of a corner case and I am not sure how much time is fruitful to spend on. What I can tell you is that in banks such subtleties are typically explicitly handled. Suppose someone does transact such a swap and suppose the software doesn't handle the case correctly based on the generic rule you are trying to discover for yourself. Then the way around this is to agree with your counterparty. Then often times the schedule software will allow you to specify the swap schedule using 4 dates instead of just 2, meaning that you can specify front and back stubs if needed, with a regular schedule in between and a roll date. Alternatively worst comes to worst, the full schedule is specified explicitly. See, I know I am not answering your question, but the point is that it may be possible to explicitly construct a rule that covers all corner cases for all times: past, present and future. But in the absence of the formulation of a generic rule everybody agrees on, it might be that individual implementations do not agree on such corner cases and then it is important to be able to specify the required schedule using slightly more explicit parameters as I describe above. It's to some extent a futile enterprise to try and capture every case, knowing that some cases may not even be unambiguously resolved using what is believed to be the rule to be applied.