feat(tools): relay opt-in extension usage events and feedback to PostHog #616
All Vouch review confidence checks passed
Residual risk 0.41 = Change Risk (0.52) × (1 − Review Confidence (0.22)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 33% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #616"
general
weight: 0.35
claude[bot]
What does this PR change?
The site middleware on
blender.scenario.comnow relays the extension's opt-in usage events anduser-written feedback to PostHog, so the extension needs no vendor SDK and never holds the project
token (#128).
POST /telemetry/v1/eventsforwards only allowlisted events to PostHog's/batch/endpoint, with MCP events under PostHog's MCP analytics names.
POST /telemetry/v1/feedbacksendsa rating, message and optional email as a response to an API survey and answers within four
seconds. Both accept only small JSON from a
ScenarioBlender/User-Agent, rate-limit per IPv4address or IPv6 /64 in memory, and never reach GitHub Pages. Download counting is unchanged.
Events are anonymous:
distinct_idis the extension's random install ID, not linked to theScenario account (a decision taken while the maintainer was away, to confirm), with no person
profile and no GeoIP. PostHog's endpoints, survey fields and MCP property names were checked
against posthog-js, posthog-python, the PostHog server and posthog.com docs.
After merge:
1. In the PostHog project that receives
extension_downloaded, enable Surveys if needed, thencreate and launch an API survey with a rating question (scale 5), an open question "What should
we improve?" and an open question "Email, if you would like a reply (optional)", in that order.
2. Set
POSTHOG_FEEDBACK_SURVEY_IDto that survey's ID on the Vercel project and redeploy.3. Add a Vercel Firewall rate-limit rule on
/telemetry/, for example 120 requests a minute per IPaddress.
Known gap: the extension side and
docs/PRIVACY.mdfollow in a separate PR. Refs #128Validation
make lintpass; commands and results are listed below.make test-blenderagainst the exact packaged ZIP in an isolated profile; Blender/OS versions and results are listed.make build; the ZIP and dependency licenses were inspected.Commands and results:
pnpm exec tsc, the three site type-checks fromsite.yml: passednode --test tests/site/middleware.test.ts tests/site/handbook-search.test.ts(Node 24): 73 passedpnpm exec vitest run: 7 passedmake check-rules: passeduv run --locked --no-env-file python -m pytest tests/unit/test_house_rules.py tests/unit/test_workflows.py tests/unit/test_knowledge.py: 184 passedtools/check_knowledge.py --base origin/main: 0 errorsPublic content
Coding rules
scenario/coreremains free ofbpy; Blender operations stay on the main thread, and UI drawing does not mutate properties.Authorship and licensing
Written with Claude Code; the commits carry its co-author trailer.
🤖 Generated with Claude Code
<!-- CURSOR_SUMMARY -->
---
<!-- /CURSOR_SUMMARY -->