ait-yaml-validate does not schema-check !include'd dictionary files (#201 still reproduces)
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 75/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python
- Domain
- cli, testing-qa, tooling
Research direction
Start with YAMLProcessor and schema_val() in ait/core/val.py:100-104 and :495-503, then read the Cmd/Tlm validation paths at :587 and :715 and tests/ait/core/test_val.py. Reproduce the included command and telemetry cases from the issue; done means schema errors in included files fail validation while shipped configuration and clean includes still pass.
Written by the indexing model from the issue text.
Description
ait-yaml-validate --cmd and --tlm don't run the JSON schema over files pulled in with !include, so a misspelled key or wrong-typed value in an included command or telemetry dictionary still ends in Validation: SUCCESS, exit 0. #201 reported this and #452 closed it, but on master (a01414c, 3.1.2) the schema check still skips includes.
schema_val() checks only the top-level file (ait/core/val.py:503), where YAMLProcessor has already turned - !include ccsds_header.yaml into - include: line 96 (val.py:100-104), which the schema accepts. The loop over yml_files_to_validate (the top-level file plus its includes, val.py:495-497) logs Validating: <file> but only runs content_val(), and the Cmd/Tlm versions load CmdDict(self._ymlfile) / TlmDict(self._ymlfile) regardless of which file the loop passes in (val.py:587, :715).
From the repo root, with AIT_CONFIG set:
cp -r config cfg
printf -- '- !Command\n name: X\n opcode: 0x0099\n subsytem: CORE\n' > cfg/extra.yaml
printf -- '\n- !include extra.yaml\n' >> cfg/cmd.yaml
ait-yaml-validate --cmd --yaml cfg/cmd.yaml # Validation: SUCCESS, exit 0
ait-yaml-validate --cmd --yaml cfg/extra.yaml # 'subsytem' was unexpected, exit 1
Other cases, each on a fresh copy of config/:
mask:renamedmaks:onCCSDS_HEADER.versionin the shippedccsds_header.yaml(included atconfig/tlm.yaml:97): exit 0. The same edited header pasted inline: exit 1; the unedited header inline: exit 0. With themaksfile,TlmDictdrops the mask and decodes08 01 c0 00 00 05asversion=8instead of0.- Field includes (
doc/source/telemetry_intro.rst:367):maks:in the included field list exits 0, inline exits 1. - A duplicate opcode in an include fails (exit 1, an uncaught
YAMLErrorfromCmdDict), so includes are loaded, just not schema-checked.
The tlm_yaml_check and cmd_yaml_check pre-commit hooks (.pre-commit-config.yaml:44-56) call the same entry point (read; the hooks weren't run), and tests/ait/core/test_val.py has no include case. Not tested: EVR and limits dictionaries, includes nested more than one level. de1a0f9 (#452's merge) was read, not run; it has the same loop.
Schema-checking each included file on its own isn't enough. I tried it: it catches the command case but fails a clean Field include ('field', 'type' were unexpected). Expanding - !include lines inside YAMLProcessor.process() before the schema pass caught the command, header and field typos, passed the shipped config and clean includes, and test_val.py stayed at 26 passed. Error line numbers then refer to the expanded text. Happy to open a PR with that plus a bad-include test, or to hear you'd rather handle it another way.
- Dominant language
- Python
- Stars
- 56
- Forks
- 35
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Similar issues
-
resource-submission validation-passed
Difficulty 1/5 Under an hour Newbie friendliness 88/100
hesreallyhim/awesome-claude-code#3214 · 1 comment ·
Maintainers usually reply within 1 day
-
room-commons replace accepts an empty old string and silently prepends the new text to the pageOpen
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
doobidoo/mcp-memory-service#1650 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
ml-explore/mlx-lm#2002 ·
Maintainers usually reply within 2 days