feat(config, validation): enhance config validation with strict mode and update example checks

- Added a `--strict` option to `validate_config.py` to fail on "Unknown section" messages, aimed at CI validation of example configs.
- Updated GitHub Actions workflow to validate shipped example configs against the canonical section list using the new strict mode.
- Expanded the `CANONICAL_NON_COMMAND_SECTIONS` in `config_validation.py` to include additional sections for improved validation accuracy.
- Introduced a regression test to ensure example configs do not trigger unknown section warnings, maintaining consistency with the canonical list.
This commit is contained in:
agessaman
2026-07-08 08:56:05 -07:00
parent 95b0601980
commit 02ce8beaaf
5 changed files with 128 additions and 0 deletions
+10
View File
@@ -75,6 +75,16 @@ jobs:
- name: Log injection check — fail on new unsanitized logger calls
run: python scripts/check_log_injection.py
- name: Config validation — fail on unrecognized sections in shipped configs
run: |
set -e
for f in config.ini.example config.ini.minimal-example config.ini.quickstart config.min.ini config-pymc.ini; do
if [ -f "$f" ]; then
echo "Validating $f"
python validate_config.py --config "$f" --strict
fi
done
typecheck:
name: Type check (mypy)
runs-on: ubuntu-latest