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

# Prerequisite Checks

> How Morph confirms it can read, push to, and open pull requests on your repositories before each step

Before the Morph Platform generates a project spec, sets up a project, or starts migration work, it checks that your git connection and repository settings let it do what that step needs. If something is missing, an alert on the project page lists each problem with its fix, so you can sort it out before a step fails partway through.

The alert always shows the exact message and fix for your repository and git provider. This page explains what each check looks at and the usual way to fix it.

***

## When the checks run

* **When you open the project page**, the Morph Platform checks that your git connection is active and can read each repository.
* **When you review the project spec**, the Morph Platform shows every check. The ones answered by the [connection test](#the-connection-test) have results once it runs after you approve.
* **When a step starts**, the Morph Platform runs the checks again and refuses the step if one it needs has failed.
* **When you click Recheck** in the alert, the Morph Platform runs the checks again, including the connection test, so you can confirm a fix.

If the Morph Platform can't get a clear answer from your git provider, that check does not hold anything back.

***

## The connection test

Some things, such as branch rules, can only be confirmed by trying them. After you approve the project spec, the Morph Platform tests each repository it will change: it pushes an empty commit to a temporary branch, opens a pull request from it, and on GitLab and Azure DevOps confirms that the pull request's event reaches the Morph Platform. It then closes the pull request and deletes the branch. No files change and nothing is merged.

Repositories marked **Read only** are never written to, so they aren't tested. The test runs again when you click **Recheck** or rename the feature branch.

***

## What each check verifies

Each check runs per repository. A failure holds back only the steps that need what it checks; a warning holds back nothing. A slow repository doesn't hold up the results for the others.

| Check | What it verifies | A failure holds back |
| - | - | - |
| Connected account | Your git connection is active. On GitHub, the Modelcode GitHub App is still installed for the repository's owner. | Spec generation, project setup, and the migration |
| Read access | The repository exists and your connection can read it. | Spec generation, project setup, and the migration |
| Base branch | The branch the project starts from exists in the repository. | Spec generation, project setup, and the migration |
| Push access | The Morph Platform can push its branches, including past branch protection, rulesets, and push rules. | Project setup and the migration |
| Branch names | No existing branch in the repository clashes with the feature branch's name. | Project setup and the migration |
| Unsigned commits | The repository doesn't require signed commits on the branches the Morph Platform pushes to. Not checked on Azure DevOps. | Project setup and the migration |
| Pull requests | The Morph Platform can open pull requests (merge requests on GitLab) and the feature is turned on for the repository. | The migration |
| Pull request events | The test pull request's event reached the Morph Platform, so it can answer review comments and notice merges. GitLab and Azure DevOps only. | Nothing (shown as a warning) |

Base branch, push access, branch names, unsigned commits, pull requests, and pull request events are answered by the [connection test](#the-connection-test), so they apply only to repositories the Morph Platform changes.

***

## Fixing a failure

The fix in the alert is specific to your repository. Most fall into one of these:

* **Connected account.** Reconnect your git provider from the alert. On GitHub, if the Modelcode GitHub App was uninstalled, reinstall it on the account or organization with access to the project's repositories, or ask an owner of the account to reinstall it. After a reinstall on github.com, wait 5 minutes and click **Recheck**. If it still fails, uninstall the App on that account, then reinstall it from **Reconnect GitHub** in the alert. Uninstalling disconnects any other the Morph Platform workspace that uses the App on that account.
* **Read access.** Check the repository URL. On GitHub, add the repository to the GitHub App's repository access. On other providers, give your connected account access to the repository.
* **Base branch.** Create the branch the project starts from in the repository.
* **Push access.** On GitHub, check that the Modelcode GitHub App has access to the repository and can write to it. On other providers, give the connected account write access to the repository. If a branch rule refuses the push, ask a repository admin to let the Morph Platform bypass the rule or to exclude the feature branch and its milestone branches from it. Where a rule matches by branch name, you can rename the feature branch instead.
* **Branch names.** Rename or delete the existing branch that clashes, or rename the feature branch.
* **Unsigned commits.** The Morph Platform doesn't sign its commits. Exclude the feature branch and its milestone branches from the rule that requires signed commits, or turn the requirement off.
* **Pull requests.** Turn pull requests on in the repository's settings, and give the account that opens them permission to do so. On GitLab and Azure DevOps, pull requests are opened with the project creator's connection, so if that connection is no longer active, ask the project creator to reconnect.
* **Pull request events.** Give the connected account permission to manage webhooks (service hooks on Azure DevOps), then register the webhook from the alert. If you can't, click **Skip webhook** for that repository. The Morph Platform then won't see merges or review comments there, so after you merge a pull request, click **Mark as done** on the milestone's Review page.

Renaming the feature branch is only possible before milestone work starts. Renaming it, and registering or skipping a webhook, need permission to edit the project.

After making a change in your git provider, click **Recheck** in the alert to confirm it.

***

## Model daemon checks

If your project runs on a [self-hosted daemon](https://docs.modelcode.ai/setup/build-environment/self-hosted-daemon.md), the same alert also lists checks on the daemon's machine. See [Daemon Administration](https://docs.modelcode.ai/setup/build-environment/daemon-administration.md#prerequisite-checks) for those.


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