|
| 1 | +name: ContextBench Five Lane Candidates |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [master] |
| 6 | + paths: |
| 7 | + - .github/workflows/contextbench-five-lane-candidates.yml |
| 8 | + - scripts/contextbench-five-lane-candidate-pack.mjs |
| 9 | + workflow_dispatch: |
| 10 | + |
| 11 | +permissions: |
| 12 | + contents: read |
| 13 | + |
| 14 | +jobs: |
| 15 | + candidates: |
| 16 | + runs-on: ubuntu-latest |
| 17 | + timeout-minutes: 100 |
| 18 | + env: |
| 19 | + ROOT: /tmp/contextbench-five-lane-candidates |
| 20 | + TASK_PAYLOADS: /tmp/contextbench-five-lane-candidates/task-payloads.json |
| 21 | + CHECKOUT_ROOT: /tmp/contextbench-checkouts |
| 22 | + CBM_BIN: /tmp/contextbench-five-lane-candidates/tool/codebase-memory-mcp |
| 23 | + TARGET_TASK_ID: SWE-Bench-Pro__go__maintenance__bugfix__4df06349 |
| 24 | + steps: |
| 25 | + - uses: actions/checkout@v4 |
| 26 | + - uses: pnpm/action-setup@v2 |
| 27 | + with: |
| 28 | + version: 10 |
| 29 | + - uses: actions/setup-node@v4 |
| 30 | + with: |
| 31 | + node-version: '24' |
| 32 | + cache: pnpm |
| 33 | + - uses: actions/setup-python@v5 |
| 34 | + with: |
| 35 | + python-version: '3.11' |
| 36 | + - name: Install tools and materialize selected Go task quietly |
| 37 | + shell: bash |
| 38 | + run: | |
| 39 | + set -euo pipefail |
| 40 | + mkdir -p "$ROOT" "$CHECKOUT_ROOT" "$ROOT/tool" "$ROOT/logs" |
| 41 | + pnpm install --frozen-lockfile > "$ROOT/logs/pnpm-install.log" 2>&1 |
| 42 | + pnpm run build > "$ROOT/logs/build.log" 2>&1 |
| 43 | + python -m pip install "tree-sitter==0.20.4" "tree-sitter-languages==1.10.2" datasets pyarrow uv codegraphcontext kuzu > "$ROOT/logs/pip-install.log" 2>&1 |
| 44 | + 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" |
| 45 | + tar -xzf "$ROOT/tool/cbm.tar.gz" -C "$ROOT/tool" |
| 46 | + chmod +x "$CBM_BIN" || true |
| 47 | + curl -sSL https://raw.githubusercontent.com/yoanbernabeu/grepai/main/install.sh | sh > "$ROOT/logs/grepai-install.log" 2>&1 || true |
| 48 | + echo "$HOME/.local/bin" >> "$GITHUB_PATH" |
| 49 | + echo "$HOME/bin" >> "$GITHUB_PATH" |
| 50 | + node scripts/contextbench-runner.mjs --validate-fixtures > "$ROOT/logs/validate-fixtures.log" 2>&1 |
| 51 | + node scripts/contextbench-select-slice.mjs --write-task-payloads --out "$TASK_PAYLOADS.all" --checkout-root "$CHECKOUT_ROOT" > "$ROOT/logs/write-payloads.log" 2>&1 |
| 52 | + node - <<'NODE' |
| 53 | + const fs = require('node:fs'); |
| 54 | + const payloadPath = process.env.TASK_PAYLOADS; |
| 55 | + const target = process.env.TARGET_TASK_ID; |
| 56 | + const payload = JSON.parse(fs.readFileSync(`${payloadPath}.all`, 'utf8')); |
| 57 | + const task = payload.tasks.find((candidate) => candidate.instance_id === target); |
| 58 | + if (!task) throw new Error(`target task ${target} not found`); |
| 59 | + fs.writeFileSync(payloadPath, `${JSON.stringify({ ...payload, task_count: 1, tasks: [task] }, null, 2)}\n`); |
| 60 | + NODE |
| 61 | + node scripts/contextbench-select-slice.mjs --materialize-checkouts --payloads "$TASK_PAYLOADS" --max-tasks 1 > "$ROOT/logs/materialize.log" 2>&1 |
| 62 | + echo "five_lane_setup_completed" |
| 63 | + - name: Generate five-lane readiness candidate pack |
| 64 | + shell: bash |
| 65 | + run: node scripts/contextbench-five-lane-candidate-pack.mjs |
| 66 | + - name: Upload five-lane candidate artifacts |
| 67 | + if: always() |
| 68 | + uses: actions/upload-artifact@v4 |
| 69 | + with: |
| 70 | + name: contextbench-five-lane-candidates |
| 71 | + path: /tmp/contextbench-five-lane-candidates |
| 72 | + retention-days: 14 |
0 commit comments