feat: community mode + trustworthy telemetry (v0.12.0.0)#416
Open
feat: community mode + trustworthy telemetry (v0.12.0.0)#416
Conversation
Adds user_id, email, config/analytics/retro snapshots, and backup versioning to installations. Creates community_benchmarks table with public read + service-role write RLS. Foundation for authenticated backup and community intelligence features. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Two-path authentication: enter 6-digit code in terminal OR click magic link in email. Races both paths — whichever completes first wins. Saves JWT to ~/.gstack/auth-token.json with auto-refresh. Includes status and logout subcommands. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Three bug fixes: - Telemetry-sync now pings update_checks on successful event sync (previously only in gstack-update-check on cache-miss path) - community-pulse falls back to distinct session_id count when update_checks is empty - Dashboard queries session_id and shows unique session count Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- gstack-community-backup: syncs config/analytics/retro to Supabase using auth JWT, rate-limited to 30min intervals - gstack-community-restore: pulls backup from Supabase, merges with local state (local wins on conflicts), supports --dry-run - gstack-community-benchmarks: compares your per-skill duration avg against community median with delta percentages Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- community-benchmarks: computes per-skill median/p25/p75 duration,
total runs, and success rate from last 30 days of telemetry events.
Upserts into community_benchmarks table, cached 1 hour.
- community-recommendations: co-occurrence-based skill suggestions
("used by X% of /qa users"). Cached 24 hours.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Telemetry prompt now offers Community (backup/benchmarks/email), Anonymous, or Off. Community tier triggers gstack-auth OTP flow. Adds one-time upgrade prompt for existing anonymous users. Preamble emits EMAIL, COMM_PROMPTED, AUTH status vars. All 33 SKILL.md files regenerated for Claude Code + Codex/agents. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
E2E test runner now sets GSTACK_STATE_DIR to a temp directory so skill preamble telemetry goes to /tmp/ instead of ~/.gstack/. Prevents test runs from polluting production Supabase with fake crash events (was causing 252 spurious "timeout" crashes from a single test session). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds error_message (max 200 chars, e.g. "bun test: 3 tests failed") and failed_step (e.g. "run_tests", "create_pr") to telemetry events. Schema, ingest function, and local logger all updated. Makes crash reports actionable instead of just "timeout — 252 occurrences". Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Magic link requires matching the Supabase Site URL to a dynamic local port, which doesn't work reliably. OTP is the right UX for a CLI tool — user is already in a terminal, typing 6 digits is fast. Removes bun callback server, nc listener, port detection, and cleanup traps. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Crash clusters now grouped by error_class (not duplicated per version). Shows errors with skill, error class, count, failed step, example message, and unique session count — so you can tell if it's one user or widespread. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Epilogue now instructs Claude to classify errors (error_class from a defined taxonomy), write a one-line error_message, and identify the failed_step. All 33 SKILL.md files regenerated. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Accept main's generated SKILL.md files (will be regenerated by bun run build). Resolve gen-skill-docs.ts: keep community tier 3-option prompt from branch, keep error context fields from branch, add PLAN MODE EXCEPTION from main. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Resolve conflict in gen-skill-docs.ts by keeping both the detailed error field instructions (community-mode) and the new Plan Status Footer section (main). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ration guards - Add source field (live/test/dev) to telemetry pipeline: --source flag in gstack-telemetry-log, GSTACK_TELEMETRY_SOURCE env fallback, pass-through in telemetry-sync, source=eq.live filter on all dashboard queries - Replace SHA-256 installation_id with UUID install_fingerprint for all tiers (not just community). Expand-contract migration: ADD new column + trigger to copy installation_id, preserving backward compat with old clients - Fix duration bug: persist _TEL_START to file via $PPID (stable across bash blocks), cap durations at 86400s, reject negative values - Ungate update-check pings from telemetry=off — sends only version + OS + random UUID. Generate .install-id in update-check for telemetry=off users - Migration 003: source columns, install_fingerprint, duration CHECK constraint, indexes, recreated views with source filter, growth funnel (first-seen based), materialized views for daily installs + version adoption - E2E test isolation: session-runner sets GSTACK_TELEMETRY_SOURCE=test - 8 new telemetry tests (source field, duration caps, fingerprint persistence) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Regenerated via bun run gen:skill-docs. Preamble now persists TEL_START and SESSION_ID to $PPID files + echoes them. Epilogue reads from files and passes --source flag. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- install.sh: curl-pipe-bash installer with prereq checks (git, bun), upgrade detection (git pull if already installed), transparency note about update-check pings - setup: add install ping at end (gstack-update-check --force) to register day-zero installs in Supabase - Install ping only in setup (not install.sh) to avoid double-counting (Codex review fix #7) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- community-benchmarks: add .eq("source", "live") to telemetry_events query
- community-pulse: use distinct install_fingerprint count instead of raw
count, add source=live filter to all queries
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Community tier auth, backup/restore, and test updates that were already on this branch before the telemetry sprint. Includes updated telemetry prompt test to match 3-option community tier flow. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add update-check transparency note to telemetry prompt (Codex fix #9): users see the disclosure about version pings at first telemetry prompt - Add one-liner install to README: bash <(curl -fsSL .../install.sh) alongside the existing Claude Code paste-in-terminal approach Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
telemetry-sync POSTs directly to Supabase REST API (/rest/v1/telemetry_events), not through this edge function. Two ingest paths = maintenance burden for zero value. Identified during eng review. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Community mode + trustworthy telemetry: source tagging, UUID fingerprinting, duration guards, growth funnel metrics, one-liner installer, edge function source filtering, dead code cleanup. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Resolve conflicts in VERSION, package.json, and CHANGELOG.md. Keep 0.12.0.0 version with community mode entry on top, followed by 0.11.12.0 and 0.11.11.0 entries from main. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
E2E Evals: ❌ FAIL77/113 tests passed | $19.69 total cost | 12 parallel runners
12x ubicloud-standard-2 (Docker: pre-baked toolchain + deps) | wall clock ≈ slowest suite Failures
|
Resolve conflicts from v0.11.13.0 merge (worktree isolation + resolver refactor). Keep 0.12.0.0 version, take main's modular gen-skill-docs resolvers, regenerate all SKILL.md files. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
live/test/dev) tags every event. All dashboard and edge function queries filtersource=live. E2E test noise (~230 of 232 events) is now separated from production data._TEL_STARTpersisted to file via$PPIDinstead of shell variable. Duration capped at 86,400s with CHECK constraint.bash <(curl -fsSL https://raw.githubusercontent.com/garrytan/gstack/main/install.sh)telemetry-ingestedge function.Reviews
Test Coverage
585 tests pass, 0 failures. 8 new telemetry tests covering source field, duration validation, UUID fingerprint generation/persistence, backward-compat field mapping.
Pre-Landing Review
No issues found (review at commit b437b53).
Deployment Notes
Requires Supabase admin access (manual steps):
UPDATE telemetry_events SET duration_s = NULL WHERE duration_s > 86400 OR duration_s < 0supabase/migrations/003_source_and_guards.sql)Test plan
installation_idmapped toinstall_fingerprintin sync🤖 Generated with Claude Code