A check is a result on one commit: its name (the context, such as ci), its state, a link and a short line. A branch shows the checks on its newest commit, on its page in the web app and in pando branch list. Pando shows the CI service’s mark beside a check that service posted.
| State | Meaning |
|---|---|
pending |
running or waiting |
success |
passed |
failure |
failed |
error |
could not run |
superseded |
its build was cancelled because a newer push replaced the commit; counts as not reported |
Pando runs no CI of its own. A CI service runs your tests and posts the checks.
Checks that Merge waits for
Name them per project in the repository’s .pando/pando.toml:
[repos."projects/web"]
required_checks = ["ci"]Merge then waits until each named check is success on the branch’s newest commit.
The server reads this file from main, so it changes through review. In a repository with projects, pando init uploads it with the rest of the folder; after that, .pando/ changes only through a reviewed branch of the repository’s meta repo (https://<server>/<owner>/<name>/meta.git), merged into its main. In a plain repository, the file lives on its own main and the table is [repos."."].
Anyone who may merge can merge past red or missing checks with pando merge --force, or Merge anyway in the web app; the merge is recorded as forced.
When checks run, and what CI costs
A build costs runner minutes each time it runs. An agent can push many times a day, so Pando gives each project a choice of when its builds run, and cancels builds nobody needs.
A newer push cancels the old build. When a push lands on a branch while the build of its previous commit is still queued or running, Pando cancels that build in Buildkite and starts the build for the new commit. The old commit’s checks read superseded, not failed. A build that already finished keeps its result. A build of main’s merge commit is never cancelled. On the CI page the cancelled build says “superseded by” and the new commit.
When checks run is a setting per project, in Settings (owners), or PATCH /v1/monorepos/{owner}/{monorepo}/repos/{repo} with {"ci_policy": "on_merge"} (see updateRepo):
| Setting | A push to a branch | A merge |
|---|---|---|
Every push (every_push, the default) |
builds the new commit, and cancels the build of the one before | builds main’s merge commit |
On merge (on_merge) |
builds nothing | the first merge asked for a commit starts its build and waits for it; then builds main’s merge commit |
Main only (main_only) |
builds nothing | builds main’s merge commit |
With On merge, the Merge button, pando merge and an agent’s merge tool all start the build the same way. Pando answers that the checks are running (“Checks started for this merge” in the web app; checks_not_green with checks_started in the API) and does not merge yet. Merge again once they are green; a cloud agent is told when they are green and merges by itself. If more pushes land while that build runs, the build is cancelled and the newest commit builds instead. Merge waits only for the checks named in .pando/pando.toml, so name them: without any, the second Merge lands as soon as nothing reported is red.
With Main only, required checks are never reported on a branch, so a merge needs --force (or Merge anyway). Use it for projects whose checks you run elsewhere, or that need none before merging.
What this saves, for one agent pushing 1,000 times a day to its branches, with 10-minute builds (each setting also builds main’s merge commit at each merge):
| Branch builds that run to the end | Build time a day | |
|---|---|---|
| Every push, with nothing cancelled | 1,000 | about 167 hours |
| Every push, pushes in bursts of ten (Pando cancels the nine) | about 100 | about 17 hours, plus the minutes each cancelled build ran |
| On merge | one per merge asked for | 10 minutes per merge |
| Main only | none | none |
Buildkite’s free plan gives about 1,000 minutes of jobs a month (see Limits). At every push with nothing cancelled, one such agent uses all of it in its first 100 builds, under three hours into its day.
Who posts checks
- Buildkite, connected to the repository: Pando starts a build on each push (or as the project’s setting says, above), and each step with a
keybecomes a check of that name. See CI with Buildkite. - A build step itself, with
pando status success(orpending,failure,error) in a build Pando started. - Any other CI, through a
webhook: each delivery carries a token that can post checks on its one commit. Blacksmith and Depot through GitHub Actions use this. - A member, through the API, with their own credential:
POST /v1/monorepos/{owner}/{monorepo}/repos/{repo}/statuses/{sha}. See the API reference.