Skip to content

Commit 992f2ff

Browse files
committed
Add lane-parallel ContextBench readiness workflow
1 parent 0f36a30 commit 992f2ff

1 file changed

Lines changed: 99 additions & 0 deletions

File tree

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
name: ContextBench Lane Readiness Matrix
2+
3+
on:
4+
push:
5+
branches: [master]
6+
paths:
7+
- .github/workflows/contextbench-lane-readiness.yml
8+
- scripts/contextbench-single-lane-candidate-pack.mjs
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
lane-readiness:
16+
runs-on: ubuntu-latest
17+
timeout-minutes: 50
18+
strategy:
19+
fail-fast: false
20+
max-parallel: 5
21+
matrix:
22+
lane:
23+
- raw-native
24+
- codebase-context
25+
- codebase-memory-mcp
26+
- grepai
27+
- codegraphcontext
28+
env:
29+
ROOT: /tmp/contextbench-lane-readiness/${{ matrix.lane }}
30+
TASK_PAYLOADS: /tmp/contextbench-lane-readiness/${{ matrix.lane }}/task-payloads.json
31+
CHECKOUT_ROOT: /tmp/contextbench-checkouts-${{ matrix.lane }}
32+
CBM_BIN: /tmp/contextbench-lane-readiness/${{ matrix.lane }}/tool/codebase-memory-mcp
33+
TARGET_TASK_ID: SWE-Bench-Pro__go__maintenance__bugfix__4df06349
34+
LANE_ID: ${{ matrix.lane }}
35+
steps:
36+
- uses: actions/checkout@v4
37+
- uses: pnpm/action-setup@v2
38+
with:
39+
version: 10
40+
- uses: actions/setup-node@v4
41+
with:
42+
node-version: '24'
43+
cache: pnpm
44+
- uses: actions/setup-python@v5
45+
with:
46+
python-version: '3.11'
47+
- name: Install shared setup and materialize selected Go task
48+
shell: bash
49+
run: |
50+
set -euo pipefail
51+
mkdir -p "$ROOT" "$CHECKOUT_ROOT" "$ROOT/tool" "$ROOT/logs"
52+
pnpm install --frozen-lockfile > "$ROOT/logs/pnpm-install.log" 2>&1
53+
python -m pip install "tree-sitter==0.20.4" "tree-sitter-languages==1.10.2" datasets pyarrow > "$ROOT/logs/pip-shared.log" 2>&1
54+
node scripts/contextbench-runner.mjs --validate-fixtures > "$ROOT/logs/validate-fixtures.log" 2>&1
55+
node scripts/contextbench-select-slice.mjs --write-task-payloads --out "$TASK_PAYLOADS.all" --checkout-root "$CHECKOUT_ROOT" > "$ROOT/logs/write-payloads.log" 2>&1
56+
node - <<'NODE'
57+
const fs = require('node:fs');
58+
const payloadPath = process.env.TASK_PAYLOADS;
59+
const target = process.env.TARGET_TASK_ID;
60+
const payload = JSON.parse(fs.readFileSync(`${payloadPath}.all`, 'utf8'));
61+
const task = payload.tasks.find((candidate) => candidate.instance_id === target);
62+
if (!task) throw new Error(`target task ${target} not found`);
63+
fs.writeFileSync(payloadPath, `${JSON.stringify({ ...payload, task_count: 1, tasks: [task] }, null, 2)}\n`);
64+
NODE
65+
node scripts/contextbench-select-slice.mjs --materialize-checkouts --payloads "$TASK_PAYLOADS" --max-tasks 1 > "$ROOT/logs/materialize.log" 2>&1
66+
- name: Build codebase-context lane
67+
if: matrix.lane == 'codebase-context'
68+
shell: bash
69+
run: pnpm run build > "$ROOT/logs/build.log" 2>&1
70+
- name: Install codebase-memory-mcp lane
71+
if: matrix.lane == 'codebase-memory-mcp'
72+
shell: bash
73+
run: |
74+
set -euo pipefail
75+
curl -fsSL "https://github.com/DeusData/codebase-memory-mcp/releases/download/v0.6.1/codebase-memory-mcp-linux-amd64.tar.gz" -o "$ROOT/tool/cbm.tar.gz"
76+
tar -xzf "$ROOT/tool/cbm.tar.gz" -C "$ROOT/tool"
77+
chmod +x "$CBM_BIN" || true
78+
- name: Install grepai lane
79+
if: matrix.lane == 'grepai'
80+
shell: bash
81+
run: |
82+
set -euo pipefail
83+
curl -sSL https://raw.githubusercontent.com/yoanbernabeu/grepai/main/install.sh | sh > "$ROOT/logs/grepai-install.log" 2>&1 || true
84+
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
85+
echo "$HOME/bin" >> "$GITHUB_PATH"
86+
- name: Install codegraphcontext lane
87+
if: matrix.lane == 'codegraphcontext'
88+
shell: bash
89+
run: python -m pip install uv codegraphcontext kuzu > "$ROOT/logs/pip-codegraphcontext.log" 2>&1
90+
- name: Generate lane readiness candidate pack
91+
shell: bash
92+
run: node scripts/contextbench-single-lane-candidate-pack.mjs
93+
- name: Upload lane readiness artifacts
94+
if: always()
95+
uses: actions/upload-artifact@v4
96+
with:
97+
name: contextbench-lane-readiness-${{ matrix.lane }}
98+
path: /tmp/contextbench-lane-readiness/${{ matrix.lane }}
99+
retention-days: 14

0 commit comments

Comments
 (0)