Repository navigation
Conversation
🤖 CI report
|
| Root | Eager (shipped) | Δ vs base | Budget |
|---|---|---|---|
entry (logged-out pages, app bootstrap)src/index.tsx |
1.64 MiB · 23 files | no change | █████████░ 88.9% 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.72 MiB · 663 files | no change | █████████░ 92.3% of 4.03 MiB |
authenticated shell (every logged-in page)src/scenes/AuthenticatedShell.tsx |
7.60 MiB · 2,404 files | 🔺 +4 B (+0.0%) | █████████░ 91.1% of 8.34 MiB |
🟡 dashboard scenesrc/scenes/dashboard/Dashboard.tsx |
13.91 MiB · 4,917 files | 🔺 +4 B (+0.0%) | ██████████ 103.2% of 13.48 MiB |
today home pathsrc/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/today/TodayHome.tsx |
7.62 MiB · 2,416 files | 🔺 +4 B (+0.0%) | █████████░ 88.8% of 8.58 MiB |
🟡 events scenesrc/scenes/activity/explore/EventsScene.tsx |
13.64 MiB · 4,789 files | 🔺 +4 B (+0.0%) | ██████████ 108.0% of 12.64 MiB |
replay detail scenesrc/scenes/session-recordings/detail/SessionRecordingDetail.tsx |
12.13 MiB · 4,142 files | 🔺 +4 B (+0.0%) | ████████░░ 77.2% of 15.72 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/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
🟢 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/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
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 |
| 839 B | src/scenes/ChunkLoadErrorBoundary.tsx |
Largest files eagerly shipped from src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
| Size | File |
|---|---|
| 306.2 KiB | ../node_modules/.pnpm/posthog-js@1.435.5_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs |
| 220.3 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 |
| 99.7 KiB | src/lib/api.ts |
| 90.7 KiB | src/products.tsx |
| 68.7 KiB | src/lib/lemon-ui/icons/icons.tsx |
| 40.7 KiB | src/lib/utils/eventUsageLogic.ts |
| 38.7 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 |
| 29.0 KiB | ../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/schemas.js |
Largest files eagerly shipped from src/scenes/AuthenticatedShell.tsx
| Size | File |
|---|---|
| 306.2 KiB | ../node_modules/.pnpm/posthog-js@1.435.5_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs |
| 280.3 KiB | src/taxonomy/core-filter-definitions-by-group.json |
| 220.3 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.7 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 |
| 112.3 KiB | ../packages/quill/packages/quill/dist/index.js |
| 99.7 KiB | src/lib/api.ts |
| 93.3 KiB | ../node_modules/.pnpm/prosemirror-view@1.40.1/node_modules/prosemirror-view/dist/index.js |
| 90.7 KiB | src/products.tsx |
| 90.6 KiB | ../node_modules/.pnpm/@tiptap+core@3.20.6_@tiptap+pm@3.20.6/node_modules/@tiptap/core/dist/index.js |
Largest files eagerly shipped from src/scenes/dashboard/Dashboard.tsx
| Size | File |
|---|---|
| 315.5 KiB | ../node_modules/.pnpm/posthog-js@1.435.5_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/rrweb.js |
| 306.2 KiB | ../node_modules/.pnpm/posthog-js@1.435.5_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs |
| 280.3 KiB | src/taxonomy/core-filter-definitions-by-group.json |
| 220.3 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 |
| 181.8 KiB | src/queries/validators.js |
| 153.7 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 |
| 112.3 KiB | ../packages/quill/packages/quill/dist/index.js |
| 99.7 KiB | src/lib/api.ts |
| 93.3 KiB | ../node_modules/.pnpm/prosemirror-view@1.40.1/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 |
|---|---|
| 306.2 KiB | ../node_modules/.pnpm/posthog-js@1.435.5_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs |
| 280.3 KiB | src/taxonomy/core-filter-definitions-by-group.json |
| 220.3 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.7 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 |
| 112.3 KiB | ../packages/quill/packages/quill/dist/index.js |
| 99.7 KiB | src/lib/api.ts |
| 93.3 KiB | ../node_modules/.pnpm/prosemirror-view@1.40.1/node_modules/prosemirror-view/dist/index.js |
| 90.7 KiB | src/products.tsx |
| 90.6 KiB | ../node_modules/.pnpm/@tiptap+core@3.20.6_@tiptap+pm@3.20.6/node_modules/@tiptap/core/dist/index.js |
Largest files eagerly shipped from src/scenes/activity/explore/EventsScene.tsx
| Size | File |
|---|---|
| 315.5 KiB | ../node_modules/.pnpm/posthog-js@1.435.5_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/rrweb.js |
| 306.2 KiB | ../node_modules/.pnpm/posthog-js@1.435.5_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs |
| 280.3 KiB | src/taxonomy/core-filter-definitions-by-group.json |
| 220.3 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 |
| 181.8 KiB | src/queries/validators.js |
| 153.7 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 |
| 112.3 KiB | ../packages/quill/packages/quill/dist/index.js |
| 99.7 KiB | src/lib/api.ts |
| 93.3 KiB | ../node_modules/.pnpm/prosemirror-view@1.40.1/node_modules/prosemirror-view/dist/index.js |
Largest files eagerly shipped from src/scenes/session-recordings/detail/SessionRecordingDetail.tsx
| Size | File |
|---|---|
| 315.5 KiB | ../node_modules/.pnpm/posthog-js@1.435.5_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/rrweb.js |
| 306.2 KiB | ../node_modules/.pnpm/posthog-js@1.435.5_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs |
| 280.3 KiB | src/taxonomy/core-filter-definitions-by-group.json |
| 220.3 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 |
| 181.8 KiB | src/queries/validators.js |
| 153.7 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 |
| 112.3 KiB | ../packages/quill/packages/quill/dist/index.js |
| 99.7 KiB | src/lib/api.ts |
| 93.3 KiB | ../node_modules/.pnpm/prosemirror-view@1.40.1/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.21 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.21 MiB · 19 files | no change | ████░░░░░░ 38.7% of 5.72 MiB |
| Deferred (lazy) | 2.12 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 |
|---|---|
| 850.9 KiB | dist/toolbar/toolbar-app-Y2YR4GWC.css |
| 657.4 KiB | dist/toolbar/chunk-chunk-XFBL4F6Z.js |
| 259.4 KiB | dist/toolbar/chunk-chunk-6EL3FW4B.js |
| 138.2 KiB | dist/toolbar/chunk-chunk-RA6AWHA2.js |
| 131.8 KiB | dist/toolbar/chunk-chunk-FDH2IBXT.js |
| 75.2 KiB | dist/toolbar/toolbar-app-CKJNSUZK.js |
| 69.0 KiB | dist/toolbar/chunk-chunk-TSAL54PB.js |
| 35.6 KiB | dist/toolbar/chunk-chunk-42S7SJLQ.js |
| 21.0 KiB | dist/toolbar/chunk-chunk-G6QDVBSH.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 — 🔺 +9.6 KiB (+0.0%)
Total size of the built frontend/dist folder (all assets), compared against the base branch.
Total: 998.88 MiB · 🔺 +9.6 KiB (+0.0%)
ℹ️ MCP UI apps size — 32 app(s), 17182.9 KB JS
Built size of each MCP UI app (main.js + styles.css).
| App | JS | CSS |
|---|---|---|
| debug | 597.9 KB | 202.8 KB |
| action | 454.2 KB | 202.8 KB |
| action-list | 564.3 KB | 202.8 KB |
| cohort | 453.2 KB | 202.8 KB |
| cohort-list | 563.2 KB | 202.8 KB |
| email-template | 453.0 KB | 202.8 KB |
| error-details | 469.7 KB | 202.8 KB |
| error-issue | 454.5 KB | 202.8 KB |
| error-issue-list | 564.9 KB | 202.8 KB |
| experiment | 561.4 KB | 202.8 KB |
| experiment-list | 565.0 KB | 202.8 KB |
| experiment-results | 566.4 KB | 202.8 KB |
| feature-flag | 566.8 KB | 202.8 KB |
| feature-flag-list | 570.6 KB | 202.8 KB |
| feature-flag-testing | 457.3 KB | 202.8 KB |
| inline-scan | 453.6 KB | 202.8 KB |
| insight-actors | 562.4 KB | 202.8 KB |
| llm-costs | 559.4 KB | 202.8 KB |
| session-recording | 455.4 KB | 202.8 KB |
| survey | 454.8 KB | 202.8 KB |
| survey-global-stats | 561.9 KB | 202.8 KB |
| survey-list | 565.0 KB | 202.8 KB |
| survey-stats | 561.9 KB | 202.8 KB |
| trace-span | 453.5 KB | 202.8 KB |
| trace-span-list | 564.2 KB | 202.8 KB |
| vision-observation-list | 563.3 KB | 202.8 KB |
| workflow | 453.5 KB | 202.8 KB |
| workflow-list | 563.6 KB | 202.8 KB |
| loops-review | 457.9 KB | 202.8 KB |
| query-results | 774.3 KB | 202.8 KB |
| render-ui | 857.7 KB | 202.8 KB |
| visual-review-snapshots | 458.0 KB | 202.8 KB |
ℹ️ MCP agent API — agent-facing tool changes
What this PR changes for agents, from the tool schema snapshots and tool definitions.
Tools added (2): managed-warehouse-trino-metric-history-get, managed-warehouse-trino-monitoring-get
|
[Medium risk] Adds Trino variant monitoring endpoints to the data warehouse backend. This PR is not ready to merge in its stack: Trino readiness can leave the monitoring tabs hidden, and the connection target is not displayed. Reviews (1) · Last reviewed commit: "fix(data-warehouse): treat unknown trino..." |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
⛔ Files ignored due to path filters (4)
📒 Files selected for processing (5)
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 10 remain after this review. 📝 WalkthroughWalkthroughThe warehouse status API and managed-warehouse monitoring now support Trino alongside DuckDB. Trino monitoring adds snapshot and time-series endpoints, validated response schemas, and two read-only MCP tools. The change also adds generated API types, endpoint and tool-filtering tests, and documentation for variant selection, endpoint separation, metrics, and data handling. Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to This change adds feature-flagged Trino monitoring endpoints and tools with response validation and access scoping. No concrete merge-blocking issue was identified in the supplied context. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The new monitoring access preserves organization identity and warehouse-read controls. No introduced vulnerability was established, but query privacy depends on upstream masking that could not be independently verified. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 1✅ Passed checks (1 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (2)
products/data_warehouse/backend/presentation/managed_warehouse_trino_monitoring.py (1)
153-172: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winDuplicate of
serialize_monitoring_series. Make the label map a parameter.
serialize_trino_monitoring_seriesrepeatsserialize_monitoring_seriesline for line. The only difference is the label allow-list. If one copy gets a fix to the metric or label validation, the other copy keeps the old behavior. The path instructions require that code "says everything once and only once."♻️ Proposed refactor
In
managed_warehouse_monitoring.py:def serialize_monitoring_series( raw: object, *, expected_organization_id: str, expected_metric: str, allowed_labels_by_metric: Mapping[str, frozenset[str]] = MANAGED_WAREHOUSE_MONITORING_LABELS, ) -> dict[str, object]: ... allowed_labels = allowed_labels_by_metric[expected_metric]In this file:
- data = serialize_monitoring_response( - raw, - serializer_class=ManagedWarehouseMonitoringSeriesResponseSerializer, - expected_organization_id=expected_organization_id, - ) - if data["metric"] != expected_metric: - raise ManagedWarehouseMonitoringUpstreamError("Monitoring service returned a different metric") - allowed_labels = MANAGED_WAREHOUSE_TRINO_MONITORING_LABELS[expected_metric] - for series in cast(list[object], data["series"]): - ... - return data + return serialize_monitoring_series( + raw, + expected_organization_id=expected_organization_id, + expected_metric=expected_metric, + allowed_labels_by_metric=MANAGED_WAREHOUSE_TRINO_MONITORING_LABELS, + )Source: Path instructions
products/data_warehouse/backend/presentation/views/data_warehouse.py (1)
1537-1538: 🎯 Functional Correctness | 🔵 Trivial | 💤 Low valueThe Trino endpoints accept organizations that have neither flag.
The guard rejects only
data_ops_variant(...) == "duckdb". When an organization has neither flag,data_ops_variantreturnsNone. That case passes the guard and continues to the upstream call._requestthen returns 403 becauseis_enabledis false, so no data leaks. The result is still inconsistent:
- An organization with no flag gets 403 "not available".
- An organization on the wrong variant gets 404.
The DuckDB endpoints have the same asymmetry because they reject only
"trino". Check for the matching variant instead (!= "trino") so that the response is predictable. Alternatively, keep the current behavior but state the 403 path in the schema description.Also applies to: 1578-1579
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: PostHog/posthog/.coderabbit.yaml
Review profile: QUIET
Plan: Enterprise
Run ID: 03843c8a-ae75-4bfe-951b-004d9e3b14bc
⛔ Files ignored due to path filters (4)
products/data_warehouse/frontend/generated/api.schemas.tsis excluded by!**/generated/**products/data_warehouse/frontend/generated/api.tsis excluded by!**/generated/**services/mcp/src/generated/data_warehouse/api.tsis excluded by!**/generated/**services/mcp/src/tools/generated/data_warehouse.tsis excluded by!**/generated/**
📒 Files selected for processing (14)
docs/internal/managed-warehouse-monitoring.mdproducts/data_warehouse/backend/presentation/managed_warehouse_monitoring.pyproducts/data_warehouse/backend/presentation/managed_warehouse_trino_monitoring.pyproducts/data_warehouse/backend/presentation/views/data_warehouse.pyproducts/data_warehouse/backend/tests/api/test_data_warehouse.pyproducts/data_warehouse/backend/tests/api/test_managed_warehouse_monitoring.pyproducts/data_warehouse/backend/tests/api/test_managed_warehouse_trino_monitoring.pyproducts/data_warehouse/mcp/tools.yamlproducts/managed_warehouse/backend/presentation/views.pyproducts/managed_warehouse/backend/tests/api/test_presentation.pyservices/mcp/schema/generated-tool-definitions.jsonservices/mcp/schema/tool-definitions-all.jsonservices/mcp/src/api/generated.tsservices/mcp/tests/unit/tool-filtering.test.ts
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 8 remain after this review.
|
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
94a785b to
ddfc5e9
Compare
11f2725 to
dbf4c9e
Compare
dbf4c9e
into
eric/data-ops-trino-variant-backend
Problem
Changes
managed-warehouse-trino-monitoring/: totals, concurrency and queue limits, and up to 200 in-flight queries.managed-warehouse-trino-monitoring-timeseries/returns one of nine metrics over a window from 1 hour to 30 days.available: falseon the live response means the data could not be read. Zero totals then do not mean an idle warehouse.warehouse_statusgains atrinoblock with the Trino state and connection. It stays null until the warehouse itself is ready.unavailable, neverpending. A client then does not show an endless setup state.connectionis null for a Trino organization, because its users connect through Trino only.managed-warehouse-trino-monitoring-getandmanaged-warehouse-trino-metric-history-get, sit behinddata-warehouse-scene-trinoand thewarehouse_view:readscope.Where to look first: the serializers are an allow-list. They drop unknown upstream fields, and reject a response for another organization or a series with an unexpected label.
The Trino contract is separate from the DuckDB one on purpose. One shared contract would need optional worker and query fields on every response, and each path could not change without the other.
Mechanical: the generated OpenAPI types, the generated MCP files, and the internal monitoring doc.
Before:
flowchart LR Caller[Data ops or MCP tool] --> D[DuckDB monitoring endpoints] D -->|duckdb variant| CPW[Control plane worker routes] D -->|trino variant| N[404] classDef phBlue fill:#1d4aff,stroke:#1d4aff,color:#fff; classDef phRed fill:#f54e00,stroke:#f54e00,color:#fff; classDef phYellow fill:#f9bd2b,stroke:#f9bd2b,color:#000; classDef phGray fill:#e5e7eb,stroke:#c7ccd1,color:#000; class Caller phYellow; class D phBlue; class CPW phRed; class N phGray;After:
flowchart LR Caller[Data ops or MCP tool] --> D[DuckDB monitoring endpoints] Caller --> T[Trino monitoring endpoints] D -->|duckdb variant| CPW[Control plane worker routes] D -->|trino variant| N[404 naming the other endpoints] T -->|duckdb variant| N T -->|trino variant| CPT[Control plane Trino routes] CPT --> Q[Live query list] CPT --> M[Metric history] classDef phBlue fill:#1d4aff,stroke:#1d4aff,color:#fff; classDef phRed fill:#f54e00,stroke:#f54e00,color:#fff; classDef phYellow fill:#f9bd2b,stroke:#f9bd2b,color:#000; classDef phGray fill:#e5e7eb,stroke:#c7ccd1,color:#000; class Caller phYellow; class D,T phBlue; class CPW,CPT phRed; class N,Q,M phGray;How did you test this code?
Test rationale:
test_trino_monitoring_returns_404_for_a_duckdb_organizationcatches the wrong variant reading Trino data.test_warehouse_status_skips_the_trino_read_until_the_warehouse_is_readycatches a Trino read against a warehouse that is still provisioning.test_trino_status_for_presents_only_customer_safe_fieldscatches an internal upstream field in thetrinoblock. It also catches an error, an unknown state, or another organization's answer shown as anything butunavailable.Not checked: no request ran against a deployed control plane or a live Trino cell. Every upstream response is mocked from the contract in PostHog/duckgres#1248.
👉 Stay up-to-date with PostHog coding conventions for a smoother review.
Release status
Automatic notifications
Docs update
docs/internal/managed-warehouse-monitoring.mdcovers the Trino endpoints in this PR. No public docs change, because the variant is not available to users.🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Agent: Claude Code. Claude Sonnet 5.5 subagents wrote the code. Claude Opus 5.5 planned and coordinated the work.
superpowers:brainstorming,superpowers:writing-plans,superpowers:subagent-driven-development,superpowers:using-git-worktrees,/stacking-prs,/writing-pr-descriptions,/reviewing-with-coderabbit.example.comhosts.pendingand now maps tounavailable.🤖 Generated with Claude Code