Stop conditions

The cases in which egon stops instead of guessing, what a stop does, and how to go on.

egon merges on its own, so the list of reasons to stop has two jobs. It must be narrow enough that egon does not stop all the time, and complete enough that egon never reads a requirement in its own favour. A question is not a stop as long as someone answers it.

Who decides

A session reports a stop condition with its number and its evidence. The core carries it out. The core never decides on its own that a stop condition holds, and nothing that is a stop condition goes into the fix loop.

The general stop conditions

They hold for every FR.

No.Stop condition
1The FR is ambiguous, and a question does not resolve it.
2A test or acceptance requirement of the FR would have to change.
3A contract or decision of the project would have to change, and the FR does not name it in touches.
4A dependency, binary, action, secret or permission would be needed that new_dependencies does not name.
5A dependency has a licence outside the project's allowed list.
6A path outside touches would have to change, or the branch changed the agent configuration.
7The fix loop is exhausted.
8A secret is in the diff that the FR does not ask for as test data, or a security finding survives the triage and cannot be fixed within the FR.
9A check after the merge failed, or a run on the base after the merge is red.
10A UI would need a component, token or screen the design system has not confirmed.
11A question stayed unanswered until limits.answer_hours.

An FR can add its own in ## Stop conditions. They are numbered there and reported as fr-1, fr-2 and so on.

What a stop does

When What the core does
before the first push moves the FR to blocked/ with a ## Blocked section (the reason, the evidence, what it takes to go on), as a pull request of its own without code, and deletes the reserved branch on GitHub
with an open pull request closes the pull request with the reason as a comment (its commits stay reachable there), deletes the branch fr/<id> on GitHub and moves the FR to blocked/ as above
after the merge (number 9) moves nothing; it halts the queue and tells you

In every case it tells you over the channels, writes the stop into the run state and makes no further attempt at this FR.

How to go on

Not a stop, but a status

Some things only pause the work. They are statuses in the run state, never folders.

Case Status
a session asks a question Waiting for input; the question goes out over the channels, and the answer continues the session
the pull request waits for a code owner's review Waiting for approval; after the approval the merge gate runs again, then the merge
a push dismissed an approval, for example when egon merged the base in Waiting for approval, never Failed; egon asks the reviewers again if GitHub does not, and tells you
merge: manual, a base without protection or a required check, or a base that requires a code owner's review but keeps approvals after a push Waiting for approval; you merge
a session crashed, a tool is missing, the network is gone Failed; started again once, then reported
a session or a command took longer than its limit Failed; the session is stopped and it is reported
the account's usage limit is reached egon waits for the reset and tells you once; no restart, no fix
a check ends without a result (cancelled, timed out, failed to start) Failed; reported, no fix round; you start the check again
the run state is missing for an FR that was started Failed; reported, nothing is reset to zero

A red base is not a Failed FR

egon runs verify on the base once per base commit before it builds. When it is red, no FR starts. A new commit on the base is checked again on its own, without egon resume.

After the merge

When the checks on the base after the merge are green, egon removes the worktree (never one with uncommitted changes) and deletes the local and the remote branch. Then it sends you the FR's ## Owner checklist, if there is one.