Repository navigation
Conversation
Relay PostHog events (downloads, installs, sessions, viewers, MCP results) stopped at 2026-09-23 17:11 UTC, four minutes after the 0.23.1 release, and have not come back through 0.23.3. The capture code is unchanged since the last good release; the relay only sends when vars.POSTHOG_ENABLED is "1", and Wrangler replaces every Worker var on deploy. The production config used since 0.23.1 leaves the flag out, so relay analytics turned off silently while the accounts app, whose flag is committed, kept reporting. The production guard now requires POSTHOG_ENABLED to be "0" or "1", as it already does for MCP_CONTROL_ENABLED, so the choice is always written down. The example config sets it to "0" so self-hosters see the flag. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ScihqCEjAhjFfkvfSR3ZXN
This was referenced Sep 29, 2026
Contributor
Author
|
Combined into #285, with the other open fixes and the two flaky CI checks fixed. |
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.
What changes for the user?
Since 23 September at 17:11 UTC, the relay has sent nothing to PostHog: no downloads, installs, sessions, viewers or MCP results. That was four minutes after Release 0.23.1 (#250) landed, and it has stayed that way through 0.23.3. Over the same period the accounts app kept reporting normally, about 235–325k
service_requestevents a day.The capture code hasn't changed since the last good release (
558c3b4..maintouches no capture path inshared/posthog.tsorworker/index.ts). The relay only sends whenvars.POSTHOG_ENABLED === "1", and that flag exists only in the privatewrangler.production.jsonc. Wrangler replaces every Worker variable on deploy, so the production config used since 0.23.1 leaves the flag out and relay analytics switched off without any error. The app worker wasn't affected because its flag is committed inapp/wrangler.jsonc.Changes:
validateProductionConfignow refuses a config unlessvars.POSTHOG_ENABLEDis exactly"0"or"1".MCP_CONTROL_ENABLEDalready gets the same explicit-setting check.wrangler.example.jsoncsets"POSTHOG_ENABLED": "0", so self-hosters see the flag and still send nothing.docs/self-hosting.mdandCHANGELOG.mdexplain the requirement and the failure it prevents.Verification
npx vitest run tests/production-deploy.test.ts: 16 passed. With the guard removed fromdeploy-production.mjs, the 5 new regression cases fail (missing flag,"","true","yes", numeric1).npx vitest run: 66 files, 756 tests passed.npm run typecheck: passed.sh ./scripts/test-deploy-production.sh: passed.Access and privacy
No change to authorization, terminal input, encryption or stored content. This PR changes only whether a deploy is allowed to go ahead; the analytics payloads are untouched.
Rollout
Source only. This PR does not bring relay analytics back by itself. Whoever deploys production needs to add
"POSTHOG_ENABLED": "1"to thevarsin their privatewrangler.production.jsoncand runnpm run deploy:productionagain. After this PR, a deploy without the flag is refused instead of silently turning analytics off.🤖 Generated with Claude Code
https://claude.ai/code/session_01ScihqCEjAhjFfkvfSR3ZXN