A workflow is intended to allow agent-assisted validation only in octo-org/payments-api. The same workflow file was copied into octo-org/web-portal. A Copilot-created pull request in web-portal fails immediately. Which option best explains the failure? Select one answer.
Workflow: validate-agent-scope
Event: pull_request
Repository: octo-org/web-portal
Actor: github-copilot[bot]
Run test "${GITHUB_REPOSITORY}" = "octo-org/payments-api"
+ test octo-org/web-portal = octo-org/payments-api
Error: Process completed with exit code 1.
Job conclusion: failureChoose an answer
Tap an option to check your answer.
Correct answer: The repository guard rejected this run.
Why this is the answer
The workflow explicitly checks if GITHUBREPOSITORY equals octo-org/payments-api. When this workflow runs in octo-org/web-portal, the condition octo-org/web-portal = octo-org/payments-api evaluates to false. The test command exits with a non-zero status (exit code 1) because the comparison fails, causing the job to fail immediately. This acts as a "repository guard," preventing the workflow from executing its intended logic in repositories other than octo-org/payments-api. The actor (github-copilot[bot]) can run pull request workflows. Branch protection rules are not shown and wouldn't cause a direct workflow step failure like this. The workflow's permissions are not the issue; the failure occurs due to a conditional check within the workflow itself.
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