mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-25 09:31:43 +01:00
Reader subagents on Capy stop sending telemetry, error runs report their error class, and test fixtures stop reading the owner's settings (#4597)
On a Capy machine, a shell that never loaded gstack's launch file (such as a review subagent's) now sends no usage data instead of falling back to the machine setting, as the privacy doc already promised. Error runs now fill the existing error_class field from their exit reason, and each setup step and outcome is reported at most once a day per install, so a loop rerunning setup no longer floods the counts. Tests no longer inherit the owner's preferences file, skill loadout or plugin state, which caused false failures. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> Review-Finding: p1/red-team#1 reader=red-team Review-Finding: p1/specialist-batched#1 reader=testing Review-Finding: p1/outside-voice#1 reader=outside-voice
This commit is contained in:
1 parent
09bd0fad0f
commit
19069a9810
13 files changed
+140
-8
No files matched your search
@@ -123,6 +123,17 @@ if [ "$TIER" = "off" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# One row per onboarding step and outcome per install a day: setup sends its step on
|
||||
# every run, so anything rerunning ./setup in a loop repeated it hundreds of times an hour.
|
||||
# The day's marker is claimed with noclobber (O_EXCL), so concurrent runs send it once.
|
||||
if [ "$EVENT_TYPE" = "onboarding" ]; then
|
||||
OB_NAME="$(printf '%s' "$SKILL" | tr -cd 'A-Za-z0-9_-')--$(printf '%s' "$OUTCOME" | tr -cd 'A-Za-z0-9_-')"
|
||||
OB_MARKER="$ANALYTICS_DIR/.onboarding-$OB_NAME-$(date -u +%Y-%m-%d)"
|
||||
mkdir -p "$ANALYTICS_DIR" 2>/dev/null
|
||||
( set -C; : > "$OB_MARKER" ) 2>/dev/null || exit 0 # best-effort: another run already recorded this step today
|
||||
for _ob in "$ANALYTICS_DIR"/.onboarding-"$OB_NAME"-[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]; do [ "$_ob" = "$OB_MARKER" ] || rm -f "$_ob"; done
|
||||
fi
|
||||
|
||||
# ─── Finalize stale .pending markers ────────────────────────
|
||||
# Each session gets its own .pending-$SESSION_ID file to avoid races
|
||||
# between concurrent sessions. Finalize any that don't match our session.
|
||||
|
||||
Reference in new issue
Block a user