[Schema Consistency] 🔍 Schema Consistency Check - November 20, 2025 #4371
Closed
Replies: 1 comment
-
|
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 20, 2025
This analysis validates consistency between the JSON schema, parser implementation, documentation, and real workflows using Strategy-003: Required Field Enforcement + Error Message Documentation.
Executive Summary
Strategy Used: Required Field Enforcement + Error Message Documentation (last used: 2025-11-12)
Inconsistencies Found: 1 critical (persistent issue)
New Findings: None
Effectiveness: Medium (no new issues discovered)
The analysis confirms that previously identified issues persist, but no new critical inconsistencies have been introduced. The codebase maintains excellent error documentation and proper nested field validation.
Full Analysis Details
Critical Issues
1. Required Field "on" Not Enforced in Compiler
Location:
pkg/parser/schemas/main_workflow_schema.json:4vspkg/workflow/compiler.goIssue: The schema declares "on" as a required field, but the compiler does not enforce this requirement. Instead, it auto-generates default trigger configurations when "on" is missing.
Evidence:
"required": ["on"](line 4 in main_workflow_schema.json)applyDefaults()function generates default triggers whendata.On == ""Impact:
Recommendation: Either:
Status:⚠️ PERSISTENT (confirmed in multiple analyses since 2025-11-12)
Positive Findings
1. Excellent Error Message Documentation ✅
Location:
docs/src/content/docs/troubleshooting/errors.mdThe error documentation is comprehensive and well-maintained:
Quality: EXEMPLARY - serves as a model for error documentation
2. Proper Nested Required Field Validation ✅
All conditionally required fields are properly validated:
keyandpathrequired togethercronfield requiredusesorrunrequired (oneOf pattern)Evidence: 20+ required field constraints across nested objects all properly enforced
3. Consistent Default Value Handling ✅
The schema uses two approaches for default values:
Explicit
defaultfields (13 total):engine: "copilot"reaction: "eyes"threat-detection.enabled: trueDescription-documented defaults (10+ fields):
name: defaults to filename without extensioncommand: defaults to workflow filenameconcurrency: defaults to single job per enginegithub-token: defaults to GH_AW_GITHUB_TOKENPattern: Core feature defaults use explicit
defaultfield, behavioral defaults documented in descriptionsSchema Required Fields Audit
Top-Level Required Fields
ononly (enforcement issue noted above)Nested Required Fields (all properly enforced)
cronkey,pathusesORrun(oneOf)groupnameimageTotal oneOf patterns: 80 (all with proper mutual exclusion)
Default Values Analysis
Explicitly Defined Defaults (13 total)
{ "engine": "copilot", "reaction": "eyes", "safe-outputs.create-issue.max": 1, "safe-outputs.create-agent-task.max": 1, "safe-outputs.create-discussion.max": 1, "safe-outputs.add-comment.max": 1, "safe-outputs.create-pull-request-review-comment.max": 1, "safe-outputs.add-labels.max": 3, "safe-outputs.assign-milestone.max": 1, "safe-outputs.create-pull-request.max-patch-size": 1024, "safe-outputs.create-code-scanning-alert.max-size": 10240, "safe-outputs.noop.max": 1, "safe-outputs.threat-detection.enabled": true }Description-Documented Defaults (10+ fields)
Examples:
Pattern Observation: Explicit
defaultfields used for numeric limits and feature flags, while description-documented defaults used for complex/dynamic behavior.Comparison to Previous Run (2025-11-12)
Conclusion: The codebase has not introduced new inconsistencies. The single critical issue (on field enforcement) remains unresolved but is well-understood.
Recommendations
Priority 1: Resolve "on" Field Requirement Ambiguity
Option A (Preferred - Non-Breaking):
{ "required": [], "properties": { "on": { "description": "Workflow triggers... If not specified, defaults are auto-generated based on workflow configuration (command triggers get issue_comment/pull_request, others get workflow_dispatch)." } } }Option B (Breaking Change):
Add validation in
ParseWorkflowFile()before callingparseOnSection():Priority 2: Formalize Dynamic Defaults
Consider adding
$commentfields to document dynamic defaults that can't be represented as staticdefaultvalues:{ "timeout": { "type": "integer", "$comment": "Runtime default: 60s (Claude), 120s (Codex), 180s (Custom)" } }Priority 3: Maintain Excellence
Continue current practices:
Strategy Performance
Strategy-003 Effectiveness: MEDIUM for this run
Next Strategy Recommendation:
Validation Scope
Areas Analyzed
✅ Schema required field definitions
✅ Compiler enforcement of required fields
✅ Default value declarations (explicit and documented)
✅ Error message documentation coverage
✅ Nested required field validation
✅ Real workflow compliance
Files Examined
pkg/parser/schemas/main_workflow_schema.json(3527 lines)pkg/parser/schemas/mcp_config_schema.jsonpkg/parser/schemas/included_file_schema.jsonpkg/workflow/compiler.go(required field enforcement)pkg/workflow/tools.go(applyDefaults function)pkg/workflow/*_validation.go(multiple validation files)docs/src/content/docs/troubleshooting/errors.md.github/workflows/*.md(all 78 production workflows)Validation Results
Next Steps
Analysis Date: 2025-11-20
Strategy: 003 (Required Field Enforcement + Error Message Documentation)
Analyzer: Automated Schema Consistency Checker
Cache:
/tmp/gh-aw/cache-memory/strategies.jsonBeta Was this translation helpful? Give feedback.
All reactions