name: Retrieval Perf Gate
on:
pull_request:
branches: [main]
push:
branches: [main]
workflow_dispatch:
jobs:
retrieval-perf-gate:
runs-on: ubuntu-latest
timeout-minutes: 30
env:
DOCLEA_PERF_GATE_MAX_P95_MS: "400"
DOCLEA_PERF_GATE_MAX_P95_RATIO: "8"
DOCLEA_PERF_GATE_STAGE_P95_MS_JSON: '{"rag":300,"kag":300,"graphrag":300,"tokenize":180}'
DOCLEA_PERF_COMPARE_MEMORY_ONLY: "true"
DOCLEA_PERF_HISTORY_ENABLED: "true"
DOCLEA_PERF_HISTORY_PATH: ".doclea/benchmarks/retrieval-history.jsonl"
DOCLEA_PERF_HISTORY_RETENTION: "120"
DOCLEA_PERF_HISTORY_COMPARE_LOOKBACK: "30"
DOCLEA_PERF_RUNS_PER_QUERY: "2"
DOCLEA_PERF_WARMUP_RUNS: "1"
DOCLEA_PERF_INCLUDE_CODE_GRAPH: "true"
DOCLEA_PERF_INCLUDE_GRAPHRAG: "true"
DOCLEA_PERF_QUERIES_JSON: '["What are our authentication decisions?","What calls validateToken?","What breaks if I change PaymentService?"]'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: "1.3.9"
- name: Cache HuggingFace Models
uses: actions/cache@v4
with:
path: ~/.cache/huggingface
key: hf-${{ runner.os }}-${{ hashFiles('bun.lock') }}
- name: Install Dependencies
run: bun install --frozen-lockfile
- name: Run Retrieval Perf Gate
run: bun run perf:retrieval-gate
- name: Upload Retrieval Benchmark History
if: always()
uses: actions/upload-artifact@v4
with:
name: retrieval-benchmark-history
path: .doclea/benchmarks/retrieval-history.jsonl
if-no-files-found: ignore