Skip to content

refactor(code): agent loop inference/executor seams + Linear telemetry #13

refactor(code): agent loop inference/executor seams + Linear telemetry

refactor(code): agent loop inference/executor seams + Linear telemetry #13

Workflow file for this run

name: CI
on:
push:
branches: [main, master]
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.22"
- name: Test (Unit, Snapshot, and E2E)
env:
TERM: xterm-256color
run: |
go test -race -count=1 -v -coverprofile=coverage.out -covermode=atomic ./...
go tool cover -func=coverage.out | grep total
- name: Build
env:
CGO_ENABLED: "0"
run: go build -o /tmp/drover-code ./cmd/drover-code
- name: Upload coverage artefact
uses: actions/upload-artifact@v4
with:
name: coverage-${{ github.run_id }}
path: coverage.out
retention-days: 7
quality-gate:
name: Quality Gate (CRAP)
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download coverage artefact
uses: actions/download-artifact@v4
with:
name: coverage-${{ github.run_id }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Run quality gate
run: |
python3 scripts/quality-gate.py . \
--coverage coverage.out \
--limit 10000
fuzz:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.22"
- name: Fuzz (30s per target)
env:
CGO_ENABLED: "0"
run: |
set -e
run_fuzz() {
echo "== $1 =="
# -timeout must exceed -fuzztime so the coordinator can stop workers
# cleanly (avoids "context deadline exceeded" on some platforms).
go test -timeout=120s ./"$2" -fuzz="$3" -fuzztime=30s -fuzzminimizetime=5s
}
run_fuzz api internal/api FuzzStreamNext
run_fuzz safepath internal/tools/toolutil FuzzSafePath
run_fuzz extractJSON internal/coordinator FuzzExtractJSON
run_fuzz parseWebhook internal/github FuzzParseWebhook
run_fuzz extractMention internal/github FuzzExtractMention
run_fuzz mergeInto internal/config FuzzMergeInto
run_fuzz parseCLIFlags cmd/drover-code FuzzParseCLIFlags
run_fuzz convo internal/convo FuzzConvoManager
run_fuzz registryExecute internal/tools FuzzRegistryExecute
run_fuzz undercoverDomain internal/undercover FuzzIsInternalDomain
run_fuzz tuiPermPrompt internal/tui FuzzModel_permissionPromptKeys
run_fuzz tuiPermBatch internal/tui FuzzModel_permissionBatchKeys
run_fuzz parseExecStream internal/tools/ukc FuzzParseExecStream
run_fuzz templateExpander internal/commands FuzzTemplateExpander
run_fuzz parseMarkdownCmd internal/commands FuzzParseMarkdownCommand