Skip to content

: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.

chore(ci): install the depot cli for agent ci triage (#105247)

Raúl Negrón-Oteroc97eb75fd158
diff --git a/.agents/skills/debugging-ci-failures/SKILL.md b/.agents/skills/debugging-ci-failures/SKILL.md
index ca304ea22838..10f2becf3866 100644
--- a/.agents/skills/debugging-ci-failures/SKILL.md
+++ b/.agents/skills/debugging-ci-failures/SKILL.md
@@ -5,7 +5,7 @@ description: >
and answers broad CI-health questions ("is CI red?", "is master green today?",
"what's broken right now?"). Use when the user asks why CI is red, asks for the
current CI or master status, or mentions a failing check, GitHub Actions run,
- Depot runner, workflow, job, shard, merge queue kick, flaky test, lint failure, typecheck
+ Depot runner, Depot CI run, workflow, job, shard, merge queue kick, flaky test, lint failure, typecheck
failure, snapshot diff, migration check, generated types drift, or skills
build failure. Interactive runs start with the `hogli ci:insights` digest
(cross-run CI history from engineering analytics), then use read-only
@@ -59,7 +59,7 @@ Report an outage as an outage, name the component, and stop recommending reruns.
Do not do any of these without explicit approval in the current conversation:
-- Rerun or cancel a GitHub Actions run.
+- Rerun or cancel a GitHub Actions run, or retry, rerun, or cancel a Depot CI run.
- Post a GitHub comment, PR review, or issue comment through any CLI, MCP, or
API tool.
- Push commits, force-push, rename branches, or delete branches.
@@ -246,6 +246,22 @@ token to the server entry in `.mcp.json`. To dig into one test's flakiness
history, hand off to `fixing-flaky-tests`, which covers the `search-test` and
`fix-flaky-test` tools.
+#### Backend tests that ran on Depot CI
+
+A PR can route its backend tests to Depot CI.
+Then the GitHub Actions run holds only the relay: `Django Tests Pass` fails with "Backend tests on Depot CI concluded failure", and the GitHub run logs show nothing more.
+`gh run rerun` reads the same Depot result again.
+The log of the `Relay the Depot verdict` step prints the Depot run URL, the `depot ci` commands that diagnose and retry it, and the retry options that need no Depot access.
+
+Read the failure from Depot with the `depot` CLI, which the flox environment installs.
+Run the `depot ci diagnose` command from the relay log, which already fills in the org and workflow ids.
+For logs, artifacts, and test results, load the `depot-ci` skill.
+Its `references/posthog-check-run-semantics.md` gets Depot ids from a commit's check runs when you have no relay log.
+If a `depot` command fails to authenticate, check `DEPOT_TOKEN` first: it overrides the saved login, so a wrong one fails every command.
+Without it, ask the user to run `! depot login --clear`.
+Do not run it yourself: it waits on a browser sign-in.
+If the user has no access to the Depot org, report the relay log's no-Depot retry options instead.
+
## Classification
| Signal in the log | Class | First action |
@@ -331,9 +347,8 @@ Do NOT run `hogli test` with no arguments. Do NOT run `hogli nuke` or
browser through the chrome-devtools MCP. `status.depot.dev` covers the case
where Depot itself is the outage, and the `depot-github-runners` skill owns
runner troubleshooting beyond triage.
-- A PR can route its backend tests to Depot CI. Then `Django Tests Pass` only
- relays the Depot result, and `gh run rerun` reads the same failure again.
- The log of its `Relay the Depot verdict` step lists the retry options.
+- A PR can route its backend tests to Depot CI.
+ Read the failure there, see "Backend tests that ran on Depot CI" above.
- If a job fails before `Checkout` completes (no app code ran), classify as
`infra / runner`. Do not propose code fixes.
- PostHog CI frequently parallelizes the same test class across N shards
diff --git a/.flox/env/manifest.lock b/.flox/env/manifest.lock
index d8cdb201dcd3..8bbbfa2a0622 100644
--- a/.flox/env/manifest.lock
+++ b/.flox/env/manifest.lock
@@ -43,6 +43,11 @@
"dev"
]
},
+ "depot-cli": {
+ "pkg-path": "depot-cli",
+ "pkg-group": "depot",
+ "version": "^2.102"
+ },
"emscripten": {
"pkg-path": "emscripten",
"pkg-group": "emscripten",
@@ -3506,6 +3511,93 @@
"system": "x86_64-linux",
"group": "uv",
"priority": 5
+ },
+ {
+ "attr_path": "depot-cli",
+ "broken": false,
+ "derivation": "/nix/store/8hnwcq7wrlzwizkrxjhib7bx82llp5xi-depot-cli-2.102.9.drv",
+ "description": "Official CLI for the Depot Docker image builder",
+ "install_id": "depot-cli",
+ "license": "MIT",
+ "locked_url": "https://github.com/flox/nixpkgs?rev=6774f7bc253789b113a4f39285dc0fa100abeacc",
+ "name": "depot-cli-2.102.9",
+ "pname": "depot-cli",
+ "rev": "6774f7bc253789b113a4f39285dc0fa100abeacc",
+ "rev_count": 1077996,
+ "rev_date": "2026-09-22T03:11:10Z",
+ "scrape_date": "2026-09-23T04:58:05.803991Z",
+ "stabilities": [
+ "unstable"
+ ],
+ "unfree": false,
+ "version": "2.102.9",
+ "outputs_to_install": [
+ "out"
+ ],
+ "outputs": {
+ "out": "/nix/store/1bi1y13kr74rlmj8j4vslq993j1vdm5c-depot-cli-2.102.9"
+ },
+ "system": "aarch64-darwin",
+ "group": "depot",
+ "priority": 5
+ },
+ {
+ "attr_path": "depot-cli",
+ "broken": false,
+ "derivation": "/nix/store/zkw5dmf93pfr1wm7f2622g7lyw8yz10w-depot-cli-2.102.9.drv",
+ "description": "Official CLI for the Depot Docker image builder",
+ "install_id": "depot-cli",
+ "license": "MIT",
+ "locked_url": "https://github.com/flox/nixpkgs?rev=6774f7bc253789b113a4f39285dc0fa100abeacc",
+ "name": "depot-cli-2.102.9",
+ "pname": "depot-cli",
+ "rev": "6774f7bc253789b113a4f39285dc0fa100abeacc",
+ "rev_count": 1077996,
+ "rev_date": "2026-09-22T03:11:10Z",
+ "scrape_date": "2026-09-23T05:29:39.537297Z",
+ "stabilities": [
+ "unstable"
+ ],
+ "unfree": false,
+ "version": "2.102.9",
+ "outputs_to_install": [
+ "out"
+ ],
+ "outputs": {
+ "out": "/nix/store/ld8k0nmfl02ysjkkr9l2m5i3hy893sn3-depot-cli-2.102.9"
+ },
+ "system": "aarch64-linux",
+ "group": "depot",
+ "priority": 5
+ },
+ {
+ "attr_path": "depot-cli",
+ "broken": false,
+ "derivation": "/nix/store/vjh6m3hgsafr06qx6ajfmva818rfwq2f-depot-cli-2.102.9.drv",
+ "description": "Official CLI for the Depot Docker image builder",
+ "install_id": "depot-cli",
+ "license": "MIT",
+ "locked_url": "https://github.com/flox/nixpkgs?rev=6774f7bc253789b113a4f39285dc0fa100abeacc",
+ "name": "depot-cli-2.102.9",
+ "pname": "depot-cli",
+ "rev": "6774f7bc253789b113a4f39285dc0fa100abeacc",
+ "rev_count": 1077996,
+ "rev_date": "2026-09-22T03:11:10Z",
+ "scrape_date": "2026-09-23T06:06:17.967455Z",
+ "stabilities": [
+ "unstable"
+ ],
+ "unfree": false,
+ "version": "2.102.9",
+ "outputs_to_install": [
+ "out"
+ ],
+ "outputs": {
+ "out": "/nix/store/y9pf0adrvbwj3ki0ab9nch76p9y1d05v-depot-cli-2.102.9"
+ },
+ "system": "x86_64-linux",
+ "group": "depot",
+ "priority": 5
}
]
}
diff --git a/.flox/env/manifest.toml b/.flox/env/manifest.toml
index 72c9065865b4..b8293012244b 100644
--- a/.flox/env/manifest.toml
+++ b/.flox/env/manifest.toml
@@ -62,6 +62,9 @@ emscripten = { pkg-path = "emscripten", pkg-group = "emscripten", version = "4.0
libpthread-stubs = { pkg-path = "libpthread-stubs", pkg-group = "emscripten" }
watchman = { pkg-path = "watchman" } # Fast file watching for Django/Celery autoreload (uses pywatchman)
trunk-io = { pkg-path = "trunk-io", version = "^1.3.4" } # Launcher for the Trunk merge queue CLI; the CLI version itself is pinned in .trunk/trunk.yaml
+# depot-cli has its own group because the toplevel group's version pins cannot resolve with it.
+# Keep its version floor current: flox puts its bin first on PATH, so an old lock shadows a newer host `depot`.
+depot-cli = { pkg-path = "depot-cli", pkg-group = "depot", version = "^2.102" }
# Set environment variables in the `[vars]` section. These variables may not
# reference one another, and are added to the environment without first