chore(experiments): stop exposing the superseded experiment settings - #104928
Conversation
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
😎 Stack merged successfully - details. |
🤖 CI report
|
| Root | Eager (shipped) | Δ vs base | Budget |
|---|---|---|---|
entry (logged-out pages, app bootstrap)src/index.tsx |
1.56 MiB · 22 files | no change | ████████░░ 84.6% of 1.84 MiB |
logged-out boot: index + App + bootApp (preloaded by every page, including /login)src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts |
3.56 MiB · 628 files | no change | █████████░ 88.3% of 4.03 MiB |
authenticated shell (every logged-in page)src/scenes/AuthenticatedShell.tsx |
8.42 MiB · 2,781 files | no change | █████████░ 88.6% of 9.51 MiB |
🟢 node_modules/monaco-editor/ stays out of src/index.tsx
🟢 src/lib/components/ActivityLog/describers stays out of src/index.tsx
🟢 [object Object] stays out of src/index.tsx
🟢 [object Object] stays out of src/index.tsx
🟢 node_modules/monaco-editor/ stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/layout/navigation-3000/navigationLogic.tsx stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/scenes/dashboard/dashboardLogic.tsx stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/lib/lemon-ui/LemonMarkdown/ stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/lib/components/RichContentEditor/ stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/lib/components/CodeSnippet/ stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/taxonomy/core-filter-definitions-by-group.json stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 node_modules/monaco-editor/ stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/lib/components/ActivityLog/describers stays out of src/scenes/AuthenticatedShell.tsx
🟢 [object Object] stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/scenes/session-recordings/player/sessionRecordingPlayerLogic.ts stays out of src/scenes/AuthenticatedShell.tsx
🟢 [object Object] stays out of src/scenes/AuthenticatedShell.tsx
🟢 [object Object] stays out of src/scenes/AuthenticatedShell.tsx
Largest files eagerly shipped from src/index.tsx
| Size | File |
|---|---|
| 126.8 KiB | ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js |
| 24.6 KiB | ../node_modules/.pnpm/buffer@6.0.3/node_modules/buffer/index.js |
| 6.3 KiB | ../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.production.min.js |
| 4.5 KiB | ../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/process.js |
| 3.9 KiB | ../node_modules/.pnpm/scheduler@0.23.2/node_modules/scheduler/cjs/scheduler.production.min.js |
| 1.4 KiB | ../node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/index.js |
| 1.3 KiB | src/index.tsx |
| 1.3 KiB | src/RootErrorBoundary.tsx |
| 912 B | ../node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/index.js |
| 854 B | src/scenes/ChunkLoadErrorBoundary.tsx |
Largest files eagerly shipped from src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
| Size | File |
|---|---|
| 301.9 KiB | ../node_modules/.pnpm/posthog-js@1.434.4_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs |
| 267.7 KiB | ../node_modules/.pnpm/@posthog+icons@0.38.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js |
| 126.8 KiB | ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js |
| 101.4 KiB | src/lib/api.ts |
| 83.5 KiB | src/products.tsx |
| 68.5 KiB | src/lib/lemon-ui/icons/icons.tsx |
| 63.4 KiB | src/lib/utils/eventUsageLogic.ts |
| 38.8 KiB | ../node_modules/.pnpm/@dnd-kit+core@6.0.8_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@dnd-kit/core/dist/core.esm.js |
| 33.9 KiB | ../node_modules/.pnpm/kea@4.0.0-pre.6_patch_hash=139b8d1f1304f9d9da452a9a1244c94ea679dbcb85687d8999563146879fb6f5_react@18.3.1/node_modules/kea/lib/index.cjs.js |
| 28.6 KiB | src/scenes/scenes.ts |
Largest files eagerly shipped from src/scenes/AuthenticatedShell.tsx
| Size | File |
|---|---|
| 301.9 KiB | ../node_modules/.pnpm/posthog-js@1.434.4_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs |
| 268.0 KiB | src/taxonomy/core-filter-definitions-by-group.json |
| 267.7 KiB | ../node_modules/.pnpm/@posthog+icons@0.38.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js |
| 153.8 KiB | ../node_modules/.pnpm/re2js@0.4.1/node_modules/re2js/build/index.esm.js |
| 126.8 KiB | ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js |
| 101.4 KiB | src/lib/api.ts |
| 98.4 KiB | ../packages/quill/packages/quill/dist/index.js |
| 93.3 KiB | ../node_modules/.pnpm/prosemirror-view@1.40.1/node_modules/prosemirror-view/dist/index.js |
| 90.6 KiB | ../node_modules/.pnpm/@tiptap+core@3.20.6_@tiptap+pm@3.20.6/node_modules/@tiptap/core/dist/index.js |
| 83.5 KiB | src/products.tsx |
Posted automatically by check-eager-graph · sizes are eager output bytes (shipped, post-tree-shake) from the esbuild metafile · part of #32479
✅ Toolbar bundle — eager 2.36 MiB within budget
What the toolbar ships to customer pages, measured from the esbuild output (minified, post-tree-shake). The eager set is the entry plus everything statically imported from it — fetched before any feature runs; deferred chunks load lazily. The eager guardrail is 5.72 MiB. Each output file must also stay below 10 MB, where CloudFront stops compressing it. The module boundary is enforced separately by check-toolbar-graph.
| Metric | Size | Δ vs base | Budget |
|---|---|---|---|
| Eager (shipped) entry + static imports |
2.36 MiB · 19 files | no change | ████░░░░░░ 41.2% of 5.72 MiB |
| Deferred (lazy) | 2.09 MiB · 44 files | no change | n/a — loads on demand |
Loader dist/toolbar.js |
1.2 KiB | no change | █░░░░░░░░░ 6.0% of 19.5 KiB |
Largest eagerly-shipped chunks
| Size | File |
|---|---|
| 784.0 KiB | dist/toolbar/toolbar-app-6ZSILWYF.css |
| 649.8 KiB | dist/toolbar/chunk-chunk-PHO72TIK.js |
| 483.6 KiB | dist/toolbar/chunk-chunk-ZRM62ERU.js |
| 138.1 KiB | dist/toolbar/chunk-chunk-CQPUOIWG.js |
| 131.8 KiB | dist/toolbar/chunk-chunk-FDH2IBXT.js |
| 75.1 KiB | dist/toolbar/toolbar-app-SBMRP3DJ.js |
| 69.0 KiB | dist/toolbar/chunk-chunk-TSAL54PB.js |
| 35.6 KiB | dist/toolbar/chunk-chunk-TA7IXF2V.js |
| 21.0 KiB | dist/toolbar/chunk-chunk-TPHCTPWU.js |
| 6.8 KiB | dist/toolbar/chunk-chunk-DV7IWQNF.js |
Posted automatically by check-toolbar-size · sizes are toolbar output bytes (shipped, post-tree-shake) from the esbuild metafile
✅ Dist folder size — 🟢 -5.3 KiB (-0.0%)
Total size of the built frontend/dist folder (all assets), compared against the base branch.
Total: 1517.10 MiB · 🟢 -5.3 KiB (-0.0%)
ℹ️ MCP UI apps size — 33 app(s), 17628.2 KB JS
Built size of each MCP UI app (main.js + styles.css).
| App | JS | CSS |
|---|---|---|
| debug | 597.8 KB | 196.2 KB |
| action | 454.1 KB | 196.2 KB |
| action-list | 564.1 KB | 196.2 KB |
| cohort | 453.1 KB | 196.2 KB |
| cohort-list | 563.1 KB | 196.2 KB |
| email-template | 452.9 KB | 196.2 KB |
| error-details | 469.1 KB | 196.2 KB |
| error-issue | 453.8 KB | 196.2 KB |
| error-issue-list | 564.0 KB | 196.2 KB |
| experiment | 561.2 KB | 196.2 KB |
| experiment-list | 564.9 KB | 196.2 KB |
| experiment-results | 566.2 KB | 196.2 KB |
| feature-flag | 566.7 KB | 196.2 KB |
| feature-flag-list | 570.5 KB | 196.2 KB |
| feature-flag-testing | 457.3 KB | 196.2 KB |
| inline-scan | 453.6 KB | 196.2 KB |
| insight-actors | 562.3 KB | 196.2 KB |
| invite-email-preview | 452.3 KB | 196.2 KB |
| llm-costs | 559.3 KB | 196.2 KB |
| session-recording | 454.9 KB | 196.2 KB |
| survey | 454.7 KB | 196.2 KB |
| survey-global-stats | 561.8 KB | 196.2 KB |
| survey-list | 564.8 KB | 196.2 KB |
| survey-stats | 561.8 KB | 196.2 KB |
| trace-span | 453.5 KB | 196.2 KB |
| trace-span-list | 564.0 KB | 196.2 KB |
| vision-observation-list | 563.2 KB | 196.2 KB |
| workflow | 453.4 KB | 196.2 KB |
| workflow-list | 563.5 KB | 196.2 KB |
| loops-review | 457.8 KB | 196.2 KB |
| query-results | 774.0 KB | 196.2 KB |
| render-ui | 856.5 KB | 196.2 KB |
| visual-review-snapshots | 457.9 KB | 196.2 KB |
|
The behavior change appears safe, but the repository-required desktop API client regeneration must be committed before merging. Reviews (1) · Last reviewed commit: "chore(experiments): stop exposing the su..." |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: PostHog/posthog/.coderabbit.yaml Review profile: QUIET Plan: Enterprise Run ID: ⛔ Files ignored due to path filters (5)
📒 Files selected for processing (11)
💤 Files with no reviewable changes (11)
Included review availability: Your plan provides up to 12 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe default experiment statistics method field was removed from frontend organization types and update payloads, the organization serializer, and generated MCP organization interfaces. The mock organization and MCP organization fixtures no longer include the field. The organization ClickHouse mirror no longer selects or defines it. The activity-log display-name override and its field-specific test were removed. Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to The obsolete organization field is removed as intended. Experiment settings remain available through the project configuration endpoint, and no merge-blocking issue was identified. 🚥 Pre-merge checks | ✅ 1✅ Passed checks (1 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
👋 Visual changes detected for this PR. Review and approve in PostHog Visual Review If these changes are unexpected, they may be caused by a flaky test or a broken snapshot on master. Don't approve — rerun the job or wait for a fix. |
|
🦔 Hogbox preview · ✅ ready▶ Open the preview
commit |
There was a problem hiding this comment.
Not approved — escalated to a human reviewer.
Re-add the stamphog label to request another review once you have addressed this.
This drops a field from the public organization API — risky territory — with zero human or agent-review approvals and cross-team, only-moderate-familiarity authorship, so there's no independent assurance to rely on. Greptile also flagged that the desktop API client's generated file needs regeneration, and a grep confirms products/desktop/packages/api-client/src/generated.ts still references the removed field, so that concern looks unaddressed.
- Author wrote 4% of the modified lines and has 134 merged PRs in these paths (familiarity MODERATE).
- 👍 on the PR from greptile-apps[bot].
- Public API contract change (field removed from OrganizationSerializer) with no top-level reviews or approvals
- Greptile's unresolved concern that the desktop API client needs regeneration appears valid — products/desktop/packages/api-client/src/generated.ts still contains OrganizationDefaultExperimentStatsMethodEnum/default_experiment_stats_method and was not updated in this diff
- Author andehen is not on either owning team (@PostHog/team-context-mcp, @PostHog/team-platform-features) and familiarity is only MODERATE, not STRONG, so it doesn't substitute for team review in risky territory
Gate mechanics and policy version
| Gate | Result | |
|---|---|---|
| prerequisites | ✓ | all clear |
| deny-list | ✓ | no deny categories matched |
| size | ✓ | 10L, 7F substantive, 138L/16F incl. docs/generated/snapshots — within ceiling |
| tier | ✓ | T1-agent / T1d-complex (138L, 16F, cross-cutting, chore) |
| stamphog 2.0.0 | .stamphog/policy.yml @ fbe7213 · reviewed head fbe7213 |
Problem
An API consumer reading
default_experiment_stats_methodfrom/api/organizations/gets a value the product ignores, and a consumer writing it changes nothing.TeamExperimentsConfigon 2026-04-09.OrganizationandTeamcolumns stayed behind with no behavioral reader.experiment_service.py,setup_context.py,posthog/api/web_experiment.py,posthog/temporal/experiments/activities.py, theexperiments_configaction, andexperimentsConfigLogic.This is layer 1 of 2. It takes the dead field off every surface. Layer 2 takes the columns out of Django's model state.
Changes
default_experiment_stats_method. The field leavesOrganizationSerializer.default_experiment_stats_methodcolumn.CREATE TABLE IF NOT EXISTSdoes not alter it, and new rows leave it null.OrganizationType,organizationLogic,verifiedDomainImpactLogic,api.mock.ts, two MCP response fixtures, and the regenerated OpenAPI types.The settings UI is unaffected. It reads
TeamExperimentsConfigthroughexperimentsConfigLogic, which this PR does not touch, so nothing looks different.Note
Removing a field from a public API response is a breaking change for any client that reads it. This is a straight drop rather than a deprecation window: the column has had no reader since April, so a write is already a no-op and a read already returns a value the product ignores. The alternative shape this repo also uses is
is_member_join_email_enabled, kept as a read-only "Legacy field".How did you test this code?
test_organization_experiment_stats_method_logging. Its subject no longer exists.test_organization_name_change_loggingandtest_organization_2fa_enforcement_loggingstill cover the label map.posthog/test/activity_logging/test_organization_activity_logging.py,posthog/api/test/test_organization.py,posthog/dags/tests/test_postgres_to_clickhouse_etl.py.test_organization.pyreproduce on unmodified master. They concern license gating, not this change.kea-typegenconfirms the two hand-edited generated blocks.typescript:checkrun in this worktree reports no error in the touched files, but its unbuilt quill package hides a clean whole-repo result. CI runs the real one.Automatic notifications
Docs update
None. No doc under
docs/documents this field.🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Agent: Claude Code, Opus 5 (1M context)
Skills invoked:
/django-migrations,/improving-drf-endpoints,/stacking-prs,/writing-tests,/writing-pr-descriptions,/reviewing-with-coderabbit.CodeRabbit CLI pass: 0 findings on this layer.
The removal was verified before it was written, not after. A repo-wide grep over Python, TypeScript, Rust and Go found no behavioral reader of the old columns, and
TEAM_CONFIG_FIELDSnever carried the threeTeamfields.TeamExperimentsConfigInlinealready points at the extension. The 2026-04-09 backfill was migration0005, not a management command, so there was nothing to retire.No duplicate:
gh pr list --state open --search "default_experiment_stats_method"returns only #99248, aposthog/api/team.pymodule split with no overlap.Public artifact: the work drew only on this repository and a local planning note. Nothing in the diff comes from a customer conversation, ticket, or log.