Repository navigation
chore(ci): flag fields removed from cached query models - #124050
Conversation
Removing a field from a model that a cached query response stores makes every old cache entry that holds it fail to parse and count as a miss. A new check compares the base and head frontend/src/queries/schema.json and comments on the PR with the cost of each option. The author acknowledges the choice with a "Cache impact:" line in the PR description. Generated-By: PostHog Desktop Task-Id: a71ba72c-45ef-4f06-9293-39974ec2ae71
|
😎 Merged successfully - details. |
There was a problem hiding this comment.
PostHog Review · Standard · reviewed 8f6ac57: 2 Should fix.
This is the only automatic review while this pull request is a draft. Comment @posthog review to review new changes sooner. Otherwise, a review of the new changes runs when you mark it ready for review.
See this review and its findings in PostHog Review. Comment @posthog review --deep for a Deep review. A Deep review takes longer and looks deeper than a Standard review.
🤖 CI report🚨 Trunk lane — universal laneThis PR is assigned to the universal lane. It cannot merge in parallel with other PRs, so it can take longer to merge. Ask dev-ex if you think this is wrong. ✅ Duplication (Python) — cleanNew Python code duplication introduced by this branch. Fails at 70+ tokens in app code, or 150+ tokens when both copies live in test files. Advisory while the gate proves itself: extract a shared helper instead of copying. ✅ Duplication (TypeScript) — cleanNew TypeScript code duplication introduced by this branch. Fails at 70+ tokens in app code, or 150+ tokens when both copies live in test files. Advisory while the gate proves itself: extract a shared helper instead of copying.
|
| File | Size | Δ vs base |
|---|---|---|
render-query/src/render-query/render-query.js |
24.99 MiB | 🔺 +49.9 KiB (+0.2%) |
Posted automatically by build-bundle-size-report · uncompressed bytes from dist-report
⚠️ Eager graph — 3 over budget
How much code each root ships on the eager path — downloaded and parsed before the surface is interactive. Measured from the esbuild output chunks (post-tree-shake, static imports only); lazy import() / React.lazy chunks are not counted.
| Root | Eager (shipped) | Δ vs base | Budget |
|---|---|---|---|
entry (logged-out pages, app bootstrap)src/index.tsx |
1.01 MiB · 25 files | 🔺 +356 B (+0.0%) | █████████░ 88.2% of 1.14 MiB |
logged-out boot: index + App + bootApp (preloaded by every page, including /login)src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts |
2.98 MiB · 621 files | 🔺 +639 B (+0.0%) | ██████████ 98.1% of 3.03 MiB |
🟡 authenticated shell (every logged-in page)src/scenes/AuthenticatedShell.tsx |
7.59 MiB · 2,568 files | 🔺 +5.6 KiB (+0.1%) | ██████████ 101.3% of 7.50 MiB |
dashboard scenesrc/scenes/dashboard/Dashboard.tsx |
9.96 MiB · 3,733 files | 🔺 +5.8 KiB (+0.1%) | ██████████ 99.5% of 10.01 MiB |
🟡 today home pathsrc/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/today/TodayHome.tsx |
7.78 MiB · 2,661 files | 🔺 +5.6 KiB (+0.1%) | ██████████ 100.5% of 7.74 MiB |
🟡 AI-first home pathsrc/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/ai-first/AiFirstHomepage.tsx |
8.02 MiB · 2,654 files | 🔺 +5.6 KiB (+0.1%) | ██████████ 101.5% of 7.91 MiB |
events scenesrc/scenes/activity/explore/EventsScene.tsx |
9.40 MiB · 3,514 files | 🔺 +5.8 KiB (+0.1%) | ██████████ 98.1% of 9.59 MiB |
web analytics scenesrc/scenes/web-analytics/WebAnalyticsScene.tsx |
10.35 MiB · 3,765 files | 🔺 +5.8 KiB (+0.1%) | ██████████ 95.5% of 10.83 MiB |
replay detail scenesrc/scenes/session-recordings/detail/SessionRecordingDetail.tsx |
8.44 MiB · 3,109 files | 🔺 +21.6 KiB (+0.3%) | █████████░ 89.1% of 9.47 MiB |
🟢 node_modules/monaco-editor/ stays out of src/index.tsx
🟢 src/lib/components/ActivityLog/describers stays out of src/index.tsx
🟢 node_modules/@posthog/brand/dist/generated/hoggies/svg/ stays out of src/index.tsx
🟢 node_modules/@posthog/brand/dist/generated/hoggies/components/ 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/zod/ stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/scenes/billing/billingLogic.tsx stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/lib/components/ProductEmptyState/productSetupPreloadLogic.ts 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
🟢 products/dashboards/frontend/widgets/previews/ stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/scenes/session-recordings/player/sessionRecordingPlayerLogic.ts stays out of src/scenes/AuthenticatedShell.tsx
🟢 products/wizard/frontend/runs/WizardRunDetailsDrawer.tsx stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/layout/today/TodayShell.tsx stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/layout/today/TodayContextPanelFloating.tsx stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/layout/today/TodaySidePanel.tsx stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/layout/today/TodayTopBar.tsx stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/layout/today/todayRailItems.tsx stays out of src/scenes/AuthenticatedShell.tsx
🟢 zod/v4/locales/de.js stays out of src/scenes/AuthenticatedShell.tsx
🟢 node_modules/@posthog/brand/dist/generated/hoggies/svg/ stays out of src/scenes/AuthenticatedShell.tsx
🟢 node_modules/@posthog/brand/dist/generated/hoggies/components/ stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/scenes/session-recordings/playlist/SessionRecordingsPlaylist.tsx stays out of src/scenes/dashboard/Dashboard.tsx
🟢 src/scenes/web-analytics/tiles/WebAnalyticsTile.tsx stays out of src/scenes/dashboard/Dashboard.tsx
🟢 src/queries/validators.js stays out of src/scenes/dashboard/Dashboard.tsx
🟢 src/scenes/project-homepage/ai-first/AiFirstHomepage.tsx stays out of src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/today/TodayHome.tsx
🟢 src/scenes/project-homepage/today/TodayReportPage.tsx stays out of src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/today/TodayHome.tsx
🟢 src/queries/Query/Query.tsx stays out of src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/today/TodayHome.tsx
🟢 packages/quill/packages/charts/ stays out of src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/today/TodayHome.tsx
🟢 products/posthog_ai/frontend/components/tool/widgets/VisualizationWidget.tsx stays out of src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/ai-first/AiFirstHomepage.tsx
🟢 products/posthog_ai/frontend/components/tool/widgets/RecordingsWidget.tsx stays out of src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/ai-first/AiFirstHomepage.tsx
🟢 src/queries/Query/Query.tsx stays out of src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/ai-first/AiFirstHomepage.tsx
🟢 products/posthog_ai/frontend/api/primitives.ts stays out of src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/ai-first/AiFirstHomepage.tsx
🟢 src/scenes/notebooks/Notebook/notebookLogic.ts stays out of src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/ai-first/AiFirstHomepage.tsx
🟢 src/scenes/session-recordings/playlist/SessionRecordingsPlaylist.tsx stays out of src/scenes/activity/explore/EventsScene.tsx
🟢 src/scenes/web-analytics/tiles/WebAnalyticsTile.tsx stays out of src/scenes/activity/explore/EventsScene.tsx
🟢 src/queries/validators.js stays out of src/scenes/activity/explore/EventsScene.tsx
🟢 src/scenes/web-analytics/LiveMetricsDashboard/LiveWebAnalyticsMetrics.tsx stays out of src/scenes/web-analytics/WebAnalyticsScene.tsx
🟢 products/product_analytics/frontend/insights/trends/WorldMap/countryVectors.tsx stays out of src/scenes/web-analytics/WebAnalyticsScene.tsx
🟢 src/scenes/settings/SettingsMap.tsx stays out of src/scenes/session-recordings/detail/SessionRecordingDetail.tsx
🟢 @jspm/core/nodelibs/browser/fs stays out of src/scenes/session-recordings/detail/SessionRecordingDetail.tsx
Largest files eagerly shipped from src/index.tsx
| Size | File |
|---|---|
| 126.8 KiB | ../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.production.min.js |
| 24.6 KiB | ../node_modules/.pnpm/[email protected]/node_modules/buffer/index.js |
| 6.3 KiB | ../node_modules/.pnpm/[email protected]/node_modules/react/cjs/react.production.min.js |
| 4.7 KiB | ../node_modules/.pnpm/@[email protected]/node_modules/@jspm/core/nodelibs/browser/process.js |
| 4.0 KiB | ../node_modules/.pnpm/[email protected]/node_modules/scheduler/cjs/scheduler.production.min.js |
| 1.7 KiB | ../node_modules/.pnpm/[email protected]/node_modules/base64-js/index.js |
| 1.7 KiB | src/index.tsx |
| 1.6 KiB | src/lib/utils/bootTiming.ts |
| 1.2 KiB | src/RootErrorBoundary.tsx |
| 949 B | src/scenes/ChunkLoadErrorBoundary.tsx |
Largest files eagerly shipped from src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
| Size | File |
|---|---|
| 323.1 KiB | ../node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/posthog-js/dist/module.mjs |
| 217.5 KiB | ../node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@posthog/icons/dist/posthog-icons.es.js |
| 126.8 KiB | ../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.production.min.js |
| 102.1 KiB | src/products.tsx |
| 86.1 KiB | src/lib/api.ts |
| 68.3 KiB | src/lib/lemon-ui/icons/icons.tsx |
| 41.9 KiB | ../node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@dnd-kit/core/dist/core.esm.js |
| 36.4 KiB | ../node_modules/.pnpm/[email protected]_patch_hash=139b8d1f1304f9d9da452a9a1244c94ea679dbcb85687d8999563146879fb6f5_react@18.3.1/node_modules/kea/lib/index.cjs.js |
| 27.0 KiB | ../node_modules/.pnpm/[email protected]/node_modules/tailwind-merge/dist/bundle-mjs.mjs |
| 24.6 KiB | ../node_modules/.pnpm/[email protected]/node_modules/buffer/index.js |
Largest files eagerly shipped from src/scenes/AuthenticatedShell.tsx
| Size | File |
|---|---|
| 323.1 KiB | ../node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/posthog-js/dist/module.mjs |
| 286.4 KiB | src/taxonomy/core-filter-definitions-by-group.json |
| 239.9 KiB | ../packages/quill/packages/quill/dist/index.js |
| 217.5 KiB | ../node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@posthog/icons/dist/posthog-icons.es.js |
| 153.8 KiB | ../node_modules/.pnpm/[email protected]/node_modules/re2js/build/index.esm.js |
| 126.8 KiB | ../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.production.min.js |
| 102.1 KiB | src/products.tsx |
| 94.5 KiB | ../node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@tiptap/core/dist/index.js |
| 92.5 KiB | ../node_modules/.pnpm/[email protected]/node_modules/prosemirror-view/dist/index.js |
| 86.1 KiB | src/lib/api.ts |
Largest files eagerly shipped from src/scenes/dashboard/Dashboard.tsx
| Size | File |
|---|---|
| 323.1 KiB | ../node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/posthog-js/dist/module.mjs |
| 286.4 KiB | src/taxonomy/core-filter-definitions-by-group.json |
| 239.9 KiB | ../packages/quill/packages/quill/dist/index.js |
| 217.5 KiB | ../node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@posthog/icons/dist/posthog-icons.es.js |
| 153.8 KiB | ../node_modules/.pnpm/[email protected]/node_modules/re2js/build/index.esm.js |
| 144.1 KiB | ../packages/quill/packages/primitives/dist/index.js |
| 126.8 KiB | ../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.production.min.js |
| 102.1 KiB | src/products.tsx |
| 94.5 KiB | ../node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@tiptap/core/dist/index.js |
| 92.5 KiB | ../node_modules/.pnpm/[email protected]/node_modules/prosemirror-view/dist/index.js |
Largest files eagerly shipped from src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/today/TodayHome.tsx
| Size | File |
|---|---|
| 323.1 KiB | ../node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/posthog-js/dist/module.mjs |
| 286.4 KiB | src/taxonomy/core-filter-definitions-by-group.json |
| 239.9 KiB | ../packages/quill/packages/quill/dist/index.js |
| 217.5 KiB | ../node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@posthog/icons/dist/posthog-icons.es.js |
| 153.8 KiB | ../node_modules/.pnpm/[email protected]/node_modules/re2js/build/index.esm.js |
| 126.8 KiB | ../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.production.min.js |
| 102.1 KiB | src/products.tsx |
| 94.5 KiB | ../node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@tiptap/core/dist/index.js |
| 92.5 KiB | ../node_modules/.pnpm/[email protected]/node_modules/prosemirror-view/dist/index.js |
| 86.1 KiB | src/lib/api.ts |
Largest files eagerly shipped from src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/ai-first/AiFirstHomepage.tsx
| Size | File |
|---|---|
| 323.1 KiB | ../node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/posthog-js/dist/module.mjs |
| 286.4 KiB | src/taxonomy/core-filter-definitions-by-group.json |
| 239.9 KiB | ../packages/quill/packages/quill/dist/index.js |
| 217.5 KiB | ../node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@posthog/icons/dist/posthog-icons.es.js |
| 153.8 KiB | ../node_modules/.pnpm/[email protected]/node_modules/re2js/build/index.esm.js |
| 144.1 KiB | ../packages/quill/packages/primitives/dist/index.js |
| 126.8 KiB | ../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.production.min.js |
| 102.1 KiB | src/products.tsx |
| 94.5 KiB | ../node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@tiptap/core/dist/index.js |
| 92.5 KiB | ../node_modules/.pnpm/[email protected]/node_modules/prosemirror-view/dist/index.js |
Largest files eagerly shipped from src/scenes/activity/explore/EventsScene.tsx
| Size | File |
|---|---|
| 323.1 KiB | ../node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/posthog-js/dist/module.mjs |
| 286.4 KiB | src/taxonomy/core-filter-definitions-by-group.json |
| 239.9 KiB | ../packages/quill/packages/quill/dist/index.js |
| 217.5 KiB | ../node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@posthog/icons/dist/posthog-icons.es.js |
| 153.8 KiB | ../node_modules/.pnpm/[email protected]/node_modules/re2js/build/index.esm.js |
| 144.1 KiB | ../packages/quill/packages/primitives/dist/index.js |
| 126.8 KiB | ../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.production.min.js |
| 102.1 KiB | src/products.tsx |
| 94.5 KiB | ../node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@tiptap/core/dist/index.js |
| 92.5 KiB | ../node_modules/.pnpm/[email protected]/node_modules/prosemirror-view/dist/index.js |
Largest files eagerly shipped from src/scenes/web-analytics/WebAnalyticsScene.tsx
| Size | File |
|---|---|
| 323.1 KiB | ../node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/posthog-js/dist/module.mjs |
| 286.4 KiB | src/taxonomy/core-filter-definitions-by-group.json |
| 239.9 KiB | ../packages/quill/packages/quill/dist/index.js |
| 217.5 KiB | ../node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@posthog/icons/dist/posthog-icons.es.js |
| 187.9 KiB | src/queries/validators.js |
| 153.8 KiB | ../node_modules/.pnpm/[email protected]/node_modules/re2js/build/index.esm.js |
| 144.1 KiB | ../packages/quill/packages/primitives/dist/index.js |
| 126.8 KiB | ../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.production.min.js |
| 102.1 KiB | src/products.tsx |
| 94.5 KiB | ../node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@tiptap/core/dist/index.js |
Largest files eagerly shipped from src/scenes/session-recordings/detail/SessionRecordingDetail.tsx
| Size | File |
|---|---|
| 323.1 KiB | ../node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/posthog-js/dist/module.mjs |
| 316.1 KiB | ../node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/posthog-js/dist/rrweb.js |
| 286.4 KiB | src/taxonomy/core-filter-definitions-by-group.json |
| 239.9 KiB | ../packages/quill/packages/quill/dist/index.js |
| 217.5 KiB | ../node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@posthog/icons/dist/posthog-icons.es.js |
| 153.8 KiB | ../node_modules/.pnpm/[email protected]/node_modules/re2js/build/index.esm.js |
| 126.8 KiB | ../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.production.min.js |
| 102.1 KiB | src/products.tsx |
| 94.5 KiB | ../node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@tiptap/core/dist/index.js |
| 92.5 KiB | ../node_modules/.pnpm/[email protected]/node_modules/prosemirror-view/dist/index.js |
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.30 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.30 MiB · 18 files | 🔺 +512 B (+0.0%) | ████░░░░░░ 40.3% of 5.72 MiB |
| Deferred (lazy) | 2.11 MiB · 40 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 |
|---|---|
| 915.2 KiB | dist/toolbar/toolbar-app-SM4KM3FT.css |
| 695.1 KiB | dist/toolbar/chunk-chunk-U3442AL4.js |
| 259.9 KiB | dist/toolbar/chunk-chunk-WGO24YVJ.js |
| 131.8 KiB | dist/toolbar/chunk-chunk-FDH2IBXT.js |
| 130.4 KiB | dist/toolbar/chunk-chunk-OUJWRTLQ.js |
| 74.8 KiB | dist/toolbar/toolbar-app-U572JKAF.js |
| 69.0 KiB | dist/toolbar/chunk-chunk-TSAL54PB.js |
| 35.6 KiB | dist/toolbar/chunk-chunk-XCCLDCK3.js |
| 21.7 KiB | dist/toolbar/chunk-chunk-UW2K5BF6.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 — 🔺 +1.04 MiB (+0.1%)
Total size of the built frontend/dist folder (all assets), compared against the base branch.
Total: 973.39 MiB · 🔺 +1.04 MiB (+0.1%)
|
Risk: No findings This increment deduplicates renamed-$ref comparisons in the cached-schema-removal CI check by moving the visited-pair set from a per-path parameter to the SchemaPair instance. The exponential diamond blowup from the earlier review is fixed, and the memoization cannot hide removals: identical ref pairs always resolve to identical definitions, and same-named refs are still compared directly as top-level models. No new security issues. Sentinel reviewed |
…-effort An inline object that became an equivalent $ref was reported as removed fields. The comparison now follows a $ref when only one side has it, and guards against cycles. The comment step no longer fails an acknowledged PR when the write fails. The deprecated option now says to stop writing the field to cached responses. Generated-By: PostHog Desktop Task-Id: a71ba72c-45ef-4f06-9293-39974ec2ae71
An inline object compared against a recursive $ref hit the same pair at a nested location and skipped a real removal. Only a pair of two refs can cycle, because an inline side is finite. Generated-By: PostHog Desktop Task-Id: a71ba72c-45ef-4f06-9293-39974ec2ae71
There was a problem hiding this comment.
Not approved — this change needs a human reviewer.
Re-adding the stamphog label gives the same result unless the changed files change.
stamphog can't approve this pull request because two gates refused it. The deny-list gate flagged .github/workflows/ci-cached-schema-removals.yml as a CI workflow path, and those paths are only approved for authors on team-devex. The tier gate also classified the change (389 lines across 3 files) as T2-never, so it is not eligible for automated approval at all.
Please ask a human reviewer to take this one, ideally someone on team-devex since it adds a CI workflow. Splitting the workflow file into its own pull request won't change the outcome for that file, but it would let the scripts and tests be reviewed separately.
Gate mechanics and policy version
| Gate | Result | |
|---|---|---|
| prerequisites | ✓ | all clear |
| deny-list | ✗ | matches: ci_workflows (stamphog approves these paths only for authors on team-devex) |
| size | ✓ | 278L, 2F substantive, 389L/3F incl. docs/generated/snapshots — within ceiling |
| tier | ✗ | classified as T2-never: T2-never (389L, 3F, single-area, chore) |
| stamphog 2.6.1 | .stamphog/policy.yml @ unknown · reviewed head 864c27d |
webjunkie
left a comment
There was a problem hiding this comment.
🤖 Agent review · steered by a person
Requesting changes. This is a quick look only. The block is about devex patterns, not the detection logic. @webjunkie can take a closer look later.
The script and its tests are the right shape. The objections are about the wiring around them. There is more than one good fix for each, so treat these as directions, not a spec.
Do not add a separate workflow
The frontend CI already checks schema.json in "Check if schema.json and validators.js are up to date" (.github/workflows/ci-frontend.yml:760). The comparison can run as a step there. A new workflow adds its own trigger, concurrency group and token permissions for one file.
Post through the shared CI report, not a new bot comment
The workflow posts its own sticky comment as github-actions[bot] with pull-requests: write on the default token. The repository has a shared CI report comment for this, in frontend/bin/ci-report/update-ci-report.mjs. Migration risk analysis, comment density, complexity, snapshots and coverage all post a section into it, with an app token. One more section there keeps PR pages readable as these checks grow.
Reconsider the acknowledgement line
A "Cache impact:" line in the description is a new mechanism. Other guards here use a label (the cross-lane check, test-new-events-schema) or a reviewed allowlist (migration deletions). The description line also forces the edited trigger, so every description edit reruns the check. A label per option, or another existing mechanism, avoids both.
…port Review asked for less new CI surface. The check is now a step in the frontend typechecking job, posts a section into the shared CI report, and reads cache-impact labels instead of a PR description line. The standalone workflow, its sticky comment and the edited trigger are gone. Generated-By: PostHog Desktop Task-Id: a71ba72c-45ef-4f06-9293-39974ec2ae71
|
Note 🤖 Automated comment by PR Shepherd, not written by a human Addressed all three points in 6893839.
Trade-off to know about: the check now fails a job in the required frontend gate until a label is applied, and re-running it re-runs the whole typecheck job. A removal like this is rare, so I kept the single step. A separate small job would make the re-run cheaper but needs gate wiring. Not yet exercised on a PR that changes |
Same-typed string fields (model, location, kind, name) and the memo key pair could be swapped without a type error. Dataclasses now use frozen, kw_only and slots as in cancel_superseded_depot_runs.py, closed string sets use Literal, the memo key is a small frozen class, and render_body is defined before its first call. Behavior is unchanged. Generated-By: PostHog Desktop Task-Id: a71ba72c-45ef-4f06-9293-39974ec2ae71
The CI report section now links the Slack channel where authors can ask which cache impact option fits their change. Generated-By: PostHog Desktop Task-Id: a71ba72c-45ef-4f06-9293-39974ec2ae71
webjunkie
left a comment
There was a problem hiding this comment.
🤖 Agent review · steered by a person
Approving. The three devex points are resolved: the check runs as a step in Frontend typechecking, it posts a section in the shared CI report, and labels acknowledge a removal. #124177 shows the fail, label and clear runs work as intended.
There was a problem hiding this comment.
PostHog Review · Standard · reviewed 237c5a0: 1 Should fix.
This is review round 3 on this pull request. When findings keep coming back in the same code, the approach is usually the problem. Before the next fix, check whether a different design would remove the whole class of findings.
There was a problem hiding this comment.
PostHog Review · Standard · reviewed b4c7063: 1 Should fix.
This is review round 4 on this pull request. When findings keep coming back in the same code, the approach is usually the problem. Before the next fix, check whether a different design would remove the whole class of findings.
Problem
Customers wait for a fresh calculation on insights and dashboards when a PR removes a field that cached query responses still hold, and the PR author sees no sign of that cost during review.
#122489 removed
useNewEventsClusterfromHogQLQueryModifiers. Every cached entry that stored the field then failed to parse and counted as a miss. Context is in this Slack thread.Changes
Cached*response reaches infrontend/src/queries/schema.jsonnow gets aCached schema removalssection in the shared CI report.cache-impact-deprecated,cache-impact-acceptedorcache-impact-bumped. Without one, theFrontend typecheckingjob fails, which blocks the required frontend gate. A label does not start CI, so the author re-runs the failed job after applying it.Frontend typechecking, beside the existingschema.jsoncheck. It skips merge queue branches, and it skips itself with a notice when the base schema or the labels cannot be read, so an API error cannot fail the gate.Frontend typecheckingis skipped and the old section stays.anyOflists, type changes, and changes to howresultsare built.How did you test this code?
ruff,oxfmt,actionlintandhogli lint:workflowslocally.actionlintreports only the notes and theparallel:error that master already has forci-frontend.yml. The CI report script tests pass.useNewEventsClusteradded back to a copy used as the base. It flagged the property asalert, and the label flipped it towarnandacknowledged=true. A schema compared with itself reported no removal.HogQLQueryModifiers: propertyuseNewEventsCluster. Across the last 40 master commits that changedschema.json, the only other flag is chore(experiments): drop legacy fields from experiment query response #124170, which removed six fields fromCachedExperimentQueryResponse. The other 38 report no removal.workflow-plansuite passes except sevenbackend-difftests that fail the same way on master, because the sandbox blocksgit commit.cache-impact-acceptedand a re-run of that job, the step passed and the report showed a warning. After the removal was reverted, the report read "no removed fields".Test rationale: The tests catch a removal the detector misses (property or enum value, in a model reached through a
$refor inline) and two false alarms: a model no cached response reaches, and an inline object extracted to a$ref. A renamed recursive model and an inline object extracted to a recursive ref guard the cycle check. Theconstand union cases cover the other shapes the schema generator emits: an enum narrowed to one value, a changedconst, and a field made nullable. Other unions are skipped, so they can miss a removal but never raise a false alarm. The label cases guard the one input that turns the gate green, including unrelated labels. The workflow steps cannot run offline, so a unit test is the lowest level that catches these.Release status
Docs update
None.
🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Agent: Claude Code, Claude Sonnet 5.5
Skills: /authoring-ci-workflows, /writing-pr-descriptions, /writing-tests, /writing-dataclasses, /writing-code-comments, pr-shepherd.
$reffalse alarm and thedeprecatedguidance) and one workflow risk (the comment step). A later review found that the cycle guard skipped a real removal. All are fixed in this PR.cancel_superseded_depot_runs.py, and typed closed string sets asLiteral.@frozenfromposthog.dataclassesis not usable here because importing it loads Celery.🤖 Generated with Claude Code
Created with PostHog from a Slack thread