mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-25 01:21:24 +01:00
Telemetry can count gstack's own use on Capy, opt-in and kept out of public numbers (GST-3311) (#4576)
Agent-driven Capy sessions still send no telemetry. If the owner's `preferences.yaml` holds `telemetry_capy: anonymous`, each skill run sends one anonymous row labelled `source=capy`, or `source=gt` from Garry's own machines. Why: we couldn't see our own gstack use on Capy, and if we had sent it, it would have been counted as real use. Nothing to do yet: nothing changes until the owner adds that line, and the ingest change ships in a separate deploy. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
87a473e5aa
commit
14a84980ee
15 files changed
+250
-19
No files matched your search
@@ -94,17 +94,21 @@ while [ $# -gt 0 ]; do
|
||||
done
|
||||
|
||||
# Source: flag > GSTACK_TELEMETRY_SOURCE > an eval run (the eval harness sets
|
||||
# EVALS_RUN_ID or GSTACK_EVAL_DIR) > CI > live. An explicit value always wins,
|
||||
# so CI=true never relabels a row a test marked source=test.
|
||||
# EVALS_RUN_ID or GSTACK_EVAL_DIR) > CI > Capy (GSTACK_CAPY=1, gstack's own
|
||||
# use on Capy: capy, or gt from the owner's preferences file, never free text)
|
||||
# > live. An explicit value always wins, so CI=true never relabels a row a test
|
||||
# marked source=test, and an eval lane on Capy stays eval.
|
||||
if [ -z "$SOURCE" ]; then
|
||||
if [ -n "${GSTACK_TELEMETRY_SOURCE:-}" ]; then SOURCE="$GSTACK_TELEMETRY_SOURCE"
|
||||
elif [ -n "${EVALS_RUN_ID:-}" ] || [ -n "${GSTACK_EVAL_DIR:-}" ]; then SOURCE="eval"
|
||||
elif [ "${CI:-}" = "true" ]; then SOURCE="ci"
|
||||
elif [ "${GSTACK_CAPY:-}" = "1" ]; then SOURCE="$("$GSTACK_DIR/bin/gstack-telemetry-tier" --source 2>/dev/null || echo capy)"
|
||||
else SOURCE="live"; fi
|
||||
fi
|
||||
|
||||
# ─── Read telemetry tier ─────────────────────────────────────
|
||||
TIER="$("$CONFIG_CMD" get telemetry 2>/dev/null || true)"
|
||||
# gstack-telemetry-tier adds the Capy opt-in to this machine's setting.
|
||||
TIER="$("$GSTACK_DIR/bin/gstack-telemetry-tier" 2>/dev/null || "$CONFIG_CMD" get telemetry 2>/dev/null || true)"
|
||||
TIER="${TIER:-off}"
|
||||
|
||||
# Validate tier
|
||||
|
||||
Reference in new issue
Block a user