-
Notifications
You must be signed in to change notification settings - Fork 47
Closed
Labels
automationbugSomething isn't workingSomething isn't workingcode-qualitycompilercookieIssue Monster Loves Cookies!Issue Monster Loves Cookies!task-miningvalidation
Description
Description
27 compiled workflows contain expression errors where job outputs or properties are referenced that don't exist in the workflow context, causing runtime failures and empty values.
Error Pattern
Common issue: Referencing needs.job_name.outputs.property when:
- The job doesn't define that output
- The property name is incorrect
- The job dependency isn't declared in
needs:
Example from actionlint:
# Job references output that doesn't exist
- name: Use error message
run: echo "${{ needs.create_pull_request.outputs.error_message }}"
# ERROR: create_pull_request job doesn't define error_message outputImpact
- Runtime Errors: Workflows fail or behave unexpectedly
- Empty Values: Critical data is silently missing
- Debugging Difficulty: Errors only appear at runtime, not compile time
- Workflow Reliability: 18% of workflows affected (27/148)
Affected Workflows
From static analysis report (Discussion #11769):
- ci-coach
- cloclo
- code-scanning-fixer
- code-simplifier
- daily-doc-updater
- daily-workflow-updater
- dependabot-bundler
- developer-docs-consolidator
- dictation-prompt
- github-mcp-tools-report
- grumpy-reviewer
- homebrew-updater
- library-upgrade-guide
- mergefest
- openapi-spec-generator
- pdf-summary
- plan
- pr-nitpick-reviewer
- pull-request-summary
- q
- r
- release
- repo-audit-analyzer
- repo-tree-map
- scout
- skill-update-prompter
- unbloat-docs
Success Criteria
- All 27 workflows analyzed for expression errors
- Missing job outputs added or references removed
- Incorrect property paths corrected
- All job dependencies declared in
needs:blocks - Actionlint expression errors reduced to 0
- Add compiler validation to catch these errors early
Implementation Approach
Step 1: Detection
# Use actionlint to identify specific errors
actionlint .github/workflows/*.lock.yml 2>&1 | grep "expression"Step 2: Fix Patterns
For each workflow:
- Identify the referenced output (e.g.,
needs.job.outputs.property) - Check if the job defines that output:
- If missing: Add output definition to the job
- If wrong name: Correct the reference
- If job doesn't exist: Remove the reference or add the job
- Verify
needs:dependency is declared
Step 3: Validation
Add compiler-time validation:
// Pseudo-code for compiler enhancement
func validateJobDependencies(workflow *Workflow) []error {
// For each job's steps that reference needs.*
// Verify the referenced job exists
// Verify the output is defined
// Return errors if validation fails
}Files Affected
pkg/workflow/compiler*.go- Add expression validationpkg/workflow/validation*.go- Job dependency checks.github/workflows/*.md- Fix source workflows (27 files).github/workflows/*.lock.yml- Will be regenerated
Debugging Tips
- Search for
needs.*.outputs.*in workflow files - Cross-reference with job output definitions (
outputs:blocks) - Check
needs:dependencies are declared - Test workflows locally with
gh workflow runto verify fixes
Priority
High - This affects 18% of workflows and causes runtime failures. Should be fixed before adding new features.
Source
Extracted from Discussion #11769 - Static Analysis Report (Jan 25, 2026)
Section: Priority 1: Expression Errors (27 workflows)
AI generated by Discussion Task Miner - Code Quality Improvement Agent
- expires on Feb 15, 2026, 5:09 PM UTC
Reactions are currently unavailable
Metadata
Metadata
Labels
automationbugSomething isn't workingSomething isn't workingcode-qualitycompilercookieIssue Monster Loves Cookies!Issue Monster Loves Cookies!task-miningvalidation