-
Notifications
You must be signed in to change notification settings - Fork 36
Document strict mode enforcement areas and CLI flag in schema #4232
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
- Update main_workflow_schema.json `strict` field description to include: - All 5 enforcement areas: write permissions, network config, action pinning, MCP network, deprecated fields - CLI flag reference: `gh aw compile --strict` - Precedence rule: CLI flag takes precedence over frontmatter - Documentation link for detailed guidance - Update CLI help text for --strict flag to be more comprehensive - Schema validation passes, all tests pass - Verified with test workflows that strict mode works correctly Addresses issue #4193 per @pelikhan's feedback that the field is named "strict" in the schema. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Created schema_strict_documentation_test.go to verify the strict field description - Test validates presence of all 5 enforcement areas - Test verifies CLI flag reference and precedence rule - Test checks for documentation link - All tests pass successfully Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot lint |
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 expands the documentation for the strict field in the main workflow schema to provide comprehensive information about strict mode enforcement areas and CLI usage. The changes aim to improve IDE tooling support and developer understanding by documenting what strict mode actually validates.
Key changes:
- Expanded the
strictfield description from 127 characters to 704 characters with detailed enforcement areas - Added CLI flag reference and precedence behavior documentation
- Created a test to validate the presence of required documentation elements
- Updated CLI help text to match the enhanced schema documentation
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| pkg/parser/schemas/main_workflow_schema.json | Expanded strict field description with 5 enforcement areas, CLI usage, and documentation link |
| pkg/parser/schema_strict_documentation_test.go | Added validation test to ensure schema documentation completeness |
| cmd/gh-aw/main.go | Enhanced CLI help text for --strict flag to match schema comprehensiveness |
Critical Issue: The documentation claims that strict mode enforces "Action Pinning" (actions pinned to commit SHAs), but this is not directly implemented in the strict mode validation code. Action pinning validation only occurs when the optional --zizmor flag is used alongside --strict. This creates a discrepancy between the documented and actual behavior.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Applied gofmt to fix indentation - All tests pass - All linting checks pass Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Task: Document strict mode feature comprehensively in JSON schema
Based on the issue #4193 and @pelikhan's comment, the task is to improve the documentation of the
strictfield in the JSON schema to make it more comprehensive.Completed
gh aw compile --strict)strictfield description inpkg/parser/schemas/main_workflow_schema.jsonto include:gh aw compile --strictChanges Made
pkg/parser/schemas/main_workflow_schema.json:
strictfield description from brief summary to comprehensive documentationcmd/gh-aw/main.go:
pkg/parser/schema_strict_documentation_test.go:
Verification
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.