Repository navigation
Add needs consistency linting and fix activation output references - #70546
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft. Commit pushed:
|
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality SentinelOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
|
✅ Ponytail Reviewer completed successfully! Ponytail ReviewerOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ PR Code Quality Reviewer completed the code quality review.
|
🏗️ Design Decision Gate — ADR RequiredThis PR adds a lot of new code to core business logic (704 new lines under 📄 Draft ADR committed: Decision captured in the draft:
📋 What to do next
Once an ADR is linked in the PR body, this gate will re-run and check that the implementation matches the decision. ❓ Why ADRs Matter
ADRs create a searchable, permanent record of why the codebase looks the way it does. 📋 Michael Nygard ADR Format ReferenceAn ADR must contain these four sections to be considered complete:
All ADRs are stored in
|
There was a problem hiding this comment.
Verdict: Comment
No actionable blocking issues found in the changed lines. The needs-consistency implementation is covered by targeted regression cases, and the activation-output rewrite preserves literal and expression forms.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · 3.21 AIC · ⌖ 0.532 AIC · ⊞ 1.6K
Comment /review to run again
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved correctness issues affect linting valid workflows and executing activation and ACE jobs.
7 open issues
Use aw_context for centrally dispatched ACE runs · New Rewrite case-insensitive dot and bracket output references · New Preserve string coercion when inlining bindings · New Allow explicit empty needs lists in AW linting · New Include generated state jobs in AW built-in job names · New Recognize implicit conditions in setup-steps and pre-steps · New Tailor dependency advice for self and workflow-scope references · New
What changed in this PR
Adds dependency-consistency warnings to gh-aw’s workflow linter and corrects activation prompt output bindings.
Changes:
- Check dependency graphs, direct
needsreferences, and declared outputs. - Rewrite activation self-output references and regenerate affected locks.
- Remove ACE’s undeclared-output gate; add tests and documentation.
| File | Description |
|---|---|
| pkg/workflow/lint/rule_contract_test.go | Add rule contract fixtures. |
| pkg/workflow/lint/repository_workflows_test.go | Require clean dependency linting. |
| pkg/workflow/lint/performance_benchmark_test.go | Preserve benchmark producer jobs. |
| pkg/workflow/lint/needs_expression.go | Analyze dependency expressions. |
| pkg/workflow/lint/needs_consistency.go | Validate dependency graphs and outputs. |
| pkg/workflow/lint/needs_consistency_test.go | Cover dependency rule behavior. |
| pkg/workflow/lint/lint.go | Register the new rule. |
| pkg/workflow/lint/lint_test.go | Update registration expectations. |
| pkg/workflow/compiler_steering_issue_test.go | Verify local steering bindings. |
| pkg/workflow/compiler_experiments.go | Share expression-rewriting logic. |
| pkg/workflow/compiler_activation_prompt_outputs.go | Rewrite activation output references. |
| pkg/workflow/compiler_activation_prompt_outputs_test.go | Cover output-binding rewrites. |
| pkg/workflow/compiler_activation_job.go | Apply rewrites during prompt generation. |
| pkg/cli/lint_workflow_test.go | Test CLI rule integration. |
| docs/src/content/docs/reference/workflow-linters.md | Document rule behavior and limits. |
| .github/workflows/weekly-safe-outputs-spec-review.lock.yml | Use local steering output. |
| .github/workflows/weekly-editors-health-check.lock.yml | Use local steering output. |
| .github/workflows/weekly-blog-post-writer.lock.yml | Use local steering output. |
| .github/workflows/update-astro.lock.yml | Use local steering output. |
| .github/workflows/unbloat-docs.lock.yml | Use local steering output. |
| .github/workflows/ubuntu-image-analyzer.lock.yml | Use local steering output. |
| .github/workflows/tidy.lock.yml | Use local steering output. |
| .github/workflows/technical-doc-writer.lock.yml | Use local steering output. |
| .github/workflows/spec-extractor.lock.yml | Use local steering output. |
| .github/workflows/spec-enforcer.lock.yml | Use local steering output. |
| .github/workflows/smoke-project.lock.yml | Use local steering output. |
| .github/workflows/slide-deck-maintainer.lock.yml | Use local steering output. |
| .github/workflows/refiner.lock.yml | Use local steering output. |
| .github/workflows/q.lock.yml | Use local steering output. |
| .github/workflows/purelock.lock.yml | Use local steering output. |
| .github/workflows/linter-miner.lock.yml | Use local steering output. |
| .github/workflows/layout-spec-maintainer.lock.yml | Use local steering output. |
| .github/workflows/instructions-janitor.lock.yml | Use local steering output. |
| .github/workflows/hourly-ci-cleaner.lock.yml | Use local steering output. |
| .github/workflows/go-logger.lock.yml | Use local steering output. |
| .github/workflows/glossary-maintainer.lock.yml | Use local steering output. |
| .github/workflows/github-mcp-tools-report.lock.yml | Use local steering output. |
| .github/workflows/functional-pragmatist.lock.yml | Use local steering output. |
| .github/workflows/evoskill-evolver.lock.yml | Use local steering output. |
| .github/workflows/eslint-miner.lock.yml | Use local steering output. |
| .github/workflows/dictation-prompt.lock.yml | Use local steering output. |
| .github/workflows/developer-docs-consolidator.lock.yml | Use local steering output. |
| .github/workflows/dependabot-burner.lock.yml | Use local steering output. |
| .github/workflows/dead-code-remover.lock.yml | Use local steering output. |
| .github/workflows/daily-yamllint-fixer.lock.yml | Use local steering output. |
| .github/workflows/daily-workflow-updater.lock.yml | Use local steering output. |
| .github/workflows/daily-trajectory-grader-implementer.lock.yml | Use local steering output. |
| .github/workflows/daily-safeoutputs-git-simulator.lock.yml | Use local steering output. |
| .github/workflows/daily-safe-output-integrator.lock.yml | Use local steering output. |
| .github/workflows/daily-rendering-scripts-verifier.lock.yml | Use local steering output. |
| .github/workflows/daily-go-test-stubs-aider.lock.yml | Use local steering output. |
| .github/workflows/daily-go-test-parallelizer.lock.yml | Use local steering output. |
| .github/workflows/daily-elixir-credo-snippet-audit.lock.yml | Use local steering output. |
| .github/workflows/daily-documentation-diagram.lock.yml | Use local steering output. |
| .github/workflows/daily-doc-updater.lock.yml | Use local steering output. |
| .github/workflows/daily-doc-healer.lock.yml | Use local steering output. |
| .github/workflows/daily-compiler-threat-spec-optimizer.lock.yml | Use local steering output. |
| .github/workflows/daily-community-attribution.lock.yml | Use local steering output. |
| .github/workflows/daily-code-debt-aider.lock.yml | Use local steering output. |
| .github/workflows/daily-caveman-optimizer.lock.yml | Use local steering output. |
| .github/workflows/daily-astrostylelite-markdown-spellcheck.lock.yml | Use local steering output. |
| .github/workflows/daily-architecture-diagram.lock.yml | Use local steering output. |
| .github/workflows/daily-agent-of-the-day-blog-writer.lock.yml | Use local steering output. |
| .github/workflows/code-simplifier.lock.yml | Use local steering output. |
| .github/workflows/code-scanning-fixer.lock.yml | Use local steering output. |
| .github/workflows/cloclo.lock.yml | Use local steering output. |
| .github/workflows/ci-coach.lock.yml | Use local steering output. |
| .github/workflows/avenger.lock.yml | Use local steering output. |
| .github/workflows/archivx-agentic-workflows-analyzer.lock.yml | Use local steering output. |
| .github/workflows/approach-validator.lock.yml | Use local trigger-label output. |
| .github/workflows/ace-editor.md | Remove undeclared-output condition. |
| .github/workflows/ace-editor.lock.yml | Regenerate metadata and remove condition. |
Review effort: Max
| @@ -22,7 +22,6 @@ jobs: | |||
| post_ace_link: | |||
| runs-on: ubuntu-latest | |||
| needs: [activation] | |||
| "github.com/goccy/go-yaml" | ||
| ) | ||
|
|
||
| var activationPromptOutputReferenceRegex = regexp.MustCompile(`\bneeds\.activation\.outputs\.([a-zA-Z_][a-zA-Z0-9_-]*)\b`) |
| bindings := make(map[string]string, len(outputs)) | ||
| for name, value := range outputs { | ||
| if strings.HasPrefix(strings.TrimSpace(value), "${{") { | ||
| bindings[name] = "(" + stripExpressionWrapper(value) + ")" |
| if !valid { | ||
| return fmt.Errorf("needs-consistency requires literal job IDs at %s.needs; use needs: [build]", path) | ||
| } |
| _, builtin := constants.KnownBuiltInJobNames[id] | ||
| return builtin || c.imports |
| if path == jobPath+".if" { | ||
| return true | ||
| } | ||
| for _, field := range []string{"steps", "post-steps"} { |
| if checkEdge && !connected { | ||
| c.report(path, "Needs expression references a job outside direct needs; add the producer to this job's needs list, even if it is a transitive dependency") | ||
| return | ||
| } |
|
🎉 This pull request is included in a new release. Release: |

Summary
Disconnected
needsexpressions can silently evaluate to empty values, even when the referenced producer exists elsewhere in the workflow. Add the built-inneeds-consistencyActions/AW rule to detect unknown dependencies, self-dependencies, cycles, missing direct dependency edges, invalid job properties, and undeclared outputs.The rule parses dot and literal bracket accesses, including implicit job/step conditions. Compiled Actions graphs take precedence over authored AW configuration; unresolved imports, generated defaults, computed indexes, and external reusable-workflow outputs are handled conservatively. Ordering-only dependencies remain valid. Findings are warnings.
Fix the findings discovered in this repository:
activation.outputs.activatedoutput. Its direct activation dependency retains Actions' default successful-dependency gate.Validation
gh aw lint --rules needs-consistency --jsonreturned zero findings.--allow-parallel-runnersoption; custom scoped lint passed. The aggregate gate encountered shared golangci-lint lock contention without that option.