A repository adds this workflow to validate whether Copilot-created pull requests include a structured plan file. Evaluate the following statements. 1. The workflow can validate that a Copilot PR includes a structured plan file. 2. The workflow prevents Copilot from modifying files before writing the plan. 3. Non-Copilot pull requests skip this job because of the actor condition.
name: agent-plan-check
on:
pull_request:
types:
- opened
- synchronize
permissions:
contents: read
pull-requests: read
jobs:
check-plan:
if: github.actor == 'github-copilot[bot]'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Validate agent plan
run: |
test -f agent-plan.json
jq -e '
.goal and
.reasoning_summary and
.planned_steps and
.files_to_change and
.validation
' agent-plan.jsonChoose an answer
Tap an option to check your answer.
Correct answer: 1=Yes 2=No 3=Yes.
Why this is the answer
Statement 1 is correct. The workflow explicitly checks for the existence of agent-plan.json and then uses jq to validate its structure, ensuring it contains specific keys like goal and plannedsteps. This directly validates the presence and structure of a plan file. Statement 2 is incorrect. GitHub Actions workflows trigger after a pull request is opened or synchronized. This means Copilot has already created the pull request and potentially modified files before this workflow even starts. The workflow cannot prevent Copilot from acting; it can only react to the actions taken. Statement 3 is correct. The if: github.actor == 'github-copilot[bot]' condition ensures that the check-plan job only runs if the pull request was created by the github-copilot[bot] actor. Any pull request opened by a human user or another bot will skip this job entirely.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed