Ok, first off, I agree that limiting it to the OS that comes preinstalled on a computer would be a much less ambiguous way to write it. However, I think they're actually trying to prevent more egregious means of age verification by saying "if you get this signal, you will use it, you will not use anything else, and if you stick to that you're in the clear", so having it apply to all operating systems actually helps.
The crux if the matter then is what is an operating system, who is the developer, and what does it mean to licence it? In your example you talk about publishing your code in a git repository. Whilst there doesn't seem to be any language in the bill clarifying this, and I am, very much, not a lawyer, it seems to me that there us a difference between publishing source code that can be compiled into an operating system, and publishing an operating system. You cannot just load the source onto a machine an have it run, you need to compile it and build it into a usable image first. From that I would say that the operating system is the compiled artefact, and so the developer and licensor of that is whoever built the image, and the controller is obviously the person who put it on the machine.
That would mean that you are free to publish the code, and only those who package it (likely either the end user or a company that sells OSs) would have to concern themselves with implementing the user age bracket flag.
Stapling 5¼" disks to reports was another whoopsie.