Repository navigation
Description
Context
Reported in #27670. When a built-in job name (activation, agent, safe_outputs, conclusion) appears as a key under jobs: in frontmatter (for pre-steps customization per ADR-27138), the dependency-addition loop in compiler_main_job.go incorrectly adds the built-in job to another job's needs: list — causing duplicates or self-cycles that GitHub Actions rejects.
Specific bugs:
jobs.activation.pre-steps→activationgets added twice toagent.needsjobs.agent.pre-steps→agentadded toagent.needs(self-cycle)jobs.safe_outputs.pre-steps→safe_outputsadded toagent.needs, butsafe_outputsalready needsagent(cycle)jobs.conclusion.pre-steps→ similar cycle
Root Cause
In pkg/workflow/compiler_main_job.go, the loop that builds dependency lists only skips pre_activation / pre-activation, but data.Jobs now also contains entries for other built-in job names used as customization targets. The skip-list was never extended to cover activation, agent, safe_outputs, conclusion.
Objective
Extend the skip logic to exclude all built-in job names from being treated as custom dependencies when iterating data.Jobs.
Approach
- Add or update an
isBuiltInJobName(jobName string) boolhelper function (or similar) inpkg/workflow/compiler_main_job.go(orpkg/constants) that covers at minimum:pre_activation,pre-activationactivationagentsafe_outputs,safe-outputsconclusion
- Replace the existing
pre_activation-only skip check withisBuiltInJobName(jobName)in the dependency-addition loop.
Files to Modify
pkg/workflow/compiler_main_job.go— extend skip-list / addisBuiltInJobNamehelperpkg/constants/— consider adding built-in job name constants if not already presentpkg/workflow/compiler_main_job_test.go— add regression tests for each built-in job name
Acceptance Criteria
- Setting
jobs.activation.pre-stepsdoes not produce duplicateneeds: [activation, activation]inagent - Setting
jobs.agent.pre-stepsdoes not produce a self-cycleneeds: [agent] - Setting
jobs.safe_outputs.pre-stepsdoes not create a dependency cycle - Setting
jobs.conclusion.pre-stepsdoes not create a dependency cycle - All built-in job names are excluded from the dependency-addition loop
- Regression tests added for each built-in job name's
pre-stepsscenario -
make agent-finishpasses
Related to on.github-app credentials cannot be sourced from a custom job's outputs (jobs.{pre_activation,activation}.pre-steps splicing/needs bugs + missing on.needs API) #27670
Generated by Plan Command for issue #27670 · ● 242.8K · ◷
- expires on Apr 24, 2026, 2:47 AM UTC
Activity
github-actions commentedon Apr 22, 2026
🍪 *Issue Monster selected this for Copilotecho BEGIN___COMMAND_OUTPUT_MARKER ; PS1= ; PS2= ; unset HISTFILE ; EC=0 ; echo ___BEGIN___COMMAND_DONE_MARKER___0 ; }
I've identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.
If assignment succeeds, the Copilot coding agent will analyze the issue and create a pull request with the fix.
Om nom nom! 🍪
Caution
Security scanning requires review for Issue Monster
Details
Potential security threats were detected in the agent output. The workflow output should be reviewed before merging.
Review the workflow run logs for details.