[Schema Consistency] Cross-Schema Consistency: 8 Type & Feature Mismatches Found #5647
Closed
Replies: 2 comments 2 replies
-
|
/plan |
Beta Was this translation helpful? Give feedback.
2 replies
-
|
⚓ 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.
-
This analysis focused on cross-schema consistency by comparing the three JSON schemas that define the gh-aw workflow configuration system. Using Strategy-004 (Cross-Schema Consistency & Type Analysis), I discovered 8 inconsistencies affecting type definitions, feature completeness, and documentation quality across the schema boundaries.
Key Statistics:
The most significant finding is that the
included_file_schema.jsonsystematically provides less feature coverage than the main schema for shared fields likeengine,network, andsafe-outputs, potentially limiting the capabilities of included workflow files.Full Consistency Report
Critical Issues
1. Engine Version Field Type Mismatch 🔴
Impact: Included files cannot use numeric version values
Details:
type: ["string", "number"]with examples[20, 3.11, "latest"]type: "string"engine.version: 20(for Python) will fail validation in included filesLocation:
pkg/parser/schemas/main_workflow_schema.jsonline 82 (approx)pkg/parser/schemas/included_file_schema.jsonline 41 (approx)Recommendation: Change included schema to accept
["string", "number"]for consistency2. Engine Configuration Missing Advanced Features 🔴
Impact: Included files cannot configure 5 critical engine properties
Missing fields in included schema:
concurrency- GitHub Actions concurrency control (group, cancel-in-progress)user-agent- Custom user agent for codex engineerror_patterns- Custom error pattern validation with regexconfig- Additional TOML configuration for codex engineargs- CLI arguments array for engine customizationReal-world impact: Workflows that import shared configurations cannot:
Files affected: All
.github/workflows/shared/**/*.mdfiles using engine configurationRecommendation: Add all 5 fields to included schema or document why they're intentionally excluded
3. Network Firewall Configuration Missing 🔴
Impact: Cannot configure network firewall in included files
Details:
network.firewallproperty withversionandlog-levelsub-fieldsfirewallproperty entirelyWhy this matters: Firewall configuration controls network access logging and version pinning for security auditing
Recommendation: Add
network.firewallto included schema for feature parityModerate Issues
4. Safe-Outputs Field Structure Divergence 🟡
Finding: Main and included schemas have completely different safe-outputs structures
Main schema safe-outputs:
Included schema safe-outputs:
jobsproperty$defs/safe_jobfor custom job definitionsAssessment: This appears to be intentional design - different purposes
Recommendation: Document this difference in schema comments and user documentation
5. Permissions Field Description Mismatch 🟡
Finding: Description suggests merging behavior not explained elsewhere
Main schema description:
Included schema description:
Questions raised:
Recommendation: Add schema
$commentexplaining merge behavior or reference documentation6. MCP Config Schema Validation Confusion 🟡
Finding:
mcp_config_schema.jsonmixes stdio and HTTP requirements inanyOfCurrent anyOf:
Issue: Schema is used standalone for MCP configuration but combines validation for two distinct connection types (stdio and HTTP)
Impact: Confusing validation messages - suggests
urlcould work with stdioRecommendation: Split into separate schemas or use conditional validation (
if/then) to separate stdio and HTTP validation paths7. $defs Duplication Risk 🟡
Finding: Two schemas duplicate identical $defs without coordination
Duplicated definitions:
stdio_mcp_tool- Appears in main and included (currently 100% identical)http_mcp_tool- Appears in main and included (currently 100% identical)Current state: ✅ Definitions are identical
Risk: Future schema evolution could cause drift if one is updated without the other
Scenarios that could cause problems:
Recommendation:
common_defs.jsonfile and$refit from both schemas8. Network Description Quality Gap 🟡
Finding: Main schema provides much richer documentation
Main schema network description:
Included schema network description:
Impact: Developers using included files may not discover:
Recommendation: Synchronize descriptions or add cross-references
Positive Findings ✅
The analysis revealed excellent practices in several areas:
stdio_mcp_toolandhttp_mcp_toolare byte-for-byte identical across main and included schemas$refpointers resolve correctly - zero broken cross-referencesengine.id) are consistent where fields overlapSchema Coverage Analysis
Field Distribution
Shared fields (12 total):
Main schema exclusive (26 fields):
Included schema exclusive (2 fields):
applyTo- Glob patterns for custom agent instruction filesinputs- Workflow input parameters for shared components$defs Distribution
Main schema $defs (4):
engine_config- Referenced by engine propertygithub_token- Referenced by github-token and safe-outputshttp_mcp_tool- MCP HTTP connection definitionstdio_mcp_tool- MCP stdio connection definitionIncluded schema $defs (3):
http_mcp_tool- MCP HTTP connection definition (DUPLICATE)stdio_mcp_tool- MCP stdio connection definition (DUPLICATE)safe_job- Custom safe-job template (UNIQUE)MCP config schema: No $defs (flat structure)
Recommendations by Priority
High Priority (Breaking Changes)
Fix engine.version type - Change included schema to
["string", "number"]pkg/parser/schemas/included_file_schema.jsonAdd missing engine properties - Add concurrency, args, config, error_patterns, user-agent
pkg/parser/schemas/included_file_schema.jsonAdd network.firewall to included schema
pkg/parser/schemas/included_file_schema.jsonMedium Priority (Documentation)
Document safe-outputs behavior difference
$commentfields explaining main vs included purposesdocs/reference/frontmatter.mdwith clarificationDocument permissions merging
$commentFix mcp_config_schema anyOf
pkg/parser/schemas/mcp_config_schema.jsonLow Priority (Maintenance)
Create shared $defs file
stdio_mcp_toolandhttp_mcp_tooltocommon_defs.json$refthe common fileStandardize descriptions
Add schema version metadata
$idandversionfields to all schemasImpact Assessment
Users Affected:
.github/workflows/shared/Breaking Change Risk:
Documentation Updates Required:
docs/reference/frontmatter.md- Add included schema limitationsdocs/reference/schemas.md- Document schema purposes and differences$commentfields - Inline documentationTesting Required:
Strategy Performance
Strategy Used: Strategy-004 (Cross-Schema Consistency & Type Analysis)
Usage Count: 6th successful execution
Previous Use: 2025-12-01 (5 days ago)
Findings Comparison:
Effectiveness: VERY HIGH - Continues to discover new inconsistencies
Pattern: Different findings each run due to evolving focus areas
Recommendation: Continue using every 4-5 analyses as intended
Next Steps
Cross-reference:
Strategy Execution Notes
Strategy Selected: Cross-Schema Consistency & Type Analysis (Strategy-004)
Selection Method: Day-of-year modulo (340 mod 10 = 0, use proven strategy)
Execution Time: ~8 minutes
Tools Used: jq, bash diff, schema comparison scripts
Cache Updated: ✅ strategies.json updated with new findings
Methodology:
Files Analyzed:
pkg/parser/schemas/main_workflow_schema.json(2,847 lines)pkg/parser/schemas/included_file_schema.json(1,243 lines)pkg/parser/schemas/mcp_config_schema.json(154 lines)Total Schema Size: 4,244 lines of JSON Schema definitions
Beta Was this translation helpful? Give feedback.
All reactions