I understand CBP limitations. However, last action, when USCIS issues an I-94 (which does not have the passport expiry restriction) occurs at the moment the I-94 becomes valid.
In this case, the last action would be the I-94 issued by USCIS on the I-797, since it would only be valid from Dec 2015. So regardless of any action that CBP took before that date, the USCIS issued I-94 would take precedence.
Btw, it is not true that a person legally in US, on a valid I-94, has to "step out" of the country to remain legal when the USCIS issues them an I-94 with their approval. The new I-94 takes effect on that date stipulated on the I-797, with no action required by the beneficiary. The "passport stamp" is not really important, it is the I-94 that matters.
Example. Person is on H4, with a valid I94 expiring in Dec 2018, the date of her passport expiry. She applies for H1-B in April 2018 and it is granted for Oct 1, 2018 starting date. Her I-797 has the I-94 attached, indicating validity from 10.1.18 to 9.30.21 (USCIS does not care about passport expiry date). she leave the country in July for holidays, and comes back and enters on H4 status, with new I-94, again issues only until December. She remains in H4. On October 1 she automatically becomes H1-b, and begins work, substituting her recently issued I-94, with her I-94 from her h1-B approval notice, and begins working. This is by the last action principle. And, he never has to leave country to get h1-B, status, as USCIS granted it with an I-94 on Oct 1, 2018.