Skip to content

Pull requests

Sypnia Cloud only: how Sypnia opens a pull request with the fix, what it contains, what the GitHub App is allowed to do, what it never does, and the limits per plan.

Applies to Cloud
View as Markdown
On this page
  1. Before you start
  2. When a pull request can be opened
  3. What happens
  4. Sypnia reads the repository
  5. It writes the change and a test
  6. It opens the pull request
  7. Your checks run, a person reviews
  8. After the merge
  9. What the pull request contains
  10. What the GitHub App may do
  11. What it never does
  12. When it cannot
  13. Limits per plan

Cloud On Sypnia Cloud, a problem can arrive with its fix as a pull request. Sypnia writes the change and a test on a branch of your repository and opens the pull request. A person reads it and merges it. Sypnia never merges.

The open-source engine does not open pull requests. There, hand the fix to your own coding agent with the prompt or the MCP server. It is the same information.

Before you start

  • Your organization is on the Builder or the Team plan. Pull requests are not part of the Free plan.
  • Pull requests are turned on for the project. They are a project setting, settings.agent.pull_requests, and it is off by default: nothing is written to your repository until an owner or an admin of the organization turns it on, in the app or with PATCH /v1/projects/{project_ref}. Turning it off again stops new pull requests at once; the ones already open stay as they are.
  • The project is connected to a repository: in Sypnia Git, with your Sypnia account and nothing to install, or on GitHub through the Sypnia GitHub App. See The GitHub App for how to install it and choose repositories.
  • Your app sends its release as the git commit, so Sypnia knows which code was running. See Releases and source maps.

When a pull request can be opened

ConditionWhy
Pull requests are on for the project (settings.agent.pull_requests is true)Off by default. With it off the button is not shown and the API answers 403 pull_requests_off
The analysis is ready with confidence high or mediumSypnia does not write a fix it cannot justify. With low, or not_enough_evidence, the button is off and says why
The problem is openA resolved or ignored problem needs no fix
The problem has no open pull request from SypniaOne at a time per problem
The organization has pull requests left this monthSee the limits below

Then it opens in one of two ways:

  • You ask. The button «Open pull request» on the problem, or POST /v1/problems/{problem}/pull-request.
  • By itself, if you turn it on: the project setting settings.agent.auto_pull_requests set to high_confidence opens one for every analysis with confidence high. It is off by default, and it does nothing while settings.agent.pull_requests is off.

What happens

  1. Sypnia reads the repository

    Through the GitHub App, at the commit of the release where the problem happens. It reads the files the analysis names and the ones around them. Your code is used for this pull request and is not kept afterwards.

  2. It writes the change and a test

    The smallest change that removes the cause, and a test that fails without it, in your project’s own test framework. If the project has no tests, the pull request has the change only and says so.

  3. It opens the pull request

    On a new branch named sypnia/<problem slug>, for example sypnia/pay-button-does-nothing, against your default branch.

    You should see
    Within a few minutes the problem shows the pull request, and the problem.pull_request_opened webhook is sent.
  4. Your checks run, a person reviews

    Sypnia does not run your code. Your own CI runs on the pull request, as for any other. You read it, ask for changes or change it yourself, and merge.

  5. After the merge

    When the fix is deployed, mark the problem resolved, or let your coding agent do it. If the failure comes back, the problem reopens by itself.

What the pull request contains

PartContent
TitleWhat the change does, in the imperative: «Read the cart total from its new field»
DescriptionThe problem’s sentence, who it hit and since when; the cause with its evidence; what was changed and why; how the test covers it; links to the problem and to a session with a replay; the confidence
CommitsOne for the change, one for the test, authored by sypnia[bot]
FilesOnly the files the fix needs. Never workflow files, lock files, or configuration of your CI

The description never contains names, e-mails or ids of the people affected.

What the GitHub App may do

The app asks for three permissions, on the repositories you choose and no others.

PermissionAccessWhat it is for
ContentsRead and writeRead the code; push the branch sypnia/<problem slug>
Pull requestsRead and writeOpen the pull request and update its description
MetadataReadRequired by GitHub for any app: the repository’s name and default branch

What it never does

  • It never merges a pull request, and never approves one.
  • It never pushes to your default branch or to any branch it did not create. It never force-pushes over someone else’s commits.
  • It never changes workflows, secrets, settings, collaborators or branch protection. It has no permission to.
  • It never opens more than one pull request for a problem at a time, and never reopens one you closed.
  • It never runs your code or your tests.

Protect your default branch on GitHub so that every pull request needs a review. Sypnia’s pull requests then follow the same rule as anyone’s.

When it cannot

What you seeWhy
The button is off: «Not enough evidence to write a fix»The analysis has no cause, or its confidence is low
The button is off: «Connect a repository»The project has no repository in Sypnia Git or through the GitHub App
failed, with a reason, on the problemSypnia read the code and could not write a change it trusts: the code at that commit does not match the analysis, or the fix would touch more than it should. Nothing was opened and it did not count against your limit
The pull request is open and your checks failSypnia does not retry by itself. Fix it on the branch, or close it and ask again

Limits per plan

A pull request counts when it is opened. Asking again for the same problem counts again. The count is per organization, per calendar month in UTC.

Pull requests are not included in the Free plan. How many Sypnia opens a month on the Builder and Team plans is in the table The plans. On the Team plan you can add more as an add-on.

On the Free plan the analysis, the prompt and the MCP server give your own coding agent everything Sypnia would have used to write the fix.

These numbers come from the plans and are shown, with what you have used, by GET /v1/usage. At the limit the button says when the count resets; the analysis and the prompt keep working.

  1. Before you start
  2. When a pull request can be opened
  3. What happens
  4. Sypnia reads the repository
  5. It writes the change and a test
  6. It opens the pull request
  7. Your checks run, a person reviews
  8. After the merge
  9. What the pull request contains
  10. What the GitHub App may do
  11. What it never does
  12. When it cannot
  13. Limits per plan

    Search pages, sections and terms