Baseline build
Argos compares screenshots to a chosen baseline build, determined by analyzing the commit history of your Git project.
A baseline build is the reference point Argos compares a new build against to detect visual changes. For every new build, Argos looks through the candidate builds in your project and picks the most relevant one.
How Argos selects the baseline
Argos selects the baseline by finding the closest build in your Git history that satisfies two sets of criteria.
Criteria on the candidate build itself:
It is complete. Argos has finished processing it.
Its tests passed. None of the tests that produced the screenshots failed.
It is not a subset. It uploaded the full set of snapshots.
It has no active rejection. A build whose changes were rejected (and the rejection not dismissed) can never serve as a baseline, whatever its type.
Criteria relative to the new build:
Same build name and mode. Only builds with the same build name and build mode are considered.
Commit ancestry. The candidate's commit must be the merge base or one of its ancestors. The merge base is the closest common commit between your branch and the baseline branch. In practice, this means the baseline reflects the code your branch actually started from.
When the baseline must be approved
The baseline must be approved: an auto-approved build, an orphan, or a check build with an approved review or a merged pull request. Argos waives this when the baseline branch is an auto-approved branch and the new build isn't tied to a pull request, since merging into that branch counts as approving it.
Among the builds that meet the criteria on the candidate build itself and share the new build's name and mode, Argos looks in this order and stops at the first match:
A build on the merge-base commit, or on the commit set with
ARGOS_REFERENCE_COMMIT. A build on the reference commit doesn't need to be approved.The closest build on an ancestor of the merge base. Argos walks back through the history and skips builds that don't meet the approval rule above. It searches 5,000 commits, the merge base included. A build further back is never found, and the new build becomes an orphan.
An approved build on the new build's own commit and branch, as a last resort. This covers running Argos twice without committing, for example while setting it up.
Check whether a build can be a baseline
Every completed build shows whether it's eligible to become a baseline for future builds. Look for the baseline-eligibility chip next to the build status on the build page, in the Builds list, and in the build's Info panel:
Eligible as baseline — "This build is eligible to be used as a baseline by future builds."
Not eligible as baseline — "This build is not eligible to be used as a baseline by future builds."

When a build isn't eligible, the Baseline eligibility section of the Info panel lists which criteria it failed to meet.

The baseline branch
The baseline branch is the branch Argos uses as the reference when resolving the merge base:
For pull request builds, the base branch of the pull request is used.
For push events, Argos uses the default baseline branch configured in your project.
Auto-approved branches
Builds on auto-approved branches are approved automatically, so they can serve as baselines without a manual review. Branches are matched by pattern (e.g., main, master, or develop).
Only builds that aren't tied to a pull request are auto-approved. A pull request build is never auto-approved, even when its branch matches the pattern.
Turn off auto-approval
To review every build, including the ones on your baseline branch, select Don't auto-approve any branch in the project settings. No build is auto-approved from then on, which changes two things:
A build on the baseline branch becomes a baseline only once it's approved. Pull request builds and pushes compare against the closest approved build in their history, so approve the builds on your baseline branch to move the baseline forward.
Flaky test detection stops collecting data. Flaky test detection only learns from auto-approved builds, so test metrics and auto-ignore see no new changes.
The pattern is kept while auto-approval is off, so selecting Auto-approve branches matching a pattern again restores it.
Configure branches in project settings
In the project settings, under Baseline builds, you can configure the default baseline branch and which branches are auto-approved.

Choose a custom baseline via SDK
To compare against a specific branch or commit instead of the automatically selected baseline, set one of these environment variables in your CI:
ARGOS_REFERENCE_BRANCH: The branch to use as the baseline.ARGOS_REFERENCE_COMMIT: The commit hash to select a specific baseline build.
ARGOS_REFERENCE_COMMIT selects the build on that exact commit, even when newer builds exist and even if nobody approved it: naming the commit counts as choosing that build. It must still meet the criteria on the candidate build itself: complete, tests passed, not a subset, and no active rejection. When the commit has no such build, Argos falls back to the closest build among its ancestors, and those follow the usual approval rule. This fallback searches a shorter history than the merge base search: 300 commits, the reference commit included.
If ARGOS_REFERENCE_COMMIT is the build's own commit, Argos skips builds on that commit at first and searches its ancestors instead. Only when none of them qualifies does it fall back to an approved build on the same commit and branch (the last step of the search order).
Orphan builds
An orphan build is a build for which Argos found no baseline to compare against. This is expected for a project's first builds: once a build on your baseline branch is approved (or auto-approved), subsequent builds find their baseline automatically.
A build is also an orphan when its closest eligible build is more than 5,000 commits behind its merge base. This can happen to a suite that doesn't run on every commit of the baseline branch, for example one that runs only when its files change (a paths filter in GitHub Actions). Unrelated merges then move the baseline branch away from the suite's last build. To keep a baseline within reach, run the suite on the baseline branch regularly, on every push or on a schedule, or name its baseline with ARGOS_REFERENCE_COMMIT.
Last updated
Was this helpful?