[Schema Consistency] Cross-Schema Consistency Analysis - 2026-01-31 #13018
Closed
Replies: 1 comment
-
|
This discussion was automatically closed because it expired on 2026-02-07T23:54:33.763Z. |
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.
-
Summary
Analyzed consistency between main workflow schema and MCP configuration schema using Strategy-004 (Cross-Schema Consistency & Type Analysis).
Key Metrics
Critical Issues
None found. All MCP fields are properly defined, implemented, and functional.
Moderate Issues
1. Documentation Completeness Gap - Examples Missing
Issue: The main schema's
stdio_mcp_tool.properties.envfield lacks examples, while the MCP config schema includes comprehensive examples.Location:
pkg/parser/schemas/main_workflow_schema.jsonCurrent State
Main schema (stdio_mcp_tool.properties.env):
{ "type": "object", "patternProperties": { "^[A-Z_][A-Z0-9_]*$": { "type": "string" } }, "additionalProperties": false, "description": "Environment variables for MCP server" }MCP config schema (properties.env):
{ "type": "object", "patternProperties": { "^[A-Z_][A-Z0-9_]*$": { "type": "string" } }, "additionalProperties": false, "description": "Environment variables for MCP server", "examples": [ {"GITHUB_TOKEN": "${{ secrets.GITHUB_TOKEN }}"}, {"API_KEY": "${{ secrets.CUSTOM_API_KEY }}", "LOG_LEVEL": "debug"}, {"BRAVE_API_KEY": "${{ secrets.BRAVE_API_KEY }}"} ] } ``` </details> **Impact**: Medium - IDE autocomplete and schema validation tools have reduced discoverability for the `env` field in the main schema. **Recommendation**: Add the same examples array to the main schema's `env` field definition. --- ## Minor Issues ### 2. Description Wording Variation - Mounts Field **Issue**: The `mounts` field has slightly different description wording between schemas. **Locations**: - Main schema: `pkg/parser/schemas/main_workflow_schema.json` - `$defs.stdio_mcp_tool.properties.mounts` - MCP config schema: `pkg/parser/schemas/mcp_config_schema.json` - `properties.mounts` <details> <summary><b>Wording Comparison</b></summary> **Main schema**: ``` "Volume mounts for container in format 'source:dest:mode' where mode is 'ro' or 'rw'" ``` **MCP config schema**: ``` "Volume mounts for container (format: 'source:dest:mode' where mode is 'ro' or 'rw')"Impact: Low - Purely cosmetic. Both descriptions are clear and accurate.
Recommendation: Standardize on one wording format (suggest the MCP config schema version with parentheses).
3. Schema Metadata Inconsistency - Version Field
Issue: The MCP config schema includes a
versionfield in its metadata, but the main schema does not.Metadata Comparison
Main schema metadata:
{ "$schema": "(jsonschema.org/redacted) "$id": "https://github.com/githubnext/gh-aw/schemas/main_workflow_schema.json", "title": "GitHub Agentic Workflow Schema", "description": "JSON Schema for validating agentic workflow frontmatter configuration" }MCP config schema metadata:
{ "$schema": "(jsonschema.org/redacted) "$id": "https://github.com/githubnext/gh-aw/schemas/mcp_config_schema.json", "title": "MCP Configuration Schema", "description": "JSON Schema for validating Model Context Protocol server configuration", "version": "1.0.0" }Impact: Low - Version tracking helps with schema evolution. Main schema would benefit from versioning.
Recommendation: Add a
versionfield to the main schema metadata for consistency.Positive Findings
✅ 1. Complete Field Implementation
All MCP fields are fully implemented across the codebase:
main_workflow_schema.jsonandmcp_config_schema.jsondefine all fields correctlypkg/parser/mcp.goextracts all fields (registry, allowed, entrypoint, entrypointArgs, mounts)pkg/workflow/mcp_config_custom.goprocesses and renders all fieldspkg/types/mcp.godefinesBaseMCPServerConfigwith all properties✅ 2. Consistent Pattern Validation
Pattern constraints are identical across both schemas:
^[A-Z_][A-Z0-9_]*$for environment variable names^[a-zA-Z0-9][a-zA-Z0-9/:_.-]*$for container images^[^:]+:[^:]+:(ro|rw)$for mount format validation✅ 3. Comprehensive Documentation
All MCP fields are documented:
docs/src/content/docs/reference/mcp-gateway.md(Section A.5)docs/src/content/docs/guides/getting-started-mcp.mddocs/src/content/docs/reference/mcp-gateway.md(Section A.2)docs/src/content/docs/reference/mcp-gateway.md(Section 4.1.5)✅ 4. Real-World Usage Validated
Found actual usage of MCP fields in production workflows:
hourly-ci-cleaner.mdfor binding host binariesrelease.mdworkflow✅ 5. Extensive Test Coverage
Comprehensive tests exist for all MCP configuration:
pkg/workflow/mcp_config_comprehensive_test.go- Tests registry and allowed fieldspkg/workflow/mcp_entrypoint_mounts_integration_test.go- Tests entrypoint and mountspkg/workflow/mcp_gateway_entrypoint_mounts_e2e_test.go- End-to-end validationpkg/parser/mcp_test.go- Parser-level tests✅ 6. Type Safety Across Packages
BaseMCPServerConfigshared between parser and workflow packages eliminates duplication:✅ 7. Schema Field Parity
Both stdio and HTTP MCP tool definitions in the main schema include all appropriate fields:
✅ 8. No Schema Drift Issues
Unlike previous runs of this strategy (2026-01-24 run found 4 missing properties), all fields are now consistently defined across schemas. The historical schema drift has been resolved.
Recommendations
Priority 1: Add Examples to Main Schema
Action: Add the
examplesarray from the MCP config schema to the main schema'senvfield.File:
pkg/parser/schemas/main_workflow_schema.jsonBenefit: Improved IDE autocomplete and developer experience.
Priority 2: Standardize Description Wording
Action: Align the
mountsfield description wording between schemas.Files:
pkg/parser/schemas/main_workflow_schema.jsonpkg/parser/schemas/mcp_config_schema.jsonSuggestion: Use the MCP config schema format:
"Volume mounts for container (format: 'source:dest:mode' where mode is 'ro' or 'rw')"Priority 3: Add Version Metadata
Action: Add a
versionfield to the main schema's top-level metadata.File:
pkg/parser/schemas/main_workflow_schema.jsonBenefit: Better schema evolution tracking and compatibility management.
Strategy Performance
Strategy Insights
This run demonstrates the continued value of cross-schema validation:
The strategy effectively catches both critical bugs (when they exist) and minor quality improvements (when the code is healthy).
Next Steps
Analysis Date: 2026-01-31
Strategy: Cross-Schema Consistency & Type Analysis (Strategy-004)
Status: ✅ Schemas are highly consistent with excellent implementation coverage
Risk Level: 🟢 Low - Only minor documentation improvements needed
Beta Was this translation helpful? Give feedback.
All reactions