[Schema Consistency] 🔍 Schema Consistency Check - November 9, 2025 #3511
Closed
Replies: 2 comments 1 reply
-
|
/plan |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
This discussion was automatically closed because it was created by an agentic workflow more than 1 week ago. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
🔍 Schema Consistency Check - November 9, 2025
Executive Summary
This analysis focused on type union consistency and default value analysis across the schema, parser, compiler, and documentation. Using Strategy 11 (proven approach), I systematically examined all 13 fields with complex type unions (oneOf/anyOf), their validation implementations, default value handling, and documentation coverage.
Key Metrics:
Severity Distribution:
Major Discovery: Schema defines 0 default values despite compiler implementing at least 2 critical defaults (engine='copilot', reaction='eyes'). This prevents IDE tools from showing defaults to users.
Full Analysis Details
Type Union Analysis
Found 13 fields with complex type unions (oneOf/anyOf):
Well-Validated Unions ✅
on:string | object- Excellent validation with conditional logicpermissions:string | object- Comprehensive scope validation at permissions.go:345-380network:string | object- Strong ecosystem identifier validationroles:string | array- Proper enum validation for permission levelsGood Validation ✓
container:string | object- Adequate Docker image validationenvironment:string | object- Basic validation with name/url propertiesconcurrency:string | object- Basic group/cancel-in-progress handlingenv:object | string- Type checking presentsteps:object | array- Standard GitHub Actions handlingpost-steps:object | array- Mirrors steps validationcache:object | array- Basic key/path validationWeak Validation⚠️
bash:null | boolean | array- Type coercion issues, treats any non-array as nilcache-memory:boolean | null | object | array- Basic existence check onlyDead Code 💀
githubActionsStep:anyOf- Confirmed unused for 4th consecutive analysisCritical Findings
1. Schema Default Value Gap (MEDIUM)
Issue: Main schema defines 0 default values despite compiler implementing several critical defaults.
Evidence:
Impact:
Code Locations:
pkg/workflow/compiler.go:708-715- Engine default implementationpkg/workflow/agentic_engine.go:243-245- GetDefaultEngine functionpkg/parser/schemas/main_workflow_schema.json- 0 default annotationsRecommendation:
{ "properties": { "engine": { "type": "object", "default": { "type": "copilot" } } } }2. Type Union Behavior Not Documented (MEDIUM)
Issue: 13 fields have complex type unions but documentation doesn't explain when to use each variant.
Examples:
permissions: 'read-all'vspermissions: { issues: write }- When to use which?network: 'defaults'vsnetwork: { allowed: [...] }- What's the difference?container: 'node:18'vscontainer: { image: 'node:18', credentials: {...} }- When is object form needed?Current Documentation:
Impact: Users confused about which form to use, leading to:
Recommendation: Add "Usage Guidance" section to each union type field explaining:
3. runs-on and concurrency Missing Descriptions (LOW)
Schema Evidence:
Issue: Descriptions are generic and don't explain the type union variants or agentic workflow enhancements.
Impact: Users miss that:
runs-onsupports GitHub-hosted runner groups via object formconcurrencyauto-generates enhanced policies for agentic workflows4. safe-jobs Backwards Compatibility Cleanup (LOW)
Migration Status: ✅ 100% Complete
Current Code:
pkg/workflow/safe_jobs.go:parseSafeJobsConfig- Still supports old locationpkg/workflow/compiler.go- Checks bothsafe-jobsandsafe-outputs.jobsRecommendation:
5. Type Union Validation Quality Inconsistency (MEDIUM)
Validation Quality Comparison:
permissionsnetworkrolesonbashcache-memoryIssue: Some unions have comprehensive validation with helpful error messages, while others just check type existence.
Impact: Inconsistent user experience - some fields provide excellent validation feedback, others silently accept invalid configurations.
6. githubActionsStep Dead Code (LOW)
Confirmation: Unused for 4th consecutive analysis (strategies 7, 9, 10, 11).
Evidence:
pkg/parser/schemas/main_workflow_schema.json:githubActionsStepRecommendation: Remove from schema or document intended usage.
Positive Findings
Schema Compliance ✅
Migration Success ✅
Documentation Structure ✅
Validation Quality ✅
Workflow Usage Analysis
Type Union Field Adoption:
permissions(object form),network(object form),container(string form)runs-on(object form),concurrency(object form)Default Value Reliance:
Recommendations
HIGH Priority
MEDIUM Priority
LOW Priority
Strategy Performance
Why This Strategy Works:
Files Checked
Schema Files (3):
pkg/parser/schemas/main_workflow_schema.jsonpkg/parser/schemas/included_file_schema.jsonpkg/parser/schemas/mcp_config_schema.jsonImplementation Files (8):
pkg/workflow/compiler.go- Main compilation logicpkg/workflow/permissions.go- Permission validationpkg/workflow/network.go- Network validationpkg/workflow/role_checks.go- Role validationpkg/workflow/claude_tools.go- Tool validationpkg/workflow/cache.go- Cache-memory validationpkg/workflow/safe_jobs.go- Backwards compatibilitypkg/workflow/agentic_engine.go- Engine defaultsDocumentation Files (15):
docs/src/content/docs/reference/*.mdValidation:
.github/workflows/*.mdNext Steps
Beta Was this translation helpful? Give feedback.
All reactions