A multi-agent workflow runs three jobs: Copilot-generated code validation, documentation validation, and an evaluation summary. The team wants the summary job to identify partial completion when one validation path fails. Evaluate the following statements. 1. The summary job can still run when code-agent-validation fails. 2. The summary job can read both upstream job results through the needs context. 3. The workflow proves that the Copilot-generated code is ready to merge.
name: coordinated-agent-evaluation
on:
pull_request:
branches:
- main
jobs:
code-agent-validation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm test
docs-agent-validation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm run lint:docs
evaluation-summary:
runs-on: ubuntu-latest
needs:
- code-agent-validation
- docs-agent-validation
if: ${{ !cancelled() }}
steps:
- name: Summarize coordination state
run: |
echo "code=${{ needs.code-agent-validation.result }}"
echo "docs=${{ needs.docs-agent-validation.result }}"Choose an answer
Tap an option to check your answer.
Correct answer: 1=Yes 2=Yes 3=No.
Why this is the answer
Statement 1 is correct because the evaluation-summary job's if: ${{ !cancelled() }} condition allows it to run even if an upstream job fails, as long as the workflow itself isn't canceled. This enables partial completion reporting. Statement 2 is correct because the needs context explicitly allows downstream jobs to access the results of upstream jobs, as demonstrated by needs.code-agent-validation.result and needs.docs-agent-validation.result in the summary job. Statement 3 is incorrect. The workflow only validates the code and documentation; it doesn't guarantee the code is ready to merge. Other factors, like human review or additional tests, are typically required.
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