[Schema Consistency] Schema Consistency Issues: Cross-Schema Analysis 2025-11-27 #4905
Closed
Replies: 1 comment
-
|
⚓ Avast! This discussion be marked as outdated by Schema Consistency Checker. |
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 - 2025-11-27
Summary
This analysis focused on cross-schema consistency by comparing the three JSON schemas that define agentic workflow configurations. The analysis revealed critical inconsistencies in MCP tool definitions, network configurations, and permission scopes between the main workflow schema and the included file schema.
Key Metrics:
Critical Discovery: The
included_file_schema.jsoncontains contaminated MCP tool definitions that incorrectly allow HTTP-only properties in stdio-type tools, potentially enabling invalid configurations in shared workflow files.Full Report Details
Critical Issues
1.⚠️ stdio_mcp_tool contaminated with HTTP fields
Schema:
included_file_schema.jsonLocation:
$defs/stdio_mcp_tool/propertiesSeverity: HIGH
The stdio MCP tool definition incorrectly includes HTTP-only properties:
allowed,args,command,container,entrypointArgs,env,network,registry,type,versionheaders,urlImpact:
Example invalid config that would pass schema validation:
Root Cause: Likely copy-paste error during schema creation. The
http_mcp_tooldefinition was probably used as a template and not properly cleaned for stdio.Recommendation: Remove
headersandurlfromincluded_file_schema.json$defs/stdio_mcp_tool2. 🔒 Network field missing firewall support in included schema
Schema:
included_file_schema.jsonLocation:
properties/networkSeverity: MEDIUM-HIGH
The included file schema doesn't support AWF (Agent Workflow Firewall) configuration that's available in the main schema.
Main schema supports:
Included schema only supports:
Impact:
Use Case Example:
A team wants to create
shared/secure-network.mdwith standard firewall settings for all workflows, but cannot due to schema limitation.Recommendation: Add firewall property to included_file_schema.json network definition to match main schema
3. 🔐 Permissions field inconsistencies
Schema: Both
main_workflow_schema.jsonandincluded_file_schema.jsonLocation:
properties/permissionsSeverity: MEDIUM
Multiple inconsistencies in permission field definitions:
3a. String shortcuts missing in included schema
read-all,write-all,read,writeallshorthandall: readImpact: Included files must use verbose object syntax:
3b. Permission scope mismatches
modelsread | noneread | write | nonemetadataread | write | noneallreadonlyCritical Question: Why does included schema allow
models: writewhen main schema explicitly restricts toread|none?Impact:
metadatascopeRecommendation:
modelspermission enum (should beread|nonein both)metadatato main OR remove from includedall: readshorthand to included schemaModerate Issues
4. 🔧 Network field pattern inconsistency
Location:
properties/network/oneOf[0]for "defaults" valueSeverity: LOW
enum: ["defaults"]const: "defaults"Both are valid JSON Schema but inconsistent style reduces maintainability.
Recommendation: Standardize on
constfor single values (more semantically correct)5. 🔀 MCP standalone schema is type-ambiguous
Schema:
mcp_config_schema.jsonSeverity: MEDIUM
The standalone MCP config schema contains properties from BOTH HTTP and stdio types:
{ "properties": { "command": {}, // stdio-only "args": {}, // stdio-only "container": {}, // stdio-only "url": {}, // HTTP-only "headers": {}, // HTTP-only "type": {}, // discriminator "network": {} // shared } }Issue: Schema allows configurations like:
Root Cause: Schema represents a union of types but lacks proper oneOf discrimination
Recommendation: Refactor to use oneOf based on
typediscriminator:{ "oneOf": [ { "type": "object", "properties": { "type": {"const": "http"}, "url": {}, "headers": {} } }, { "type": "object", "properties": { "type": {"const": "stdio"}, "command": {}, "args": {} } } ] }6. 📐 Engine field organizational differences
Severity: LOW
$ref: "#/$defs/engine_config"(modular)oneOfdefinition (duplicated)Analysis: Both functionally equivalent. Main schema approach is better for DRY principle and reusability.
Recommendation: Consider using $ref in included schema for consistency
Positive Findings ✅
http_mcp_tool perfectly consistent between main and included schemas
allowed,headers,registry,type,url["url"]Tools field consistent across schemas
Real workflows don't exploit inconsistencies
.github/workflows/*.md.github/workflows/shared/Schema internal references valid
$refreferences resolve correctly$defsare used (no dead definitions)Architecture Insights
Schema Structure Comparison
Common $defs
Both main and included schemas share:
http_mcp_tool✅ (identical)stdio_mcp_toolUnique to main schema:
engine_configgithub_tokenUnique to included schema:
safe_jobShared Top-Level Properties
Properties present in both main and included:
description✅enginemcp-serversnetworkpermissionsruntimes✅safe-outputs✅secret-masking✅services✅steps✅tools✅Recommendations
Priority 1 - Critical (Must Fix)
Fix stdio_mcp_tool in included_file_schema.json
headerspropertyurlpropertypkg/parser/schemas/included_file_schema.json:$defs.stdio_mcp_toolAlign models permission scope
read|write|nonetoread|nonepkg/parser/schemas/included_file_schema.json:properties.permissions.oneOf[0].properties.modelsmodels: writeDocument or fix metadata scope mismatch
metadataa valid GitHub permission scope?Priority 2 - High (Should Fix)
Add firewall support to included schema
pkg/parser/schemas/included_file_schema.json:properties.network.oneOf[1].propertiesAdd permission string shortcuts to included schema
read-all,write-all,read,writeenum valuesall: readproperty to permission objectpkg/parser/schemas/included_file_schema.json:properties.permissionsRefactor MCP standalone schema
typefieldpkg/parser/schemas/mcp_config_schema.jsonPriority 3 - Medium (Improve)
Standardize const vs enum usage
constfor single-value constraintsenum: ["defaults"]withconst: "defaults"Add schema consistency tests
Document intentional differences
Priority 4 - Low (Consider)
allOf,$ref) to reduce duplication$defsfileTesting Impact
Workflows to Validate
Before deploying schema changes, test against:
.github/workflows/*.md.github/workflows/shared/.github/workflows/shared/mcp/*.mdValidation Commands
Expected Impact
✅ No breaking changes expected - Real workflows already use valid configurations
⚠️ Stricter validation - Some previously-accepted-but-invalid configs will now fail
✅ Better IDE support - Autocomplete will suggest correct properties only
Strategy Performance
Strategy Used: Strategy-004 (Cross-Schema Consistency & Type Analysis)
Findings: 6 critical/moderate + 3 low-severity = 9 total
Effectiveness: Very High
Should Reuse: Yes - excellent for detecting cross-schema drift
Methodology
$defsacross all three schemasUnique Value
This strategy is the only one focused on inter-schema consistency. Other strategies analyze:
Complementary strategies:
Next Steps
Appendix: Schema File Locations
pkg/parser/schemas/main_workflow_schema.jsonpkg/parser/schemas/included_file_schema.jsonpkg/parser/schemas/mcp_config_schema.jsonpkg/parser/frontmatter.gopkg/workflow/compiler.godocs/src/content/docs/reference/frontmatter.mdAnalysis Completed: 2025-11-27
Strategy ID: strategy-004
Run Count: 3
Overall Success Rate: Very High
Beta Was this translation helpful? Give feedback.
All reactions