[Schema Consistency] 🔍 Schema Consistency Check - Implementation File Coverage Analysis (2025-11-10) #3552
Closed
Replies: 1 comment
-
|
This discussion was automatically closed because it was created by an agentic workflow more than 1 week ago. |
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 - Implementation File Coverage Analysis
Date: 2025-11-10
Strategy: Strategy-010 - Implementation File Coverage & Architectural Pattern Analysis
Analysis Scope: 33 schema fields, 116 implementation files, 110 production workflows
Summary
This analysis mapped schema fields to their implementation files in
pkg/workflow/to identify architectural patterns, dead code, and documentation gaps. The key finding: most fields follow a clear pattern (dedicated files for complex features, inline handling for simple ones), but we found critical issues with unused fields and missing documentation.Key Metrics:
Critical Findings
Critical Findings
1. 🚨 githubActionsStep - Dead Code (3rd Confirmation)
Severity: HIGH
Status: Confirmed across 3 consecutive analyses
The
githubActionsStepfield exists in the schema but has zero implementation:main_workflow_schema.jsonpkg/parser/pkg/workflow/docs/Evidence:
Recommendation: Remove from
main_workflow_schema.jsonin next release OR clearly document its intended future use.Impact: Schema bloat, user confusion, maintenance burden.
2. 📝 post-steps Field - Undocumented but Used
Severity: MEDIUM
Status: Feature exists and works, but users can't discover it
The
post-stepsfield is:pkg/workflow/compiler.go.github/workflows/test-post-steps.md)docs/src/content/docs/reference/frontmatter.mdEvidence:
Recommendation: Add documentation section in
frontmatter.mdwith examples and use cases.Impact: Valuable feature remains hidden from users.
3. 🗑️ Truly Unused Fields
Severity: LOW-MEDIUM
Status: Fields in schema never used in practice
Four fields exist in the schema but are never used in 110 production workflows:
githubActionsSteprun-nameruntimesincluded_file_schema.jsontimeout_minutestimeout-minutesRecommendation:
timeout-minutes4.⚠️ Misleading "Never Used" Analysis
Severity: INFO
Status: Important methodological insight
Key Discovery: Initial analysis showed many fields as "never used" because they're actually nested properties, not top-level fields:
commandon.command(trigger)containermcp-servers[].containerenvjobs[].env,steps[].envgithub-tokensafe-outputs[].github-tokenLesson: Field usage analysis must account for schema nesting structure.
Schema ↔ Implementation Mapping
Schema ↔ Implementation Mapping
Fields with Dedicated Implementation Files (15)
These fields have their own
pkg/workflow/{field}.gofiles:cachepkg/workflow/cache.gocommandpkg/workflow/command.goon.commandconcurrencypkg/workflow/concurrency.goenginepkg/workflow/engine.goenvpkg/workflow/env.gojobs[].envfeaturespkg/workflow/features.gogithub-tokenpkg/workflow/github_token.gosafe-outputs[]importspkg/workflow/imports.gojobspkg/workflow/jobs.gomcp-serverspkg/workflow/mcp_servers.gonetworkpkg/workflow/network.gopermissionspkg/workflow/permissions.gosafe-outputspkg/workflow/safe_outputs.gosecret-maskingpkg/workflow/secret_masking.gotoolspkg/workflow/tools.goFields Handled Inline (19)
These fields are processed in
compiler.goor scattered across multiple files:Simple fields (inline handling is appropriate):
description- metadata fieldname- workflow namerun-name- workflow run name (unused)source- tracking metadataComplex fields (might benefit from dedicated files):
on- trigger configuration (handled incompiler.go,filters.go,stop_after.go)steps- step definitions (handled incompiler.go,compiler_jobs.go)if- conditional logic (scattered acrossbundler.go,compiler_jobs.go)container- MCP container config (inmcp-config.go,fetch.go)Specialized fields:
roles- validation inrole_checks.gostrict- validation instrict_mode_validation.gopost-steps- handled incompiler.goDead Code (1)
❌ githubActionsStep - No implementation anywhere
Implementation File Organization
Implementation File Analysis
The 116 non-test implementation files in
pkg/workflow/are organized into 9 clear categories:1. Direct Schema Field Handlers (15 files)
Files that directly implement top-level schema fields:
cache.go,command.go,concurrency.go,engine.go,env.go,features.go,github_token.go,imports.go,jobs.go,mcp_servers.go,network.go,permissions.go,safe_outputs.go,secret_masking.go,tools.go2. Feature Support Files (30 files)
Files implementing sub-features or nested properties:
add_comment.go,add_labels.go,create_discussion.go,create_issue.go,create_pr_review_comment.go,update_issue.go,missing_tool.gofilters.go,manual_approval.go,reactions.go,stop_after.goartifacts.go,firewall.gonotify_comment.go,role_checks.go,safe_jobs.go,strict_mode_validation.go3. Engine Implementations (5 files)
AI engine adapters:
agentic_engine.go,claude_engine.go,codex_engine.go,copilot_engine.go,custom_engine.go4. Engine Support (10 files)
Engine helpers and configurations:
claude_logs.go,claude_mcp.go,claude_settings.go,claude_tools.go,engine_firewall_support.go,engine_helpers.go,engine_network_hooks.go,engine_output.go,engine_validation.go,edit_tool_prompt.go5. Compiler Core (5 files)
Core compilation logic:
compiler.go,compiler_jobs.go,compiler_yaml.go,frontmatter_extraction.go,yaml_generation.go6. Validation (8 files)
Schema and security validation:
bundler_validation.go,docker_validation.go,npm_validation.go,pip_validation.go,engine_validation.go,permissions_validator.go,step_order_validation.go,validation.go7. Security (7 files)
Security and safety features:
domain_sanitization.go,expression_safety.go,redact_secrets.go,threat_detection.go,xpia.go,strict_mode_validation.go,firewall.go8. GitHub Integration (20 files)
GitHub API and toolset integrations:
action_cache.go,action_pins.go,action_resolver.go,github_context.go,github_tool_to_toolset.go,github_toolsets.go,git_patch.go,pr.go, etc.9. Utilities (16 files)
Helper functions and utilities:
args.go,bundler.go,expressions.go,nodejs.go,semver.go,shell.go,strings.go,template.go,yaml.go, etc.Insight: The architecture is well-organized with clear separation of concerns. Most files fall into logical categories.
Usage Statistics
Workflow Field Usage Analysis
Analyzed 110 production workflows in
.github/workflows/:Heavily Used Fields (50%+ adoption)
onpermissionsenginetoolssafe-outputstimeout-minutesimportsModerately Used Fields (10-49% adoption)
namenetworkstrictstepsmcp-serversRarely Used Fields (1-9% adoption)
concurrencyrolessourceifdescriptioncachejobspost-stepssecret-maskingservicesNever Used (0% adoption)
githubActionsSteprun-nameruntimestimeout_minutesDocumentation Coverage
Documentation Analysis
Well Documented Fields (13)
These fields have H3 sections in
docs/src/content/docs/reference/frontmatter.md:engine)description)features)github-token)network)permissions)roles)run-name,runs-on,timeout-minutes)safe-outputs)source)strict)on)concurrency)Fields in Specialized Docs (9)
These fields are documented in other reference files:
cache→tools.md(undercache-memory)command→triggers.md(underon.command)container→guides/mcps.mdimports→imports.mdmcp-servers→guides/mcps.mdsecret-masking→ Mentioned brieflysteps→ Mentioned in jobs contexttools→tools.mdUndocumented (5)
Fields that lack documentation:
post-stepsgithubActionsSteprun-nameruntimestimeout_minutesRecommendations
Recommendations
🔴 HIGH PRIORITY
1. Remove
githubActionsStepfrom SchemaIssue: Confirmed dead code across 3 consecutive analyses
Impact: Reduces schema complexity, eliminates user confusion
Risk: None (never used anywhere)
Action: Remove from
main_workflow_schema.json2. Document
post-stepsFieldIssue: Used in production (test-post-steps.md) but completely undocumented
Impact: Users can't discover valuable feature
Risk: Feature adoption blocked by lack of documentation
Action: Add comprehensive section to
frontmatter.mdwith:steps3. Resolve
timeout_minutesAmbiguityIssue: Legacy alias never used (0 of 110 workflows)
Impact: Schema clarity, reduce confusion
Risk: Very low
Action: Mark as deprecated or remove from schema
4. Investigate
runtimesField StatusIssue: Exists in both main and included schemas but never used
Impact: Unclear if feature is production-ready
Risk: Either dead code or missing critical documentation
Action: Either:
🟡 MEDIUM PRIORITY
5. Consider Dedicated Files for Complex Inline Fields
Issue: Complex features handled inline in
compiler.goImpact: Harder to maintain and understand
Files to consider:
on→pkg/workflow/triggers.go(currently in compiler.go, filters.go)steps→pkg/workflow/steps.go(currently in compiler_jobs.go)if→pkg/workflow/conditions.go(currently scattered)Benefit: Clearer code organization, easier maintenance
Risk: Refactoring effort
6. Add Usage Statistics to Schema
Issue: No way to track field adoption rates
Impact: Helps prioritize documentation and deprecation decisions
Action: Consider adding custom schema properties:
x-usage-count: Number of workflows using fieldx-adoption-rate: Percentage adoptionx-last-updated: When field was last modified🟢 LOW PRIORITY
7. Review Rarely Used Fields
Issue: Some fields have very low adoption (1-3%)
Fields:
cache(1 workflow) - Underutilized? Add examples?jobs(1 workflow) - Custom jobs rare?services(1 workflow) - Unclear use case?Impact: Could improve adoption of valuable features
Risk: May be intentionally niche features (acceptable)
Action: Add prominent examples or cookbook recipes
Strategy Performance
Strategy Used: Strategy-010 - Implementation File Coverage & Architectural Pattern Analysis
Findings: 7 issues across critical to low severity
Effectiveness: ⭐⭐⭐⭐⭐ VERY HIGH
Should Reuse: ✅ YES - Every 4-5 analyses
Key Insights:
Complements Other Strategies:
This strategy provides the architectural perspective that reveals code organization patterns invisible to field-level analysis.
Files Analyzed
Schemas (3):
pkg/parser/schemas/main_workflow_schema.jsonpkg/parser/schemas/included_file_schema.jsonpkg/parser/schemas/mcp_config_schema.jsonParser (1):
pkg/parser/frontmatter.goImplementation (116 files):
pkg/workflow/*.go(all non-test files)Documentation (7+ files):
docs/src/content/docs/reference/frontmatter.mddocs/src/content/docs/reference/*.mdProduction Workflows (110):
.github/workflows/*.md(all workflow files)Next Steps
githubActionsStepfield from schemapost-stepsfield in frontmatter.mdruntimesfield statustimeout_minutesStrategy cache updated at
/tmp/gh-aw/cache-memory/strategies.jsonBeta Was this translation helpful? Give feedback.
All reactions