Skip to content

Add policyData.jsonc validation test and update add-policy skill#310040

Merged
joshspicer merged 3 commits intomainfrom
josh/policy-enum-test
Apr 15, 2026
Merged

Add policyData.jsonc validation test and update add-policy skill#310040
joshspicer merged 3 commits intomainfrom
josh/policy-enum-test

Conversation

@joshspicer
Copy link
Copy Markdown
Member

@joshspicer joshspicer commented Apr 15, 2026

fixes #310040

  • 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

- 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
Copilot AI review requested due to automatic review settings April 15, 2026 00:25
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.jsonc and runs it through parsePolicies().
  • Document that enumDescriptions is required for type: 'string' policies with an enum array.
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

Comment thread build/lib/test/policyConversion.test.ts
Comment thread build/lib/test/policyConversion.test.ts Outdated
Comment thread .github/skills/add-policy/SKILL.md Outdated
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 15, 2026

Screenshot Changes

Base: 8d4822e0 Current: 328542fb

Changed (41)

sessions/aiCustomizationShortcutsWidget/Expanded/Light
Before After
before after
sessions/aiCustomizationShortcutsWidget/CollapsedWithMcpServers/Dark
Before After
before after
sessions/aiCustomizationShortcutsWidget/Collapsed/Dark
Before After
before after
sessions/aiCustomizationShortcutsWidget/WithCounts/Light
Before After
before after
sessions/aiCustomizationShortcutsWidget/WithMcpServers/Dark
Before After
before after
chat/aiStats/AiStatsHover/Light
Before After
before after
sessions/aiCustomizationShortcutsWidget/Collapsed/Light
Before After
before after
chat/aiStats/AiStatsHover/Dark
Before After
before after
sessions/aiCustomizationShortcutsWidget/WithMcpServers/Light
Before After
before after
sessions/aiCustomizationShortcutsWidget/Expanded/Dark
Before After
before after
sessions/aiCustomizationShortcutsWidget/CollapsedWithMcpServers/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/McpBrowseMode/Dark
Before After
before after
editor/inlineCompletions/other/JumpToHint/Dark
Before After
before after
sessions/aiCustomizationShortcutsWidget/WithCounts/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/McpBrowseMode/Light
Before After
before after
agentSessionsViewer/CompletedRead/Light
Before After
before after
agentSessionsViewer/FailedWithDuration/Dark
Before After
before after
agentSessionsViewer/WithFileChangesList/Light
Before After
before after
agentSessionsViewer/WithDiffChanges/Light
Before After
before after
peekReference/PeekReferences/Light
Before After
before after
agentSessionsViewer/WithDiffChanges/Dark
Before After
before after
agentSessionsViewer/WithMarkdownBadge/Light
Before After
before after
agentSessionsViewer/BackgroundProvider/Light
Before After
before after
agentSessionsViewer/CompletedUnread/Light
Before After
before after
agentSessionsViewer/FailedWithoutDuration/Dark
Before After
before after
agentSessionsViewer/WithBadge/Light
Before After
before after
agentSessionsViewer/WithBadgeAndDiff/Dark
Before After
before after
agentSessionsViewer/CloudProvider/Light
Before After
before after
agentSessionsViewer/ApprovalRowLongLabel/Light
Before After
before after
agentSessionsViewer/CompletedRead/Dark
Before After
before after
agentSessionsViewer/WithFileChangesList/Dark
Before After
before after
agentSessionsViewer/ClaudeProvider/Light
Before After
before after
agentSessionsViewer/CompletedUnread/Dark
Before After
before after
agentSessionsViewer/FailedWithDuration/Light
Before After
before after
agentSessionsViewer/WithBadge/Dark
Before After
before after
agentSessionsViewer/CloudProvider/Dark
Before After
before after
agentSessionsViewer/FailedWithoutDuration/Light
Before After
before after
agentSessionsViewer/WithMarkdownBadge/Dark
Before After
before after
agentSessionsViewer/WithBadgeAndDiff/Light
Before After
before after
agentSessionsViewer/BackgroundProvider/Dark
Before After
before after
agentSessionsViewer/ClaudeProvider/Dark
Before After
before after

roblourens
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>
@joshspicer joshspicer merged commit c6cac8e into main Apr 15, 2026
40 of 41 checks passed
@joshspicer joshspicer deleted the josh/policy-enum-test branch April 15, 2026 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants