# Baselines and approvals

Keep comparisons meaningful as pull requests merge and new commits arrive.

## Set the first baseline
Upload a run on the configured baseline branch and accept its intended results. The project then has a reference for later runs. If setup starts on a pull request, review it first, merge it, and confirm that the default-branch run sets the baseline.

A missing baseline is different from an unchanged story. It means there is no accepted reference for that comparison.

## Pull-request comparisons
Framecheck compares a pull request with the accepted reference at its merge base. Keep accurate commit and merge-base metadata in CI. If the expected reference is missing, run and accept the relevant default-branch build, or update the pull request onto a branch with an accepted reference as appropriate for your workflow.

Accepting a pull request does not move the shared baseline. Its default-branch run must complete and be accepted after merge.

## Approvals carried forward
When a newer run produces the same images and compatible capture settings as an approved result, the approval can carry over. This includes matching approved pull-request images after merge. A visually different result needs a fresh decision. Do not assume an approval covers all later commits merely because the story's name is unchanged.

## Accept main automatically
Owners and admins can enable **Project settings → General → Accept main automatically**. It is off by default. Successful default-branch changes with nothing rejected can then become the baseline without manual review. Pull requests are never automatically accepted by this setting.

Small numbers of story errors can leave those stories' old baseline images in place while the rest advances. The run reports this explicitly. Larger error sets need a person to decide whether to accept all except the errors. Follow up on those errors so the baseline does not remain stale for affected stories.

## Change the baseline branch
Update **Baseline branch** in project settings and ensure CI runs on that branch. Establish an accepted run there. Review the first comparison after changing branch or capture settings; the previous reference may not cover the new configuration.

## Quarantined and removed stories
A quarantined story keeps its previous baseline until released. An intentional removed story should be reviewed like other changes. Renaming story IDs or modes can appear as additions and removals rather than a continuous history.
