[Schema Consistency] Schema Consistency Analysis Report #23823
Closed
Replies: 1 comment
-
|
This discussion has been marked as outdated by Schema Consistency Checker. A newer discussion is available at Discussion #24018. |
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
Comprehensive schema consistency analysis of the gh-aw repository reveals 7 major schema inconsistencies between the JSON schema definition and Go implementation:
Part 1: Schema Fields vs Go Structs
COMPLETE: All properties keys match between schema and Go implementation.
Schema contains 41 root-level properties:
Status: ✅ All documented in schema and Go implementation.
Part 2: Services Field & Allow-Host-Service-Ports
DOCUMENTED: The
services:field is properly defined in schema at/pkg/parser/schemas/main_workflow_schema.jsonline 2780.Schema Structure (line 2780):
Implementation Details:
pkg/workflow/compiler_types.goline 374Services string(stores YAML)pkg/workflow/compiler_types.goline 439ServicePortExpressions string(comma-separated expressions)Feature Enabled by Commit 74416d9:
$\{\{ job.services['<id>'].ports['<port>'] }}expressionsImplementation Files:
pkg/workflow/service_ports.go- Parses services YAML and extracts port expressionspkg/workflow/awf_helpers.golines 100-107 - Injects--allow-host-service-portsflag to AWFpkg/workflow/compiler_orchestrator_workflow.golines 535-545 - Calls extraction logicReal-World Usage:
.github/workflows/smoke-service-ports.md- Smoke test validating Redis service connectivity.github/workflows/smoke-service-ports.mdline 48: Must connect viahost.docker.internal(notlocalhost)Status: ✅ Fully documented in schema and properly implemented.
Part 3: Firewall/Engine Schema vs Implementation
Schema Definition:
pkg/parser/schemas/main_workflow_schema.jsonlines 446-649The
engine:property references#/$defs/engine_configand supports:engine: copilot)Implementation:
pkg/workflow/compiler_types.goEngineConfig *EngineConfig- Extended engine configuration structStatus: ✅ Schema matches implementation.
Part 4: Safe-Outputs Schema vs Implementation
Schema Structure:
pkg/parser/schemas/main_workflow_schema.json-safe-outputs:propertySafe-Outputs Properties Include:
jobs- Custom safe-output jobs (line 38 in schema: "jobs" field)env- Environment variablesenvironment- GitHub deployment environmentsteps- User-provided stepsscripts- Custom MCP scriptsactions- Custom GitHub Actionsruns-on- Runner configurationImplementation:
pkg/workflow/compiler_types.golines 449-515SafeOutputsConfigwith fieldJobs map[string]*SafeJobConfigpkg/workflow/safe_jobs.golines 33-149safe-outputs.jobslocation (line 330-334)SafeJobConfig Structure (
pkg/workflow/safe_jobs.golines 18-29):Go Code Defines (47 total scopes) -
pkg/workflow/permissions.golines 137-189:Repository-level (19 in Go, 18 in schema):
Organization-level (15 in Go, 1 in schema):
Non-standard (1 in Go):
File References:
pkg/parser/schemas/main_workflow_schema.json(lines 2-3 show total of 19 properties in github_actions_permissions)pkg/workflow/permissions.golines 137-189pkg/workflow/permissions.golines 225-244 (GetAllPermissionScopes returns all 47 permissions)Status: ❌ SCHEMA SIGNIFICANTLY OUTDATED - Missing 28 permission scopes defined in Go code
Part 6: Documentation vs Schema Field List
Frontmatter Reference:
docs/src/content/docs/reference/frontmatter.mdServices Documentation Location: Lines 564-581
Allow-Host-Service-Ports Documentation:
.github/workflows/smoke-service-ports.md(test workflow)Imports Documentation:
docs/src/content/docs/reference/imports.mdline 234Status:⚠️ PARTIAL - Services documented in frontmatter but --allow-host-service-ports feature is undocumented
Part 7: Workflow Files Using Services Field
Documented Usage (3 files):
.github/workflows/smoke-service-ports.md- Lines 14-23.github/workflows/smoke-service-ports.lock.yml- Generated lock file.github/workflows/shared/mcp/jupyter.md- References services (mentioned in blog)Status: ✅ Service containers documented and tested.
Part 8: Environment Variables Field Type
Schema Definition:
pkg/parser/schemas/main_workflow_schema.json-properties.envSchema Type (oneOf):
{ "type": "object", "additionalProperties": { "type": "string" }, "examples": { "NODE_ENV": "production" } } OR { "type": "string" }Implementation: No specific Go struct field found (env is typically embedded in WorkflowData or handled as map[string]string)
Status: ✅ Schema supports both object and string formats correctly.
Summary Table
Actionable Findings
HIGH PRIORITY
$defs.github_actions_permissionsin schemaMEDIUM PRIORITY
--allow-host-service-portsfeature documentation todocs/src/content/docs/reference/frontmatter.mdLOW PRIORITY
Timestamp: Analysis completed on 2026-04-01
Scope: Full repository schema and implementation analysis with file:line references
Beta Was this translation helpful? Give feedback.
All reactions