> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bbrands.io/llms.txt
> Use this file to discover all available pages before exploring further.

# CI and cost per PR

> What each PR event kicks off in GitHub Actions, and the rules that save the most runner minutes.

GitHub Actions bills per runner minute, **rounded up per job**. A 10-second job costs a full
minute, and a large runner multiplies that minute. That is why the cost depends above all on **how
many times** we trigger CI and **how many jobs** each run starts.

## What each event kicks off

| Event | What runs | Relative weight |
| - | - | - |
| Local commit and push with the pre-push hook | Nothing on GitHub | 0 |
| Push to a **draft** PR | Title validation, labeling, Initiative Check and Danibot | Low: a few lightweight jobs |
| Push to a PR that is **ready for review** | CI plan and the lanes of each affected project (static, build, tests, checks, E2E), shared suites, `Code review (AI)`, `Initiative review (AI)`, Review gate and Danibot | **High: around 40 jobs** |
| **Merge queue** run | CI again, on the merge result | High |
| PR targeting `release` or `master` | Every lane of every project | Very high |

> [!NOTE]
>
> More than 40% of each job's time goes into setting up the environment: checkout, dependency
> installation and cleanup. That is why ten short jobs cost much more than one long one.

## Firm rules

[In force since Wave 0](https://docs.bbrands.io/bbrands-lab/pull-requests/waves-roadmap.md)
These rules apply from today to every PR, from people and agents alike.

| Rule | What it saves |
| - | - |
| **Always open as a draft** and mark it ready only when `pnpm initiatives:pr-check` and the local tests pass | Every push before it is ready avoids \~40 jobs |
| **One push per review round**: group every fix | 5 separate pushes ≈ 200 jobs; 1 push ≈ 40 |
| **Do not use "Update branch"** or rebase onto `develop` unless there is a conflict | Every update is a full run; the queue already tests against the latest `develop` |
| **No "wip" or "fix typo" pushes** to a ready PR | Each one reruns everything and dismisses the approvals |
| **`[skip e2e]`** in the title if the change does not touch the UI | Skips the Playwright shards on the PR (the queue never skips them) |
| **Do not use `--no-verify`** | The hook finds on your machine what CI would find at a cost |
| **Re-run only the failed jobs**, never the whole workflow | Avoids repeating the lanes that already passed |
| **Multi-PR with an integration branch** ([Level 3](https://docs.bbrands.io/bbrands-lab/pull-requests/level-3-multi-pr.md)) | N full runs become 1 |
| **Integrate often** ([Level 4](https://docs.bbrands.io/bbrands-lab/pull-requests/level-4-module-initiative.md)) | Avoids the cascading rebases of a big-bang merge |

> [!TIP]
>
> CI pass markers skip the lanes that already passed with the same fingerprint on an earlier push
> of the same PR. If your push only changes documentation, most lanes are skipped on their own.

## What is coming

[Arrives in Wave 1](https://docs.bbrands.io/bbrands-lab/pull-requests/waves-roadmap.md)
E2E in the merge queue with an option to request it on the PR, no Danibot jobs after skipped runs, the label inside the title check, checkout without the Drizzle snapshots and no gate jobs in the queue.

[Arrives in Wave 2](https://docs.bbrands.io/bbrands-lab/pull-requests/waves-roadmap.md)
Small projects grouped into fewer jobs, Turbo without forced runs in the queue, related tests on the PR and installation filtered per lane.

[Arrives in Wave 3](https://docs.bbrands.io/bbrands-lab/pull-requests/waves-roadmap.md)
Heavy lanes on external or self-hosted runners, and Danibot outside Actions publishing the policy checks and a Review gate that does not poll.

When a wave lands, some rules become automatic (for example, `[skip e2e]` is no longer needed in
Wave 1), but the method stays the same.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.