Skip to content

trunk-merge/pr-110577/56ee41a8-8fe4-496e-9337-16a1f3bc1f32 - #110952

Closed
trunk-io[bot] wants to merge 78 commits into
masterfrom
trunk-merge/pr-110577/56ee41a8-8fe4-496e-9337-16a1f3bc1f32
Closed

trunk-io[bot] wants to merge 78 commits into
masterfrom
trunk-merge/pr-110577/56ee41a8-8fe4-496e-9337-16a1f3bc1f32

Conversation

@trunk-io

@trunk-io trunk-io Bot commented Oct 2, 2026

Copy link
Copy Markdown
Trunk Merge Pull Request Banner

This pull request was created and is being managed by Trunk Merge.

This pull request is based on the master branch at SHA 662ed11756653c2f52b855a01ee19a0c13b23faa.

See more details about each PR in the batch here:

When CI completes, this pull request will be closed automatically.

Pull Requests Being Tested

This pull request is testing a batch with the changes from pull requests 110577, 110908, and 108850 - batching documentation.

Pull request 110577 is stacked on pull request 110829, whose changes are included here and will be merged with it.

Dependencies

This pull request depends on the changes from pull requests 110856, 110579, 110905, 110273, 110906, 110347, 110601, 110801, 110830, 110789, 110415, and 110160.

mariusandra and others added 30 commits September 30, 2026 01:44
Rebuild the BI worksheet around a Tableau-style layout: a data pane of
dimensions and measures, filters and marks cards, rows and columns pill
shelves above the view, a "Show me" chart picker, and a toolbar with
swap, quick sort, and auto-update.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The button opened the Fundamentals tab, which is behind the METRICS_FUNDAMENTALS flag. Without the flag, the scene fell back to the overview tab.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Generated-By: PostHog Desktop
Task-Id: 5a2b9f43-13fb-4aca-b9f3-a249aa554c8d
Removes the Fundamentals tab, its logic, the /metrics/explain/ action with its diagnostics and fundamentals modules, the metrics-fundamentals flag constants, and the MCP tool entry. Regenerates the API types.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Generated-By: PostHog Desktop
Task-Id: 5a2b9f43-13fb-4aca-b9f3-a249aa554c8d
Generated-By: PostHog Desktop
Task-Id: 5a2b9f43-13fb-4aca-b9f3-a249aa554c8d
Direct-mint sites each built an OAuthAccessToken row by hand: generate the
token value, compute expiry from now, set scope and team pinning. Copies of
security-sensitive code drift, and new callers (WebMCP is next) would add one
more. `mint_oauth_access_token` in posthog/models/oauth.py now owns that,
next to the model and the other token lookups, so products can import it
without reaching into posthog.temporal.

- Move the sandbox/wizard run mint in posthog/temporal/oauth.py and both
  streamlit_apps mints (iframe and bridge) onto the helper.
- No behavior change: same token format, scope strings, lifetimes and
  scoped_teams; sandbox_task_id stays null where it was not set.
- Leave the authorization-code/refresh flows (oauth views, agentic and
  Stripe provisioning, Stripe integration, generate_stripe_app_tokens)
  alone. They pair the access token with a refresh token, rotate rows, or
  take values from oauthlib, so they stay explicit.
2 updated
Run: 92718009-080f-48a1-bb19-8fc805c612cd

Co-authored-by: mariusandra <53387+mariusandra@users.noreply.github.com>
The canvas runtime now sends the client rect of the clicked highlight line with comment-activate. The field is optional, so builds made before this change stay valid. The web host moves the rect into page coordinates and passes it to onCommentActivate. The web sandbox document is regenerated from the runtime source.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Generated-By: PostHog Desktop
Task-Id: b999fc3e-c145-4e0e-9851-6ef273201d04
A click on a highlight opens the thread in a popover at that line. A new comments menu in the canvas header lists every thread. The Comments side panel tab is removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Generated-By: PostHog Desktop
Task-Id: b999fc3e-c145-4e0e-9851-6ef273201d04
A click on a text highlight or an image pin opens the thread in a popover next to it. The comments button opens a menu with comments on the whole file and a list of every thread. The comments side panel is removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Generated-By: PostHog Desktop
Task-Id: b999fc3e-c145-4e0e-9851-6ef273201d04
Add products/autoresearch/backend/** to the selfDriving container-image path filter, and keep it in generalPurpose while both workers register autoresearch.

Include the clipped capture error_description in the InferenceRunError for a failed or partial prediction emit, so a transport failure records the underlying exception text.

Closes #110837

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Generated-By: PostHog Desktop
Task-Id: 738aed62-67b4-4867-adb2-40a71130ad17
CI runs Kea typegen and then checks for a clean tree. The hand-written activateThread type used CanvasRect where typegen writes the object shape, so the schema diff checks failed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Generated-By: PostHog Desktop
Task-Id: b999fc3e-c145-4e0e-9851-6ef273201d04
2 updated
Run: 30eba949-dfb9-45e9-aa26-8893df928672

Co-authored-by: mariusandra <53387+mariusandra@users.noreply.github.com>
A requests transport error starts with the target host and ends with the cause, such as the errno. The head-only clip cut the cause, so a refused connection and a failed DNS lookup gave the same run error. The clip now keeps the start and the end of the description inside the same 200-character limit.

The emit-failure test now uses a requests-style refused-connection message and checks that the errno survives the clip.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Generated-By: PostHog Desktop
Task-Id: 30cf875e-5854-447b-b60d-3fdb1f89e4c3
…er (#110771)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The services query scanned every series-hour row of the last day. The
services_by_hour projection on metrics4_series holds the same rollup per
team, hour and service, but the query shape kept ClickHouse from using it.

The query now filters on time_bucket, counts series with uniq, and
aggregates the bare last_seen column with convertToProjectTimezone off,
converting to UTC outside max(). metric_series exposes time_bucket for
the filter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Generated-By: PostHog Desktop
Task-Id: 3538a544-5668-418a-aebd-c3430d18864a
The overview test now runs the services query with
force_optimize_projection, so ClickHouse rejects the query when the
projection is not used. HogQL settings accept the new field.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Generated-By: PostHog Desktop
Task-Id: 3538a544-5668-418a-aebd-c3430d18864a
sakce and others added 25 commits October 2, 2026 16:58
The Data Ops scene no longer has a data quality tab, so /data-ops?tab=data-quality falls back to the default tab and the spec timed out waiting for the check controls. The same overview still renders on the Models scene, so the test navigates there instead and only needs the data quality checks flag.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

Generated-By: PostHog Desktop
Task-Id: 789f88f8-021d-4728-8b98-92c94b145315
A cited PostHog object in the task Artifacts tab now shows its own app page in a same-origin frame, for every object kind that has a page. The frame keeps the page's URL and navigation apart from the task page. A frame named posthog-embedded-page puts the app in a new embedded navigation mode, which renders the scene without the navigation, command palette or floating buttons. The per-kind insight, SQL, dashboard and replay embeds are gone, and a kind with no page keeps the card.

The app CSP frame-ancestors now includes 'self', because the app could not frame its own pages before. Events captured in the frame carry embedded_page_frame: true.

Also fixes the app failing to start when Django sends null bootstrap flags, which happens when it cannot evaluate flags locally and a last-seen flag cache exists.

Generated-By: PostHog Desktop
Task-Id: e2367959-ab88-40ff-8761-5632645167aa
The cited-object frame now has a sandbox attribute. It keeps the app's origin, scripts, forms and new tabs, and it cannot navigate the task page.

Events from the frame get embedded_page_frame per event through before_send. register() persisted the property in storage the main window shares, so it marked the user's ordinary events too.

'self' moves out of app_frame_ancestor_sources() and onto the app policy only. The canvas sandbox document on the user-content origin shares that list, so its policy stays as it was.

Generated-By: PostHog Desktop
Task-Id: e2367959-ab88-40ff-8761-5632645167aa
The embed is keyed by its page URL instead of the artifact id, so the loading state starts over for any new page the frame shows.

Generated-By: PostHog Desktop
Task-Id: e2367959-ab88-40ff-8761-5632645167aa
Resolve the SOURCES.md conflict with master while preserving both newly registered AWS sources.
@coderabbitai

coderabbitai Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

🧰 Additional context used
📚 Code guidelines (29)
products/autoresearch/backend/presentation/AGENTS.md — auto-discovered
products/autoresearch/backend/inference/AGENTS.md — auto-discovered
products/posthog_ai/frontend/AGENTS.md — auto-discovered
.cursor/rules/react-typescript.mdc — auto-discovered
.agents/skills/using-kea-disposables/SKILL.md — configured
.agents/skills/writing-ui-components/SKILL.md — configured
.agents/skills/authoring-ci-workflows/SKILL.md — configured
.agents/skills/gating-production-deploys/SKILL.md — configured
products/desktop/AGENTS.md — auto-discovered
posthog/temporal/AGENTS.md — auto-discovered
.agents/skills/posthog-desktop/SKILL.md — configured
.agents/security.md — configured
products/autoresearch/backend/dataset/AGENTS.md — auto-discovered
posthog/hogql/database/schema/AGENTS.md — auto-discovered
products/autoresearch/AGENTS.md — auto-discovered
products/autoresearch/mcp/AGENTS.md — auto-discovered
services/mcp/CONTRIBUTING.md — configured
… and 12 more
📝 Walkthrough

Walkthrough

The pull request adds a BI worksheet editor, task new-session routes, embedded artifact previews, canvas comment menus and popovers, and an AWS Inspector warehouse source. It also changes AI provider timeout, retry, and stream cleanup handling; adds optional autoresearch report-notebook support; removes the metrics Fundamentals feature; and updates Meta Ads retries, OAuth token creation, and several smaller UI and query behaviors.

Priority: ➖ Normal

🚥 Pre-merge checks | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description only contains Trunk Merge batch metadata, dependencies, and automatic-close details. It omits the required Problem, Changes, testing and test rationale, Release status, notifications, … Replace or augment the autogenerated text with the repository template. Describe the problem and user-visible changes, identify mechanical changes, include screenshots or state why they are not applicable, document automated tests and test …
Full details: Description check

Explanation

The description only contains Trunk Merge batch metadata, dependencies, and automatic-close details. It omits the required Problem, Changes, testing and test rationale, Release status, notifications, Docs update, and Agent context sections, so it does not explain the substantial user-visible changes in the batch.

Resolution

Replace or augment the autogenerated text with the repository template. Describe the problem and user-visible changes, identify mechanical changes, include screenshots or state why they are not applicable, document automated tests and test rationale without claiming unrun checks, select exactly one release-status option, complete notifications and docs fields, and add Agent context when applicable. Retain the Trunk batch links as supplemental context rather than the main description body.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Note

Quiet mode is enabled, so only the most important comments were posted inline. Other review comments are grouped below.

🟡 Other comments (3)
products/canvas/frontend/scene/CanvasScene.stories.tsx-232-242 (1)

232-242: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

The play function clicks the menu again on every waitFor retry.

waitFor reruns the callback until the callback passes. The second click toggles the popover closed. The story can then time out or capture a flaky snapshot. Wait for the menu button first. Click the button once. Then wait for the thread row.

Proposed fix
-        await waitFor(
-            async () => {
-                const menu = canvasElement.querySelector<HTMLElement>('[data-attr="canvas-comments-menu"]')
-                expect(menu).not.toBeNull()
-                await userEvent.click(menu!)
-                expect(document.querySelector('[data-attr="canvas-comments-menu-thread"]')).not.toBeNull()
-            },
-            { timeout: 15_000 }
-        )
+        const menu = await waitFor(
+            () => {
+                const el = canvasElement.querySelector<HTMLElement>('[data-attr="canvas-comments-menu"]')
+                expect(el).not.toBeNull()
+                return el!
+            },
+            { timeout: 15_000 }
+        )
+        await userEvent.click(menu)
+        await waitFor(() =>
+            expect(document.querySelector('[data-attr="canvas-comments-menu-thread"]')).not.toBeNull()
+        )
products/canvas/frontend/sidePanel/comments/CanvasCommentThreadPopover.tsx-21-53 (1)

21-53: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

The popover does not return focus when it closes.

The effect moves focus into the dialog when it opens. Focus is not restored when the dialog closes through Escape, an outside click, or the close button. The dialog then unmounts, so focus falls back to document.body. A keyboard user who opened the dialog from the comments menu loses their position in the toolbar. Store document.activeElement before you focus the dialog, and restore it in the cleanup.

Proposed fix
-        ref.current?.focus({ preventScroll: true })
+        const previouslyFocused = document.activeElement instanceof HTMLElement ? document.activeElement : null
+        ref.current?.focus({ preventScroll: true })
@@
         return () => {
             window.removeEventListener('keydown', onKeyDown)
             window.removeEventListener('blur', close)
             window.removeEventListener('resize', close)
             document.removeEventListener('pointerdown', onPointerDown)
+            if (previouslyFocused?.isConnected && ref.current?.contains(document.activeElement)) {
+                previouslyFocused.focus({ preventScroll: true })
+            }
         }

Based on learnings: "verify that focus is programmatically managed (e.g., ... returned to trigger element on close)".

Source: Learnings

frontend/src/scenes/data-warehouse/editor/bi/biEditorLogic.ts-141-148 (1)

141-148: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

moveFieldInConfig deletes the field when the destination rejects it.

moveFieldInConfig removes the field from the source shelf. It then calls addFieldToConfig. addFieldToConfig returns its input unchanged in two cases:

  • The destination shelf already holds the same field.id. This applies to rows/columns and to a matching filter.
  • The field is incompatible with the source.

Rows and columns check duplicates only within their own shelf. The same field can therefore sit on both shelves. In that state, "Move to columns" or a pill drag from rows to columns removes the pill and adds nothing. "Convert to dimension" fails the same way when rows already holds that field. A drop onto filters fails the same way when a matching filter exists.

If the add is rejected, return the original config.

🐛 Proposed fix
-    return addFieldToConfig(removeFieldFromConfig(config, fromShelf, fromIndex), field, toShelf)
+    const removed = removeFieldFromConfig(config, fromShelf, fromIndex)
+    const moved = addFieldToConfig(removed, field, toShelf)
+    // addFieldToConfig returns its input when the destination rejects the field; keep the pill where it was
+    return moved === removed ? config : moved
🧹 Nitpick comments (3)
products/warehouse_sources/backend/temporal/data_imports/sources/aws_inspector/aws_inspector.py (1)

192-210: 🩺 Stability & Availability | 🔵 Trivial | 💤 Low value

Close the client when payload construction fails.

AwsInspectorClient is created at Line 192. The try/finally that closes it starts at Line 198. If request_payload raises before Line 198, the session stays open. The current helper does not raise, so the impact is low. Create the client right before the guarded request to make the close path complete.

♻️ Proposed fix
-    try:
-        client = AwsInspectorClient(config, api_version)
-    except ValueError as error:
-        return False, str(error)
     payload = request_payload(endpoint)
     if endpoint.page_size is not None:
         payload["maxResults"] = 1
+    try:
+        client = AwsInspectorClient(config, api_version)
+    except ValueError as error:
+        return False, str(error)
     try:
frontend/src/layout/today/todaySpacesLogic.ts (1)

83-87: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add a unit test for spaceIdForPath.

The function has branching logic: project-ID stripping, the new exclusion, and trailing segments such as /spaces/:id/new. The new todaySpacesLogic listeners depend on it. A parameterised test with these inputs covers it:

  • /spaces/abc
  • /project/1/spaces/abc/new
  • /spaces/new
  • /spaces
  • /tasks

Source: Path instructions

frontend/src/scenes/data-warehouse/editor/sqlEditorLogic.test.ts (1)

2564-2609: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Parameterized chart-only test mixes a conditional assertion with a mock-restore pattern that can leak state on setup failure.

dataLogic.mount() and jest.spyOn(logic.actions, 'runQuery') run before the try block. If setup throws, for example in setResponse, dataLogic and biLogic stay mounted. They also stay mounted if jest.spyOn throws. Fake timers are enabled inside the try, so they are safe. Move all mounts and spies inside the try, or use afterEach cleanup. This prevents cross-test leakage in the test.each cases.

Source: Path instructions


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: PostHog/posthog/.coderabbit.yaml

Review profile: QUIET

Plan: Enterprise

Run ID: 019b5cd9-c78e-4d0c-bf3c-c1806ba1e068

📥 Commits

Reviewing files that changed from the base of the PR and between 662ed11 and 0498b35.

⛔ Files ignored due to path filters (8)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • products/autoresearch/frontend/generated/api.schemas.ts is excluded by !**/generated/**
  • products/autoresearch/frontend/generated/api.zod.ts is excluded by !**/generated/**
  • products/metrics/frontend/generated/api.schemas.ts is excluded by !**/generated/**
  • products/metrics/frontend/generated/api.ts is excluded by !**/generated/**
  • products/metrics/frontend/generated/api.zod.ts is excluded by !**/generated/**
  • services/mcp/src/generated/autoresearch/api.ts is excluded by !**/generated/**
  • services/mcp/src/tools/generated/autoresearch.ts is excluded by !**/generated/**
📒 Files selected for processing (171)
  • .github/workflows/container-images-cd.yml
  • docs/internal/ai-observability-judge-inputs.md
  • ee/hogai/utils/asgi.py
  • ee/hogai/utils/test/test_asgi.py
  • frontend/snapshots.yml
  • frontend/src/layout/navigation-3000/Navigation.tsx
  • frontend/src/layout/navigation-3000/navigationLogic.tsx
  • frontend/src/layout/navigation-3000/sidepanel/SidePanel.tsx
  • frontend/src/layout/navigation-3000/sidepanel/sidePanelLogic.tsx
  • frontend/src/layout/today/TodaySpaceActions.tsx
  • frontend/src/layout/today/TodaySpacesSidebar.tsx
  • frontend/src/layout/today/todaySpacesLogic.ts
  • frontend/src/lib/constants.tsx
  • frontend/src/lib/utils/embeddedPageFrame.ts
  • frontend/src/loadPostHogJS.tsx
  • frontend/src/productScenes.tsx
  • frontend/src/products.tsx
  • frontend/src/queries/nodes/DataNode/dataNodeLogic.ts
  • frontend/src/scenes/AuthenticatedShell.tsx
  • frontend/src/scenes/data-warehouse/editor/QueryWindow.tsx
  • frontend/src/scenes/data-warehouse/editor/SQLEditor.tsx
  • frontend/src/scenes/data-warehouse/editor/SQLEditorScene.stories.tsx
  • frontend/src/scenes/data-warehouse/editor/bi/BIEditor.tsx
  • frontend/src/scenes/data-warehouse/editor/bi/biEditorLogic.ts
  • frontend/src/scenes/data-warehouse/editor/bi/biEditorOptions.tsx
  • frontend/src/scenes/data-warehouse/editor/bi/biEditorTypes.test.ts
  • frontend/src/scenes/data-warehouse/editor/bi/biEditorTypes.ts
  • frontend/src/scenes/data-warehouse/editor/bi/components/BIDataPane.tsx
  • frontend/src/scenes/data-warehouse/editor/bi/components/BIExpressionPopover.tsx
  • frontend/src/scenes/data-warehouse/editor/bi/components/BIFieldPill.tsx
  • frontend/src/scenes/data-warehouse/editor/bi/components/BIFilterEditor.tsx
  • frontend/src/scenes/data-warehouse/editor/bi/components/BIFilterPill.tsx
  • frontend/src/scenes/data-warehouse/editor/bi/components/BIFiltersCard.tsx
  • frontend/src/scenes/data-warehouse/editor/bi/components/BIMarksCard.tsx
  • frontend/src/scenes/data-warehouse/editor/bi/components/BIPill.tsx
  • frontend/src/scenes/data-warehouse/editor/bi/components/BIShelfCard.tsx
  • frontend/src/scenes/data-warehouse/editor/bi/components/BIShelfDropTarget.tsx
  • frontend/src/scenes/data-warehouse/editor/bi/components/BIShelfStrip.tsx
  • frontend/src/scenes/data-warehouse/editor/bi/components/BIShowMe.tsx
  • frontend/src/scenes/data-warehouse/editor/bi/components/BIToolbar.tsx
  • frontend/src/scenes/data-warehouse/editor/editorSizingLogic.tsx
  • frontend/src/scenes/data-warehouse/editor/sqlEditorLogic.test.ts
  • frontend/src/scenes/data-warehouse/editor/sqlEditorLogic.tsx
  • frontend/src/scenes/project-homepage/today/Today.stories.tsx
  • frontend/src/scenes/project-homepage/today/TodayHomeSidebar.tsx
  • frontend/src/scenes/project-homepage/today/todayAskPrompt.ts
  • frontend/src/scenes/project-homepage/today/todayLogic.test.ts
  • frontend/src/scenes/sceneTypes.ts
  • frontend/src/types.ts
  • playwright/e2e/data-quality-overview.spec.ts
  • posthog/api/streaming.py
  • posthog/api/test/test_streaming.py
  • posthog/csp_middleware.py
  • posthog/hogql/constants.py
  • posthog/hogql/database/schema/metrics.py
  • posthog/models/oauth.py
  • posthog/temporal/ai_observability/evaluation_llm_judge.py
  • posthog/temporal/ai_observability/run_tagger.py
  • posthog/temporal/ai_observability/test_run_evaluation.py
  • posthog/temporal/ai_observability/test_run_tagger.py
  • posthog/temporal/common/posthog_client.py
  • posthog/temporal/oauth.py
  • posthog/test/test_csp_middleware.py
  • products/ai_observability/backend/api/proxy.py
  • products/ai_observability/backend/api/test/test_proxy.py
  • products/ai_observability/backend/llm/errors.py
  • products/ai_observability/backend/llm/providers/_diagnostics.py
  • products/ai_observability/backend/llm/providers/azure_openai.py
  • products/ai_observability/backend/llm/providers/openai.py
  • products/ai_observability/backend/llm/providers/openai_compatible.py
  • products/ai_observability/backend/llm/providers/test/test_azure_openai.py
  • products/ai_observability/backend/llm/providers/test/test_openai_compatible.py
  • products/ai_observability/backend/llm/system_one.py
  • products/autoresearch/backend/access.py
  • products/autoresearch/backend/facade/api.py
  • products/autoresearch/backend/facade/contracts.py
  • products/autoresearch/backend/inference/scoring.py
  • products/autoresearch/backend/inference/test_inference.py
  • products/autoresearch/backend/presentation/views/serializers.py
  • products/autoresearch/backend/presentation/views/views.py
  • products/autoresearch/backend/training/AGENTS.md
  • products/autoresearch/backend/training/promotion.py
  • products/autoresearch/backend/training/runner.py
  • products/autoresearch/backend/training/test_promotion.py
  • products/autoresearch/backend/training/test_training.py
  • products/autoresearch/mcp/tools.yaml
  • products/canvas/backend/sandbox/sandbox_document.html
  • products/canvas/frontend/canvasAnalytics.ts
  • products/canvas/frontend/host/BuiltCanvas.tsx
  • products/canvas/frontend/host/DraftCanvas.tsx
  • products/canvas/frontend/host/canvasHostMessageRouter.test.ts
  • products/canvas/frontend/host/canvasHostMessageRouter.ts
  • products/canvas/frontend/host/canvasProtocol.ts
  • products/canvas/frontend/scene/CanvasHostFrame.tsx
  • products/canvas/frontend/scene/CanvasScene.stories.tsx
  • products/canvas/frontend/scene/CanvasScene.tsx
  • products/canvas/frontend/scene/CanvasSceneHeader.tsx
  • products/canvas/frontend/sidePanel/CanvasSidePanel.tsx
  • products/canvas/frontend/sidePanel/CanvasSidePanelTabBody.tsx
  • products/canvas/frontend/sidePanel/canvasPanelTabs.ts
  • products/canvas/frontend/sidePanel/comments/CanvasCommentThreadCard.tsx
  • products/canvas/frontend/sidePanel/comments/CanvasCommentThreadPopover.tsx
  • products/canvas/frontend/sidePanel/comments/CanvasCommentsMenu.tsx
  • products/canvas/frontend/sidePanel/comments/CanvasCommentsTab.tsx
  • products/canvas/frontend/sidePanel/comments/canvasCommentThreads.ts
  • products/canvas/frontend/sidePanel/comments/canvasCommentsLogic.ts
  • products/data_warehouse/frontend/scenes/DataOpsScene/DataWarehouseScene.tsx
  • products/data_warehouse/frontend/scenes/DataOpsScene/dataWarehouseSceneLogic.ts
  • products/desktop/packages/core/src/canvas/freeformSchemas.ts
  • products/desktop/packages/ui/src/features/canvas/freeform/sandboxRuntime.ts
  • products/metrics/backend/diagnostics.py
  • products/metrics/backend/facade/api.py
  • products/metrics/backend/facade/contracts.py
  • products/metrics/backend/fundamentals.py
  • products/metrics/backend/metrics_overview_query_runner.py
  • products/metrics/backend/presentation/api.py
  • products/metrics/backend/tests/conftest.py
  • products/metrics/backend/tests/test_api.py
  • products/metrics/backend/tests/test_diagnostics.py
  • products/metrics/backend/tests/test_fundamentals.py
  • products/metrics/backend/tests/test_metrics_overview_query_runner.py
  • products/metrics/frontend/MetricsScene.tsx
  • products/metrics/frontend/components/MetricsClauseRow.tsx
  • products/metrics/frontend/components/MetricsFundamentals.tsx
  • products/metrics/frontend/components/metricsFundamentalsLogic.test.ts
  • products/metrics/frontend/components/metricsFundamentalsLogic.tsx
  • products/metrics/frontend/components/metricsHandoff.test.ts
  • products/metrics/frontend/components/metricsOverviewLogic.test.ts
  • products/metrics/frontend/metricsSceneLogic.tsx
  • products/metrics/mcp/tools.yaml
  • products/posthog_ai/frontend/components/composer/ComposerModelEffortPickers.tsx
  • products/posthog_ai/frontend/scenes/TaskTracker/TaskRunArtifacts.stories.tsx
  • products/posthog_ai/frontend/scenes/TaskTracker/components/ArtifactCommentActions.tsx
  • products/posthog_ai/frontend/scenes/TaskTracker/components/ArtifactCommentThreadCard.tsx
  • products/posthog_ai/frontend/scenes/TaskTracker/components/ArtifactCommentsMenu.tsx
  • products/posthog_ai/frontend/scenes/TaskTracker/components/ArtifactCommentsPanel.tsx
  • products/posthog_ai/frontend/scenes/TaskTracker/components/ArtifactImagePins.tsx
  • products/posthog_ai/frontend/scenes/TaskTracker/components/ArtifactInlineThread.tsx
  • products/posthog_ai/frontend/scenes/TaskTracker/components/ArtifactObjectEmbed.tsx
  • products/posthog_ai/frontend/scenes/TaskTracker/components/ArtifactTextAnnotations.tsx
  • products/posthog_ai/frontend/scenes/TaskTracker/components/TaskRunArtifacts.tsx
  • products/posthog_ai/frontend/scenes/TaskTracker/taskArtifactCommentsLogic.ts
  • products/posthog_ai/frontend/scenes/TaskTracker/taskRunArtifacts.ts
  • products/streamlit_apps/backend/logic/oauth.py
  • products/tasks/frontend/spaces/NewSessionScene.tsx
  • products/tasks/frontend/spaces/NewSessionSpaceSelect.tsx
  • products/tasks/frontend/spaces/SpaceScene.tsx
  • products/tasks/frontend/spaces/SpaceTaskComposer.tsx
  • products/tasks/frontend/spaces/SpaceTaskComposerSkeleton.tsx
  • products/tasks/frontend/spaces/newSessionSceneLogic.test.ts
  • products/tasks/frontend/spaces/newSessionSceneLogic.ts
  • products/tasks/frontend/spaces/spaceSceneLogic.test.ts
  • products/tasks/frontend/spaces/spaceSceneLogic.ts
  • products/tasks/manifest.tsx
  • products/tasks/package.json
  • products/warehouse_sources/backend/temporal/data_imports/sources/SOURCES.md
  • products/warehouse_sources/backend/temporal/data_imports/sources/aws_inspector/aws_inspector.py
  • products/warehouse_sources/backend/temporal/data_imports/sources/aws_inspector/canonical_descriptions.py
  • products/warehouse_sources/backend/temporal/data_imports/sources/aws_inspector/settings.py
  • products/warehouse_sources/backend/temporal/data_imports/sources/aws_inspector/source.py
  • products/warehouse_sources/backend/temporal/data_imports/sources/aws_inspector/tests/test_aws_inspector.py
  • products/warehouse_sources/backend/temporal/data_imports/sources/generated_configs/awsinspector.py
  • products/warehouse_sources/backend/temporal/data_imports/sources/meta_ads/meta_ads.py
  • products/warehouse_sources/backend/temporal/data_imports/sources/meta_ads/source.py
  • products/warehouse_sources/backend/temporal/data_imports/sources/meta_ads/test_meta_ads.py
  • services/mcp/schema/generated-tool-definitions.json
  • services/mcp/schema/tool-definitions-all.json
  • services/mcp/src/api/generated.ts
  • services/mcp/src/tools/links/app-url-manifest.json
  • services/mcp/tests/unit/__snapshots__/tool-schemas/generate-app-url.json
  • tach.toml
💤 Files with no reviewable changes (20)
  • products/metrics/mcp/tools.yaml
  • frontend/src/lib/constants.tsx
  • products/posthog_ai/frontend/scenes/TaskTracker/components/ArtifactCommentsPanel.tsx
  • products/metrics/frontend/components/MetricsFundamentals.tsx
  • products/metrics/backend/tests/test_fundamentals.py
  • products/data_warehouse/frontend/scenes/DataOpsScene/DataWarehouseScene.tsx
  • products/canvas/frontend/sidePanel/comments/CanvasCommentsTab.tsx
  • products/metrics/backend/diagnostics.py
  • products/metrics/backend/tests/test_api.py
  • products/metrics/frontend/components/metricsFundamentalsLogic.test.ts
  • products/canvas/frontend/sidePanel/CanvasSidePanelTabBody.tsx
  • products/metrics/frontend/components/metricsOverviewLogic.test.ts
  • products/metrics/backend/tests/test_diagnostics.py
  • products/metrics/backend/facade/contracts.py
  • frontend/src/types.ts
  • products/metrics/backend/facade/api.py
  • products/metrics/frontend/components/metricsFundamentalsLogic.tsx
  • products/metrics/backend/presentation/api.py
  • products/metrics/backend/fundamentals.py
  • products/data_warehouse/frontend/scenes/DataOpsScene/dataWarehouseSceneLogic.ts

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 0 remain after this review.

toTimeZone(max(max(last_seen)) OVER (), 'UTC') AS total_last_seen_at
FROM posthog.metric_series
WHERE last_seen > now() - {lookback}
WHERE time_bucket >= toStartOfHour(toTimeZone(now() - {lookback}, 'UTC'))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Preserve the requested lookback cutoff.

When the cutoff falls within an hour, this predicate includes series last seen earlier in that hour. For example, a 12:45 cutoff includes a series last seen at 12:05 because its time_bucket is 12:00. The overview then overstates service and series counts. Keep the hourly predicate for projection pruning, but apply the exact last_seen cutoff when counting series.

@trunk-io trunk-io Bot closed this Oct 2, 2026
@trunk-io
trunk-io Bot deleted the trunk-merge/pr-110577/56ee41a8-8fe4-496e-9337-16a1f3bc1f32 branch October 2, 2026 16:00
@trunk-io

trunk-io Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Author

Static Badge   Static Badge   Static Badge

Failed Test Failure Summary Logs
Scenes/Code review Default play-test A logic access error occurred because 'actions' on 'scenes.userLogic' was not mounted, likely due to missing logic connection or incorrect componen... Logs ↗︎
compareTopLevelSections() reports a modifiers change when the current query overrides the team default A TypeError occurred because the code attempted to access the 'add' property of an undefined object. Logs ↗︎

View Full Report ↗︎ ⋅ Docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.