> For the complete documentation index, see [llms.txt](https://docs.flxbl.io/flxbl/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flxbl.io/flxbl/codev/ci-cd/sync/sync-review-environment.md).

# Syncing a Review Environment

Your PR's [review environment](/flxbl/codev/inspect/review-environments.md) is validated against the packages your PR *changed* — but sometimes you want the whole environment to match your branch. Maybe your branch carries changes across several domains, or the environment has drifted while the PR sat open.

```
sfp sync-review-env
```

Comment this on the pull request, and codev brings every review environment assigned to the PR up to the **full state of the PR branch**. No approval is needed — the change is already under review on the PR itself, and the environment belongs to it.

## Variations

```
sfp sync-review-env --domain sales            # only the sales domain's environment
sfp sync-review-env --domain sales,finance    # several domains, each synced independently
sfp sync-review-env --dry-run                 # preview what would be deployed, deploy nothing
```

## What codev handles for you

* **Multi-domain PRs fan out.** Each domain's environment syncs independently, and you get a status comment per environment as it completes.
* **Only what's needed is deployed.** codev compares your branch against what's actually installed in the environment and rebuilds only the packages that differ. If the environment is already up to date, the sync says so and deploys nothing.
* **Dry runs are honest previews.** The completion comment lists exactly which packages *would* be deployed.
* **The environment is reserved during the sync** and released afterwards, so a validation run can't collide with it.

{% hint style="info" %}
If the review environment is busy (for example, a validation is using it), the sync tells you who is using it and when it becomes available, rather than waiting silently.
{% endhint %}

## When to use it

Use it whenever it helps — it's your PR's own environment:

* **After a rebase or merge from main**, to bring the environment in line with everything your branch now contains, not just the packages your PR changed.
* **For cross-domain testing**, when you want a domain your PR didn't touch to be at your branch's state on the same environment.
* **When the environment has drifted** — a long-lived PR whose environment was assigned days ago.
* **As a preview** (`--dry-run`) to see how far the environment is from your branch before deciding anything.

The completion comment tells you which packages were deployed (with component counts), or that the environment was already up to date.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.flxbl.io/flxbl/codev/ci-cd/sync/sync-review-environment.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
