models: fix grammar validation
Metadata
Current evaluation
Merged PR #6 as commit 8822ad6 (merge commit 249399c), fixing validators to handle grammar lists of one-entry dictionaries and adding recursive-validation coverage.
Resolution: closed resolved
Reason: The approved PR was merged with commit 8822ad6, correcting the Pydantic validators introduced by the grammar-aware models work.
Evaluated by: mr-cal-bot
No scores available.
Issue body
Grammar is expressed as a list of one-entry dictionaries. Previous
code validated it as a dictionary, so fix the validators to use the
correct data structures.
This is a follow-up to PR #4 (CRAFT-856).
**Note to reviewers:** please make sure that the yaml definition in
`test_validate_grammar_recursive` is syntactically correct.
Signed-off-by: Claudio Matsuoka <claudio.matsuoka@canonical.com>
- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
-----
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #6 as commit 8822ad6 (merge commit 249399c), fixing validators to handle grammar lists of one-entry dictionaries and adding recursive-validation coverage. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged grammar validation fix, correcting validators to handle grammar as a list of one-entry dictionaries rather than a single dictionary. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged grammar validator fix to use a list of one-entry dictionaries instead of a dictionary; a CRAFT-856 follow-up to PR #4. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged fix for grammar validation. Updated validators to correctly process a list of one-entry dictionaries instead of a single dictionary. Approved, passed CI, and integrated as a follow-up to PR #4. |
Update history
No update history recorded yet.
Related work
-
Related To:
canonical/craft-grammar#4
(confidence 100%)
PR #6 is explicitly described as a follow-up to the grammar-aware Pydantic models introduced by PR #4.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #74 fix: handle multi-entry dictionary after grammar statement | craft-grammar | merged | Merged PR #74 fixed #73 in commit 7f75f79 by correctly handling multi-entry dictionaries after grammar statements. |