feat: optional findings telemetry — emit runs+findings to a gadfly-reports store
Build & push image / build-and-push (push) Successful in 8s
Build & push image / build-and-push (push) Successful in 8s
After each review the binary POSTs the run + its heuristically-extracted findings to GADFLY_FINDINGS_URL (off unless set). Advisory: any error only goes to stderr — never touches stdout, the exit code, or the review. stdlib net/http only (no new deps). entrypoint.sh derives GADFLY_REPO/GADFLY_PR and passes through GADFLY_FINDINGS_URL/GADFLY_FINDINGS_TOKEN. Also renames store references from the old 'docket' name to 'gadfly-reports'. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -39,6 +39,9 @@
|
||||
# GADFLY_TRIGGER_PHRASE comment phrase that triggers a re-review (default "@gadfly review")
|
||||
# GADFLY_ALLOWED_USERS comma-separated usernames allowed to comment-trigger;
|
||||
# empty => fall back to "is a repo collaborator"
|
||||
# GADFLY_FINDINGS_URL optional gadfly-reports store base URL; set to POST the run +
|
||||
# findings for model-quality tracking (off when empty)
|
||||
# GADFLY_FINDINGS_TOKEN optional bearer token for the gadfly-reports store
|
||||
set -uo pipefail
|
||||
|
||||
# One model by default: the specialist suite already provides breadth, so a
|
||||
@@ -124,6 +127,17 @@ log "cloning ${REPO_PATH} @ ${BRANCH}"
|
||||
git clone --depth=1 --branch "$BRANCH" "$CLONE_URL" "$REPO_DIR" 2>/dev/null \
|
||||
|| die "clone of ${REPO_PATH}@${BRANCH} failed"
|
||||
|
||||
# --- findings telemetry (optional) -----------------------------------------
|
||||
# Plumb the run context to the binary (inherited through run.sh and the gadfly
|
||||
# process env). The binary's emit is OFF unless GADFLY_FINDINGS_URL is set; when
|
||||
# set it POSTs the run + its findings to a gadfly-reports store. GADFLY_FINDINGS_URL /
|
||||
# GADFLY_FINDINGS_TOKEN come from the consumer's stub env and are re-exported so
|
||||
# they reach the binary even if unset (empty => disabled).
|
||||
export GADFLY_REPO="$REPO_PATH"
|
||||
export GADFLY_PR="$PR"
|
||||
export GADFLY_FINDINGS_URL="${GADFLY_FINDINGS_URL:-}"
|
||||
export GADFLY_FINDINGS_TOKEN="${GADFLY_FINDINGS_TOKEN:-}"
|
||||
|
||||
# --- review once per model, with per-provider concurrency -------------------
|
||||
# GADFLY_MODELS is the provider-agnostic name; OLLAMA_REVIEW_MODELS is a
|
||||
# back-compat alias. GADFLY_PROVIDER / GADFLY_BASE_URL / GADFLY_API_KEY and any
|
||||
|
||||
Reference in New Issue
Block a user