Skip update_cache_memory job when agent job is skipped#23720
Conversation
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/b9bb8d03-ccac-4689-b836-716408129077 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Add needs.agent.result != 'skipped' condition to update_cache_memory job so it is skipped when the agent job is skipped (e.g. when the activation job filters out the run). Recompile all lock files to apply the new condition." Agent-Logs-Url: https://github.com/github/gh-aw/sessions/b9bb8d03-ccac-4689-b836-716408129077 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
🤖 Contribution Guidelines Check — 🟢 AlignedHey
Quality signal:
|
There was a problem hiding this comment.
Pull request overview
Updates the generated workflow so the update_cache_memory job does not run when the agent job is skipped, reducing unnecessary workflow noise when runs are filtered out by activation.
Changes:
- Updated
update_cache_memoryjobif:condition to includeneeds.agent.result != 'skipped'. - Updated the cache-memory + threat-detection integration test expectations for the new rendered condition formatting.
- Recompiled affected
.lock.ymlworkflow lockfiles to reflect the new condition.
Reviewed changes
Copilot reviewed 78 out of 79 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pkg/workflow/cache.go | Adds needs.agent.result != 'skipped' to the compiled update_cache_memory job condition. |
| pkg/workflow/cache_memory_threat_detection_test.go | Updates integration test expectations for the new multi-line if: rendering. |
| go.mod | Removes an indirect dependency entry (module tidy change). |
| go.sum | Removes unused module checksums (module tidy change). |
| .github/workflows/weekly-issue-summary.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/unbloat-docs.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/test-create-pr-error-handling.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/technical-doc-writer.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/super-linter.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/step-name-alignment.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/static-analysis-report.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/stale-repo-identifier.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/smoke-update-cross-repo-pr.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/smoke-gemini.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/smoke-copilot.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/smoke-copilot-arm.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/smoke-codex.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/smoke-claude.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/slide-deck-maintainer.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/sergo.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/security-review.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/scout.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/schema-consistency-checker.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/safe-output-health.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/repository-quality-improver.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/repo-audit-analyzer.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/q.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/python-data-charts.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/prompt-clustering-analysis.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/pr-nitpick-reviewer.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/portfolio-analyst.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/poem-bot.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/pdf-summary.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/org-health-report.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/mcp-inspector.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/lockfile-stats.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/jsweep.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/instructions-janitor.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/grumpy-reviewer.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/gpclean.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/go-logger.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/go-fan.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/glossary-maintainer.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/github-mcp-tools-report.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/github-mcp-structural-analysis.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/firewall-escape.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/developer-docs-consolidator.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/deep-report.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/dead-code-remover.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/daily-safe-output-optimizer.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/daily-repo-chronicle.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/daily-rendering-scripts-verifier.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/daily-performance-summary.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/daily-news.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/daily-mcp-concurrency-analysis.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/daily-issues-report.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/daily-integrity-analysis.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/daily-function-namer.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/daily-firewall-report.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/daily-doc-updater.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/daily-doc-healer.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/daily-copilot-token-report.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/daily-compiler-quality.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/daily-code-metrics.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/daily-architecture-diagram.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/copilot-session-insights.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/copilot-pr-prompt-analysis.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/copilot-pr-nlp-analysis.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/copilot-pr-merged-report.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/copilot-agent-analysis.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/constraint-solving-potd.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/code-scanning-fixer.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/cloclo.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/cli-version-checker.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/claude-code-user-docs-review.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/ci-doctor.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/ci-coach.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/audit-workflows.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
| .github/workflows/agent-persona-explorer.lock.yml | Recompiled lockfile to include agent not-skipped check in update_cache_memory condition. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| github.com/pmezard/go-difflib v1.0.0 // indirect | ||
| github.com/rivo/uniseg v0.4.7 // indirect | ||
| github.com/robfig/cron/v3 v3.0.1 // indirect | ||
| github.com/sahilm/fuzzy v0.1.1 // indirect | ||
| github.com/segmentio/asm v1.1.3 // indirect | ||
| github.com/segmentio/encoding v0.5.4 // indirect |
There was a problem hiding this comment.
go.mod/go.sum are modified (dependency removals) but this isn’t mentioned in the PR description. Please either update the PR description to call out the dependency tidy/removal, or split these module file changes into a separate PR to keep the workflow-condition change focused.
Summary
The
update_cache_memoryjob was running even when theagentjob was skipped (e.g. when the activation job filters out the run because no matching conditions were met). This caused unnecessary job executions and noise in workflow run logs.Changes
pkg/workflow/cache.go: Addedneeds.agent.result != 'skipped'to theupdate_cache_memoryjob condition. The condition now reads:pkg/workflow/cache_memory_threat_detection_test.go: Updated the integration test to match the new condition string (now rendered as a YAML folded block scalar due to line length)..lock.ymlfiles recompiled to apply the new condition.Root Cause
The previous condition only checked that the
detectionjob passed or was skipped, but didn't check whether theagentjob itself ran. When the activation job skips the agent (because workflow trigger conditions aren't met), thedetectionjob also gets skipped — but theupdate_cache_memoryjob would still run becauseneeds.detection.result == 'skipped'was satisfied.Ref: https://github.com/github/gh-aw/actions/runs/23798063756/job/69351374488