:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
chore(ci): remove GitHub merge queue support (#72579)
Raúl Negrón-Otero95f0fd004304
diff --git a/.agents/skills/authoring-ci-workflows/SKILL.md b/.agents/skills/authoring-ci-workflows/SKILL.mdindex 131d3fb10ffe..35b9e77f853c 100644--- a/.agents/skills/authoring-ci-workflows/SKILL.md+++ b/.agents/skills/authoring-ci-workflows/SKILL.md@@ -53,12 +53,9 @@ GitHub caps _workflow-run dispatch_ at 500 runs per 10s per repo; overflow failspaths:- '.github/workflows/ci-x.yml'- 'path/to/product/**'- merge_group:workflow_dispatch:```- `merge_group:` currently no-ops — no merge queue is enabled right now — but it's harmless and forward-compatible, so keep it on merge-gate workflows for when a queue returns.-- **Judgment call — trigger `paths:` vs a runtime `dorny/paths-filter` job.**Use trigger `paths:` for a workflow that is _skippable as a whole_.Never put a trigger `paths:` on a workflow whose check is **required** by branch protection: a required check that doesn't dispatch on a PR leaves it stuck "waiting for status" and unmergeable.diff --git a/.agents/skills/gating-production-deploys/SKILL.md b/.agents/skills/gating-production-deploys/SKILL.mdindex 4bb19382c8f1..5ddaffa8be1d 100644--- a/.agents/skills/gating-production-deploys/SKILL.md+++ b/.agents/skills/gating-production-deploys/SKILL.md@@ -24,7 +24,7 @@ publishes/deploys from the wrong place.- Release/distribution workflows — GitHub release, npm, crate, Homebrew (e.g.`build-phrocs.yml`, `release-cli.yml`). They publish from public; leave them.-- `pull_request` / `merge_group` validation builds (gating them breaks contributor CI).+- `pull_request` validation builds (gating them breaks contributor CI).- change-detection / setup jobs (use the org check only, not the variable).The test is "pushes a prod image or triggers a deploy" — not "builds on master".@@ -53,7 +53,7 @@ if: github.repository_owner == 'PostHog' && vars.CD_DEPLOY_ENABLED == 'true' &&# push step, master-only:push: ${{ github.ref == 'refs/heads/master' && vars.CD_DEPLOY_ENABLED == 'true' }}# push step, `push: true` (also pushes on PR for validation):-push: ${{ github.event_name == 'pull_request' || github.event_name == 'merge_group' || vars.CD_DEPLOY_ENABLED == 'true' }}+push: ${{ github.event_name == 'pull_request' || vars.CD_DEPLOY_ENABLED == 'true' }}# reusable that pushes — add a `push` boolean input (default true), pass from caller:# with: { push: ${{ github.event_name == 'pull_request' || vars.CD_DEPLOY_ENABLED == 'true' }} }diff --git a/.depot/workflows/ci-backend.yml b/.depot/workflows/ci-backend.ymlindex 07f4b351b40f..3fc30e5bef26 100644--- a/.depot/workflows/ci-backend.yml+++ b/.depot/workflows/ci-backend.yml@@ -55,7 +55,7 @@# .depot/workflows/ci-backend-update-test-timing.yml, so shard counts match GitHub Actions.# Committed .test_durations is the fallback.# - master (push) runs only check-migrations to prime the shared schema cache; the-# test matrices are skipped on master (canonical runs them). PRs/merge_group/dispatch+# test matrices are skipped on master (canonical runs them). PRs and dispatches# run the full graph — that is where the apples-to-apples comparison happens# - check-migrations timeout widened to 60m because it also runs the folded OpenAPI generation@@ -69,7 +69,7 @@ name: '[optional, does not block merge] Backend CI'# CI_DEPOT_SHADOW_PERCENT Depot CI variable (0-100; 0 or unset = fully off) is both the# master switch and the pull_request sample rate: when >0, pull_request runs are sampled at# that percent; master (push) runs only check-migrations to prime the schema cache (test-# matrices are skipped there); workflow_dispatch and merge_group always run. The `sample` job rolls a deterministic+# matrices are skipped there); workflow_dispatch always runs. The `sample` job rolls a deterministic# per-run dice; `changes` (root of the needs graph) only runs when sampled in, so the# whole workflow cascades off on a miss. This is a Depot variable, NOT a GitHub one —# Depot CI reads its own `vars` store. Set it with:@@ -92,7 +92,6 @@ on:# `run-ci-backend` label (labeled/unlabeled re-trigger) to force the full# matrices on a draft. Mirrors canonical.types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]- merge_group:concurrency:# PRs: one active run per branch, cancel stale. Push: per-SHA so master# pushes never cancel each other (check-migrations always completes).@@ -164,7 +163,7 @@ jobs:EVENT: ${{ github.event_name }}run: |set -euo pipefail- # Only pull_request is sampled; push/workflow_dispatch/merge_group always run+ # Only pull_request is sampled; push and workflow_dispatch always run# when enabled (sampling them would skip cache priming or no-op a dispatch).if [ "$EVENT" != "pull_request" ]; thenecho "sampled=true" >> "$GITHUB_OUTPUT"@@ -545,8 +544,8 @@ jobs:select-tests:name: Select testsneeds: [changes, turbo-discover]- # Only draft PRs do selective runs; ready PRs and non-PR events (push,- # merge_group) always run full, which build_django_matrix falls back to+ # Only draft PRs do selective runs; ready PRs and pushes always run full,+ # which build_django_matrix falls back to# when select-tests is skipped (empty MODE). The run-ci-backend label# forces the full matrices on a draft.if: |diff --git a/.github/actions/paths-filter/dist/index.js b/.github/actions/paths-filter/dist/index.jsindex 25cc36e96b84..00836501b899 100644--- a/.github/actions/paths-filter/dist/index.js+++ b/.github/actions/paths-filter/dist/index.js@@ -42767,18 +42767,6 @@ async function getChangedFiles(token, base, ref, initialFetchDepth) {const currentRef = await git.getCurrentRef();return await git.getChanges(base || baseSha || defaultBranch, currentRef);}- // To keep backward compatibility, manual inputs take precedence over- // commits in GitHub merge queue event.- case 'merge_group': {- const mergeGroup = github.context.payload;- if (!base) {- base = mergeGroup.merge_group.base_sha;- }- if (!ref) {- ref = mergeGroup.merge_group.head_sha;- }- break;- }}return getChangedFilesFromGit(base, ref, initialFetchDepth);}diff --git a/.github/actions/paths-filter/src/main.ts b/.github/actions/paths-filter/src/main.tsindex fca17bcbab5c..2254fef3a32a 100644--- a/.github/actions/paths-filter/src/main.ts+++ b/.github/actions/paths-filter/src/main.ts@@ -2,7 +2,7 @@ import * as fs from 'fs'import * as core from '@actions/core'import * as github from '@actions/github'import {GetResponseDataTypeFromEndpointMethod} from '@octokit/types'-import {MergeGroupEvent, PullRequest, PushEvent} from '@octokit/webhooks-types'+import {PullRequest, PushEvent} from '@octokit/webhooks-types'import {Filter, FilterResults} from './filter'import {File, ChangeStatus} from './file'@@ -97,18 +97,6 @@ async function getChangedFiles(token: string, base: string, ref: string, initialconst currentRef = await git.getCurrentRef()return await git.getChanges(base || baseSha || defaultBranch, currentRef)}- // To keep backward compatibility, manual inputs take precedence over- // commits in GitHub merge queue event.- case 'merge_group': {- const mergeGroup = github.context.payload as MergeGroupEvent- if (!base) {- base = mergeGroup.merge_group.base_sha- }- if (!ref) {- ref = mergeGroup.merge_group.head_sha- }- break- }}return getChangedFilesFromGit(base, ref, initialFetchDepth)diff --git a/.github/workflows/ci-agent-container.yml b/.github/workflows/ci-agent-container.ymlindex d66367d04c53..e82f2c078d5b 100644--- a/.github/workflows/ci-agent-container.yml+++ b/.github/workflows/ci-agent-container.yml@@ -8,8 +8,7 @@ name: Build and deploy agent platform container imageson:workflow_dispatch:- # paths mirror the changes job's dorny filter, which still gates push and- # merge_group events (merge_group triggers don't support paths).+ # paths mirror the changes job's dorny filter, which still gates push events.pull_request:paths:- 'products/agent_platform/services/**'@@ -27,7 +26,6 @@ on:- '.github/workflows/ci-agent-container.yml'- 'pnpm-lock.yaml'- 'pnpm-workspace.yaml'- merge_group:push:branches:- 'master'@@ -43,7 +41,7 @@ jobs:contents: readpull-requests: readtimeout-minutes: 5- if: github.repository == 'PostHog/posthog' && github.event_name != 'merge_group'+ if: github.repository == 'PostHog/posthog'name: Determine need to run agent Docker buildoutputs:agent_files: ${{ steps.filter.outputs.agent_files }}@@ -85,7 +83,6 @@ jobs:name: Build ${{ matrix.image }}if: |(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && needs.changes.outputs.agent_files == 'true') ||- github.event_name == 'merge_group' ||github.event_name == 'workflow_dispatch' ||(github.event_name == 'push' && github.ref == 'refs/heads/master' && needs.changes.outputs.agent_files == 'true' && github.repository_owner == 'PostHog' && vars.CD_DEPLOY_ENABLED == 'true')runs-on: depot-ubuntu-latest@@ -150,7 +147,7 @@ jobs:context: ${{ matrix.context }}buildx-fallback: falseproject: ${{ matrix.depot_project }}- push: ${{ github.event_name == 'pull_request' || github.event_name == 'merge_group' || vars.CD_DEPLOY_ENABLED == 'true' }}+ push: ${{ github.event_name == 'pull_request' || vars.CD_DEPLOY_ENABLED == 'true' }}file: ${{ matrix.dockerfile }}tags: ${{ steps.docker-meta.outputs.tags }}labels: ${{ steps.docker-meta.outputs.labels }}diff --git a/.github/workflows/ci-agent-proxy.yml b/.github/workflows/ci-agent-proxy.ymlindex 318bc5f555f6..67bc37ee4cbb 100644--- a/.github/workflows/ci-agent-proxy.yml+++ b/.github/workflows/ci-agent-proxy.yml@@ -5,7 +5,6 @@ on:branches:- masterpull_request:- merge_group:concurrency:group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}diff --git a/.github/workflows/ci-agents.yml b/.github/workflows/ci-agents.ymlindex 2e9bf1e8945c..49646f4ea1f9 100644--- a/.github/workflows/ci-agents.yml+++ b/.github/workflows/ci-agents.yml@@ -5,7 +5,6 @@ name: Agent services CIon:pull_request:- merge_group:push:branches:- masterdiff --git a/.github/workflows/ci-ai.yml b/.github/workflows/ci-ai.ymlindex cc0a97f2bcab..b13fdf88404b 100644--- a/.github/workflows/ci-ai.yml+++ b/.github/workflows/ci-ai.yml@@ -202,8 +202,8 @@ jobs:path: eval-artifacts/*/junit.xml# Upload results to Trunk for flaky-test detection. Non-gating (continue-on-error),- # so a Trunk outage never fails the job. Runs the token only on internal PRs,- # master, and the merge queue — never on fork PRs or Dependabot, which have no secret.+ # so a Trunk outage never fails the job. Runs the token only on internal PRs+ # and master, never on fork PRs or Dependabot, which have no secret.# The TRUNK_UPLOAD_ENABLED repo variable is the kill-switch: when it is not 'true'# this upload skips.- name: Upload test results to Trunkdiff --git a/.github/workflows/ci-alerts-devex.yml b/.github/workflows/ci-alerts-devex.ymlindex 93823534245b..8d71db4cd935 100644--- a/.github/workflows/ci-alerts-devex.yml+++ b/.github/workflows/ci-alerts-devex.yml@@ -45,7 +45,7 @@ env:# The master ruleset's required status checks that run on master push — a failure# here means master is genuinely broken. Hand-synced with the ruleset; there is no# automated reconciliation, so update this when the required checks change.- # (container-images-ci and shellcheck are also required but only run on PR/merge_group,+ # (container-images-ci and shellcheck are also required but only run on PRs,# so this push-based alerter can't observe them.)# Every workflow listed MUST run on every master push (no path filters) — the script verifies# runs freshness against master's newest commit; one that legitimately lags would wedge resolution.diff --git a/.github/workflows/ci-backend.yml b/.github/workflows/ci-backend.ymlindex a4a5239fc387..0f2947f1279d 100644--- a/.github/workflows/ci-backend.yml+++ b/.github/workflows/ci-backend.yml@@ -21,9 +21,8 @@ on:# start without needing a new push. Cheap checks still run on drafts.# The `test-new-events-schema` label opts a PR into the doubled matrices that# rerun everything with CLICKHOUSE_HOGQL_USE_NEW_EVENTS_SCHEMA=true; unlabeled- # PRs run legacy-schema only (master/merge-queue runs always cover both).+ # PRs run legacy-schema only (master runs always cover both).types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]- merge_group:concurrency:# PRs: one active run per branch, cancel stale. Push: per-SHA so master@@ -467,8 +466,8 @@ jobs:select-tests:name: Select testsneeds: [changes, turbo-discover]- # Only draft PRs do selective runs; ready PRs and non-PR events (push,- # merge_group) always run full, which build_django_matrix falls back to+ # Only draft PRs do selective runs; ready PRs and pushes always run full,+ # which build_django_matrix falls back to# when select-tests is skipped (empty MODE). The run-ci-backend label# forces the full matrices on a draft.if: |diff --git a/.github/workflows/ci-clickhouse-hcl-schema.yml b/.github/workflows/ci-clickhouse-hcl-schema.ymlindex dbdebd986242..e1798a9066a8 100644--- a/.github/workflows/ci-clickhouse-hcl-schema.yml+++ b/.github/workflows/ci-clickhouse-hcl-schema.yml@@ -16,7 +16,6 @@ on:paths:- 'posthog/clickhouse/hcl/**'- '.github/workflows/ci-clickhouse-hcl-schema.yml'- merge_group:workflow_dispatch:concurrency:diff --git a/.github/workflows/ci-clickhouse-multinode-migrations.yml b/.github/workflows/ci-clickhouse-multinode-migrations.ymlindex 4b197b0b1401..7bd49c7b38f8 100644--- a/.github/workflows/ci-clickhouse-multinode-migrations.yml+++ b/.github/workflows/ci-clickhouse-multinode-migrations.yml@@ -15,7 +15,6 @@ on:- 'tools/infra-scripts/clickhouse-multinode/**'- 'posthog/clickhouse/hcl/**'- '.github/workflows/ci-clickhouse-multinode-migrations.yml'- merge_group:workflow_dispatch:concurrency:@@ -97,27 +96,18 @@ jobs:- name: Compute Postgres schema cache keyid: schema-key- if: github.event_name == 'pull_request' || github.event_name == 'merge_group'+ if: github.event_name == 'pull_request'env:BASE_REF: ${{ github.event.pull_request.base.ref }}- # On merge_group the queue branch is built directly on top of- # this base SHA (latest master), so it is exactly the SHA the- # cache producer keyed off — no merge-base computation needed.- MERGE_GROUP_BASE_SHA: ${{ github.event.merge_group.base_sha }}run: |# ci-backend.yml's "Validate migrations" job dumps the post-PR# schema and caches it keyed by master SHA. PR jobs key off the# merge base so they restore the dump produced by the commit- # their branch diverged from; merge_group jobs key off the- # queue's base SHA directly.- if [ "${GITHUB_EVENT_NAME}" = "merge_group" ]; then- BASE_SHA="${MERGE_GROUP_BASE_SHA}"- else- # fetch-depth: 1000 on checkout bounds how far back the- # merge base can be found; older divergence yields an empty- # result and the graceful fallback to `migrate` below.- BASE_SHA=$(git merge-base HEAD^2 "origin/${BASE_REF}" 2>/dev/null || echo "")- fi+ # their branch diverged from.+ # fetch-depth: 1000 on checkout bounds how far back the+ # merge base can be found; older divergence yields an empty+ # result and the graceful fallback to `migrate` below.+ BASE_SHA=$(git merge-base HEAD^2 "origin/${BASE_REF}" 2>/dev/null || echo "")# Always emit a key so the restore runs; when the exact branch-point# SHA is unknown, the bare prefix lets restore-keys fall back to the# most recent cached master schema (any valid schema works — the smoke@@ -125,7 +115,7 @@ jobs:echo "key=posthog-schema-master-${BASE_SHA}" >> "$GITHUB_OUTPUT"- name: Restore Postgres schema cache- if: github.event_name == 'pull_request' || github.event_name == 'merge_group'+ if: github.event_name == 'pull_request'uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3with:path: schema.sql.gzdiff --git a/.github/workflows/ci-dagster.yml b/.github/workflows/ci-dagster.ymlindex 25258112b691..c3f49c981b1c 100644--- a/.github/workflows/ci-dagster.yml+++ b/.github/workflows/ci-dagster.yml@@ -5,11 +5,6 @@ on:branches:- masterpull_request:- # Required so `Dagster Tests Pass` (a required status check) reports on merge- # queue entries — without it the queue would wait for the check until timeout.- # The jobs themselves skip on merge_group (the suite already runs in full on- # every PR) and the aggregator treats skipped as success.- merge_group:concurrency:group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}@@ -48,7 +43,6 @@ jobs:runs-on: ubuntu-latesttimeout-minutes: 5name: Validate dagster path filter coverage- if: github.event_name != 'merge_group'steps:- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2with:@@ -64,7 +58,6 @@ jobs:runs-on: ubuntu-latesttimeout-minutes: 5name: Determine need to run dagster checks- if: github.event_name != 'merge_group'# Set job outputs to values from filter stepoutputs:dagster: ${{ steps.filter.outputs.dagster || 'true' }}@@ -435,8 +428,8 @@ jobs:path: junit-*.xml# Upload results to Trunk for flaky-test detection. Non-gating (continue-on-error),- # so a Trunk outage never fails the job. Runs the token only on internal PRs,- # master, and the merge queue — never on fork PRs or Dependabot, which have no secret.+ # so a Trunk outage never fails the job. Runs the token only on internal PRs+ # and master, never on fork PRs or Dependabot, which have no secret.# The TRUNK_UPLOAD_ENABLED repo variable is the kill-switch: when it is not 'true'# this upload skips.- name: Upload test results to Trunkdiff --git a/.github/workflows/ci-e2e-playwright.yml b/.github/workflows/ci-e2e-playwright.ymlindex 4e34ab8ed617..ef20716bf6cc 100644--- a/.github/workflows/ci-e2e-playwright.yml+++ b/.github/workflows/ci-e2e-playwright.yml@@ -21,11 +21,6 @@ on:push:branches:- master- # Required so `Playwright tests pass` (a required status check) reports on- # merge queue entries — without it the queue would wait for the check until- # timeout. The jobs themselves skip on merge_group (the suite already runs- # in full on every PR) and the aggregator treats skipped as success.- merge_group:permissions:contents: read@@ -85,11 +80,10 @@ jobs:# Drafts skip E2E (see the trigger comment); the `Playwright tests pass`# aggregator treats skipped as success, and drafts can't merge anyway.if: |- github.event_name != 'merge_group' && (github.event_name == 'push' ||github.event_name == 'workflow_dispatch' ||(github.event.pull_request.head.repo.full_name == github.repository &&- github.event.pull_request.draft != true))+ github.event.pull_request.draft != true)name: Determine need to run E2E checksoutputs:# Debounce can veto a PR run whose SHA has already been superseded (see below).@@ -313,7 +307,7 @@ jobs:needs: [changes]# Narrow the suite only on incremental `synchronize` pushes to a ready# (non-draft) internal PR. Every other trigger — opened, reopened,- # ready_for_review, workflow_dispatch, push to master, merge_group — skips+ # ready_for_review, workflow_dispatch, and push to master — skips# this job, leaving empty outputs so the playwright job runs the FULL suite.# The merge gate (ready_for_review run) and the post-merge master run always# run everything, so a selection miss is caught there. Fail-open is FULL,diff --git a/.github/workflows/ci-frontend.yml b/.github/workflows/ci-frontend.ymlindex 5268a231bbd4..d44d12fd0d19 100644--- a/.github/workflows/ci-frontend.yml+++ b/.github/workflows/ci-frontend.yml@@ -7,7 +7,6 @@ on:# draft, add the `run-ci-frontend` label — labeled/unlabeled re-trigger# the run so it starts without needing a new push.types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]- merge_group:push:branches:- master@@ -162,7 +161,7 @@ jobs:# Pick which jest tests to run on draft PRs by passing changed files to# `jest --findRelatedTests` (jest's resolver walks the import graph for us).- # Skipped on ready PRs, master push, and merge_group; the jest job falls back+ # Skipped on ready PRs and master pushes; the jest job falls back# to its full FOSS×EE × chunk matrix in those cases. The ready-for-review# full run is the merge gate. The run-ci-frontend label forces the full# matrix on a draft. When selection can't be trusted on a draft (config@@ -332,7 +331,7 @@ jobs:frontend-bundle-size:name: Frontend bundle sizeneeds: [changes]- if: needs.changes.outputs.frontend_code == 'true' && github.event_name != 'merge_group'+ if: needs.changes.outputs.frontend_code == 'true'runs-on: ubuntu-latesttimeout-minutes: 10steps:@@ -643,7 +642,7 @@ jobs:# On draft PRs, select-jest-tests may narrow this to a single EE job# running only the tests reachable from changed frontend source files,# or skip jest entirely (should_run=false) when selection can't be- # trusted. On ready PRs, master push, and merge_group it's skipped, so+ # trusted. On ready PRs and master pushes it's skipped, so# we fall back to the full FOSS×EE × chunk fanout (the merge gate).matrix: ${{ fromJson(needs.select-jest-tests.outputs.matrix || '{"segment":["FOSS","EE"],"chunk":[1,2,3,4]}') }}diff --git a/.github/workflows/ci-llm-gateway.yml b/.github/workflows/ci-llm-gateway.ymlindex 907b56622602..7275f8bb7b5f 100644--- a/.github/workflows/ci-llm-gateway.yml+++ b/.github/workflows/ci-llm-gateway.yml@@ -13,7 +13,6 @@ on:branches:- masterpull_request:- merge_group:concurrency:group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}diff --git a/.github/workflows/ci-mcp.yml b/.github/workflows/ci-mcp.ymlindex d3dfc1ade326..cde84648b8e5 100644--- a/.github/workflows/ci-mcp.yml+++ b/.github/workflows/ci-mcp.yml@@ -8,11 +8,6 @@ on:# the full PostHog backend and trigger on any Python change) run when the# PR is marked ready for review — that full run is the merge gate.types: [opened, synchronize, reopened, ready_for_review]- # Required so `MCP Tests Pass` (a required status check) reports on merge- # queue entries — without it the queue would wait for the check until timeout.- # The jobs themselves skip on merge_group (the suite already runs in full on- # every PR) and the aggregator treats skipped as success.- merge_group:concurrency:group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}@@ -30,7 +25,6 @@ jobs:runs-on: ubuntu-24.04timeout-minutes: 5name: Determine need to run MCP checks- if: github.event_name != 'merge_group'outputs:mcp: ${{ steps.filter.outputs.mcp || 'true' }}steps:diff --git a/.github/workflows/ci-migrations-service-separation-check.yml b/.github/workflows/ci-migrations-service-separation-check.ymlindex 8e8047948268..98ebb6fb6714 100644--- a/.github/workflows/ci-migrations-service-separation-check.yml+++ b/.github/workflows/ci-migrations-service-separation-check.yml@@ -1,7 +1,6 @@name: Migration & Service Separation Check# Reusable workflow, called by pr-housekeeping.yml on every PR push.-# merge_group stays as a direct trigger for the merge queue.on:workflow_call:@@ -10,7 +9,6 @@ on:required: falseGH_APP_POSTHOG_PATHS_FILTER_PRIVATE_KEY:required: false- merge_group:permissions:contents: read@@ -31,25 +29,9 @@ jobs:- name: Check for skip labelid: skip-labelenv:- GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}- EVENT_NAME: ${{ github.event_name }}PR_LABELS_JSON: ${{ toJson(github.event.pull_request.labels.*.name) }}- GITHUB_REF: ${{ github.ref }}- GITHUB_REPOSITORY: ${{ github.repository }}run: |- if [ "$EVENT_NAME" = "pull_request" ] || [ "$EVENT_NAME" = "workflow_call" ]; then- labels="$PR_LABELS_JSON"- elif [ "$EVENT_NAME" = "merge_group" ]; then- # GITHUB_REF looks like refs/heads/gh-readonly-queue/<base>/pr-<num>-<sha>- pr_num=$(echo "$GITHUB_REF" | grep -oE 'pr-[0-9]+' | head -1 | sed 's/pr-//')- if [ -n "$pr_num" ]; then- labels=$(gh api "repos/$GITHUB_REPOSITORY/issues/$pr_num/labels" --jq '[.[].name]')- else- labels='[]'- fi- else- labels='[]'- fi+ labels="$PR_LABELS_JSON"echo "Labels: $labels"if echo "$labels" | grep -q '"skip-migration-service-check"'; thenecho "skip=true" >> "$GITHUB_OUTPUT"diff --git a/.github/workflows/ci-ml-mirror-image-scrub-container.yml b/.github/workflows/ci-ml-mirror-image-scrub-container.ymlindex e8e9801c81be..13edd8fba268 100644--- a/.github/workflows/ci-ml-mirror-image-scrub-container.yml+++ b/.github/workflows/ci-ml-mirror-image-scrub-container.yml@@ -3,7 +3,6 @@ name: Build and deploy ml-mirror-image-scrub container imageon:workflow_dispatch:pull_request:- merge_group:push:branches:- 'master'@@ -19,7 +18,7 @@ jobs:contents: readpull-requests: readtimeout-minutes: 5- if: github.repository_owner == 'PostHog' && github.event_name != 'merge_group'+ if: github.repository_owner == 'PostHog'name: Determine need to run ml-mirror-image-scrub Docker buildoutputs:scrub_files: ${{ steps.filter.outputs.scrub_files }}@@ -46,9 +45,7 @@ jobs:test:needs: changesname: Unit-test ml-mirror-image-scrub- if: |- (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && needs.changes.outputs.scrub_files == 'true') ||- github.event_name == 'merge_group'+ if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && needs.changes.outputs.scrub_files == 'true'runs-on: ubuntu-24.04timeout-minutes: 10permissions:@@ -87,7 +84,6 @@ jobs:name: Build and push ml-mirror-image-scrub imageif: |(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && needs.changes.outputs.scrub_files == 'true') ||- github.event_name == 'merge_group' ||(github.event_name == 'workflow_dispatch' && github.repository_owner == 'PostHog' && vars.CD_DEPLOY_ENABLED == 'true') ||(github.event_name == 'push' && github.ref == 'refs/heads/master' && needs.changes.outputs.scrub_files == 'true' && github.repository_owner == 'PostHog' && vars.CD_DEPLOY_ENABLED == 'true')runs-on: depot-ubuntu-latest@@ -133,7 +129,7 @@ jobs:buildx-fallback: false# Depot project "replay-vision-ingestion-ml-mirror-image-scrub".project: 'hmrgpk84ch'- push: ${{ github.event_name == 'pull_request' || github.event_name == 'merge_group' || vars.CD_DEPLOY_ENABLED == 'true' }}+ push: ${{ github.event_name == 'pull_request' || vars.CD_DEPLOY_ENABLED == 'true' }}file: Dockerfile.ml-mirror-image-scrubtags: ${{ steps.docker-meta.outputs.tags }}labels: ${{ steps.docker-meta.outputs.labels }}diff --git a/.github/workflows/ci-nodejs-container.yml b/.github/workflows/ci-nodejs-container.ymlindex bf957a8c226c..b48cbb8d9146 100644--- a/.github/workflows/ci-nodejs-container.yml+++ b/.github/workflows/ci-nodejs-container.yml@@ -2,8 +2,7 @@ name: Build and deploy node container imageon:workflow_dispatch:- # paths mirror the changes job's dorny filter, which still gates push and- # merge_group events (merge_group triggers don't support paths).+ # paths mirror the changes job's dorny filter, which still gates push events.pull_request:paths:- 'nodejs/**'@@ -22,7 +21,6 @@ on:- 'package.json'- 'pnpm-lock.yaml'- 'pnpm-workspace.yaml'- merge_group:push:branches:- 'master'@@ -38,7 +36,7 @@ jobs:contents: readpull-requests: readtimeout-minutes: 5- if: github.repository_owner == 'PostHog' && github.event_name != 'merge_group'+ if: github.repository_owner == 'PostHog'name: Determine need to run node Docker buildoutputs:node_files: ${{ steps.filter.outputs.node_files }}@@ -81,7 +79,6 @@ jobs:name: Build and push node imageif: |(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && needs.changes.outputs.node_files == 'true') ||- github.event_name == 'merge_group' ||(github.event_name == 'push' && github.ref == 'refs/heads/master' && needs.changes.outputs.node_files == 'true' && github.repository_owner == 'PostHog' && vars.CD_DEPLOY_ENABLED == 'true')runs-on: depot-ubuntu-latesttimeout-minutes: 30@@ -122,7 +119,7 @@ jobs:context: .buildx-fallback: falseproject: '00mrvlsdvh'- push: ${{ github.event_name == 'pull_request' || github.event_name == 'merge_group' || vars.CD_DEPLOY_ENABLED == 'true' }}+ push: ${{ github.event_name == 'pull_request' || vars.CD_DEPLOY_ENABLED == 'true' }}file: Dockerfile.nodetags: ${{ steps.docker-meta.outputs.tags }}labels: ${{ steps.docker-meta.outputs.labels }}diff --git a/.github/workflows/ci-nodejs.yml b/.github/workflows/ci-nodejs.ymlindex 347744b24427..baa8c6f5a3c8 100644--- a/.github/workflows/ci-nodejs.yml+++ b/.github/workflows/ci-nodejs.yml@@ -1,7 +1,6 @@name: Node.js CIon:pull_request:- merge_group:push:branches:- master@@ -89,7 +88,7 @@ jobs:uses: ./.github/actions/rust-compute-affectedwith:event-name: ${{ github.event_name }}- pr-base-sha: ${{ github.event.pull_request.base.sha || github.event.merge_group.base_sha }}+ pr-base-sha: ${{ github.event.pull_request.base.sha }}push-before-sha: ${{ github.event.before }}- name: Decide whether Node.js checks should rundiff --git a/.github/workflows/ci-paths-filter.yml b/.github/workflows/ci-paths-filter.ymlindex 2e5967e275b6..69af66d355c3 100644--- a/.github/workflows/ci-paths-filter.yml+++ b/.github/workflows/ci-paths-filter.yml@@ -5,7 +5,6 @@ on:paths:- '.github/actions/paths-filter/**'- '.github/workflows/ci-paths-filter.yml'- merge_group:concurrency:group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}diff --git a/.github/workflows/ci-proto.yml b/.github/workflows/ci-proto.ymlindex eca198fdd7f0..01ebba3f00ac 100644--- a/.github/workflows/ci-proto.yml+++ b/.github/workflows/ci-proto.yml@@ -4,7 +4,6 @@ on:push:branches: [master]pull_request:- merge_group:concurrency:group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}diff --git a/.github/workflows/ci-python.yml b/.github/workflows/ci-python.ymlindex 891fc2f2638b..4633eefb9a8a 100644--- a/.github/workflows/ci-python.yml+++ b/.github/workflows/ci-python.yml@@ -5,7 +5,6 @@ on:branches:- masterpull_request:- merge_group:permissions:contents: read@@ -235,8 +234,8 @@ jobs:path: junit-dependency-detection.xml# Upload results to Trunk for flaky-test detection. Non-gating (continue-on-error),- # so a Trunk outage never fails the job. Runs the token only on internal PRs,- # master, and the merge queue — never on fork PRs or Dependabot, which have no secret.+ # so a Trunk outage never fails the job. Runs the token only on internal PRs+ # and master, never on fork PRs or Dependabot, which have no secret.# The TRUNK_UPLOAD_ENABLED repo variable is the kill-switch: when it is not 'true'# this upload skips.- name: Upload test results to Trunkdiff --git a/.github/workflows/ci-recording-rasterizer-container.yml b/.github/workflows/ci-recording-rasterizer-container.ymlindex a34740acee1a..7bda24099140 100644--- a/.github/workflows/ci-recording-rasterizer-container.yml+++ b/.github/workflows/ci-recording-rasterizer-container.yml@@ -2,8 +2,7 @@ name: Build and deploy recording-rasterizer container imageon:workflow_dispatch:- # paths mirror the changes job's dorny filter, which still gates push and- # merge_group events (merge_group triggers don't support paths).+ # paths mirror the changes job's dorny filter, which still gates push events.pull_request:paths:- 'nodejs/**'@@ -23,7 +22,6 @@ on:- 'package.json'- 'pnpm-lock.yaml'- 'pnpm-workspace.yaml'- merge_group:push:branches:- 'master'@@ -43,7 +41,7 @@ jobs:contents: readpull-requests: readtimeout-minutes: 5- if: github.repository_owner == 'PostHog' && github.event_name != 'merge_group'+ if: github.repository_owner == 'PostHog'name: Determine need to run recording-rasterizer Docker buildoutputs:rasterizer_files: ${{ steps.filter.outputs.rasterizer_files }}@@ -87,7 +85,6 @@ jobs:name: Build and push recording-rasterizer imageif: |(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && needs.changes.outputs.rasterizer_files == 'true') ||- github.event_name == 'merge_group' ||(github.event_name == 'workflow_dispatch' && github.repository_owner == 'PostHog' && vars.CD_DEPLOY_ENABLED == 'true') ||(github.event_name == 'schedule' && github.repository_owner == 'PostHog' && vars.CD_DEPLOY_ENABLED == 'true') ||(github.event_name == 'push' && github.ref == 'refs/heads/master' && needs.changes.outputs.rasterizer_files == 'true' && github.repository_owner == 'PostHog' && vars.CD_DEPLOY_ENABLED == 'true')@@ -133,7 +130,7 @@ jobs:context: .buildx-fallback: falseproject: '00mrvlsdvh'- push: ${{ github.event_name == 'pull_request' || github.event_name == 'merge_group' || vars.CD_DEPLOY_ENABLED == 'true' }}+ push: ${{ github.event_name == 'pull_request' || vars.CD_DEPLOY_ENABLED == 'true' }}file: Dockerfile.recording-rasterizertags: ${{ steps.docker-meta.outputs.tags }}labels: ${{ steps.docker-meta.outputs.labels }}diff --git a/.github/workflows/ci-rust.yml b/.github/workflows/ci-rust.ymlindex 61c6bf1eec5f..81160f0d0552 100644--- a/.github/workflows/ci-rust.yml+++ b/.github/workflows/ci-rust.yml@@ -4,7 +4,6 @@ on:push:branches: [master, main]pull_request:- merge_group:concurrency:group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}@@ -102,7 +101,7 @@ jobs:uses: ./.github/actions/rust-compute-affectedwith:event-name: ${{ github.event_name }}- pr-base-sha: ${{ github.event.pull_request.base.sha || github.event.merge_group.base_sha }}+ pr-base-sha: ${{ github.event.pull_request.base.sha }}push-before-sha: ${{ github.event.before }}rebuild-all: ${{ github.event_name == 'workflow_dispatch' && 'true' || 'false' }}@@ -470,8 +469,8 @@ jobs:done# Upload results to Trunk for flaky-test detection. Non-gating (continue-on-error),- # so a Trunk outage never fails the job. Runs the token only on internal PRs,- # master, and the merge queue — never on fork PRs or Dependabot, which have no secret.+ # so a Trunk outage never fails the job. Runs the token only on internal PRs+ # and master, never on fork PRs or Dependabot, which have no secret.# The TRUNK_UPLOAD_ENABLED repo variable is the kill-switch: when it is not 'true'# this upload skips.- name: Upload test results to Trunkdiff --git a/.github/workflows/ci-security.yaml b/.github/workflows/ci-security.yamlindex a4fcdefc1154..f7e58b1732ce 100644--- a/.github/workflows/ci-security.yaml+++ b/.github/workflows/ci-security.yaml@@ -3,7 +3,6 @@ on:branches:- masterpull_request:- merge_group:name: Securitydiff --git a/.github/workflows/ci-storybook.yml b/.github/workflows/ci-storybook.ymlindex 8fd927f48457..e97d35a6c02a 100644--- a/.github/workflows/ci-storybook.yml+++ b/.github/workflows/ci-storybook.yml@@ -7,7 +7,6 @@ on:# `run-ci-frontend` label —# labeled/unlabeled re-trigger the run so it starts without needing a push.types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]- merge_group:push:branches:- master@@ -26,7 +25,6 @@ jobs:runs-on: ubuntu-latesttimeout-minutes: 5name: Determine need to run storybook checks- if: github.event_name != 'merge_group'# Set job outputs to values from filter stepoutputs:# Two positive filters compared by count exclude generated-only PRs.@@ -265,8 +263,8 @@ jobs:runs-on: ubuntu-latesttimeout-minutes: 5needs: [changes, build-storybook, select-stories]- # always() so vr-setup still runs when select-stories is skipped (ready PRs,- # master push, merge_group). Without it, GitHub treats a skipped need as a+ # always() so vr-setup still runs when select-stories is skipped (ready PRs+ # and master pushes). Without it, GitHub treats a skipped need as a# skip-cascade and vr-setup wouldn't run when we still want it to.if: |always()@@ -359,7 +357,6 @@ jobs:# Draft PRs may use chromium shards running only affected story files.# Ready PRs fall back to changes.outputs.matrix (full chromium), while# master pushes run chromium + webkit.- # Storybook CI is skipped entirely on merge_group (changes.if).matrix: ${{ fromJson(needs.select-stories.outputs.matrix || needs.changes.outputs.matrix) }}env:NODE_OPTIONS: --max-old-space-size=16384@@ -617,7 +614,7 @@ jobs:# Change detection is the root of the graph: if it fails, build-storybook# (and everything after) is skipped, which the checks below would read as# a pass. Fail here so a broken paths-filter/checkout can't launder into a- # green required check. A legitimate skip (e.g. merge_group) still passes.+ # green required check.if [[ "${{ needs.changes.result }}" != "success" && "${{ needs.changes.result }}" != "skipped" ]]; thenecho "Change detection did not succeed (result: ${{ needs.changes.result }}) — cannot certify visual regression."exit 1@@ -992,8 +989,7 @@ jobs:runs-on: ubuntu-latestcontinue-on-error: truetimeout-minutes: 10- # Storybook CI is skipped on merge_group, so visual-regression won't run there;- # != 'skipped' keeps this from spinning a runner that downloads nothing, while still+ # Avoid spinning a runner when visual-regression was skipped, while still# uploading failed-test results (the flake signal Trunk needs) on master push.# The TRUNK_UPLOAD_ENABLED repo variable is the kill-switch: when it is not 'true'# this job skips, so no results upload.diff --git a/.github/workflows/container-images-ci.yml b/.github/workflows/container-images-ci.ymlindex 1f5dd956c83b..671f1ab9fb11 100644--- a/.github/workflows/container-images-ci.yml+++ b/.github/workflows/container-images-ci.yml@@ -6,7 +6,6 @@ on:# retroactively kick off a build. ci-hobby.yml omits `reopened`, so we# do too — otherwise reopens would build an image with no consumer.types: [opened, synchronize, labeled, unlabeled]- merge_group:concurrency:group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}@@ -16,9 +15,6 @@ jobs:changes:runs-on: ubuntu-24.04timeout-minutes: 5- # Runs on merge_group too so the lint job below (a required check) can consume- # its changed-Dockerfile list there. should_build is ignored on merge_group —- # posthog_build forces a build regardless via its own `if`.if: github.repository == 'PostHog/posthog'name: Determine need to run Docker checkspermissions:@@ -41,8 +37,6 @@ jobs:dockerfiles_changed: ${{ steps.filter.outputs.dockerfiles }}dockerfiles_files: ${{ steps.filter.outputs.dockerfiles_files }}steps:- # paths-filter uses the GitHub API on pull_request, but falls back to git for- # merge_group — so the repo must be checked out for the merge-queue run.- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2- uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3.1.1id: app-token@@ -86,7 +80,7 @@ jobs:# by the `hobby:` filter — workflow self-edits, `.dockerignore`# (silently changes the build context), and `pnpm-lock.yaml` so# Renovate-style dep bumps are exercised on PR (otherwise they'd- # only fail at merge_group / master push).+ # only fail after merging).build_inputs:- .github/workflows/container-images-ci.yml- .github/actions/build-n-cache-image/**@@ -108,8 +102,7 @@ jobs:name: Guard against dropped image filesruns-on: ubuntu-24.04timeout-minutes: 10- # PR-time only (event == pull_request), so it's skipped on merge_group. Needs no secrets or- # docker login — unlike the image build below, it runs on fork PRs too.+ # Needs no secrets or docker login, so unlike the image build below it runs on fork PRs too.if: github.event_name == 'pull_request' && needs.changes.outputs.dockerignore_changed == 'true'permissions:contents: read@@ -131,7 +124,7 @@ jobs:id-token: write # allow issuing OIDC tokens for this workflow runcontents: read # allow at least reading the repo contents, add other permissions if necessary# Only on PostHog/posthog, as there's no docker login on forks- if: ${{ (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && needs.changes.outputs.should_build == 'true') || github.event_name == 'merge_group' }}+ if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && needs.changes.outputs.should_build == 'true'outputs:digest: ${{ steps.build.outputs.digest }}diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.ymlindex 4924ad96ae5b..70abf31e4e54 100644--- a/.github/workflows/shellcheck.yml+++ b/.github/workflows/shellcheck.yml@@ -2,7 +2,6 @@ name: shellcheckon:pull_request:- merge_group:permissions:contents: readdiff --git a/tools/hogli-commands/hogli_commands/workflow_lint/checks/cache_writes.py b/tools/hogli-commands/hogli_commands/workflow_lint/checks/cache_writes.pyindex 7a4354d933c6..b0761f05c95f 100644--- a/tools/hogli-commands/hogli_commands/workflow_lint/checks/cache_writes.py+++ b/tools/hogli-commands/hogli_commands/workflow_lint/checks/cache_writes.py@@ -53,7 +53,7 @@ SETUP_CACHE_ACTIONS = (# triggers whose runs can land on a non-default ref (workflow_dispatch is excluded# on purpose — see module docstring, condition 1)-BRANCH_REF_TRIGGERS = frozenset({"pull_request", "pull_request_target", "merge_group", "workflow_call"})+BRANCH_REF_TRIGGERS = frozenset({"pull_request", "pull_request_target", "workflow_call"})# step `if:` substrings (whitespace-stripped) that pin a write to the default branch.# Positive `==` only, so a negation like `github.ref != 'refs/heads/master'` (which runs