Files
jepa-fx-risk/.gitea/workflows/autoresearch.yml
T
mathiasandClaude Sonnet 4.6 54b1bc216d
CD / Lint / Test / Vet (push) Failing after 3s
CD / Build & Import (push) Has been skipped
CD / Deploy via GitOps (push) Has been skipped
feat(ci): Gitea Actions workflow for autoresearch loop (Phase A automation)
workflow_dispatch with inputs: fixture, rq_id, iters, model override.
- Scaffolds run dir from fixtures/<fixture>.json via autoresearch_start.py
- Runs loop.py with LITELLM_KEY/LITELLM_BASE/NTFY_URL secrets
- Uploads STATUS.md + metrics.json + program.md as artifacts (30-day retention)
- Cleans stale run dir at start; venv created/reused per runner workspace
- timeout-minutes: 90 to cover multi-iter runs

Phase B (k8s Job + GPU isolation) tracked in jepa-fx-risk#15.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 17:20:44 +02:00

74 lines
2.2 KiB
YAML

name: Autoresearch Loop
on:
workflow_dispatch:
inputs:
fixture:
description: 'Fixture name in fixtures/ (without .json)'
required: true
default: 'phase-a-toy'
rq_id:
description: 'Run ID — defaults to fixture name if blank'
required: false
default: ''
iters:
description: 'Max iterations'
required: false
default: '3'
model:
description: 'LiteLLM model override (leave blank for default berget/gemma4-31b)'
required: false
default: ''
jobs:
run:
name: Autoresearch — ${{ inputs.fixture }}
runs-on: self-hosted
timeout-minutes: 90
steps:
- uses: actions/checkout@v4
- name: Resolve run ID
id: vars
run: |
RQ_ID="${{ inputs.rq_id }}"
[ -z "$RQ_ID" ] && RQ_ID="${{ inputs.fixture }}"
echo "rq_id=$RQ_ID" >> "$GITHUB_OUTPUT"
- name: Clean stale run dir
run: rm -rf "runs/${{ steps.vars.outputs.rq_id }}"
- name: Set up Python venv
run: |
[ -d .venv ] || python3 -m venv .venv
.venv/bin/pip install -q -r requirements.txt
- name: Scaffold run dir
run: |
.venv/bin/python scripts/autoresearch_start.py \
"fixtures/${{ inputs.fixture }}.json" \
"${{ steps.vars.outputs.rq_id }}"
- name: Run autoresearch loop
env:
LITELLM_KEY: ${{ secrets.LITELLM_KEY }}
LITELLM_BASE: ${{ secrets.LITELLM_BASE }}
NTFY_URL: ${{ secrets.NTFY_URL }}
LOOP_MODEL: ${{ inputs.model }}
run: |
ARGS="--run-dir runs/${{ steps.vars.outputs.rq_id }} --iters ${{ inputs.iters }}"
[ -n "${{ inputs.model }}" ] && ARGS="$ARGS --model ${{ inputs.model }}"
.venv/bin/python loop.py $ARGS
- name: Upload run artifacts
if: always()
uses: https://gitea.com/actions/upload-artifact@v4
with:
name: run-${{ steps.vars.outputs.rq_id }}-${{ github.run_number }}
path: |
runs/${{ steps.vars.outputs.rq_id }}/STATUS.md
runs/${{ steps.vars.outputs.rq_id }}/metrics.json
runs/${{ steps.vars.outputs.rq_id }}/program.md
retention-days: 30