[Schema Consistency] 🔍 Schema Consistency Check - Required Fields & Error Documentation Gap (Nov 2, 2025) #2969
Replies: 1 comment 1 reply
-
|
/plan |
Beta Was this translation helpful? Give feedback.
1 reply
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 2, 2025
Overview
Today's analysis using Strategy-003 (Required Field Enforcement + Error Message Documentation) uncovered a critical gap between schema-level validation and runtime enforcement. The headline finding: all three schemas have zero required fields, yet the compiler enforces multiple implicit requirements through 328 error messages that are completely undocumented for end users.
Key Statistics:
Full Report Details
Critical Issues
1. Schema Has NO Required Fields Despite Implicit Requirements⚠️
Finding: All three schemas have no
"required"array defined:main_workflow_schema.json: No required fieldsincluded_file_schema.json: No required fieldsmcp_config_schema.json: No required fieldsReality: The compiler implicitly requires several fields. For example, all 67 production workflows have the
on:field (100% usage), yet the schema doesn't mark it as required.Impact:
File Reference:
pkg/parser/schemas/main_workflow_schema.json:1(missing"required": ["on"])2. MCP HTTP Tool URL Required Only at Runtime⚠️
Finding: The MCP config schema doesn't enforce the
urlfield as required via JSON Schema.Code Enforcement (
pkg/workflow/mcp-config.go:827):Impact:
urlRecommendation: Add conditional
requiredarray tohttp_mcp_tooldefinition in schema.3. 328 Error Messages - ZERO Documentation 🔴
Critical Finding: The codebase contains 328 error messages (via
errors.Newandfmt.Errorf), but there is:docs/src/content/docs/troubleshooting/directorySample Undocumented Errors:
"cannot use 'command' with 'issues' in the same workflow""strict mode: 'network' configuration is required""job name cannot be empty""safe-outputs.{feature} configuration is required""http MCP tool '%s' missing required 'url' field"Impact: Users encountering errors cannot:
stop-timewhich has EXCELLENT error message)4. Conditional Requirements NOT in Schema 🔴
Finding: Many requirements are conditional but not encoded in JSON Schema.
Examples:
Command Trigger Conflicts (
pkg/workflow/compiler.go:1221):notorif/then/elseMCP Command XOR Container (
pkg/workflow/mcp-config.go):anyOf,not,allOfcorrectlyStrict Mode Network Requirement (
pkg/workflow/strict_mode.go):Positive Example: The MCP tool schemas are GOLD STANDARD with proper use of JSON Schema conditionals.
Recommendation: Apply MCP schema conditional pattern to main schema for command trigger conflicts, strict mode requirements, and feature co-dependencies.
5. Default Values: Code vs Schema Mismatch⚠️
Finding: Code implements default values that are NOT documented in schema.
Code Defaults:
pkg/workflow/compiler.go:716)compiler.go:829)compiler.go:1241)Schema Defaults: NONE defined using
"default"keywordImpact:
6. Excellent Error Example: stop-time Deprecation ✅
Positive Finding: The
stop-timedeprecation error is a GOLD STANDARD:Why This is Excellent:
Recommendation: Apply this pattern to ALL deprecation and validation errors.
Documentation Gaps
Missing Documentation Categories
No Troubleshooting Section:
docs/src/content/docs/troubleshooting/does NOT existerrors.md,common-issues.md,migration-guides.mdError Messages NOT Documented:
Conditional Requirements NOT Explained:
Validation Timing NOT Clarified:
Schema Improvements Needed
1. Add Required Fields Array
{ "$schema": "(redacted)", "title": "Agentic Workflow", "type": "object", "required": ["on"], // ← ADD THIS "properties": { ... } }2. Add Default Values
{ "engine": { "type": "object", "default": {"id": "claude"}, // ← ADD THIS "description": "AI engine configuration (defaults to Claude if not specified)" } }3. Add Examples Field
{ "tools": { "type": "object", "examples": [ // ← ADD THIS {"bash": ["ls", "cat"], "edit": null}, {"github": {"allowed": ["issues:*"]}} ] } }4. Add Conditionals for Field Relationships
{ "if": { "properties": { "on": {"properties": {"command": {"type": "string"}}} } }, "then": { "not": { "properties": { "on": { "anyOf": [ {"required": ["issues"]}, {"required": ["issue_comment"]}, {"required": ["pull_request"]}, {"required": ["pull_request_review_comment"]} ] } } } } }Positive Findings ✅
Recommendations
High Priority
"required": ["on"]tomain_workflow_schema.jsondocs/src/content/docs/troubleshooting/errors.mddocs/src/content/docs/troubleshooting/common-issues.mdMedium Priority
Low Priority
Strategy Performance
Strategy Used: Required Field Enforcement + Error Message Documentation
Effectiveness: Very High
Findings: 6 critical issues, 328 undocumented error messages
Unique Discoveries:
Should Reuse: YES - This strategy reveals runtime vs schema gaps that other strategies miss.
Files Analyzed
Schemas:
pkg/parser/schemas/*.json(all 3)Compiler/Parser:
pkg/workflow/*.go,pkg/parser/*.go(all files)Documentation:
docs/src/content/docs/**/*.md(all reference docs)Workflows:
.github/workflows/*.md(all 67 files)Next Steps
"required": ["on"]to main schemaBeta Was this translation helpful? Give feedback.
All reactions