[Schema Consistency] Schema Consistency Audit: JSON Schema vs Go Implementation #26808
Closed
Replies: 1 comment
-
|
This discussion has been marked as outdated by Schema Consistency Checker. A newer discussion is available at Discussion #26978. |
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.
-
Executive Summary
A comprehensive audit of schema consistency between
pkg/parser/schemas/main_workflow_schema.jsonand the Go implementation inpkg/workflow/has been completed. All critical fields are properly aligned. No breaking inconsistencies were found.Schema Coverage Analysis
Top-Level Properties (49 total)
All properties defined in the JSON schema are properly handled in Go code. Field access patterns vary intentionally:
On Section Properties (47+ fields)
All critical event trigger fields are properly documented in schema and handled:
Safe-Outputs Properties (60+ handler fields)
All handler configurations properly defined in schema with corresponding Go handlers:
Network, Sandbox, Tools Properties
Key Files Examined
Schema Definitions
/home/runner/work/gh-aw/gh-aw/pkg/parser/schemas/main_workflow_schema.json(486.5 KB, 49 top-level properties)Go Implementation Files
pkg/workflow/engine.go- Engine config parsing (ExtractEngineConfig)pkg/workflow/compiler.go- Main compiler orchestrationpkg/workflow/stop_after.go- Stop-after field handling (on.stop-after)pkg/workflow/compiler_safe_outputs.go- Safe-outputs processing, github-token, label_commandpkg/workflow/workflow_builder.go- Field extraction via extractTopLevelYAMLSection() and specialized methodspkg/workflow/cache.go- Cache configuration processingpkg/workflow/permissions.go- Permissions mappingpkg/workflow/tools.go- Tools configurationpkg/workflow/compiler_safe_outputs_handlers.go- Handler registry for safe-outputsDocumentation Files
/home/runner/work/gh-aw/gh-aw/docs/src/content/docs/reference/frontmatter.md- Comprehensive coverage of all fields/home/runner/work/gh-aw/gh-aw/docs/src/content/docs/reference/frontmatter-full.md- Detailed field specificationsDetailed Findings
Stop-After Field
properties.on.oneOf[1].properties.stop-afterstop_after.go:18-51(extractStopAfterFromOn)GitHub-Token Field
on.properties.github-token(top-level on section)safe-outputs.properties.github-token(safe-outputs handlers)compiler_safe_outputs.go:218(excluded from otherEvents)compiler_safe_outputs_handlers.go(used in handler config)Label_Command Field
properties.on.oneOf[1].properties.label_commandcompiler_safe_outputs.go:191Cache Field
properties.cache(top-level)workflow_builder.go:169via extractTopLevelYAMLSection()Cache-Memory (in Tools)
properties.tools.properties.cache-memorycompiler_orchestrator_workflow.go:235(extractCacheMemoryConfigFromMap)Network Permissions
properties.networkNetworkPermissionsstruct with Allowed, Blocked, Firewall fieldsengine.go:80-85(NetworkPermissions struct definition)strict_mode_network_validation.govalidates strict mode requirementsSandbox Configuration
properties.sandboxPermissions Field
properties.permissions(oneOf string/object)frontmatter_extraction_yaml.go(extractPermissions)permissions.go,permissions_parser.go,permissions_operations.goTools Configuration
properties.tools(object with 14 tool properties)tools.go,tools_parser.gotools_timeout_validation.goEngine Configuration
properties.engine($ref to engine_config)EngineConfigstructType Consistency Verification
No Critical Issues Found
The following commonly-queried items were thoroughly investigated and confirmed working:
Minor Observations
Some schema properties have indirect access patterns that could be documented:
private- schema exists but not directly accessed via frontmatterresources- schema exists but not directly accessedimport-schema- schema exists but rarely usedinfer- schema exists but not directly accessed in standard workflow pathdisable-model-invocation- schema exists but handled conditionallyThese are intentional design choices (they're validated at parse time or used for special cases) rather than inconsistencies.
Recommendations
import-schemaandinferare usedAudit Scope
Conclusion: The schema and Go implementation are well-aligned with no critical inconsistencies. All documented frontmatter fields are properly handled in the compiler with appropriate type checking and validation.
Beta Was this translation helpful? Give feedback.
All reactions