[Schema Consistency] 🔍 Schema Consistency Check - 2025-11-24 - Execution Context Analysis #4623
Closed
Replies: 0 comments
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 - 2025-11-24
This analysis discovered 6 critical/moderate inconsistencies where runtime execution depends on environment variables, filesystem layouts, and configurations not documented in the JSON schema.
Summary
Critical Issues
Critical Issues
1. GitHub Actions Environment Variables Not in Schema
Severity: CRITICAL
Location: Throughout
pkg/workflow/*.go, schema has no documentationIssue: Workflows implicitly depend on 7+ GitHub Actions environment variables that are never mentioned in the schema.
Variables Used in Code:
GITHUB_WORKSPACE(pkg/workflow/compiler_yaml.go:542, copilot_engine.go:93)GITHUB_TOKEN(pkg/workflow/codex_engine.go:68-70, multiple engines)GITHUB_REPOSITORY(pkg/workflow/codex_engine.go:69)GITHUB_RUN_ATTEMPT(pkg/workflow/compiler_yaml.go:879)COPILOT_GITHUB_TOKEN(pkg/workflow/copilot_engine.go:91)GH_AW_GITHUB_TOKEN(throughout codebase, fallback chains)COPILOT_CLI_TOKEN(legacy, pkg/workflow/copilot_engine.go:91)Schema Status: No mention of available environment variables or GitHub Actions context
Documentation Status: Partially documented in
docs/src/content/docs/reference/engines.mdandcompilation-process.md, but NOT in schemaImpact:
${{ env.* }}or${{ github.* }}expressionsEvidence:
Recommendation: Add
$commentfield to schema documenting available GitHub Actions context variables2. Filesystem Path Assumptions Not Documented
Severity: CRITICAL
Location: pkg/workflow/runtime_setup.go, workflows, documentation
Issue: Runtime assumes specific filesystem layout without schema documentation
Hardcoded Assumptions:
go.modat specific path (pkg/workflow/runtime_setup.go:569-588)/tmp/gh-aw/cache-memory/for cache storage (workflows, docs)$GITHUB_WORKSPACE/tmp/gh-aw/Schema Status: No filesystem requirements or conventions documented
Impact:
Evidence:
# Real workflows use hardcoded paths .github/workflows/audit-workflows.md: run: ./gh-aw logs --start-date -1d -o /tmp/gh-aw/aw-mcp/logsRecommendation: Document filesystem requirements in schema description or
$commentfieldModerate Issues
Moderate Issues
3. Token Precedence Logic Not in Schema
Severity: MODERATE
Location: Multiple engine files, schema
github-tokenfieldIssue: Complex token fallback chains exist in code but not fully documented in schema
Token Chains:
${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}${{ secrets.COPILOT_GITHUB_TOKEN || secrets.COPILOT_CLI_TOKEN || secrets.GH_AW_COPILOT_TOKEN || secrets.GH_AW_GITHUB_TOKEN }}Schema Status:
github-tokenfield exists with description mentioning precedence, but doesn't show fallback chain examplesDocumentation Status: ✅ Well documented in engines.md and frontmatter-full.md
Impact: Users must read prose documentation to understand token selection behavior
Recommendation: Add schema
examplesarray showing common fallback patterns4. Engine-Specific Secret Requirements Not in Schema
Severity: MODERATE
Location: pkg/workflow/agentic_engine.go, engine schema definitions
Issue: Each engine requires different secrets, validated at runtime but not documented in schema
Evidence:
Schema Status: Engine schema doesn't document required vs optional secrets per engine
Documentation Status: ✅ Well documented per-engine in engines.md
Impact: Users don't know which secrets to configure until workflow execution fails
Recommendation: Add engine-specific
required-secretsmetadata to schema or $comment5. Runtime Auto-Detection Not Schema-Documented
Severity: MODERATE
Location: pkg/workflow/runtime_setup.go:166-993
Issue: Sophisticated automatic runtime setup happens invisibly without schema explanation
Auto-Detection Behavior:
npm,pip,go,ruby, etc.)Evidence:
Supported Runtimes (11 total): bun, deno, dotnet, elixir, go, haskell, java, node, python, ruby, uv
Schema Status:
runtimesfield exists but doesn't explain auto-detection behaviorDocumentation Status:⚠️ Not prominently documented
Impact: "Magic" behavior that users don't understand; surprises when runtimes appear
Recommendation: Expand
runtimesfield description with auto-detection logic and examples6. Tool Permission Requirements Not in Schema
Severity: MODERATE
Location: pkg/workflow/compiler.go, tool configurations
Issue: Tools have implicit permission requirements validated at runtime
Evidence:
Schema Status: Tools schema doesn't document permission requirements per tool
Impact: Permission denied errors only appear at runtime after workflow starts
Recommendation: Add permission requirements to tool schema definitions or use
$commentto documentPositive Findings
Positive Findings
✅ Environment variables well-documented in reference docs (engines.md, compilation-process.md)
✅ Token configuration comprehensively explained in engines.md and frontmatter-full.md
✅ Secret validation happens at workflow start (fail-fast pattern)
✅ Runtime detection is sophisticated and helpful (11 runtimes with command scanning, MCP detection, language services)
✅ Good error messages for missing secrets/permissions
✅ Documentation quality high where it exists (just not in schema)
Detailed Recommendations
Recommendations by Priority
HIGH PRIORITY
1. Add GitHub Actions Context Documentation
What: Schema
$commentor description documenting available environment variablesWhere: Top-level schema or
envfieldFormat:
{ "env": { "$comment": "Available GitHub Actions context: GITHUB_WORKSPACE, GITHUB_TOKEN, GITHUB_REPOSITORY, GITHUB_RUN_ATTEMPT, GITHUB_EVENT_PATH. See https://docs.github.com/en/actions/learn-github-actions/variables", "type": "object", "description": "Environment variables..." } }2. Document Filesystem Requirements
What: Schema description or
$commentwith filesystem layout assumptionsWhere: Top-level schema or in relevant fields (cache-memory, etc.)
Content: Document
/tmp/gh-aw/paths, go.mod conventions, GITHUB_WORKSPACE relativityMEDIUM PRIORITY
3. Engine Secret Requirements
What: Add required/optional secrets metadata per engine
Where: Engine schema definitions
Format: Add
required-secretsandoptional-secretsarrays or use $comment4. Tool Permission Requirements
What: Document permission needs per tool
Where: Tools schema or individual tool definitions
Format: Add
required-permissionsfield or $comment5. Runtime Auto-Detection Explanation
What: Expand
runtimesfield descriptionWhere: Schema
runtimespropertyContent: Explain command scanning, dependency chains (UV→Python), Serena language detection
LOW PRIORITY
6. Token Fallback Examples
What: Add schema examples showing token precedence chains
Where:
github-tokenfield examples array7. Runner Resource Guidance
What: Document minimum runner specs for AI workloads
Where:
runs-onfield description or $commentContent: CPU, memory, disk space recommendations
Strategy Analysis & Methodology
Strategy Performance
Strategy ID: strategy-019
Name: Execution Context & Runtime Environment Assumptions
Findings: 6 (2 critical, 4 moderate)
Effectiveness: VERY HIGH
Novelty: ⭐ NEW - First strategy to analyze runtime execution assumptions vs schema promises
Why This Strategy Works
Methodology
✅ Grep for environment variable usage (
GITHUB_*,RUNNER_*, etc.)✅ Analyzed
pkg/workflow/runtime_setup.gofor auto-detection patterns✅ Traced token precedence chains through engine implementations
✅ Cross-referenced schema with documentation for execution context
✅ Validated against real workflow examples in
.github/workflows/✅ Identified filesystem and secret configuration assumptions
Complementary Strategies
This strategy pairs well with:
Implementation Quality Notes
Implementation Quality
Overall Assessment: ⭐⭐⭐⭐⭐ Excellent
The implementation quality is very high. The issues found are documentation gaps rather than implementation bugs:
Main Gap: Schema metadata doesn't reflect the sophistication of the implementation
Recommendation: Focus on enhancing schema documentation rather than changing code
Next Steps
Strategy Update
Cache Updated: Strategy-019 added to
/tmp/gh-aw/cache-memory/strategies.jsonSuccess Count: 1
Last Used: 2025-11-24
Recommendation: Use every 5-6 analyses to audit runtime requirements and execution prerequisites
Analysis generated using Strategy-019: Execution Context & Runtime Environment Assumptions
Focus: Runtime execution assumptions vs schema documentation
Novel approach: First strategy to analyze execution environment prerequisites
Beta Was this translation helpful? Give feedback.
All reactions