Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .github/actions/install-agent-harnesses/action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
name: Install Agent Harnesses
description: Install the agent harnesses used by the evaluation workflows

inputs:
bc-alagents-ref:
description: >-
BC-ALAgents ref to evaluate. Leave empty to use the pinned baseline.
Override it to score an engine branch before it merges - for example a
branch whose bcquality.config.yaml points at an unmerged BCQuality PR.
required: false
default: ""

outputs:
bc-alagents-path:
description: Path to the pinned BC-ALAgents checkout
Expand All @@ -21,7 +30,7 @@ runs:
uses: actions/checkout@v5
with:
repository: microsoft/BC-ALAgents
ref: e9d9249eaa25be88388b60106b4cbf8cd7aa8a7d
ref: ${{ inputs.bc-alagents-ref || 'e9d9249eaa25be88388b60106b4cbf8cd7aa8a7d' }}
path: .agent-harnesses/bc-alagents
persist-credentials: false

Expand Down
20 changes: 17 additions & 3 deletions .github/workflows/pr-review-evaluation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,19 @@ on:
required: false
default: ""
type: string
engine-ref:
description: "BC-ALAgents ref to evaluate (branch, tag, or SHA). Leave blank to use the pinned baseline engine."
required: false
default: ""
type: string
modified-only:
description: "Only evaluate dataset entries changed versus origin/main"
required: false
default: false
type: boolean

concurrency:
group: pr-review-evaluation-${{ inputs.test-run && 'test' || 'full' }}
group: pr-review-evaluation-${{ inputs.test-run && 'test' || inputs.modified-only && 'modified' || 'full' }}
cancel-in-progress: false

env:
Expand All @@ -62,6 +72,7 @@ jobs:
get-entries:
uses: $/.github/workflows/get-entries.yml
with:
modified-only: ${{ inputs.modified-only }}
test-run: ${{ inputs.test-run }}
category: code-review

Expand Down Expand Up @@ -111,6 +122,8 @@ jobs:
- name: Install evaluation CLIs
id: install-harnesses
uses: $/.github/actions/install-agent-harnesses
with:
bc-alagents-ref: ${{ inputs.engine-ref }}

- name: Run BC PR Review for entry ${{ matrix.entry }}
timeout-minutes: 120
Expand Down Expand Up @@ -148,11 +161,12 @@ jobs:
mock: ${{ inputs.test-run }}
category: code-review
git-ref: ${{ inputs.git-ref || github.ref_name }}
skip-leaderboard: ${{ inputs.modified-only }}
secrets: inherit

requeue:
needs: [summarize-results, pin-commit]
if: ${{ !cancelled() && !failure() && !inputs.test-run }}
if: ${{ !cancelled() && !failure() && !inputs.test-run && !inputs.modified-only }}
uses: $/.github/workflows/requeue-evaluation.yml
permissions:
contents: write
Expand All @@ -162,4 +176,4 @@ jobs:
repeat: ${{ inputs.repeat }}
existing-tag: ${{ needs.pin-commit.outputs.tag-name }}
workflow-inputs: |
{"model": "${{ inputs.model }}", "test-run": "${{ inputs.test-run }}", "git-ref": "${{ inputs.git-ref || github.ref_name }}"}
{"model": "${{ inputs.model }}", "test-run": "${{ inputs.test-run }}", "git-ref": "${{ inputs.git-ref || github.ref_name }}", "engine-ref": "${{ inputs.engine-ref }}"}
4 changes: 2 additions & 2 deletions tests/test_review_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def test_pr_review_workflow_is_fixed_to_code_review() -> None:
assert "mai-code-1-flash-picker" not in workflow
assert '"gemini-3.7-flash"' in workflow
assert "gemini-3.6-flash" not in workflow
for input_name in ("model:", "test-run:", "repeat:", "git-ref:"):
for input_name in ("model:", "test-run:", "repeat:", "git-ref:", "engine-ref:", "modified-only:"):
assert input_name in workflow


Expand All @@ -63,5 +63,5 @@ def test_agent_harness_action_pins_and_exports_bc_alagents() -> None:
action = (ACTIONS / "install-agent-harnesses" / "action.yml").read_text(encoding="utf-8")

assert "repository: microsoft/BC-ALAgents" in action
assert "ref: e9d9249eaa25be88388b60106b4cbf8cd7aa8a7d" in action
assert "inputs.bc-alagents-ref || 'e9d9249eaa25be88388b60106b4cbf8cd7aa8a7d'" in action
assert "bc-alagents-path:" in action
Loading