Skip to content
Draft
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
22 changes: 20 additions & 2 deletions .github/actions/install-agent-harnesses/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,18 @@ inputs:
description: Full BC-ALAgents commit SHA (blank uses the default pin)
required: false
default: ""
copilot-version:
description: GitHub Copilot CLI version (defaults to 1.0.82)
required: false
default: "1.0.82"

outputs:
bc-alagents-path:
description: Path to the pinned BC-ALAgents checkout
value: ${{ steps.bc-alagents-path.outputs.path }}
copilot-version:
description: Installed GitHub Copilot CLI version
value: ${{ steps.copilot-version.outputs.version }}

runs:
using: composite
Expand All @@ -24,7 +31,7 @@ runs:
id: engine-sha
shell: pwsh
env:
ENGINE_SHA: ${{ inputs.engine-sha || 'ecf8e31759d6ddd6d78e3a0b7836b40134368009' }}
ENGINE_SHA: ${{ inputs.engine-sha || 'da9236a6f43d47c37e0bd59ebced33b6fe73f277' }}
run: |
if ($env:ENGINE_SHA -notmatch '\A[0-9a-fA-F]{40}\z') {
throw "engine-sha must be a full 40-character hexadecimal commit SHA."
Expand All @@ -35,8 +42,19 @@ runs:
run: npm install -g @anthropic-ai/claude-code@2.1.221
shell: pwsh

- name: Validate GitHub Copilot CLI version
id: copilot-version
shell: pwsh
env:
COPILOT_VERSION: ${{ inputs.copilot-version }}
run: |
if ($env:COPILOT_VERSION -notmatch '\A\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?\z') {
throw "copilot-version must be a pinned semantic version."
}
"version=$env:COPILOT_VERSION" >> $env:GITHUB_OUTPUT

- name: Install GitHub Copilot CLI
run: npm install -g @github/copilot@1.0.82
run: npm install -g @github/copilot@${{ steps.copilot-version.outputs.version }}
shell: pwsh

- name: Checkout BC-ALAgents
Expand Down
69 changes: 61 additions & 8 deletions .github/workflows/pr-review-evaluation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,37 @@ on:
model:
description: "Copilot model used internally by BC PR Review"
required: false
default: "gpt-5.6-luna"
default: "gpt-5.6-sol"
type: choice
options:
- "claude-sonnet-5"
- "claude-opus-5"
- "gpt-5.4"
- "gpt-5.6-sol"
- "gpt-5.6-terra"
- "gpt-5.6-luna"
- "gpt-5.3-codex"
- "mai-code-1.1-flash"
- "gemini-3.7-flash"
leaf-model:
description: "Model requested for domain leaf agents"
required: false
default: "gpt-5.6-luna"
type: choice
options:
- "gpt-5.4"
- "gpt-5.6-luna"
- "mai-code-1.1-flash"
leaf-execution:
description: "Deterministic leaf scheduling mode"
required: false
default: "serial"
type: choice
options:
- "serial"
- "parallel"
max-leaf-concurrency:
description: "Maximum simultaneous leaves in parallel mode"
required: false
default: "4"
type: string
engine-sha:
description: "Full BC-ALAgents commit SHA (blank uses the default pin)"
required: false
Expand All @@ -46,6 +66,11 @@ on:
- "3"
- "4"
- "5"
entries:
description: "Optional JSON array of entry IDs for a focused experiment"
required: false
default: ""
type: string
git-ref:
description: "Branch to record for experiment tracking (auto-filled on requeue; leave blank for manual runs)"
required: false
Expand Down Expand Up @@ -95,7 +120,7 @@ jobs:
fail-fast: false
max-parallel: 64
matrix:
entry: ${{ fromJson(needs.get-entries.outputs.entries) }}
entry: ${{ fromJson(inputs.entries != '' && inputs.entries || needs.get-entries.outputs.entries) }}
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Expand All @@ -121,13 +146,18 @@ jobs:
uses: $/.github/actions/install-agent-harnesses
with:
engine-sha: ${{ inputs.engine-sha }}
copilot-version: "1.0.88"

- name: Run BC PR Review for entry ${{ matrix.entry }}
timeout-minutes: 120
shell: pwsh
env:
COPILOT_GITHUB_TOKEN: ${{ github.token }}
GH_TOKEN: ${{ github.token }}
COPILOT_REVIEW_CLI_VERSION: ${{ steps.install-harnesses.outputs.copilot-version }}
COPILOT_REVIEW_LEAF_MODEL: ${{ inputs.leaf-model }}
COPILOT_REVIEW_LEAF_EXECUTION: ${{ inputs.leaf-execution }}
COPILOT_REVIEW_MAX_LEAF_CONCURRENCY: ${{ inputs.max-leaf-concurrency }}
run: |
Write-Output "::add-mask::$env:COPILOT_GITHUB_TOKEN"

Expand All @@ -142,9 +172,32 @@ jobs:
if: always()
with:
name: evaluation-results-${{ github.run_id }}-${{ matrix.entry }}
path: ${{ env.EVALUATION_RESULTS_DIR }}/**/*.jsonl
path: |
${{ env.EVALUATION_RESULTS_DIR }}/**/*.jsonl
${{ env.EVALUATION_RESULTS_DIR }}/**/_run-manifest.json
retention-days: ${{ (inputs.test-run || inputs.modified-only) && 1 || 30 }}

- name: Upload allowlisted review diagnostics
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: always()
with:
name: review-diagnostics-${{ github.run_id }}-${{ matrix.entry }}
path: |
${{ env.EVALUATION_RESULTS_DIR }}/**/_run-manifest.json
${{ env.EVALUATION_RESULTS_DIR }}/**/_run-metrics.json
${{ env.EVALUATION_RESULTS_DIR }}/**/_review-report.json
${{ env.EVALUATION_RESULTS_DIR }}/**/al-code-review-findings.json
${{ env.EVALUATION_RESULTS_DIR }}/**/agent-output.txt
${{ env.EVALUATION_RESULTS_DIR }}/**/agent-transcript.log
${{ env.EVALUATION_RESULTS_DIR }}/**/leaf-results/*/stdout.txt
${{ env.EVALUATION_RESULTS_DIR }}/**/leaf-results/*/stderr.txt
${{ env.EVALUATION_RESULTS_DIR }}/**/_filter-report.json
${{ env.EVALUATION_RESULTS_DIR }}/**/bcquality/schemas/findings-report.schema.json
${{ steps.setup-env.outputs.repo_path }}/review.json
${{ steps.setup-env.outputs.repo_path }}/judge_results.json
if-no-files-found: warn
retention-days: 7

summarize-results:
needs: evaluate-with-pr-review
uses: $/.github/workflows/summarize-results.yml
Expand All @@ -157,7 +210,7 @@ jobs:
agent: "BC PR Review"
# Scores only the modified entries, so publishing it to Braintrust/Kusto or the
# leaderboard would record a partial corpus as a benchmark result.
mock: ${{ inputs.test-run || inputs.modified-only || inputs.engine-sha != '' }}
mock: ${{ inputs.test-run || inputs.modified-only || inputs.engine-sha != '' || inputs.entries != '' }}
category: code-review
git-ref: ${{ inputs.git-ref || github.ref_name }}
secrets: inherit
Expand All @@ -174,4 +227,4 @@ jobs:
repeat: ${{ inputs.repeat }}
existing-tag: ${{ needs.pin-commit.outputs.tag-name }}
workflow-inputs: |
{"model": "${{ inputs.model }}", "engine-sha": ${{ toJSON(inputs.engine-sha) }}, "test-run": "${{ inputs.test-run }}", "git-ref": "${{ inputs.git-ref || github.ref_name }}"}
{"model": "${{ inputs.model }}", "leaf-model": "${{ inputs.leaf-model }}", "leaf-execution": "${{ inputs.leaf-execution }}", "max-leaf-concurrency": "${{ inputs.max-leaf-concurrency }}", "engine-sha": ${{ toJSON(inputs.engine-sha) }}, "test-run": "${{ inputs.test-run }}", "entries": ${{ toJSON(inputs.entries) }}, "git-ref": "${{ inputs.git-ref || github.ref_name }}"}
Loading
Loading