[Schema Consistency] 🔍 Schema Consistency Report: Required Fields & Error Documentation #2259
Closed
Replies: 1 comment
-
|
This discussion was automatically closed because it was created by an agentic workflow more than 1 month 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 - October 24, 2025
Executive Summary
This automated consistency check analyzed the relationship between the JSON schema, parser/compiler implementation, documentation, and actual workflows. 8 major inconsistencies were found using a new detection strategy focused on required field enforcement and error message documentation.
Key Findings:
requiredfields in main schema despite implicit requirementsCritical Issues
1. ❌ No Required Fields in Schema
Severity: HIGH | Location:
pkg/parser/schemas/main_workflow_schema.jsonThe main workflow schema has NO
requiredarray at the top level:{ "type": "object", "properties": { ... }, "required": null // ← COMPLETELY MISSING! }Evidence:
.github/workflows/haveon:field{}Impact: Users could pass schema validation with incomplete workflows, only to fail at compile time.
Recommendation: Add
"required": ["on"]to schema OR document why no fields are required.2. ❌ No Troubleshooting Documentation
Severity: HIGH | Location:
docs/src/content/docs/The
troubleshooting/directory does not exist. Key error messages are completely undocumented:frontmatter not properly closedpkg/parser/frontmatter.go:129invalid reaction valuepkg/workflow/compiler.go:1400cannot use 'command' with 'issues'pkg/workflow/compiler.go:1417imports field must be an arraypkg/parser/frontmatter.go:388invalid workflowspec: must be owner/repo/path[@ref]pkg/parser/frontmatter.go:699safe-outputs configuration is requiredpkg/workflow/add_labels.goImpact: Users encountering these errors have no reference documentation to help resolve them.
Recommendation:
docs/src/content/docs/troubleshooting/errors.md3.⚠️ Command + Event Conflicts Not Documented
Severity: MEDIUM | Location:
pkg/workflow/compiler.go:1414-1418The compiler validates that
commandcannot be used with:issuesissue_commentpull_requestpull_request_review_commentError:
"cannot use 'command' with '%s' in the same workflow"Problem: This restriction is NOT mentioned in the frontmatter documentation. Users discover it only when they encounter the error.
Recommendation: Document this restriction in the
on.commandsection with explanation of WHY this limitation exists.What's Working Well ✅
Reaction Validation is Perfect!
Location:
pkg/workflow/reactions.goSchema defines 8 reaction values:
+1, -1, laugh, confused, heart, hooray, rocket, eyesCode validates with hardcoded map that matches 100% with schema enum!
✅ This is EXCELLENT consistency between schema and implementation!
Excellent Error Message Example
Location:
pkg/workflow/compiler.go:503The
stop-timedeprecation error is a model for all error messages:Why This is Great:
Recommendation: Use this template for other error messages project-wide!
Additional Findings
4.⚠️ Strict Mode Validation Not Fully Documented
Documentation states strict mode enforces:
contents,issues, orpull-requests*innetwork.allowedMissing: Examples of what error messages appear for each violation and how to fix them.
5.⚠️ Default Reaction Behavior Not Clear
Code has conditional default logic:
Schema shows:
"default": "eyes"Issue: Default only applies to
commandtriggers, not all reactions. This conditional behavior isn't clear in schema or docs.Recommendation: Clarify that
eyesis auto-added for commands only.6. ℹ️ Import Error Formats Not Documented
Multiple import-related errors exist but format requirements aren't documented:
"invalid workflowspec: must be owner/repo/path[@ref]"Recommendation: Add import troubleshooting section.
Recommendations by Priority
Priority 1: Critical (Do Now)
"required": ["on"]topkg/parser/schemas/main_workflow_schema.jsondocs/src/content/docs/troubleshooting/errors.mdwith all error messagesPriority 2: Important (Do Soon)
Priority 3: Nice to Have
examplesto schema fields (JSON Schema supports this)Analysis Methodology
Strategy Used: Required Field Enforcement + Error Message Documentation Analysis (NEW)
Approach:
requiredarrays from all schemasFiles Analyzed:
docs/src/content/docs/.github/workflows/Effectiveness: HIGH - Found entirely new class of issues not detected in previous runs!
Strategy Performance
Cache Updated: Results saved to
/tmp/gh-aw/cache-memory/for future runsContext
Files Referenced
Schema:
pkg/parser/schemas/main_workflow_schema.json(26,645 tokens)Parser:
pkg/parser/frontmatter.go,pkg/parser/*.goCompiler:
pkg/workflow/compiler.go,pkg/workflow/reactions.go,pkg/workflow/*.goDocumentation:
docs/src/content/docs/reference/frontmatter.mdWorkflows:
.github/workflows/*.md(51 files)Automated analysis by Schema Consistency Checker
Strategy cache:
/tmp/gh-aw/cache-memory/strategies.jsonFull report:
/tmp/gh-aw/cache-memory/consistency_report_2025-10-24.mdBeta Was this translation helpful? Give feedback.
All reactions