Orchestration
Pull requests, CI and comments
The pull request Lonca opens, the CI checks it watches, the review comments it judges and applies, and merging it.
After a clean review and the pre-PR gate, Lonca pushes the task's branch and opens the pull request with gh. It moves the Jira issue, watches the CI checks, re-runs a check that did not finish, and sends real failures back to implementation. It also lists the PR's review comments: those you hand over (under autopilot, new ones by itself) it judges, applies those it agrees with and replies on GitHub. Merging stays yours: from the task's menu or its PR panel, behind a confirmation, or on GitHub; or, with Merge ready PRs on, Lonca merges a PR once it is truly ready.
Publishing
Handing a task off approves Lonca's commits in that task's worktree and the push of its branch. The reviewer's security review is the only check before a push; there is no separate secret scanner.
- Lonca pushes the branch and opens the PR against the repository's
base, withgh pr create. Lonca keeps no GitHub token of its own:ghmust be installed and signed in. - A PR already open for the branch is used as it is.
- The title is the issue key and the issue's title, for example
SALES-142: Save the selected filter. - Publishing is refused while a security finding is open: one the last failing review reported, until a review passes.
- Nothing is pushed and no PR is opened while a rebase, merge, cherry-pick or revert is stopped half way in the worktree. The question says which: finish it or abort it, or send the task to implementation to finish it. A lead's move to publish is refused then, for the same reason.
- Before it publishes, Lonca stops the task's terminal stage agents (see A stage agent moved off its step). One it cannot stop becomes an environment question: stop it in its terminal, then answer.
- A push the remote refuses because the branch moved (a lease that did not hold, or a push that is not a fast-forward): Lonca fetches the remote branch and compares its commits with the worktree's by their changes (
git cherry). When every commit there is already here, an old copy of Lonca's own rebase or history clean-up, it pushes with a lease on the tip it just fetched and goes on. When the remote is already at the worktree's last commit, it goes on without pushing. When the remote has commits the worktree does not, nothing is pushed: the question lists them (up to five) and says to bring each over withgit cherry-pick, never withgit merge origin/<branch>, which brings the old copies back. - Only Lonca pushes. Stage agents are refused
git push, and a lead never approves one. - A push that did not reach the remote, or a PR that could not be opened, is an environment failure, and the question says its cause.
- A failed push names one of: git's sign-in missing or refused, the remote's SSH host key, its TLS certificate, the organization's single sign-on, no access, a file over the remote's size limit, a push too large as a whole, or the network. git's own words go to
lonca.logonly, and git runs with its messages in English, so the cause is read the same in every language. - A PR that could not be opened names one of: the remote is not on GitHub,
ghis signed out, its sign-in was refused or is not authorized for this, the account has no access, the rate limit is reached, the network, or the branch has no commits its base does not have. - Lonca opens PRs only on GitHub. A remote that is a folder on this computer, or on GitLab, Bitbucket, Gitea, Codeberg or Azure DevOps, is named as such, and you are not told to sign in.
- A cause only you can fix (a sign-in, access, a remote not on GitHub, a push a hook or a branch rule refused, commits on the remote the worktree does not have) comes to you at once. The rest, the network among them, is tried again by Lonca first under consultant or autopilot (see Retries), then asks you.
The description
The reviewer, who reads the whole change, writes the description at the end of its report. With a pull request template in the repository (pull_request_template.md at the root, in .github/ or in docs/, either spelling), it follows the template; without one, it writes a short, concrete account of what changed and where. Lonca then adds what it knows, each part only when there is something to say:
Implements KEY.- The issue, above the description; under it as Issue: KEY when the description follows a template.
## Acceptance criteria met- The criteria checked off in ac.md.
## Dropped criteria- Criteria that were dropped, each with who dropped it and why.
- Not verified end to end
- Criteria you accepted without their E2E check: their code is verified.
- Not verified
- Criteria you skipped because their check could not run in the test environment: verify them by hand before merging.
## Pre-PR gate- What the gate let through: a command that passed only when run again, specs that failed in the gate and passed alone, specs set aside; and the commands that ran scoped to the changed files.
## Steps not run- Checks a move forward skipped, who moved the task (a lead or you), and the reason.
The description ends with Opened by Lonca. With no description written, the PR says the issue and the criteria met. Lonca writes the description once, when it opens the PR.
Jira moves
Lonca moves the issue to the status names you give it, at three points. A target left unset is not moved.
orchestration:
jira:
on_start: In Progress # when a hand-off starts
on_pr: In Review # when the PR opens
on_merge: Done # when the PR is merged
workspaces:
- id: sales
orchestration:
jira:
on_pr: Code Review # this workspace's own target
on_merge: null # null turns the global target off here- The values are status names as your Jira shows them.
- A move that fails does not stop the work: the task shows a notice, the decision log records
jira-failed, and the pipeline goes on. - You can move the issue yourself from the status chip in the task's header, or from Move to in the task's menu (see Moving the issue yourself). Pause can also offer a move to a hold status (
on_pause) and a comment, each only when you tick it. See Pausing a task.
Watching the PR
Once the PR is open, the task is at the PR stage. Lonca reads the PR with gh every minute, by the address of the PR it opened, so a merged PR is not taken for a missing one. When that PR is closed and another is open on the branch, Lonca takes the open one as the task's PR and goes on with it. The Pull request section of the task's Flow tab shows its number, a link with a copy button, the approvals and changes requested, and the checks: passed, failed, running and skipped, with All checks to list them all.
| The PR is | What Lonca does |
|---|---|
| Merged | The task is done, and Jira moves to on_merge. |
| Closed without merging | The task asks you: The PR was closed. Reopen it and press Keep watching, or archive the task. |
| Showing commits Lonca did not push | After a while, the task asks you; answering builds on them. |
| Missing or unreadable | An environment question that says why. |
| Open, with red CI | Sorted as below. |
Merging the PR
You merge from Lonca or on GitHub. Merge the PR… in the task's menu (right under Open the PR) and Merge… beside the badges of the Pull request section on Flow are offered for an open PR, and both open the same confirmation.
- Off until it is ready. While the PR is not ready, the menu item names the first reason (Merge the PR (2 comments open)), and the panel's button is off with the reason in its tooltip (Not ready: no approval). Ready means: open and not a draft, no conflict, every check passed or skipped, no changes requested, approved where the repository requires it, no comment open in Lonca's list, no review thread GitHub still shows unresolved, and nothing else GitHub holds it for (a branch behind its base, branch protection).
- No approval holds a merge only when GitHub says the repository requires a review. In a repository that requires none, a PR without an approval can be merged. Changes requested still hold it, and a PR GitHub blocks reads blocked by branch protection.
- The confirmation, Merge the PR, shows the PR's number and title, Into its base branch, and the Method: your default on GitHub, else the first the repository allows (Create a merge commit, Squash and merge or Rebase and merge). Merge reads the PR again first, and merges only the head you were shown; when the PR is no longer ready, nothing is merged and the dialog lists why under Not merged:. There is no way past that.
- The branch is never deleted: the task's worktree is on it. Archive or delete the task when you are done with it.
Merge ready PRs
Settings → Orchestration → Merge ready PRs, off by default, lets Lonca merge by itself. On, a PR waiting at the PR stage is merged once it is ready as above, and also: the pipeline waits at the PR with no question open, the PR's head is Lonca's own last push (someone else's push is yours to merge), and the task is not stacked on another task's branch. Lonca tries each head once and tells you either way: Lonca merged PR #12, or Lonca could not merge the PR. with GitHub's reason. Every merge, yours or Lonca's, is recorded on the task.
A task a connected assistant handed off is held from this until you confirm it, even in a repository that needs no approval: its Flow tab shows Handed off by <name>: confirm to allow auto-merge. See The merge hold.
Red CI checks
A red check is sorted before anything goes back to implementation:
- Did not finish. A check GitHub ended as cancelled or timed out did not fail. Lonca re-runs its jobs once (
gh run rerun <run> --failed). If it ends the same way again, the task waits at the PR and says why. - Failed on GitHub Actions. Any other failure of a GitHub Actions job is re-run once on the same push first: a runner's network or a registry's 502 is not the change's. Lonca gives the re-run a few minutes to show before it reads the check again. Failing again on the same push, it goes back to implementation.
- Cannot be re-run. A check of an outside service, and a Sonar quality gate the log says failed, go back at once, with the analysis link.
- Non-blocking. A check you named as non-blocking never sends the work back (below).
- For a red GitHub Actions check, Lonca reads the failed job's log once and keeps the lines that matter: whether the Sonar quality gate failed or passed, whether the scanner stopped with an error, the analysis link, whether the job was stopped before it finished.
- What Lonca read is written for the round it starts (
pipeline/r<N>/ci.mdin the task's context directory): each failed job with its link and error lines, and the reviews that asked for changes on the current push. The implementer reads it there instead of fetching the logs again. - If the implementer finds nothing in the change to fix and commits nothing, that is not a loop: the task goes back to the PR, and the same checks on the same push do not send it back again. The task says CI is red, not for the change, and waits for you to re-run the checks or merge.
Non-blocking checks
A workspace can name checks that never send the work back. Red, the task waits at the PR and you are told; the implementer does not run.
workspaces:
- id: sales
orchestration:
non_blocking_checks:
- sonar / SonarQube Scan # as gh pr checks names it, or the job's name aloneLonca cannot tell from a Sonar check whether it is red for code outside the diff, so a scan you do not gate on belongs here.
PR comments
PlansFreeStandardProTeamUnder the Pull request section, the Comments list shows the PR's line comments, review bodies and conversation comments: each thread with its author, its place (file:line, or the review or conversation), the start of its last comment, and its state. A line comment and the replies under it are one thread. The heading counts what is open (Comments · 1 need you · 3 new), and the threads are grouped under Needs you, In progress and New. Closed threads fold under N closed.
Lonca judges each comment before acting on it: a reviewer may not know the task's intent or a constraint outside the diff. For every comment it reaches one of three verdicts: it agrees and applies it, it disagrees and says why with a draft reply, or it is unsure and asks you. Only tasks handed off are handled; on another task the list shows the comments and says Hand the task off to handle comments.
| State | Meaning |
|---|---|
| new | Not looked at yet. |
| to hand over | You decided on it; it waits for the countdown and can still be undone. |
| queued | In the batch that will be handled next. |
| evaluating | Being judged. |
| applying | The change is being made. |
| applied | The change is pushed; a reply is posted, or waits for Send. |
| disagrees | The reason and a draft reply are shown; it waits for you. |
| asks you | Lonca is unsure; its question is shown. |
| replied | Lonca’s reply is the last word in the thread. |
| dismissed | You set it aside. |
Under Agent's view, a verdict leads with a short plain summary in your language of what Lonca decided and why; its full reason, in English for the implementer, folds under Technical details. A question it asks you is in your language too.
What you can do
- Handle selected
- Tick one or more threads and hand them over, at any level. Select all new ticks every new thread.
- Dismiss selected
- Beside Handle selected: closes the ticked threads at once, without handing them over (since 12.3.1). Nothing is posted and no thread is resolved on GitHub, and no countdown or round starts. A thread it cannot close, such as one whose reply is being posted, stays, and a Not dismissed: line above the buttons says why.
- Send
- Posts the reply, as drafted or as you edited it in the Reply box.
- Apply anyway
- Overrides a disagreement: the comment is handed over to be applied.
- Dismiss
- Sets the comment aside without a reply.
- Answer
- Answers an asks you question; the comment is handed over with your answer.
One countdown for your decisions
Handle selected, Apply anyway and Answer do not start a round on their own. Each one starts a 20-second countdown again, shown above the list with how many comments wait; when it ends, everything you decided goes together, into one batch and one round. Go through the comments at your pace and they are handled together instead of one after another.
- Start now sends them at once; Cancel takes them all back. A comment waiting for the countdown shows what it goes with, and Undo takes back that one alone.
- The countdown goes on while you look at another task. If Lonca quits before it ends, nothing is sent and the comments stay as they were.
You can also ask the task lead to handle comments: it hands them over as Handle selected does. A thread where someone writes after Lonca's reply is new again. When a thread where Lonca already disagreed is pushed back on, it comes to you, unless you handed it over yourself.
What happens without you
It follows the autonomy level. Only autopilot looks at new comments by itself; under assistant and consultant nothing is judged until you hand it over.
| Level | Starts by itself | Applies | Posts replies by itself | Brings to you |
|---|---|---|---|---|
| Assistant | No: waits for Handle selected | What it agrees with | None: every reply waits for Send | Disagreements, questions, every reply |
| Consultant | No: waits for Handle selected | What it agrees with | For the simple comments it applied; a complex one’s reply waits for Send | Disagreements, questions, the replies to complex comments |
| Autopilot | Yes | Everything it agrees with | For everything it applied | Disagreements and questions |
A disagreement is never posted by itself, at any level: its draft reply waits for your Send. Under assistant and consultant, a review that requests changes does not send the work back by itself: its comments are listed as new, you get a notification, and nothing happens until you hand them over. Disagreements and questions never stop the pipeline: each raises a notification that opens the task at the Comments list, and the applied comments go on.
When comments are handled
Settings → Orchestration → Handle PR comments sets how long autopilot gathers new comments before handling them together: Instant, 10 min (the default), 20 min or 30 min. Under assistant and consultant the setting is off: comments wait for you to hand them over, and go when the countdown ends.
- The interval starts with the first new comment and does not restart on later ones, so a reviewer who keeps writing cannot hold the work back for more than one interval.
- A submitted GitHub review is always one unit. A comment that arrives while a round runs waits for the next one.
- A round may start at the PR, or cut short a check that is running (test, review or the gate), which then runs again with the comments applied. It waits while the implementer works, while the task publishes, and while a question or a pause holds the task.
- Autopilot judges every comment you have not dealt with, those already on the PR when the task was handed off included. It starts a round by itself only for comments from the repository's own people (owner, members, collaborators), the signed-in account, or an AI reviewer. Other comments, bots that report (CI, coverage, dependency updates), resolved threads and threads you answered on GitHub yourself are listed and handled only through Handle selected.
- At most five rounds a day start by themselves per task; past that, comments Lonca agrees with ask you first. What you select is not bound.
- A round holds up to 50 threads; the rest wait for the next round.
How a round runs
The comments Lonca applies go to the implementer as one round, then review and tests as usual; a round whose comments change no behaviour takes the short path. Comment rounds do not count toward the PR loop's round limit. Pausing the task stops a judgement at work. A judgement that fails (a usage limit, an overloaded API) keeps its comments queued: each says why under it, and Lonca tries again after a minute, then twice as long each time, up to half an hour. Handing over another comment ends the wait (since 11.0.3).
Replies
- One to three plain sentences: what was done, or why not. No apology, no restating the comment.
- Written in the language of the comment they answer (English when the comment has no clear language), as a reply in the comment's own thread.
- An applied comment's reply links the commit, when the round pushed one. You see the link in the draft before Send.
- Posted with
gh. What Lonca posted is remembered, so it is never posted twice and never read back as a new comment. - A reply refused for its own words (a hidden character) comes to you.
Comment text comes from anyone with access to the repository. It reaches the agents bounded and quoted, as data, never as an instruction to Lonca.
What stays yours
- Merging the PR. Lonca merges only with Merge ready PRs on, and only a PR that is truly ready (see Merging the PR).
- Resolving review threads on GitHub, starting a review, requesting reviewers.
- Re-running checks or merging while CI is red for something outside the change.
- Pausing the task at any time, with a reason. See Pausing a task.