-
Notifications
You must be signed in to change notification settings - Fork 38
Treat under-provisioned permissions as warnings in non-strict mode #2843
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…n non-strict mode Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
Agentic Changeset Generator triggered by this pull request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR changes how the compiler handles under-provisioned GitHub permissions for MCP toolsets. Previously, workflows with insufficient permissions always failed compilation. Now, non-strict mode emits actionable warnings that suggest either adding missing permissions or reducing toolset requirements, while strict mode continues to fail with errors.
Key Changes:
- Non-strict mode treats missing permissions as warnings instead of errors
- Warning messages now provide two concrete fix options with examples
- Strict mode behavior unchanged (still fails compilation)
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
pkg/workflow/compiler.go |
Adds conditional logic to emit warnings in non-strict mode vs errors in strict mode for missing permissions |
pkg/workflow/permissions_validator.go |
Enhances warning message format to include both "add permissions" and "reduce toolsets" options |
pkg/workflow/permissions_validator_test.go |
Updates test expectations to match new warning message format |
pkg/workflow/permissions_warning_test.go |
New comprehensive test suite covering warning/error behavior in both strict and non-strict modes |
.github/workflows/example-permissions-warning.md |
Example workflow demonstrating the new warning behavior with documentation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This PR updates the documentation based on features merged in the last 24 hours. ## Documentation Updates ### Custom Agent Files (PR #2838, #2837) - Added comprehensive documentation for custom agent files in the AI Engines reference - Documented the new imports-based approach for agent files - Provided migration guide from deprecated `engine.custom-agent` field - Included examples of creating and using custom agents ### Permission Validation (PR #2843) - Documented new permission validation behavior in non-strict mode - Added examples of warning messages when permissions are under-provisioned - Explained the difference between non-strict and strict mode validation - Provided actionable guidance for resolving permission warnings ### Agent File Imports (PR #2838) - Updated Imports reference to explain agent file imports - Clarified that only one agent file can be imported per workflow - Cross-referenced Custom Agent Files documentation in Engines reference ## Changes Made - Updated `docs/src/content/docs/reference/engines.md`: - Added "Custom Agent Files" section with creation and usage examples - Documented agent file requirements and constraints - Provided migration guide from `engine.custom-agent` to `imports` - Updated `docs/src/content/docs/reference/frontmatter.md`: - Added "Permission Validation" subsection under Permissions - Documented non-strict mode warning behavior - Documented strict mode error behavior - Included example warning messages - Updated `docs/src/content/docs/reference/imports.md`: - Added "Agent Files" section - Updated "Frontmatter Merging" to mention agent file fields 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Under-provisioned GitHub MCP permissions previously always failed compilation. Users now get actionable warnings in non-strict mode with suggestions to either add missing permissions or reduce toolset requirements.
Changes
compiler.go): Under-provisioned permissions emit warnings in non-strict mode, errors in strict modepermissions_validator.go): Messages now include two fix options:permissions_warning_test.go): Coverage for both warning and error modesExample
Workflow with insufficient permissions:
Non-strict mode (default):
Strict mode (
--strict):Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.