Add policyData.jsonc validation test and update add-policy skill#310040
Open
joshspicer wants to merge 3 commits intomainfrom
Open
Add policyData.jsonc validation test and update add-policy skill#310040joshspicer wants to merge 3 commits intomainfrom
joshspicer wants to merge 3 commits intomainfrom
Conversation
- Add test that parses the checked-in policyData.jsonc through parsePolicies() to catch missing/mismatched enumDescriptions on string enum policies - Update add-policy skill to document that enumDescriptions is required for string enum policies
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a regression test to validate the checked-in policyData.jsonc via parsePolicies() (catching enum description mismatches), and updates the “add-policy” skill docs to clarify when enumDescriptions is required.
Changes:
- Add an E2E-style test that reads/parses
policyData.jsoncand runs it throughparsePolicies(). - Document that
enumDescriptionsis required fortype: 'string'policies with anenumarray.
Show a summary per file
| File | Description |
|---|---|
| build/lib/test/policyConversion.test.ts | Adds a test that parses policyData.jsonc with jsonc-parser and validates it via parsePolicies(). |
| .github/skills/add-policy/SKILL.md | Updates guidance to require enumDescriptions for string enum policies and documents the failure message. |
Copilot's findings
- Files reviewed: 2/2 changed files
- Comments generated: 3
| }); | ||
|
|
||
| test('should successfully parse the checked-in policyData.jsonc', async () => { | ||
| const policyDataPath = path.join(import.meta.dirname, '..', 'policies', 'policyData.jsonc'); |
There was a problem hiding this comment.
import.meta.dirname is not a standard Node ESM API and can break test execution depending on the runtime/tooling. Prefer deriving the directory from import.meta.url (e.g., via fileURLToPath + path.dirname) or use the existing repo convention for locating fixture files.
Contributor
Screenshot ChangesBase: Changed (6) |
roblourens
previously approved these changes
Apr 15, 2026
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
roblourens
approved these changes
Apr 15, 2026
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.
fixes #310040