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): make depot ci run work for agents (#127526)

Raúl Negrón-Oterob1586eef21ea
diff --git a/.agents/skills/debugging-ci-failures/SKILL.md b/.agents/skills/debugging-ci-failures/SKILL.md
index ff5c4396a438..4272a836bca0 100644
--- a/.agents/skills/debugging-ci-failures/SKILL.md
+++ b/.agents/skills/debugging-ci-failures/SKILL.md
@@ -60,6 +60,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, or retry, rerun, or cancel a Depot CI run.
+ The exception is a check-job run from your working tree, see "Run a Depot CI check job from your working tree".
- 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.
@@ -351,6 +352,28 @@ is unclear, read `.agents/skills/hogli/SKILL.md` and `hogli <command> --help`.
Do NOT run `hogli test` with no arguments. Do NOT run `hogli nuke` or
`hogli dev:reset` as a shortcut. Do NOT bypass hooks with `--no-verify`.
+### Run a Depot CI check job from your working tree
+
+Fix with the local `hogli` command first.
+Use `depot ci run` only when that command passes locally and the job still fails in CI.
+It tests your working tree on Depot without a push. The `depot-ci` skill has the flags.
+
+```bash
+depot ci run --workflow .depot/workflows/ci-backend.yml --job <job>
+```
+
+- `<job>` is `repo-checks` or `sdk-major-guard`. Always pass `--job`: the whole workflow is over Depot's inline size limit.
+- Any other job needs approval. CLI runs skip test selection, and `check-migrations` and `check-openapi-types` mishandle the patch.
+- `repo-checks` skips its pull-request-only steps on a CLI run, so a green run does not cover them.
+- At most 2 runs per task without approval.
+- Ask before every run when `HEAD` is an open PR's head: the run posts its checks to that commit.
+- Only tracked files reach the patch. `git add` new files first.
+- `--ssh-after-step` bills for the whole pause. Use it only with approval, then `depot ci cancel`.
+
+After each run, poll `depot ci status <run-id>` (`--wait` needs CLI 2.102.19+).
+On failure, read `depot ci diagnose --job <job-id> --output json`, and confirm it against `depot ci logs <attempt-id>`.
+Reproduce and fix locally before the next run. At the cap, stop and report the run ids and the remaining blocker.
+
## PostHog CI notes
- Most PostHog jobs run on `depot-ubuntu-latest` or `depot-ubuntu-latest-16`.
@@ -363,7 +386,7 @@ Do NOT run `hogli test` with no arguments. Do NOT run `hogli nuke` or
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.
- Read the failure there, see "Backend tests that ran on Depot CI" above.
+ Read the failure there, see "Backend tests 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/.agents/skills/depot-ci/SKILL.md b/.agents/skills/depot-ci/SKILL.md
index ac7b6f8100a9..65e5ea81c435 100644
--- a/.agents/skills/depot-ci/SKILL.md
+++ b/.agents/skills/depot-ci/SKILL.md
@@ -150,9 +150,11 @@ depot ci run --workflow .depot/workflows/ci.yml --repo owner/repo
depot ci run --workflow .depot/workflows/ci.yml --forge depot
```
-The CLI detects GitHub, Origin, and Depot Code from git remotes. Depot Code is automatic only when all supported remotes use Depot Code; mirrored checkouts default to GitHub or Origin. Set `--forge` to `github`, `origin`, or `depot` to select a forge. Use `--repo <name>` to select a repository. When no matching remote exists, specify `--forge origin` or `--forge depot` for those forges.
+The CLI detects GitHub, Origin, Entire, and Depot Code from git remotes. Depot Code is automatic only when all supported remotes use Depot Code; mirrored checkouts use the other forge. Set `--forge` to `github`, `origin`, `entire`, or `depot` to select a forge. Use `--repo <name>` to select a repository. Without a matching remote, also specify `--forge` for non-GitHub repositories. Entire names include the namespace, such as `et/acme/api`.
-Local patches contain unpushed changes relative to the branch's remote state, or changes relative to the default branch for local-only branches. The CLI uploads the patch to Depot Cache and injects an application step after `actions/checkout`. Jobs that call reusable workflows have no steps for patch injection and run the merge-base code without local changes; the CLI warns about them.
+Local patches contain unpushed changes relative to the branch's remote state, or changes relative to the default branch for local-only branches. The patch applies after `actions/checkout` for the run's repository, including jobs in same-repository reusable workflows. Download or application failures fail the job. Use the latest CLI, because older versions may still warn that reusable workflow patches are unsupported.
+
+If an external reusable workflow checks out the run's repository, push your changes and run CI from that commit; local patches are rejected. In reusable workflows, move checkout out of a composite action with `continue-on-error`, or remove `continue-on-error`, so patch failures cannot be hidden.
Use `--ssh` / `--ssh-after-step` to start a debug session when launching a new run; both require exactly one `--job` and cannot be combined. Use `depot ci ssh` to connect to an already-running job. Pass `--follow` to stream the triggered run's logs: it follows the single requested job, or selects the only job and prompts when several are running. `--follow` cannot be combined with `--ssh` / `--ssh-after-step`.
@@ -167,7 +169,7 @@ depot ci dispatch --repo depot/cli --workflow deploy.yml --ref main \
depot ci dispatch --repo depot/cli --workflow deploy.yml --ref main --output json
```
-`--workflow` takes the workflow file's **basename** (for example `deploy.yml`), not the full path `.depot/workflows/deploy.yml`, matching GitHub's `workflow_dispatch` API convention. Required flags: `--repo <owner/repo>`, `--workflow <filename>`, `--ref <branch-or-tag>`. `--input <key>=<value>` is repeatable.
+`--workflow` takes the workflow file's **basename** (for example `deploy.yml`), not the full path `.depot/workflows/deploy.yml`, matching GitHub's `workflow_dispatch` API convention. Required flags: `--repo <owner/repo>` (or `<namespace>/<owner>/<repo>` for Entire), `--workflow <filename>`, `--ref <branch-or-tag>`. `--input <key>=<value>` is repeatable.
The `depot.actor` context identifies who created the run; `depot.triggering_actor` identifies who started the current attempt, including retries and reruns. Both expose `kind`, `id`, `email`, and `name`. Actor kinds are `user`, `organization_token`, `service`, and `github`; only users have an email. The corresponding environment variables are `DEPOT_ACTOR_KIND`, `DEPOT_ACTOR_ID`, `DEPOT_ACTOR_EMAIL`, `DEPOT_ACTOR_NAME`, `DEPOT_TRIGGERING_ACTOR_KIND`, `DEPOT_TRIGGERING_ACTOR_ID`, `DEPOT_TRIGGERING_ACTOR_EMAIL`, and `DEPOT_TRIGGERING_ACTOR_NAME`. GitHub actor contexts retain their GitHub meaning.
@@ -221,6 +223,8 @@ jobs:
The `image` value can be a shorthand name like `ci-base` (which Depot expands to `{orgId}.registry.depot.dev/depot/snapshots/ci-base`) or a full Depot Registry reference `{orgId}.registry.depot.dev/some-image`. It must reference an image created by a snapshot job, not an arbitrary image.
+Pin a reviewed snapshot with `image: <org-id>.registry.depot.dev/my-ci-image@sha256:<digest>`, using its full 64-character digest from Registry → repository → tag → Details. Keep a tag on snapshots still in use: digest pinning does not prevent retention from deleting them.
+
Available sizes: `2x8`, `4x16`, `8x32`, `16x64`, `32x128`, `64x256` (CPUs x RAM in GB).
**Constraints:** images get pushed to and must be pulled from the Depot registry (`registry.depot.dev`), external registries are not supported.
@@ -327,6 +331,12 @@ steps:
- **`DEPOT_JOB_URL`**: each job's environment includes `DEPOT_JOB_URL`, a direct link to the job in the Depot dashboard.
- **GitHub checks**: Depot CI automatically reports a GitHub check for each job in a workflow run.
+Completed GitHub checks include errors, annotations, step summaries from `$GITHUB_STEP_SUMMARY`, and artifact links to the Depot job. Use workflow commands such as `::error file=src/example.ts,line=10::Expected a value` for inline annotations. Checks truncate large output; open the Depot job for full summaries and artifacts.
+
+If GitHub API limits delay check updates, organization owners can connect **Depot Checks** and **Depot Checks 2** under Settings → Connections → GitHub Checks. Depot Code Access must already be connected. Give the checks apps access to the same repositories. If an approved connection remains pending, use **Finish connecting**.
+
+Before adding checks apps, set required Depot check sources to **Any source**, because multiple apps can publish the same name. **Any source** also permits other repository writers to satisfy that name. Keep a pinned source and skip additional apps when app-specific trust is required. Existing checks stay with their original app and can still encounter its rate limit.
+
## OIDC for Cloud Authentication
Depot CI issues a signed JWT to each job so workflows can authenticate to cloud providers (AWS, GCP, Azure) with short-lived tokens instead of static credentials. Set `permissions: id-token: write` in the workflow for the token to be issued; the issuer is `https://identity.depot.dev`. Depot injects the token-request credentials into the environment, so standard actions like `aws-actions/configure-aws-credentials` work without extra configuration.
@@ -406,7 +416,7 @@ Depot CI executes GitHub Actions YAML workflows. There are a few limitations whe
Read the compatibility reference when you need to answer or act on any of the following or similar questions:
- Whether a specific workflow-, job-, or step-level field is supported, for example `concurrency`, `jobs.<id>.environment`, `jobs.<id>.snapshot`, `jobs.<id>.container`, `jobs.<id>.services`, `jobs.<id>.strategy.matrix`, `steps[*].shell`.
-- Whether a trigger event is accepted: the supported list (`push`, `pull_request`, `pull_request_target`, `pull_request_review`, `issue_comment`, `deployment_status`, `repository_dispatch`, `schedule`, `workflow_call`, `workflow_dispatch`, `workflow_run`, `merge_group`) and the GitHub-only events Depot CI rejects (for example, `release`, `issues`, `deployment`, `branch_protection_rule`).
+- Whether a trigger event is accepted: the supported list (`push`, `pull_request`, `pull_request_target`, `pull_request_review`, `pull_request_review_comment`, `issue_comment`, `deployment_status`, `repository_dispatch`, `schedule`, `workflow_call`, `workflow_dispatch`, `workflow_run`, `merge_group`) and the GitHub-only events Depot CI rejects (for example, `release`, `issues`, `deployment`, `branch_protection_rule`).
- Which expression contexts (`github`, `env`, `vars`, `secrets`, `needs`, `strategy`, `matrix`, `steps`, `job`, `runner`, `inputs`, `depot`) and functions (`always()`, `success()`, `failure()`, `cancelled()`, `case()`, `contains()`, `startsWith()`, `endsWith()`, `format()`, `join()`, `toJSON()`, `fromJSON()`, `hashFiles()`) are available.
- Which `permissions` scopes work (`actions`, `checks`, `code-quality`, `contents`, `id-token`, `issues`, `packages`, `pull-requests`, `security-events`, `statuses`). Request `code-quality` explicitly because `read-all` and `write-all` do not include it.
- Which action types run (JavaScript Node 12/16/20/24, Composite, Docker).
diff --git a/.agents/skills/depot-ci/UPSTREAM.md b/.agents/skills/depot-ci/UPSTREAM.md
index 3d6357e4a668..d8548f795856 100644
--- a/.agents/skills/depot-ci/UPSTREAM.md
+++ b/.agents/skills/depot-ci/UPSTREAM.md
@@ -3,15 +3,17 @@
Vendored from [depot/skills](https://github.com/depot/skills) — used by the Depot CI workflows this repo keeps under `.depot/workflows/`.
- Source: `skills/depot-ci/SKILL.md` and `skills/depot-ci/references/`
-- Commit: [`71f008d`](https://github.com/depot/skills/tree/71f008de4dbfa8625ece3df85019bc914b9399a0/skills/depot-ci) (2026-10-15)
+- Commit: [`34871e1`](https://github.com/depot/skills/tree/34871e14c57f322e87debbe17e73f0a3b4e2e4f1/skills/depot-ci) (2026-10-30)
- License: none in upstream at this commit; README documents `cp SKILL.md` install.
Upstream also ships `agents/openai.yaml`, `assets/` icons and `references/test-splitting.md` in this directory. None is vendored: we do not run the OpenAI agent definition, the icons are branding for Depot's own docs, and PostHog does not use Depot test splitting.
+`references/entire.md` is not vendored either, because PostHog does not use Entire.
## Local additions
- `references/posthog-check-run-semantics.md`, which upstream has no equivalent of.
- In `SKILL.md`, the three sections between PostHog-local comment markers (one under the intro, one under "Parallel Steps" recording that GitHub Actions now has its own `parallel:` keyword, and one under "Test Results and Timing-Based Splitting" that replaces upstream's splitting sentences and its link to `references/test-splitting.md`), and the two sentences appended to the frontmatter `description`.
+- Entire mentions that lead to the unvendored `references/entire.md` are removed: "running Depot CI on Entire repositories" in the frontmatter `description`, the first line under "Getting Started" and the last clause of the forge paragraph in `SKILL.md`, and the last sentence of the Entire paragraph in `references/migration.md`.
- In `references/oidc.md`, the trust policy JSON as reflowed by the repo formatter.
- Three code fences tagged `text` to satisfy markdownlint MD040, which the pre-commit hook enforces: the directory tree in `SKILL.md` and `references/migration.md`, and the SPIFFE id in `references/oidc.md`. Upstream leaves them untagged, so a resync reintroduces the error.
- One of two consecutive blank lines after the runner label table in `references/github-actions-compatibility.md`, which markdownlint MD012 rejects.
diff --git a/.agents/skills/depot-ci/references/github-actions-compatibility.md b/.agents/skills/depot-ci/references/github-actions-compatibility.md
index 7d7733bf456e..b2e3a8b3f42a 100644
--- a/.agents/skills/depot-ci/references/github-actions-compatibility.md
+++ b/.agents/skills/depot-ci/references/github-actions-compatibility.md
@@ -10,9 +10,11 @@ Depot CI runs GitHub Actions YAML on Depot's own orchestrator and compute, so mo
### Triggers
-`push` (branches, tags, paths), `pull_request` (branches, paths), `pull_request_target`, `pull_request_review`, `issue_comment` (created, edited, deleted), `deployment_status`, `repository_dispatch` (with `types`), `schedule`, `workflow_call`, `workflow_dispatch` (with inputs), `workflow_run`, `merge_group`
+`push` (branches, tags, paths), `pull_request` (branches, paths), `pull_request_target`, `pull_request_review`, `pull_request_review_comment`, `issue_comment` (created, edited, deleted), `deployment_status`, `repository_dispatch` (with `types`), `schedule`, `workflow_call`, `workflow_dispatch` (with inputs), `workflow_run`, `merge_group`
-`issue_comment` covers comments on issues and pull requests. The workflow runs from the repository's default branch. Use `github.event.issue.pull_request` to distinguish pull request comments. Issue edits and label changes use the separate unsupported `issues` trigger; inline pull request review comments use the separate unsupported `pull_request_review_comment` trigger.
+`issue_comment` covers comments on issues and pull requests. The workflow runs from the repository's default branch. Use `github.event.issue.pull_request` to distinguish pull request comments. Issue edits and label changes use the separate unsupported `issues` trigger.
+
+`pull_request_review` handles `submitted`, `edited`, and `dismissed` reviews. `pull_request_review_comment` handles `created`, `edited`, and `deleted` comments on a pull request diff. Use `types` to filter activities; omitting `types` accepts every activity. The listening workflow must exist on the default branch, but the run uses the pull request's merge ref. Read payloads from `github.event`; `github.base_ref` and `github.head_ref` are empty. Fork review runs and review runs triggered by Dependabot receive no user secrets and a read-only `GITHUB_TOKEN`.
`repository_dispatch` lets you trigger runs from outside GitHub via the GitHub API; the custom event type and `client_payload` are available through `github.event.action` and `github.event.client_payload`. GitHub delivers these events only against the default branch, so the default-branch workflow runs.
@@ -65,7 +67,7 @@ Actions declaring Node 12, 16, or 20 run on Node.js 24 by default. `ACTIONS_ALLO
- **Fork-triggered PRs**: `pull_request` and `pull_request_target` from forks not supported yet.
- **Non-Ubuntu runners**: Depot CI has no Windows or macOS sandboxes. Do not assume a migrated runner label preserves the original operating system.
- **Deployment environments**: the `environment` field is not supported.
-- **GitHub-specific event triggers**: `branch_protection_rule`, `check_run`, `check_suite`, `create`, `delete`, `deployment`, `discussion`, `discussion_comment`, `fork`, `gollum`, `image_version`, `issues`, `label`, `milestone`, `page_build`, `public`, `pull_request_comment`, `pull_request_review_comment`, `registry_package`, `release`, `status`, `watch`.
+- **GitHub-specific event triggers**: `branch_protection_rule`, `check_run`, `check_suite`, `create`, `delete`, `deployment`, `discussion`, `discussion_comment`, `fork`, `gollum`, `image_version`, `issues`, `label`, `milestone`, `page_build`, `public`, `pull_request_comment`, `registry_package`, `release`, `status`, `watch`.
### GitHub Packages authentication
diff --git a/.agents/skills/depot-ci/references/migration.md b/.agents/skills/depot-ci/references/migration.md
index e7da58e44685..68688c3407e1 100644
--- a/.agents/skills/depot-ci/references/migration.md
+++ b/.agents/skills/depot-ci/references/migration.md
@@ -2,10 +2,12 @@
Detail for `depot ci migrate` and its subcommands, the transformations migration applies, and manual setup. SKILL.md keeps the high-level "Getting Started" flow; load this file for the subcommand flag tables and the exact set of changes migration makes to your workflows.
-**Common flags:** `depot ci migrate` and its subcommands accept `--forge <github|origin>` (default `github`), `-y` / `--yes`, `--org <id>` (required when the user belongs to multiple organizations), and `--token <token>`.
+**Common flags:** `depot ci migrate` and its subcommands accept `--forge <github|origin|entire>` (default `github`), `-y` / `--yes`, `--org <id>` (required when the user belongs to multiple organizations), and `--token <token>`.
Use the default `--forge=github` for repositories that use GitHub as the source of truth. Use `--forge=origin` for Origin-hosted repositories. The Origin flow detects an `origin.cursor.com` remote and checks that Depot can access the repository.
+Use `--forge=entire` for Entire repositories with CLI v2.103.3 or later. Preflight checks that a connected Entire installation covers the repository. Entire cannot supply secrets and variables through migration; run `depot ci migrate secrets-and-vars` from a checkout whose push remote is the GitHub repository that holds them, or add them manually.
+
## Migrate subcommands
`depot ci migrate` runs the full flow: a preflight check, then copying and transforming selected workflows into `.depot/workflows/`, then reporting the secrets and variables they reference. Each phase is also a standalone subcommand:
diff --git a/.agents/skills/depot-container-builds/SKILL.md b/.agents/skills/depot-container-builds/SKILL.md
index 78fdb3c34c65..e9ef52c0e0ae 100644
--- a/.agents/skills/depot-container-builds/SKILL.md
+++ b/.agents/skills/depot-container-builds/SKILL.md
@@ -4,7 +4,7 @@ description: >
Configures and runs Depot remote container builds using `depot build` and `depot bake`.
Use when building Docker images, creating Dockerfiles with Depot, pushing images to registries,
building multi-platform/multi-arch images (linux/amd64, linux/arm64), debugging container build
- failures, optimizing Dockerfile layer caching, using docker-bake.hcl or docker-compose builds,
+ failures, cancelling builds, configuring autoscaling, optimizing Dockerfile layer caching, using docker-bake.hcl or docker-compose builds,
or migrating from `docker build` / `docker buildx build` to Depot. Also use when the user
mentions depot build, depot bake, container builds, image builds, or asks about Depot's
build cache, build parallelism, build autoscaling, or ephemeral registry.
@@ -99,6 +99,20 @@ depot build --project <project-id> -t repo/image:tag .
| `--ssh` | Expose SSH agent |
| `--output` / `-o` | Custom output (`type=local,dest=path`) |
+## Cancel Container Builds
+
+Use `depot build cancel` only when cancellation is requested. Supply an organization API token through `--token` or `DEPOT_TOKEN`; project tokens, reader tokens, legacy login tokens, and CI OIDC credentials cannot cancel builds.
+
+```bash
+depot build cancel <build-id> <another-build-id>
+depot build cancel --all-running --project <project-id> --dry-run
+depot build cancel --all-running --project <project-id> --yes --output json
+```
+
+Choose explicit build IDs or `--all-running --project`, not both. Bulk selection requires an explicit project; `depot.json` and `DEPOT_PROJECT_ID` do not supply it. Preview bulk cancellation with `--dry-run`; use `--yes` only for authorized non-interactive cancellation. Selection excludes builds started afterward.
+
+Cancellation is asynchronous: success means the request was accepted, not that execution stopped. Finished builds are successful no-ops. JSON reports each build's outcome or error; any failed request makes the command fail.
+
## `depot bake` — Multi-Image Builds
Drop-in replacement for `docker buildx bake`. Builds multiple images in parallel.
@@ -221,6 +235,15 @@ Each builder has an independent cache. Heavy autoscaling can reduce cache effici
One `depot bake` invocation counts as one build for autoscaling, regardless of its target count. Separate project IDs create separate build requests.
+Configure autoscaling from the CLI with an organization API token:
+
+```bash
+depot projects update <project-id> --max-concurrent-builds 3
+depot projects update <project-id> --disable-autoscaling
+```
+
+The positive limit applies per builder instance. The two update flags are mutually exclusive; omitting both preserves the current setting. `depot projects create <name> --max-concurrent-builds 3` enables autoscaling for a new project; creation without the flag leaves autoscaling disabled.
+
## Depot Registry
An OCI-compliant registry that works both as a lightweight ephemeral store for build output and as a full primary registry for all your images (including ones not built with Depot). Each org gets its own subdomain `{orgId}.registry.depot.dev`, backed by a global CDN, and stores images and OCI artifacts (Helm charts, AI models) up to 50 GB. Browse repositories, tags, and attestations in the Registry Explorer in the dashboard.
diff --git a/.agents/skills/depot-container-builds/UPSTREAM.md b/.agents/skills/depot-container-builds/UPSTREAM.md
index 5c55c1b0d4f1..48d57df35394 100644
--- a/.agents/skills/depot-container-builds/UPSTREAM.md
+++ b/.agents/skills/depot-container-builds/UPSTREAM.md
@@ -3,7 +3,7 @@
Vendored from [depot/skills](https://github.com/depot/skills) — used by PostHog's container-image CI/CD (`depot/build-push-action`, `depot/setup-action`).
- Source: `skills/depot-container-builds/SKILL.md`
-- Commit: [`71f008d`](https://github.com/depot/skills/tree/71f008de4dbfa8625ece3df85019bc914b9399a0/skills/depot-container-builds) (2026-10-15)
+- Commit: [`34871e1`](https://github.com/depot/skills/tree/34871e14c57f322e87debbe17e73f0a3b4e2e4f1/skills/depot-container-builds) (2026-10-30)
- License: none in upstream at this commit; README documents `cp SKILL.md` install.
## Local additions
diff --git a/.agents/skills/depot-github-runners/SKILL.md b/.agents/skills/depot-github-runners/SKILL.md
index 486e1c8f6c1a..e152a41f4532 100644
--- a/.agents/skills/depot-github-runners/SKILL.md
+++ b/.agents/skills/depot-github-runners/SKILL.md
@@ -7,7 +7,7 @@ description: >
macOS runners, troubleshooting GitHub Actions runner issues, configuring egress filtering,
using Depot Cache with GitHub Actions, or running Dagger/Dependabot on Depot runners.
Also use when the user mentions depot-ubuntu, depot-windows, depot-macos runner labels,
- or asks about faster/cheaper GitHub Actions runners. Not for Depot CI, the separate engine
+ or asks about faster/cheaper GitHub Actions runners, `depot jobs`, job analytics, or CPU and memory metrics. Not for Depot CI, the separate engine
that reads .depot/workflows/ — that is the depot-ci skill.
---
@@ -174,6 +174,8 @@ Setup:
3. In Depot org settings, open Tailscale settings and connect using the OAuth client ID/secret.
4. Add ACLs allowing `tag:depot-runner` to access target hosts/subnets.
+Optionally grant `Devices > Core` write scope so Depot can remove leftover offline nodes after machines stop abruptly. The scope permits listing and removing devices across the whole tailnet. Depot removes only offline, ephemeral nodes with the Depot tag and no running Depot machine. Without the scope, Tailscale removes ephemeral nodes later. To add the scope, create a new OAuth client with both scopes and reconnect Depot.
+
ACL examples:
```json
@@ -211,6 +213,27 @@ Enable "Dependabot on self-hosted runners" in GitHub org settings. Jobs auto-run
**Important:** OIDC is not supported for Dependabot. Use `token:` input with a `DEPOT_TOKEN` secret instead.
+## Inspect Jobs and Resource Usage
+
+Use `depot jobs` for GitHub Actions jobs on Depot. Depot CI jobs use `depot ci` commands instead.
+
+```bash
+depot jobs --repo owner/repo --conclusion failure --output json
+depot jobs <github-job-id> --repo owner/repo --output json
+depot jobs metrics <github-job-id> --repo owner/repo --output json
+depot jobs analytics --repo owner/repo --job test --output json
+```
+
+All four forms accept `--org`, `--token`, and `--output` with `auto`, `table`, or `json`. Piped output defaults to JSON without prompting for login. Inspecting one job or its metrics requires exactly one `--repo`.
+
+Listings support repeatable `--repo`, `--status`, `--conclusion`, and `--runner-label`, plus `--query`. Status values are `queued`, `waiting`, `running`, and `finished`; conclusions are `success`, `failure`, `cancelled`, `skipped`, and `neutral`. Analytics filters are `--repo`, `--workflow`, `--workflow-path`, `--job`, and `--runner-label`.
+
+Listings and analytics return one page at a time. Use `--page-size` (1–250, default 50) and the returned `nextPageToken` with `--page-token`; keep filters and time ranges unchanged. Both default to the last 30 days. Supply `--start` and `--end` together as RFC 3339 timestamps for a positive range of at most 90 days.
+
+Per-job metrics include CPU and memory samples, statistics, and availability. JSON utilization is a fraction from 0 to 1; tables show percentages. Missing measurements remain absent, not zero. Execution windows are limited to seven days and 5,000 returned samples; statistics use all observed samples before downsampling. Aggregate analytics can lag completed jobs by 15 minutes. Step timings are unavailable.
+
+Job inspection and `depot jobs metrics` also report observed out-of-memory (OOM) kernel kills. No observed events does not rule out OOM; events can arrive after completion. At most 100 events are returned, with truncation indicated in JSON.
+
## SSH Debugging
```yaml
diff --git a/.agents/skills/depot-github-runners/UPSTREAM.md b/.agents/skills/depot-github-runners/UPSTREAM.md
index ef5c310c1c46..a069c6192a4a 100644
--- a/.agents/skills/depot-github-runners/UPSTREAM.md
+++ b/.agents/skills/depot-github-runners/UPSTREAM.md
@@ -3,7 +3,7 @@
Vendored from [depot/skills](https://github.com/depot/skills) — used by PostHog workflows pinning `depot-ubuntu-*` runners.
- Source: `skills/depot-github-runners/SKILL.md`
-- Commit: [`71f008d`](https://github.com/depot/skills/tree/71f008de4dbfa8625ece3df85019bc914b9399a0/skills/depot-github-runners) (2026-10-15)
+- Commit: [`34871e1`](https://github.com/depot/skills/tree/34871e14c57f322e87debbe17e73f0a3b4e2e4f1/skills/depot-github-runners) (2026-10-30)
- License: none in upstream at this commit; README documents `cp SKILL.md` install.
## Local additions
diff --git a/.depot/actions/pnpm-install/action.yml b/.depot/actions/pnpm-install/action.yml
index 12a17f4de700..dfc975970cd2 100644
--- a/.depot/actions/pnpm-install/action.yml
+++ b/.depot/actions/pnpm-install/action.yml
@@ -99,8 +99,9 @@ runs:
# Save only on the default branch. Caches written on a PR/branch ref are
# scoped to that ref alone — no other branch can read them, they evict
# the shared master cache, and they only ever help that one PR's re-runs.
+ # `depot ci run` (event `api`) has the master ref but runs an unreviewed local patch.
- name: Save pnpm store
- if: inputs.install != 'false' && github.ref == 'refs/heads/master' && steps.restore.outputs.cache-hit != 'true'
+ if: inputs.install != 'false' && github.ref == 'refs/heads/master' && github.event_name != 'api' && steps.restore.outputs.cache-hit != 'true'
uses: actions/cache/save@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: ${{ steps.pnpm-store.outputs.path }}
@@ -108,7 +109,7 @@ runs:
# On a verdict miss the install above ran the check itself, so the record is pnpm's own.
- name: Save pnpm lockfile verdict
- if: inputs.install != 'false' && github.ref == 'refs/heads/master' && steps.restore-verdict.outputs.cache-hit != 'true'
+ if: inputs.install != 'false' && github.ref == 'refs/heads/master' && github.event_name != 'api' && steps.restore-verdict.outputs.cache-hit != 'true'
uses: actions/cache/save@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: ${{ steps.pnpm-cache.outputs.path }}/lockfile-verified.jsonl
diff --git a/.depot/actions/setup-pnpm/action.yml b/.depot/actions/setup-pnpm/action.yml
index b0aaee6c223d..e2064c1503e7 100644
--- a/.depot/actions/setup-pnpm/action.yml
+++ b/.depot/actions/setup-pnpm/action.yml
@@ -86,7 +86,7 @@ runs:
# Save only on the default branch: caches written on a PR ref are scoped to
# that ref alone, evict the shared master entry, and help only that one PR.
- name: Save Node tool cache
- if: github.ref == 'refs/heads/master' && steps.node-version.outputs.version != '' && steps.node-toolcache.outputs.cache-hit != 'true'
+ if: github.ref == 'refs/heads/master' && github.event_name != 'api' && steps.node-version.outputs.version != '' && steps.node-toolcache.outputs.cache-hit != 'true'
uses: actions/cache/save@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: ${{ runner.tool_cache }}/node/${{ steps.node-version.outputs.version }}
diff --git a/.depot/actions/setup-python-cached/action.yml b/.depot/actions/setup-python-cached/action.yml
index aa8cf86b3ced..3e9e529208fd 100644
--- a/.depot/actions/setup-python-cached/action.yml
+++ b/.depot/actions/setup-python-cached/action.yml
@@ -59,7 +59,7 @@ runs:
# Save only on the default branch, for the same reasons as the pnpm
# store save in pnpm-install.
- name: Save Python tool cache
- if: github.ref == 'refs/heads/master' && steps.python-version.outputs.version != '' && steps.python-toolcache.outputs.cache-hit != 'true'
+ if: github.ref == 'refs/heads/master' && github.event_name != 'api' && steps.python-version.outputs.version != '' && steps.python-toolcache.outputs.cache-hit != 'true'
uses: actions/cache/save@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: ${{ runner.tool_cache }}/Python/${{ steps.python-version.outputs.version }}
diff --git a/.depot/actions/setup-sqlx-cli/action.yml b/.depot/actions/setup-sqlx-cli/action.yml
index 3b8e226d555b..383420789a1a 100644
--- a/.depot/actions/setup-sqlx-cli/action.yml
+++ b/.depot/actions/setup-sqlx-cli/action.yml
@@ -57,7 +57,7 @@ runs:
chmod +x "$HOME/.cache/sqlx-cli/bin/sqlx"
- name: Save sqlx-cli binary to cache
- if: steps.cache-sqlx-cli.outputs.cache-hit != 'true' && github.ref == 'refs/heads/master'
+ if: steps.cache-sqlx-cli.outputs.cache-hit != 'true' && github.ref == 'refs/heads/master' && github.event_name != 'api'
uses: actions/cache/save@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
with:
path: ~/.cache/sqlx-cli
diff --git a/.depot/actions/setup-uv/action.yml b/.depot/actions/setup-uv/action.yml
index b233d58be9eb..58fc139c7a38 100644
--- a/.depot/actions/setup-uv/action.yml
+++ b/.depot/actions/setup-uv/action.yml
@@ -22,7 +22,7 @@ inputs:
save-cache:
description: Whether to save the uv cache after the job
required: false
- default: ${{ github.ref == 'refs/heads/master' }}
+ default: ${{ github.ref == 'refs/heads/master' && github.event_name != 'api' }}
outputs:
cache-hit:
diff --git a/.depot/workflows/ci-backend.yml b/.depot/workflows/ci-backend.yml
index 32abdc4396b4..4d3aef94a369 100644
--- a/.depot/workflows/ci-backend.yml
+++ b/.depot/workflows/ci-backend.yml
@@ -115,8 +115,9 @@ on:
types: [opened, synchronize, reopened, ready_for_review]
concurrency:
# PRs: one group per event; cancel-superseded-runs cancels stale runs. Push: per-SHA so master
- # pushes never cancel each other (check-migrations always completes).
- group: ${{ github.workflow }}-${{ github.event_name == 'push' && github.sha || github.event_name == 'pull_request' && format('pr-{0}-{1}-{2}', github.event.pull_request.number, github.event.pull_request.head.sha, github.event.pull_request.updated_at) || github.head_ref || github.ref }}
+ # pushes never cancel each other (check-migrations always completes). `depot ci run` (event `api`)
+ # gets a per-run group: it has the master ref, and would otherwise queue behind the hourly run.
+ group: ${{ github.workflow }}-${{ github.event_name == 'push' && github.sha || github.event_name == 'pull_request' && format('pr-{0}-{1}-{2}', github.event.pull_request.number, github.event.pull_request.head.sha, github.event.pull_request.updated_at) || github.event_name == 'api' && format('api-{0}', github.run_id) || github.head_ref || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
env:
# Schema cache epoch. Bump to abandon every shared schema cache entry at once
@@ -148,8 +149,9 @@ env:
# The root conftest ends a green pytest session with os._exit once every report is written.
# That also hides a crash during interpreter teardown, so the hourly schedule exits normally.
POSTHOG_PYTEST_HARD_EXIT: ${{ github.event_name == 'schedule' && '0' || '1' }}
- # Scheduled runs test master even when Depot does not populate github.ref.
- IS_MASTER: ${{ github.event_name == 'schedule' || github.ref == 'refs/heads/master' }}
+ # Scheduled runs test master even when Depot does not populate github.ref. `depot ci run`
+ # (event `api`) has the master ref but runs an unreviewed local patch, so it is not master.
+ IS_MASTER: ${{ github.event_name == 'schedule' || (github.ref == 'refs/heads/master' && github.event_name != 'api') }}
# Depot CI runners expose OTEL_SERVICE_NAME=ci-worker ambient; GitHub Actions test steps do not.
# Left set, it leaks into settings.OTEL_SERVICE_NAME (personhog metric client_name label) and
# diverges from test assertions. Blank it to match the GHA environment. Depot also injects
@@ -249,10 +251,11 @@ jobs:
steps:
# For pull requests it's not necessary to checkout the code, but we
# also want this to run on master so we need to checkout
+ # `depot ci run` (event `api`) applies its patch after this step, which fails in a sparse tree.
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
clean: false
- sparse-checkout: .depot/actions/paths-filter
+ sparse-checkout: ${{ github.event_name != 'api' && '.depot/actions/paths-filter' || '' }}
sparse-checkout-cone-mode: false
- name: Clean up data directories with container permissions
run: |
@@ -4472,7 +4475,7 @@ jobs:
(needs.django.result != 'skipped' || needs.turbo-tests.result != 'skipped') &&
(
github.event_name == 'schedule' ||
- (github.event_name != 'pull_request' && github.event_name != 'push' && github.ref == 'refs/heads/master') ||
+ (github.event_name != 'pull_request' && github.event_name != 'push' && github.event_name != 'api' && github.ref == 'refs/heads/master') ||
(github.event_name == 'pull_request' &&
github.event.pull_request.head.repo.full_name == 'PostHog/posthog')
)
diff --git a/.github/actions/setup-uv/action.yml b/.github/actions/setup-uv/action.yml
index b233d58be9eb..58fc139c7a38 100644
--- a/.github/actions/setup-uv/action.yml
+++ b/.github/actions/setup-uv/action.yml
@@ -22,7 +22,7 @@ inputs:
save-cache:
description: Whether to save the uv cache after the job
required: false
- default: ${{ github.ref == 'refs/heads/master' }}
+ default: ${{ github.ref == 'refs/heads/master' && github.event_name != 'api' }}
outputs:
cache-hit: