Coding 2025-10-30
I didn't realize how rough of a day I was having until a few hours ago. I tried to address the causes as best I can, but I still need at least one night's sleep to handle it.
With just a little time to work on hobby stuff after I cooled off, I decided to see what kinds of fixes MOTR needs as a result of not looking at it for a while. I ended up needing to update one test case, and delete a file that my NAS really wanted to keep around for some reason.
With that out of the way, let's look at the coverage misses:
- There are a few lines in the saltate plugin that aren't hit because I would need to break some assumptions of the plugin code to hit them. Probably the strongest candidate for adding a no-cover pragma and not looking back.
- The coverage gaps in the type_func (dependent mapping) plugin are actually kind of a bug that I should fix, but I don't want to right now. Since the code should eventually change in the exact place that's not being covered currently, it does make sense to keep checking this.
- The cmd module is missing coverage of EnvVar.concatenate. The natural way to get coverage is to pass an Invocation to Invocation.append such that their env attributes have overlapping keys. This may require going through InvocationRelations.append. This is called from InvocationEnvironment.append, which is called from... places.
- The command module is missing coverage of Implicit artifacts, as well as various error cases in a helper function that's ultimately called by Command.matrix and Command.fill_in_module.
- invocation_environment is missing a line that can only be hit if InvocationEnvironment.invocation_relations contains an Executable as a relation, and we get the facts. I don't remember what some of this means.
- I'm running out of steam, so I'll look over runner and matrix later.
- That said, conftest is also a case of "I'm not feeling worried about putting a pragma on this line, I just haven't done it yet".
For now, I really need to get some rest.
Good night.