The text for Gallant Inspiration seems clear, that it can apply whenever a creature fails an attack roll or skill check. In practice, however, there are times where it seems inappropriate.
For example, my players were researching an Infernal Contract (as per The Kintargo Contract), the rules for which describe that a research check represents an uninterrupted 8-hour period of research for which characters cannot take 10 or 20.
RAW, I was unaware of any reason to refuse Gallant Inspiration after a failed check, but it felt like an erroneous use of the spell given the conditions. Is there any rule that would or should have prevented my player from doing so, or is it a pertinent application of the spell?