Add schema enforcement for user-modifiable data using Pydantic
Some parts of the code loads user-modifiable JSON or config files directly using json.loads() without any schema validation. This can lead to runtime errors if files are empty, malformed, or missing required fields.
Suggestion: we might be better off to use some sort of data validation library (Im suggesting pydantic).
It would be nice to collect the individual cases, maybe as subissues. IIRC the initial culprit was the reboot request file, there surely may be more offenders.
It would be nice to collect the individual cases, maybe as subissues.
Agree - there are a handful (5) of them currently.
IIRC the initial culprit was the reboot request file
Yep, I had included the link in the description.