🎯 Repository Quality Improvement Report - Workflow Compilation Consistency #4844
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.
-
🎯 Repository Quality Improvement Report - Workflow Compilation Consistency
Analysis Date: 2025-11-26
Focus Area: Workflow Compilation Consistency
Strategy Type: Custom (60% algorithm - repository-specific focus area)
Custom Area: Yes - This focus area addresses gh-aw's unique challenge of maintaining consistency between source workflow files (
.md) and their compiled GitHub Actions artifacts (.lock.yml)Executive Summary
This analysis reveals significant inconsistencies in the workflow compilation state, particularly affecting the 42 shared workflow components in
.github/workflows/shared/. While top-level workflows maintain 100% compilation coverage, 40 out of 42 shared workflows (95.2%) are missing their compiled.lock.ymlartifacts. Additionally, 6 top-level workflows have stale compilations where the source.mdfile was modified after the last compilation.The root cause is the absence of automated enforcement mechanisms. Despite documentation stating "ALWAYS run
gh aw compileafter every change," there are no pre-commit hooks, no CI validation of compilation state, and limited visibility into staleness. This creates a maintenance burden and potential runtime issues when workflows reference uncompiled or stale shared components.Full Analysis Report
Focus Area: Workflow Compilation Consistency
Current State Assessment
The gh-aw repository uses a unique compilation model where human-readable workflow definitions (
.mdfiles with YAML frontmatter) are compiled into GitHub Actions YAML (.lock.ymlfiles). This compilation is critical for workflow execution but currently relies entirely on manual developer discipline.Metrics Collected:
Findings
Strengths
.mdfiles have corresponding.lock.ymlcompilationsci.ymlworkflow includesmake recompileto rebuild lock files on merge--purgeflag exists to remove orphaned.lock.ymlfilesAreas for Improvement
1. Shared Workflow Compilation Gap (CRITICAL)
.github/workflows/shared/lack.lock.ymlartifactsactions-ai-inference.md,app-config.md,changeset-format.md,charts-with-trending.md,copilot-pr-data-fetch.md, and 35 others2. Stale Compilation Detection (HIGH)
.lock.ymlwas generatedai-triage-campaign.lock.ymlcommit-changes-analyzer.lock.ymlcopilot-session-insights.lock.ymlglossary-maintainer.lock.ymlpdf-summary.lock.ymlrelease.lock.yml3. No Pre-Commit Enforcement (HIGH)
make recompilemanually.git/hooks/contains only sample files, no active pre-commit hooks4. Limited Compilation State Visibility (MEDIUM)
5. Documentation Gaps (MEDIUM)
make recompileinCONTRIBUTING.mdDEVGUIDE.mddoesn't mention pre-commit hook setupDetailed Analysis
Shared Workflow Compilation Mystery
The shared workflows are designed as reusable components (imported via
imports:field), but they are not currently being compiled. Analysis suggests:gh aw compilecommand may skip shared directories by defaultRecommendation: Clarify the intended behavior and either:
.lock.yml.lock.ymlStaleness Detection Challenges
Current staleness happens because:
.mdfilemake recompile.mdchanges but no.lock.ymlupdatemake recompileand commits changes separately (creating extra commits)This creates "repair commits" that pollute git history with compilation-only changes.
CI Workflow Analysis
The current
ci.ymlincludes:This rebuilds on merge but doesn't:
.lock.yml🤖 Tasks for Copilot Agent
NOTE TO PLANNER AGENT: The following tasks are designed for GitHub Copilot agent execution. Please split these into individual work items for processing.
Improvement Tasks
The following code regions and tasks should be processed by the Copilot agent. Each section is marked for easy identification by the planner agent.
Task 1: Create Pre-Commit Hook for Automatic Compilation
Priority: High
Estimated Effort: Medium
Focus Area: Workflow Compilation Consistency
Description:
Create a Git pre-commit hook that automatically runs
make recompile(or at minimum, validates compilation state) before allowing commits. This prevents developers from forgetting to compile workflows and reduces "repair commits" in the git history.Acceptance Criteria:
.git/hooks/pre-commit(and provided as installable template).mdworkflow files in the commitDEVGUIDE.mdsetup section--no-verifyflag for emergency commitsCode Region:
.git/hooks/andscripts/install-hooks.shTask 2: Add Compilation Status Command
Priority: High
Estimated Effort: Medium
Focus Area: Workflow Compilation Consistency
Description:
Implement a new CLI command
gh aw status(orgh aw compile --status) that shows the compilation state of all workflows: which are compiled, which are stale, which are missing.lock.yml, and which shared workflows are uncompiled.Acceptance Criteria:
.lock.yml).lock.ymlfiles--jsonoutput for scriptingCode Region:
pkg/cli/compile_command.goor newpkg/cli/status_command.goWorkflow Compilation Status:
workflow-name.md ✅ Current (compiled 2h ago)⚠️ Stale (source modified 1d ago, compiled 3d ago)
ai-triage-campaign.md
shared/reporting.md ❌ Missing (no .lock.yml found)
Summary: 88 current, 6 stale, 40 missing
Task 3: Enhance CI to Fail on Stale Compilations
Priority: High
Estimated Effort: Small
Focus Area: Workflow Compilation Consistency
Description:
Update
.github/workflows/ci.ymlto explicitly check for stale or missing compilations BEFORE runningmake recompile. If staleness detected, fail the build with a clear error message. This prevents merging PRs with uncompiled workflows.Acceptance Criteria:
make recompilestepmake recompile)make recompilestep preserved for fallback/repairCode Region:
.github/workflows/ci.ymlThis prevents PRs with uncompiled workflows from being merged. Developers must run
make recompilelocally before pushing.Keep the existing
make recompilestep as a safety net but consider making it less silent (add warnings or diff output).Task 5: Add Compilation Freshness Documentation
Priority: Medium
Estimated Effort: Small
Focus Area: Workflow Compilation Consistency
Description:
Expand
DEVGUIDE.mdandCONTRIBUTING.mdto include comprehensive guidance on workflow compilation: when to compile, how to check staleness, troubleshooting compilation errors, and best practices for maintaining compilation consistency.Acceptance Criteria:
DEVGUIDE.mdtitled "Workflow Compilation"make recompile, how to check staleness, common errorsCode Region:
DEVGUIDE.md,CONTRIBUTING.mdTroubleshooting
"Compilation failed" error:
Stale .lock.yml detected:
make recompileto update.mdand.lock.ymltogetherBest Practices
scripts/install-hooks.sh(see Task 1).lock.ymldiffs in PRs--purgeflag to remove orphaned files📊 Historical Context
Previous Focus Areas
Statistics:
🎯 Recommendations
Immediate Actions (This Week)
Short-term Actions (This Month)
Long-term Actions (This Quarter)
.lock.ymlduring recompilationmake recompilefor large repositories📈 Success Metrics
Track these metrics to measure improvement in Workflow Compilation Consistency:
Next Steps
make recompileafter Task 4 decision to establish baselineGenerated by Repository Quality Improvement Agent
Next analysis: 2025-11-27 - Focus area will be selected based on diversity algorithm (aim for continued custom areas to maintain 60%+ rate)
Beta Was this translation helpful? Give feedback.
All reactions