Enforce top-level additionalProperties: false in load_param_table_yaml()#214
Merged
james-ball-qualcomm merged 2 commits intomainfrom Mar 15, 2026
Merged
Enforce top-level additionalProperties: false in load_param_table_yaml()#214james-ball-qualcomm merged 2 commits intomainfrom
james-ball-qualcomm merged 2 commits intomainfrom
Conversation
Co-authored-by: james-ball-qualcomm <140646808+james-ball-qualcomm@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] [WIP] Address feedback from review on organizing params by chapter
Enforce top-level additionalProperties: false in load_param_table_yaml()
Mar 15, 2026
james-ball-qualcomm
approved these changes
Mar 15, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR tightens validation of the parameter table layout YAML consumed by tools/create_param_appendix.py, ensuring the YAML’s top-level shape matches the schemas/param-table-schema.json contract.
Changes:
- Added top-level key validation for the parameter table YAML, only allowing
columnsand optional$schema. - Emit a fatal error when unexpected top-level properties are present.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+125
to
+131
| allowed_top_level_keys = {"columns", "$schema"} | ||
| unexpected_top_level_keys = sorted(set(data.keys()) - allowed_top_level_keys) | ||
| if unexpected_top_level_keys: | ||
| fatal( | ||
| f"Unexpected top-level properties in {pathname}: " | ||
| f"{', '.join(unexpected_top_level_keys)}" | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
load_param_table_yaml()validatedcolumns[*]entries but silently ignored unknown top-level keys, allowing typos likecolums:to go undetected despiteschemas/param-table-schema.jsonspecifyingadditionalProperties: falseat the top level.Changes
tools/create_param_appendix.py: After loading the YAML, compute the set difference against{"columns", "$schema"}andfatal()if any unexpected keys are present.A file with a key like
colums:now produces a clear fatal error instead of silently proceeding with thecolumns:data.📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.