- Fix — when X, should Y, actually Z. Example:
#1074 — when
gh auth statusexits 1 while the active account is valid, the Runner should resolve it; actually the exit code failed the delivery. - Change — when X, the user should be able to Y; today they
cannot because Z. Example: #1048 —
when a user starts the runner from the published image, they should
get a working model provider; nothing read the
ORBI_PI_*variables yet.
ai-blocked scene that needs a human). This page covers the complete
automatic chain and the project’s GitHub workflow vocabulary.
The complete chain
State machine (the seven delivery states; the review/fix loop stays on the same PR — only its head may advance):ai-fix-needed with
the failure comment on the Issue AND the PR carrying the full scene — and
the next tick resumes the same run, branch, worktree and PR (no
replacement PR, no re-claim). A missing worktree is not a failure at
all: the resume rebuilds it from the remote delivery branch and
continues (Issue #807 — the worktree is a local cache of the remote
state, branch + PR live on GitHub). Only an external precondition the AI cannot
safely judge or fix (an unrecoverable scene,
an exhausted review round budget, a PR closed without merge, a delivery
branch deleted from the remote — nothing left to rebuild the worktree
from) fails fast:
the Issue is marked ai-blocked with the explicit reason why automatic
recovery is impossible, and the automatic loop never touches these unrecoverable scenes again — a
human decides the next step.
Opened-PR candidates are considered oldest Issue first, across a bounded scan of up to 100 candidates. Running or CI-pending candidates are skipped so another delivery can proceed.
A saved clean review can avoid another review session after a deferred merge or after a policy wait (ai-awaiting-merge). Reuse requires the stored PR head and the hash of the Issue body actually included in the review prompt to match. An outside head change or a change to that rendered body requires review again; a custom prompt that omits {{ISSUE_BODY}} does not use body changes for this check. The policy wait is not proof the reviewed inputs still apply: an approval poll is not a review, an edit to the ticket while Orbi waited runs a new independent review before the merge, and the merged receipt reports the round that review round ran in (review_rounds), never 0 and never one per poll. When the Runner absorbs a non-conflicting base update itself, it updates the recorded head, pushes it and defers merge until a later tick checks that head’s CI. The merge gate still verifies the current head and base before merging.
CI usage: what a delivery triggers and how to keep runs down
A delivery does not run your CI itself: it pushes to GitHub, and the workflows in your repository run on the events those pushes create. One delivery typically causes three kinds of run:- Pushes to the PR branch. Once the PR exists, every push to the
delivery branch — the implementation push, each review/fix push and every
base absorption — updates the PR and runs its
pull_requestworkflows. - Base-branch absorption. When the base branch advanced while the
delivery was in flight, the Runner merges
origin/<base>into the task branch (src/orbi/runner.pybefore the PR opens, andsrc/orbi/merge_exec.pyat the merge gate), pushes the new head and waits for CI on it before merging. Absorption is kept because what merges must have been tested against current code: without it, two deliveries could each pass CI on an older base and break the base in combination. - The merge itself. Merging the PR lands commits on the base branch,
which runs the repository’s
pushworkflows again.
- Put CI in a
concurrencygroup withcancel-in-progress: true, so a new push to the same branch cancels the previous run instead of finishing both (see GitHub’s concurrency guide). - Use
paths-ignoreso a documentation-only push skips the expensive pull request workflows. - Keep
labeledout of apull_requestworkflow’stypeslist so a label change does not start a run. - Run slow end-to-end suites only on pushes to the base branch: fewer runs, at the cost of finding a failure after merge.
Steering an active delivery
You can correct direction without cancelling an active delivery. While the Issue isai-in-progress, add a comment with the new decision or edit the
Issue body. The Runner checks for trusted corrections at the next steering
poll (steering_poll_seconds, 60 seconds by default) and restarts the active
session with the correction. The restarts are bounded by
steering_max_rounds (3 by default); after the limit
is reached, further corrections do not restart that delivery and the journal
records steering_limit_reached. Let the current delivery finish, then put the
revised scope in a follow-up delivery.
The same poll reads the Issue’s state, so closing the Issue ends the
session at that poll instead of running it to the end
(Stopping a delivery, Issue #2468).
The Runner applies the same trust rule to the comment author and the last
editor of the Issue body. A correction can steer if GitHub reports admin
or write for that login (collaborators/{login}/permission) or the login
is the runner’s authenticated account. The comment’s authorAssociation
reflects membership and visibility to the reading token. The Runner ignores
body edits by untrusted or unknown editors and records
steering_body_untrusted in the journal. The initial trusted comment timeline
is capped at issue_comments_limit (200 by default). The injected context states
how many older comments were omitted.
A stop question can also be answered WHILE the session runs
(The stop question). The steering
poll reads the answer record, writes the acceptance criterion it implies
into the Issue body with the same append /orbi amend uses, and the
restart above carries the amended ticket into the new session exactly
once. Only the engine’s own write is skipped from steering — a maintainer
who shares the runner’s account is still read as a person, and editing
the body by hand still steers. A closing answer (cancel included) is
carried out only while the ticket is ai-blocked; during a session it
leaves one receipt saying so and changes nothing.
Dead-loop guard and comment dedup (Issue #825): recovery of an existing
attempt keeps its run id. A fresh claim or takeover can start a new attempt
on the same delivery branch and PR. Since the PR body is written once at
creation, the resume verification accepts ANY run marker the
delivery line has used — the marker set is read from the Issue’s TRUSTED
comments (the same trust filter as the resume scene; a copied marker in a
public comment widens nothing, and the branch, base, head and exact-URL
checks stay intact, keeping the #45/#89 anti-PR-swap posture). A failure
comment of one (run_id, failure fingerprint) pair is posted ONCE (the
hidden <!-- orbi:fail=... --> marker is the key); every identical
repeat bumps that comment’s hidden :<count> suffix in place (the
journal records the repeat). The same pair recurring to 3 CONSECUTIVE
failures (a scene block — a newly opened PR, a completed review round —
means the line advanced and resets the streak) is classified as a dead
loop, not a transient error: it escalates to ai-blocked with the count
and the unchanged-precondition verdict in the comment.
A resumable Pi/model failure follows the same bound (Issue #2292): its
recovery comment carries the <!-- orbi:fail=... --> marker too, so one
occurrence still keeps the Issue ai-in-progress and the next tick
resumes the same run, while the same fingerprint on 3 consecutive rounds
stops the loop ai-blocked. That stop is one blocker comment naming the
reason and the human decision (answer the agent’s question or amend the
ticket, then relabel); after it lands, the failed worktree is retained
under keep_failed_worktrees (default on), so the agent’s uncommitted
changes stay inspectable — the runner never commits them.
Rules of the chain:
- A development delivery keeps the same branch and PR through review/fix. Each attempt has one run id and worktree; recovery of that attempt keeps them. A fresh re-claim or takeover may use a new attempt on the same branch/PR. Read the Issue’s trusted comments to find its attempt markers.
- Only the two opened-PR states are picked up automatically:
ai-pr-opened(awaiting review) andai-fix-needed(awaiting the next review session).ai-readyis claimed as new work;ai-blockedis never auto-recovered for these unrecoverable conditions. The v0.7.15base_ci_redrecovery and the v0.7.18checks_permission_missingrecovery are the explicit exceptions. A delivery that still carriesai-in-progress(left by a runner of an older version killed during review) is still picked up — the positive opened-PR qualifier already keeps implement-phase Issues out of the scan. ai-awaiting-mergewaits for a maintainer, so it never competes with the work the runner can move (Issue #1745): it is re-checked — the same merge-only path — only on a tick where the opened-PR review, the in-flight restart and the ready scan all found nothing. One PR waiting for approval therefore never starves the review backlog or the new claims. The cost: after the maintainer acts, the merge happens on the first otherwise-idle tick, not on the very next one. The scans cover every repository the runner serves, so while any other repository of the same runner still has work, this merge is pushed back with it.- The review/fix loop is bounded (5 rounds). The completed-round count
lives in the trusted scene (
review_round, Issue #788): every round comment carries the updated scene block, so the next tick reads the advanced count from it (a human’s blocked -> ai-fix-needed recovery after the scene still starts a fresh budget, Issue #483). Exhausting rounds with findings marks the Issueai-blocked(the bounded loop is a human decision); a recoverable failure (Issue #50) keeps itai-fix-needed. Either way the PR, branch and worktree stay intact. The reviewer guards the budget itself (Issue #878): before the work its prompt reads the delivery’s round comments (the samerun_id) and, when the same failure reason already appears in two or more consecutive rounds, emits the findings verdict naming the repetition instead of repeating the fix — a wall is hit by at most two rounds. - Ordinary development deliveries defer pending CI to a later tick (Issue #788):
they record the wait, return and release the slot. The next tick re-reads
the state (
delivery_ci_pending,merge_gate_ci_pending,merge_gate_mergeable_unknown). While that wait lasts the Issue’s progress comment says so in one line: the head commit whose checks Orbi waits for and that the merge follows automatically once they pass, with no time and no next-tick promise (Issue #2304). The review scan skips CI-pending candidates, so other work can proceed. One bounded exception (Issue #2305): a delivery that already PASSED review and only waits for the checks on its latest head (the #1626 review record’s head equals the PR head, at least one check in progress, none failed, at most 15 minutes since it was recorded) holds the FRESH claim while no free slot is left — only that claim is skipped, the slot stays free for the merge, and thereview_waiting_deliveryjournal line says so. Nothing else is held: past the 15-minute bound the claim proceeds as above, and an empty check list, a failed check, another free slot, the in-flight restart scan and theai-awaiting-mergere-check still move. The cost with one slot is at most about 20 minutes of idling (the bound plus the 5-minute timer). Releases have a separate in-process CI wait: they keep a slot while polling, bounded byrelease_ci_wait_seconds(default 1800 seconds per CI gate, not a total release timeout). One bounded exception is GitHub’s asynchronously computed mergeability (Issue #1736): when the merge gate’s first read saysUNKNOWNand the head’s CI has already concluded, the gate re-reads the whole PR state after 2 s, 4 s and 8 s (MERGEABLE_UNKNOWN_RETRY_DELAYS) and continues in that same tick as soon as GitHub answers — at most about 15 s of slot time. A pending or failed rollup is never re-read, and a PR that staysUNKNOWNthrough every re-read still defers as above. A PR whose view never picked up the delivery’s own push is a different wait (Issue #2440): when the merge gate’s read staysUNKNOWNand the PR head is not the branch tip onorigin, the Runner asks GitHub to update the pull request branch itself (PUT /pulls/<n>/update-branchwith the branch tip asexpected_head_sha;pr_head_lagging,pr_head_refresh_requested), so GitHub re-reads the branch and the delivery continues on the refreshed head. The attempt is bounded to three ticks (PR_HEAD_REFRESH_TICKS); past the bound the run stopsai-blockedwith a comment that names the cause (GitHub never refreshed the PR) and the repair (a new commit on the branch, or the PR’s “Update branch” button) instead of polling forever. - Base advances are absorbed by a plain
git mergeof the latestorigin/<base>on the task branch (conflicts resolved manually), followed by a full test rerun. No force push, no auto conflict resolution, no push of the protected branch. - A head whose checks are RED and that only lacks the base (GitHub reports
the PR mergeable, so there is no conflict) is absorbed and pushed by the
Runner BEFORE the review session starts (Issue #2423): no session runs on
that stale head, no round is counted, no failure comment is posted, and
the next tick reviews the new head. A red check the base has already
fixed therefore no longer ends the delivery — re-queuing the ticket with
ai-fix-neededpicks the fix up. - The same absorb runs when the PR reports NO check at all — from the SECOND review round on (Issue #2480): an empty rollup holds no result the absorb could invalidate, and the stale head would otherwise be reviewed again and again while the review’s own local gate kept reporting a failure the base had already fixed. Round one still reviews the head (no session has run on it yet, and a pass reaches the merge gate’s own absorb), and a rollup that carries any entry — pending or concluded — keeps the red-only rule above.
- A head that already CONTAINS the base and fails a check that also failed
on that base commit is paused as
base_ci_redbefore any review session starts (Issue #2442): the SAME detection the merge gate uses, on the base commit the head carries at that moment (never only the SHA frozen when the round opened), so ONE fix Issue opens, the delivery pauses, and it resumes by itself once the base turns green — a review of a PR that cannot merge until the base is fixed is never run. A base whose matching check has not concluded yet is not green: that tick records nothing, starts no session, and looks again on the next tick. Every other red head — the base is green on every failed check, or the head does not contain the base (a conflict) — keeps the paths above: the review runs on the red head, and a conflicting head is absorbed in the session. - Absorb contract (Issue #877, machine-checked by the Runner): a review
round that starts with the head behind
origin/<base>or facing a merge conflict must end in one of two states — the branch containsorigin/<base>(git merge-base --is-ancestortrue), or the verdict isfindingsstating that the round attempted the absorb and abandoned it, with the concrete reason. Apasswhose head still lacks the base is named in the round comment as an absorb-contract violation (review_absorb_abandoned); the bounded 5-round semantics are unchanged. - Git transport (Issue #114, #580): git data operations go over the
configured transport (
git_transport:sshby default — git over SSH —, orhttpswith theghcredential helper), GitHub API operations stay on theghtoken — the full two-channel boundary and the pre-start check: Operations; the credentials: Security.
Reviewing with a different model
The independent review does not have to run on the model that wrote the code:review_pi_provider, review_pi_model and review_pi_thinking
select a separate provider/model/thinking level for the review session,
so the reviewer does not inherit the author’s blind spots. Each key
falls back independently to its implementation-side value
(review_pi_provider → pi_provider, review_pi_model → pi_model,
review_pi_thinking → pi_thinking), so overriding only one of them is
valid. Both selections must exist in the configured pi_providers
catalog and are validated separately at startup — an invalid review
selection fails fast with review provider selection invalid. No
specific pairing is recommended or benchmarked here; the capability and
the fallback are the contract.
The merge record: external_commits and commits
When the Runner merges a delivery PR, the Orbi merged PR: Issue
comment shows the user only what they act on — the PR link, the review
result and the target branch — and folds the merged-as-is facts
(Issue #833) into one collapsed Run details block:
Run details rows keep the key=value form (equals sign, not
colon) because they are machine-read anchors: the orbi-cloud
mergeCommentFields reader and the repository’s comment-reader
contracts match external_commits=K, review_rounds=N, run_id=… and
pr_url=<url> exactly. pr_url is the unambiguous PR URL, so a consumer
never has to read the translatable Orbi merged PR: heading; the receipt
carries the hidden <!-- orbi:comment=merged --> kind right after the run
marker, and both rules are defined in
Public contracts. The Orbi: merged milestone line
carries the same facts for a human reader, but its rows are display text
whose labels follow the message language — no consumer reads a fact from
the milestone; the receipt’s Run details fold is the machine surface.
commits— all commits of the PR branch relative to the base at merge time (the denominator of the ratio).external_commits— commits NOT in the engine’s own push history (the head the PR opened with plus every review/fix head the Runner itself pushed; git authorship is never inspected).0= merged as-is: no human changed a line on the delivery branch before the merge. The count is read after the merge through the merge commit’s parent chain (M^1the base tip,M^2the PR head) minus the engine’s recorded push line: the last engine-pushed head, and — for an external takeover (Issue #608) — excluding the taken-over contributor head the line starts from, so the contributor’s commits stay external.external_commits=unknown— the push history is unverifiable (a recreated worktree lost the run-state record, a fix push’s round ended before its record and the history is incomplete, or a recorded head or base is not an ancestor of the merged head). A squash or rebase merge (Issue #1480) has noM^2, so both metrics areunknownthere as well. An uncountable history is never written as0.
pushed_head, Issue #219 file) at three points — the delivery push,
a verdict-covered review/fix push, and the round-start adoption of a
head a previous session pushed but whose round ended before the
re-freeze record — so resumes of the same worktree keep the history; a
fresh worktree starts without it and degrades to unknown. An
external takeover additionally records the taken-over head once at
claim time (pushed_base), and its round-start adoption never runs:
the worktree legitimately starts on the contributor’s head. Recording
is bypass-safe: a missing or corrupt state file logs
pushed_head_unrecorded and the delivery continues.
Delivering in a fork for an upstream PR
When the task repository is a GitHub fork, Orbi still delivers and opens its own PR in the fork; a person opens the upstream pull request and talks to the maintainers. Before the handover push, the Runner reads the repository’sparent from GitHub and brings the delivery branch up to date with the
parent’s CURRENT default branch (a plain merge, never a force push). It then
re-reads the same GitHub checks the delivery already merges on, on the updated
head, and the Issue’s progress comment names the parent commit and the test
result. A conflict with the parent, a failing check, or a check that does not
conclude stops the delivery with one structured question; it never reports a
branch that no longer applies as ready. A repository that is not a fork, or
whose parent cannot be read, keeps the normal closeout unchanged. Orbi never
pushes to, comments in, or opens a PR on the parent repository.
Delivery labels
GitHub labels are the external state machine. They are not created by commits — initialize them per repository (see Getting started):
Queued means not started (Issue #2309).
is:open label:ai-ready — or the
repository’s dispatch_label — is the queue. The default ai-ready is data,
not code: it is the queue role in the engine’s labels.toml, and the
precedence is the repository’s .github/orbi.toml dispatch_label >
labels.toml (Issue #2347); the host orbi.toml does not read it. The claim removes that label in
the same write that adds ai-in-progress, and every later non-terminal stage
event removes it too, so a ticket claimed under the older rule converges on its
next stage event. Only a ticket that is put back in the queue adds it again: a
requeue, a person re-adding it after ai-needs-detail, the amend/draft/split
re-dispatch paths, an idle release arming, and a release that waits for open
deliveries. dispatch_label may name any ordinary label, never one of the
lifecycle, type, priority or control labels — the repository config load
rejects that with the conflicting label named.
A repository policy may block the merge even after Orbi’s review and checks
pass. Orbi stops at ai-awaiting-merge; the Issue comment names the exact head
and the one maintainer action (including the settings URL when applicable).
Such a delivery is a wait, not work the runner can move, so it is re-checked
only after the opened-PR, in-flight and ready scans found nothing for the tick:
the waiting PR never takes a tick away from a review, a restart or a new claim.
After the maintainer changes the policy or supplies the required approval, the
next otherwise-idle tick resumes and Orbi merges the PR itself — the cost of
the rule is that this is the first tick with an empty queue, not the very next
tick, and the queue is the runner’s whole queue: while another repository served
by the same runner still has work, the merge waits for it as well. A policy rejection without a known FAILED preflight action, or any other
merge failure, remains ai-blocked.
Stopping a delivery
- Not claimed yet: remove the queue label.
- Running now: close the Issue. The session stops within one steering
poll (
steering_poll_seconds, 60 seconds by default) instead of running to its end: the poll that collects corrections also reads the Issue’s state, and a closed Issue terminates the session where it is (Issue #2468). Orbi then pushes whatever the session had already committed to the task branch, opens no PR and comments on the Issue that the delivery stopped (the run endsissue_closed), so the slot is free for the next ticket. If the PR is already open, later ticks no longer pick the delivery up, so Orbi does not review or merge it again and comments on the PR: merge it to keep the work, or close it. A review round that is already running is not interrupted and can still merge; to hold that merge, addai-blocked, which the merge gate reads right before merging. Removing a label does not stop a running session. - Interrupted (the Runner was killed and the next tick would resume it):
an implement-phase run is found by
ai-in-progressplus this deployment’s own task worktree and run state file (Issue #2309). Removeai-in-progress, or close the Issue, and it is not resumed. - Claimed before the upgrade to this rule: the ticket may still carry the
queue label as well. Remove both labels, or close the Issue: removing only
ai-in-progressleaves the queue label, and the ready scan claims the ticket again as new work. - Upgrading across this change: a delivery you stopped under the old rule
by removing only
ai-readystill carriesai-in-progress. The upgraded engine finds interrupted runs by that label alone and would resume it, so removeai-in-progresstoo (or close the Issue) before upgrading.
Human acceptance gate (ai-human-review)
The main line of the product is unattended: the default pipeline runs with humans OUT of the loop, and the gate is off by default — with the switch off the delivery, review, merge and release behavior is exactly what it was before (Issue #763). The host config turns the gate on (human_review_gate = true in
orbi.toml — an operator trust decision, not a repository policy).
Every delivery then posts ONE acceptance checklist comment to the Issue
when its PR opens, split in two columns:
- Column 1 — what the run already verified (evidence, not todos):
the PR head’s observed checks and conclusions (Issue #1613: the engine
never parses a local test log; Issue #2339: it reports each check GitHub
concluded —
docs-format=SUCCESS,integration=SKIPPED— and never a test layer the rollup does not establish), the link to the PR’s per-job CI results, and the delivered file count only when the changed-file list could actually be read. - Column 2 — the machine-unverifiable minimum, derived per delivery from the changed paths and the available evidence (never a hardcoded human-items template): business intent (tests prove the implementation matches the tests, not that the tests match the intent), UI visuals and copy, external-environment verification, and missing-evidence items when the head’s checks have not passed or the diff cannot be read.
ai-in-progress and the queue label
are cleared, NOTHING is added (a waiting ticket is not queued, Issue #2309),
the opened-PR label stays as the resume anchor, the slot is released, and
every later tick leaves the label set unchanged, writes no label and starts no
review session. The wait does
NOT consume the review-round budget and never touches
ai-fix-needed. Because that wait is KNOWN before the resume scan returns,
the claim skips the delivery instead of spending the tick on it: the in-flight
restart and fresh-claim scans still run, so one person’s pending confirmation
never denies another delivery its turn (Issue #2335). The wait is re-read from
the delivery’s CURRENT evidence on every scan, so a delivery whose column 2
emptied when its checks passed (a green docs-only change, for example) is
reviewed immediately — and being skipped is never a confirmation: only the
label approves a delivery. A person who confirms the checklist applies
ai-human-review, and the next tick reviews and merges the delivery
exactly as it does today (the verdict binding and
--match-head-commit are untouched).
The checklist write is best effort, so a transient failure must not turn the
gate into a request nobody can act on: the waiting tick publishes the
checklist itself. A complete read of the Issue’s comments decides — published
once when it is absent, never appended twice on an unknown outcome — and the
PR link and the ai-human-review instruction arrive with it (Issue #2336).
An EMPTY column 2 is the target state: the checklist says
无需人工介入 (“no human intervention needed”) explicitly and the
delivery passes without the label. As model capability grows,
column-2 items migrate into column 1 — the checklist comment carries a
machine-parsable <!-- orbi:human-review {...} --> block (schema 1)
so the migration is toolable without changing the artifact shape. The
checklist makes no correctness guarantee of any kind: column 1 is
evidence of what was verified, column 2 is what a person still
confirms.
Thin-ticket clarification gate (ai-needs-detail)
A confident delivery against a vague ticket is worse than no delivery: it burns a run, opens a PR nobody can accept and buries the real question. The gate is OFF by default and a repository turns it on withclarify_thin_tickets = true in .github/orbi.toml; an unopted
repository behaves exactly as before.
With the gate on, a fresh claim first asks ONE Pi session — no worktree,
no branch, no delivery — to judge the ticket on three checks: the
observable result (what a user sees or does differently),
the acceptance condition (how a finished delivery is told apart from
an unfinished one) and the single outcome (one fix or one change, not
several unrelated things). The judgment reads the ticket exactly as every
other Issue session does: its text AND the images attached to it (the
Attachments section, and any native GitHub image in the body or a trusted
comment; see Public contracts), so a
ticket whose result and acceptance live in a screenshot is judged with
that screenshot in view. A passing verdict changes nothing and the
delivery starts.
The judgment session loads no built-in tool: it runs with
--no-builtin-tools --no-extensions --extension <shipped clarify_verdict>,
so the model can answer in exactly one way — one call to that
schema-checked tool, which writes the verdict to a file the engine reads.
There is no free-text answer and no stdout parsing. Every unusable answer
(no file, a file the schema would not allow, an unknown check id) is the
same bypass as an unavailable model.
Since v0.7.15, this judgment uses the meaning of the request rather than template headings. A concrete runtime failure with an unambiguous correction can state the result; several symptoms of the same failure can still be one outcome. A log from an earlier attempt does not by itself state an acceptance condition.
A failing verdict whose ONLY missing piece is the acceptance condition and
which carries a usable criteria proposal is completed from the ticket’s
own text instead: the proposed conditions are appended to the body under the
acceptance heading (the very section /orbi amend writes, hidden
orbi:acceptance:v1 marker included, in the repository’s
message_language) and ONE comment lists what was added and says that
editing the ticket changes them. No ai-needs-detail is added and the SAME
claim goes on to deliver — the person already authorized the work with the
claim label. A failed write falls back to the stop below, so /orbi amend
can finish the append, and a body that already carries the appended section
is never amended twice.
A failing verdict that carries a usable split proposal does not wait for
a person either (Issue #2207): the proposal comes from the ticket text alone and
the author already authorized the work by adding the claim label, so the gate
applies it in the same claim — exactly what /orbi split does. The child
tickets are created, attached as native sub-issues, given their blockedBy
dependency and queued with the claim label; this ticket becomes an Epic
(ai-epic, claim label removed) and ONE comment lists the children. The parent
itself is not delivered, and the tick ends with no worktree, branch, Pi session
or PR. The apply is safe to interrupt: every step reads GitHub’s own state
first, so a re-run after an interruption adopts the children already created
and opens no duplicate. A GitHub write failure during the apply falls back to
the stop below — the comment still carries the proposal and the ticket carries
ai-needs-detail, so /orbi split finishes it and a half-split parent is
never delivered.
Every other failing verdict stops the attempt before any work exists: ONE Issue
comment lists every missing piece and the repair action, the repository’s
claim label (ai-ready by default — dispatch_label may name another)
is replaced by ai-needs-detail, and the tick ends — no worktree, no branch,
no Pi session, no PR, and the slot is released for the next Issue. The
ticket then waits for a human exactly like ai-blocked: the next chance to
be delivered comes from editing the Issue and adding that claim label
again, which re-runs the judgment from scratch — or, when the stop comment
carries a proposal, from a write-permission reply /orbi amend (appends
the proposed acceptance conditions to the body and re-queues the ticket) or
/orbi split (creates the proposed child tickets and turns this one into an
Epic). Re-adding the claim label without editing the text does NOT judge,
comment or notify again: the runner’s own stop comment records the text it
judged, so the next claim re-applies the stop, removes the claim label and
leaves the rest of the queue untouched. A comment carrying such a marker
without being written by the runner is ignored.
Every error path is a bypass — the gate never loses a delivery. A model
error or timeout, an unusable answer, or a failed comment/label write logs
the clarify_check_skipped journal line and lets the delivery proceed.
The one exception is an attached image the gate cannot read: it is the
existing attachment stop, not a bypass and not a verdict — the Issue ends
ai-blocked with ONE comment naming the image and the repair, exactly as
a delivery session does (reason code attachment_unavailable, Issue
#2364), so an unreadable image is never turned into “missing details” and
is never skipped.
The judgment and the stop are visible as the clarify_check_skipped and
clarify_needs_detail rows in
Operations.
Ticket dispatch: content, dev and ops
ai-ready is the execution switch for every task type; a second label
selects the type (Issue #537). Three types exist — pick one per Issue at
dispatch time:
Ops semantics (Issue #537):
- The trust boundary is (credentials, ticket) — never a command
whitelist. The session receives the runner’s whole environment
unfiltered (gh auth,
CLOUDFLARE_API_TOKEN, AWS keys, … plus the deploy-home.orbi/envfile); how wide the credentials are is the user’s decision — the runner never trims them. - The ticket body is the authorization. The session executes only the ops actions the ticket states (which PR to merge, which environment to deploy); an action beyond the ticket is reported in a comment and the session stops. Human approval gates (environment approval, Release approval) are never performed by the session — a prompt convention, not enforced code.
- Delivery = evidence (the fact culture of Issue #526): every step
posts the real command and its real output / API response verbatim on
the ticket; a step not executed is labeled as not executed. A
pure-ops run (no commit) ends with the Runner closing the Issue and
removing
ai-in-progress— no PR. Committed code takes the normal PR path with review and merge.
ai-ready +
ai-ops-only. A dev ticket cannot carry that instruction: the dev
delivery criterion is a commit on the task branch, so an agent that
correctly follows it delivers no commit and the run fails with
the agent delivered no commit — the Issue is burned ai-blocked.
The ops playbook’s evidence discipline (real commands, verbatim
output, unverified items labeled as such) IS the research
deliverable; a no-commit ops run completes normally (the Issue is
closed, ai-in-progress removed), and research that continues into
code still takes the normal PR ceremony.
Before Issue #537 the label ai-ops-only dispatched the content agent
(the #530 rename never changed the behavior — the name promised ops,
the mode was content-only); the content path dispatches on
ai-content-only now, and ai-ops-only is the full-execution ops
path.
Run marker and run_id
Every task attempt generates onerun_id (8 hex chars, e.g.
e07383c2) and reuses it for every step and recovery of that attempt.
A fresh claim or takeover starts a new attempt, which can continue the
same Issue and PR with a new id. The same id appears in:
- every journal line of the attempt (prefix
[e07383c2]); - the Issue/PR comments: visible field
run_id=e07383c2plus the hidden machine-readable marker<!-- orbi:run=e07383c2 -->; - the comment kinds: the hidden
<!-- orbi:comment=started -->,<!-- orbi:comment=failure -->,<!-- orbi:comment=review-round -->and<!-- orbi:comment=merged -->markers identify the started, complete failure, completed review-round and merged comments independently of their visible (translatable) headings; the kinds, their prefix rule and the merged receipt’s fixed rows are defined in Public contracts; - milestone, scene and live progress comments also carry the hidden runner
marker
<!-- runner=1a2b3c4d -->: a fingerprint of the deployment that wrote them — the executing checkout’s HEAD, the package version for a non-editable install, orunknownwhen the probe fails. The one comment writer every posting path uses appends it (src/orbi/comment_write.py, Issue #2407), so a post and an edit carry the same rendering; - the
Orbi opened PRscene comment carries the hidden versioned run scene<!-- orbi:scene:v1 {json} -->(src/orbi/scene.py): the machine-readable recovery record the resume scan parses — a corrupted scene and a missing scene are distinct failure branches (Issue #786); - the worktree name (
.worktrees/orbi-<owner>-<repo>-issue-<n>-e07383c2), plus the Pi session directory and run artifacts; - the PR body — the stable marker
<!-- orbi:run=e07383c2 -->is part of the PR contract; the Runner rejects a PR without it.
orbi/<owner>-<repo>-issue-<N>),
not by run id. Use the Issue’s trusted comments to find all attempt ids,
then inspect each attempt’s timeline:
Comment language
Orbi’s own comments are written in the instance’s message language:message_language accepts only en (default) or zh (Simplified
Chinese). Precedence is per key, through the normal configuration
binding: an explicit message_language in the repository’s
.github/orbi.toml on the default branch wins, otherwise the host
orbi.toml, otherwise en. A repository key that is absent inherits —
nothing is copied from the host, and deleting the repository key restores
inheritance. A value that is not en/zh fails the configuration load
fast, naming the file, the key, the value and the allowed values.
The setting covers the Runner-owned Issue/PR conversation: start and live
progress, phase and milestone notifications, thin-ticket clarification,
the opened-PR scene, review findings and fix instructions, the human
review/merge handoff, recoverable and terminal failures, delivery
completion and release-task status comments, and the attribution footer
Orbi writes at the end of a PR body. Translated are the human labels and
prose; project/Issue text, paths, commands, URLs, error codes, raw logs,
JSON keys, verdict/severity/action enums, labels, fingerprints and
machine fields stay verbatim. Source files, project documentation, Issue
titles/bodies, PR titles and the rest of a PR body, and release notes
keep their own existing language rules — the setting never overrides
them (this repository declares en, so its public ledger stays English
on any host).
Comment identity stays language-independent: the readers match the hidden
run/kind/scene markers, the progress block prefix and the persisted
machine fields, never a translatable heading, so a restart, a resume, an
in-place PATCH, failure folding or the review-round budget behave the same
in either language, and mixed history (older English comments beside new
Chinese ones) stays usable.
When a model session runs, the same effective instruction is appended at
the session boundary (implement/continued, review and ops sessions), so a
custom prompt template receives it too: the natural-language fields that
become comments (questions, summary, notes, fix explanations) follow the
message language, while code, commands, machine keys and enums do not.
Failure record: orbi:failure:v1
Every failure the engine reports through its failure path is
machine-readable: both the detailed Orbi: blocked / Orbi: fix needed
comment (kind <!-- orbi:comment=failure -->, defined in
Public contracts) and the short milestone posted beside
it carry exactly one hidden versioned block next to the run marker:
outcome is blocked (terminal, a human decides) or fix_needed (the
next tick resumes the same run). reason_code says why the delivery
stopped; action_code says what the reader should do; retry_safe says
whether a plain re-queue can succeed without a human repair. The sets
are closed and owned by the engine (src/orbi/failure.py); an exception
the classifier does not recognize maps to unclassified, the block is
never omitted, and a comment written before this feature carries no block
at all — readers ignore it (parse returns None).
Actions:
requeue relabels the Issue ai-ready (or presses retry) —
nothing to fix; fix_ticket writes the answer or the missing detail into
the Issue body and re-queues it, so the next run starts from that body;
decide answers the one question the comment asks the same way;
check_credentials verifies and repairs the credential, then relabels;
top_up_balance tops up the model provider account (or switches to a key
with balance), then relabels; wait_quota retries after the quota window
resets. The readable headline, **Reason:** and **Action:** lines stay
beside the block for a human reader: ONE function of the record
(orbi.failure_stop.stop_wording) decides the headline and the action
together, so only a decide stop says “waiting on a human decision” — a
no-commit stop says the run produced no commit and the ticket needs a
change, a no-file-change stop says the run changed no file and that an
Issue the session found already satisfied can simply be closed
(Issue #2358), an unreadable attachment names the file and asks the person to
upload it again or remove it (Issue #2364), a delivery PR body that lost its
Fixes #N says exactly that and asks for the keyword back on the PR body
instead of claiming the cause is unknown (Issue #2506), an undetermined
cause says so instead of blaming the Issue text
(Issue #1651), and a configured base branch that does not exist says that
(Issue #1749) — and the terminal progress comment repeats that same
sentence. The
session’s own final explanation is quoted in its own bounded segment of
the failure evidence (up to 4000 characters, redacted like every comment
sentence), so a person reads what the session wrote before it stopped. The
milestone’s visible summary is the same bounded, host-path free reader
explanation — the reason, or the reader-facing action when the failure
carries a specific repair path (the Actions-workflow permission refusal,
Issue #1651) — a full command stderr is never cut to its first word.
One automatic re-queue after a transient GitHub failure
Available since v0.7.44. In the implement phase — no PR exists yet — agithub_transient failure is
re-queued by the engine itself, ONCE. The Issue gets its queue label back
(ai-ready, or the configured dispatch label) and one comment of its own kind
<!-- orbi:comment=requeued --> says the run hit a temporary GitHub error and
was re-queued automatically; there is no failure block and no ai-blocked, so
nothing shows a state a person must act on, and the next tick claims the Issue
again as a new run. Nobody has to relabel it.
That comment IS the counter — there is no per-Issue counter, no backoff and no
new state store. A re-queue marker already on the Issue (written by the runner
itself, or by an account that can write to the repository) makes the same
failure terminal exactly as before: ai-blocked with the failure block, so an
unreachable GitHub can never loop. A look-alike marker in anyone else’s comment
is ignored. provider_quota and every other reason are unchanged: a provider
quota stop stays terminal on purpose (Issue #698).
A stop that asks one question
Available since v0.7.46. A stop that needs a decision carries one machine-readable question beside its unchangedorbi:failure:v1 record (<!-- orbi:question:v1 {json} -->,
shape and action set in Public contracts). Two stops
ask one today:
- a review deadlock (
blocked_on_human_decision): the reviewer writes the question in its verdict — the real cause in one sentence, 2 to 4 options, and, when it would execute one of them itself, exactly one option markedrecommendedwith a one-line reason. The visible Reason of the stop comment is thatsummary, and the options are listed for the reader. - an external PR that passed review: the engine fixes the question itself —
authority, three options (link to the PR, close the external PR and let Orbi build the change, drop the work) and no recommendation, whatever the reviewer wrote.
decision_class is authority ONLY for accepting code from outside
contributors, anything about money, prices or plans, and overriding a
decision the maintainer wrote explicitly in the ticket body or the repository
AGENTS.md; existing tests, gates and checks are NOT recorded maintainer
decisions. Otherwise it is pick_best (one option is better on the
evidence) or missing_info (only the person knows a fact).
A review deadlock whose class is not authority and that carries a
recommended option the engine can execute in place (amend_requeue)
resolves itself ONCE, at the moment the stop report is written: the option’s
acceptance criterion is appended to the Issue body, the Issue is relabelled
ai-fix-needed (an open PR) or ai-ready (no PR), and ONE requeued
comment says what was chosen, why, and “Not right? Reply with another
option.” — it carries the same question block (so a person or a caller can
choose again from the same options) and one answer record:
ai-blocked label, no failure block and no “stuck”
notification. A person who disagrees edits the Issue body (the reviewer reads
only the current body) or asks for another stop.
That comment IS the counter: an Issue gets at most ONE automatic resume over
its life, and the one automatic re-queue of a transient GitHub failure
(Issues #2202, above) counts as it — both write the requeued kind, so a
second deadlock waits at ai-blocked with the question attached. The
base_ci_red and checks_permission_missing self-recoveries write no
requeued comment and are not counted. A question with no recommended
option, a recommended option the engine cannot execute in place, a
confirm/text question and a malformed question all stay at
ai-blocked; a malformed one arrives without the block (the parse error is
logged) and the finding’s note and fix still carry the decision.
With telegram_chat_id set, the automatic choice sends one message naming
the decision, the reason and the Issue link. A stop that lands at
ai-blocked keeps its existing single “needs you” message.
A delivery paused on a red base branch: base_ci_red
Available since v0.7.15, including /orbi fix-base.
When a check the PR fails is ALSO failing on the configured base branch,
the PR cannot turn it green and no review round can repair it. The review
tick asks that question BEFORE it starts a session (Issue #2442) and the
merge gate asks it again for a ready PR, both through the same detection.
The delivery pauses in ai-blocked with reason_code
base_ci_red — action_code fix_ticket, retry_safe false, because a
plain requeue would hit the same red base — and ONE comment that says what the
reader already has (a ready PR, or — when the review tick stopped before its
session — that the PR is not the cause), why it paused, EVERY failing base
check with its run link and first error lines, the fix Issue Orbi opened for
it, and the repair left to the reader. The base branch is the configured one, never a
hard-coded main, and a non-subprocess failure prints no empty evidence
section.
The same comment carries a second hidden block beside orbi:failure:v1:
state is waiting (the recovery scan polls), resuming (the base turned
green and the delivery resumed), merged (it merged) or stale (the bounded
wait expired). failing_checks names the base checks the scan re-reads.
Recovery needs no relabel:
- every tick, BEFORE the resume scans, one bounded scan reads the open
ai-blockedIssues whose LATEST TRUSTED failure is thebase_ci_redone and whose record in that same comment iswaiting, runs a pending/orbi fix-basecomment, then reads the current base head once and the recorded check names against it. A record copied by an author without write permission authorizes nothing, and a newer trusted failure — even one carrying no base-CI block — supersedes an older record; - all green -> the Issue goes
ai-blocked->ai-fix-needed(that is the only label change; no new label, no new state), the existing resume flow absorbs the base, re-runs the review and merge, and the same comment is edited in place tomerged; - still red, or a check still pending -> nothing moves;
- still red after seven days -> ONE reminder comment, the block becomes
stale, and polling stops. Removingai-blockedand addingai-fix-neededstill resumes the delivery by hand.
CI failure on branch <base> Issue for the base branch, labelled
ai-ready + p0 and placed in the active Milestone, through the same
implementation the command uses. Its body names EVERY failing base check with
its run link and first error lines and states that the Issue’s own PR has to
make all of them green — one Issue per failing check could never merge, because
a PR that repairs only its own check stays red on the others and is paused as
“the base is already red”. The comment names the Issue (created #K /
reused #K) instead of asking a person to reply the command, and that fix
Issue is an ordinary delivery: once it lands the base is green and every paused
delivery resumes by itself (the recovery above).
The run happens once per scene. A command’s receipt is keyed on the command
comment that requested it; the engine has no such comment, so its key is the
record itself — the pause comment carries
<!-- orbi-base-ci-red-fix-issues scene=<digest> -->, and only a comment
written by the Runner’s own account counts, so a copied marker opens nothing.
A later tick that still sees the same pause opens no Issue, posts no comment
and repeats no receipt. If the lookup or the creation fails, the failure is
logged (base_ci_red_fix_issues_failed) and the delivered pause comment keeps
the command repair, so a recorded pause is never lost to a failed side run.
/orbi fix-base (write permission, one execution per comment) stays
available and idempotent: it opens — or reuses an OPEN — the same Issue, so a
reply after the automatic run, or a second delivery paused on the same red base,
reports reused #K. A closed fix Issue is never reused: a base that turns red
again gets a new one.
A delivery paused on an unapproved App permission: checks_permission_missing
Available since v0.7.18.
An App installation keeps the permissions it was granted until the account
owner approves a newly requested one. When the Runner reads a PR’s
statusCheckRollup — the check result a review cannot merge without — GitHub
answers Resource not accessible by integration (HTTP 403), and no retry on
the same permission can succeed. The delivery stops in ai-blocked with
reason_code checks_permission_missing (action_code
check_credentials, retry_safe false) and ONE comment that says the PR is
open, names the statuses: read permission, and links the approval page of
THIS installation — https://github.com/settings/installations/<id> for a
user account, https://github.com/organizations/<org>/settings/installations/<id>
for an organization, built from the repository owner’s account type and the
deployment’s installation_id.
The same comment carries a second hidden block beside orbi:failure:v1:
state is waiting (the recovery scan re-tries the read) or resumed.
Recovery needs no relabel: every tick, BEFORE the resume scans, one bounded
scan re-tries the refused read of each open ai-blocked Issue whose newest
trusted failure is this stop and whose record is still waiting (the same
gate the base-branch-red scan uses: a record an older stop left behind never
clears a later ai-blocked decided for another reason). A refused read again
changes nothing and logs no crash — the permission is still not approved; a
successful read swaps
ai-blocked for ai-fix-needed (the only label change) and the existing
resume flow merges the PR as usual. Every other failed read keeps its existing
failure handling.
PR body contract: Fixes #N
The PR description must contain Fixes #<issue-number> (it may be on the
first line). GitHub reads the body (not the PR title) and closes the Issue
natively when the PR merges into the default branch. The Runner verifies
the keyword during PR acceptance and fails fast when it is missing. This
validation failure is recorded on the affected Issue and does not terminate
the runner tick.
A staged initiative must not use one Issue and one PR for several independent
runtime outcomes. Use an Epic or parent Issue for coordination, split each
phase into a child Issue, and give every child its own delivery PR with
Fixes #<child-number>. This preserves native close behavior without adding a
second PR-body syntax. If an existing PR says Part of #N, the maintainer must
update it to the exact Fixes #N reference when that PR is the complete child
outcome, or split the remaining phases into child Issues before retrying.
Epics, Release tasks and P0 priority
The project organizes multi-task work with plain GitHub primitives — no DAG, no priority numbers, no separate queues:-
Epic: a coordination Issue that groups a set of related tasks (for
example the v0.1 release checklist). It is marked with the
ai-epiclabel. An Epic is not itself a directly executable task: the actual work is split into independentai-readyIssues, each with one runtime outcome, one PR, one review and one merge. The Runner NEVER claims an Epic (Issue #93): the ready claim scan skips it with the structuredepic_not_claimed issue=N repo=...journal line (no claim, no label change, no worktree, no run, no slot), and the restart-resume scan excludes it too. Epic completion is declared exclusively by GitHub’s nativesub-issuesrelationship: every child Issue must be closed (or its PR is merged) and there must be no open nativeblockedBydependency. References in the Epic body, includingChildren/Child Issuessections, are not declarations. An Epic with no native sub-issues, or malformed child or dependency state, fails closed. The Runner reconciles open Epics on every tick and leaves an idempotent audit comment. The comment lists how each child ended (merged by Orbi, closed while blocked, closed by a person as completed or as not planned); only when every child was delivered by Orbi does it say the Epic is complete. When no child was delivered by Orbi and none was closed as completed, the Epic is closed as not planned (Issue #2356). Any prose describing extra acceptance conditions is an Epic definition error: make that condition a final child Issue instead (for example, a browser acceptance ticket). The same tick then reconciles open Milestones: an exact-title published Release (draft excluded) plus zero open Issues closes the Milestone; all other cases remain open. The same tick finally sweeps open PRs (Issue #746): a stable-delivery PR (orbi/<owner>-<repo>-issue-<N>head branch) whose source Issue a human closed is reported ONCE on the PR with an idempotent comment — every resumable scan readsstate=openIssues only, so without this sweep the PR would dangle forever. The merge/close decision stays with the human: the Runner never auto-merges and never auto-closes across a human’s close. -
Release task: an
ai-readyIssue additionally marked with theai-releaselabel (Issue #98). It is NOT a development task. The three ordinary scans skip it withrelease_not_claimed; only the release fallback scan usesallow_release=True. Before claiming it,_pick_from_scanapplies the Milestone completeness gate: while its Milestone has any other open Issue (open_issues > 1), the Runner recordsrelease_milestone_incomplete, leaves the releaseai-ready, and retries on a later tick. This is a recoverable wait, neverai-blocked. A Milestone query that cannot be evaluated also skips the claim, withrelease_milestone_check_failed. This claim layer runs beforeprocess_issueand before any release-state-machine wait, so a release queued behind open tickets has nowait_startedvalue and accumulates zerorelease_waited_seconds. Once claimed,process_issueroutes it to the deterministic release state machine instead ofrun_pi— no Pi session, no PR. The state machine is idempotent and resumable (a restart resumes the same run id/worktree) and runs these steps in order:- Resolve the release contract. The version and scope come from the
Issue’s Milestone (its title is the version) and the base branch from
the repository configuration; an Issue without a Milestone fails fast.
The
## Releasesection in the Issue body is an optional override: without it nothing more is parsed. When present it is parsed strictly:version,base_branch, andscope(a list of#Nitems) orscope_from_milestone, plus optionalversion_file(pyproject.tomlby default; alsopackage.json,pom.xml,build.gradle,build.gradle.kts,gradle.properties,Cargo.toml,composer.json,pubspec.yaml, ornoneto skip version metadata changes). The declaration carries NO test contract (Issue #569): test acceptance is the GitHub Actions CI result on the release commit (the Issue #268 CI-wait gate). In a present section, missing, duplicated or unknown fields fail fast, and aversionthat differs from the Milestone title fails fast. - Freeze the base — the release commit is exactly
origin/<base_branch>(fetched under the base-sync lock). Before any gate wait, the declared (or defaulted)version_fileis proven to exist at the root of that frozen tree (Issue #740): a mismatch fails fast at claim time, naming the supported ecosystem files that DO exist there and thenoneoption, never as a late FileNotFoundError after the gates and the scope verification. - Enforce the pre-release gates. Only after the claim layer above has
admitted the release can the gate-layer
release_waiting_deliverieswait for open Issues carryingai-in-progress,ai-pr-opened, orai-fix-needed(the release Issue itself is excluded). With a Milestone, only Issues in that Milestone hold the gate (Issue #671); without one, the repository-wide scan is unchanged. A bareai-readyIssue does not hold this gate. The bounded wait usesrelease_deliveries_wait_seconds(hostorbi.toml, default 1800 s); exceeding it produces a delivery wait timeout and moves the release toai-blocked. Then require CI green on the release commit (a repository with no observed CI may pass with explicit no-checks evidence; once the base has CI, an empty check list on a newly pushed version commit waits for registration. A pending check is an intermediate state — the gate waits for the final conclusion, onerelease_waiting_cijournal line and one progress-comment update per poll, up torelease_ci_wait_seconds(default 1800 s); a wait timeout fails with its own reason, never reported as a CI failure). Open PRs are deliberately NOT a gate (Issue #608, maintainer ruling): an open PR is queue state, never a release premise — whether open PRs exist, how many, or who authored them says nothing about the release; a stranded PR is the delivery loop’s takeover/reconciliation job. A gate that cannot be checked because of a realghfailure is a failed gate. - Verify the scope item by item:
gh pr viewmust reportMERGED, otherwisegh issue viewmust reportCLOSEDwithstateReasonCOMPLETED— aNOT_PLANNEDclosure (duplicate / won’t fix) is annotated in the Scope evidence as excluded and never enters the Changelog, and a Changelog PR link is written only when its PR is contained in the tagged commit range (Issue #1492). The Changelog itself is derived from the tagged commit range (prev_tag..release_commit), never from the Milestone Issue list: the Milestone scope decides only whether a release may run, not what its notes say. For milestone-derived scope,open_milestone_evidencedoes not wait: still-open milestone Issues are excluded and recorded asNOT released (still open in milestone <name>): <item>. Checkbox parsing is forbidden — every scope item is checked against the live API. - Test acceptance is the CI-wait gate on the release commit: after
the version bump the gates re-run against that exact commit
(step 3’s
release_ci_wait_secondswait), and a red or timed-out CI takes the existing recoverable failure path (ai-blocked). No local test execution (Issue #569) — the release flow is bump → push → CI-wait → tag. If Actions is red or times out, the existing failure path blocks the release; the version bump may remain onmainas an acceptable state. The bump is idempotent, so repairing CI and retrying the release safely prepares the requested version again. - Tag: when the remote tag is absent, create an annotated tag at the
release commit and push it with a plain push (never
--force). When it exists at the release commit, the step is idempotent. When it exists at an ancestor of the release commit (an earlier attempt pushed it and the base advanced since), Orbi logsrelease_base_advanced_past_tagand continues the release from that tag’s commit. Any other existing tag fails fast. An existing tag is never moved, overwritten or force-pushed. - Publish the GitHub Release (idempotent) whose notes carry the full
verification evidence: version, tag, release commit, per-item
scope evidence, gate evidence, test evidence and the run marker.
The docs-site Release pages are NOT written by the state machine
(Issue #1483): the repository’s own
.github/workflows/release-docs.yml(Issue #1482) rendersdocs/release-<version>.mdxanddocs/zh/release-<version>.mdxfrom the published Release body, inserts the new version at the head of theReleases/发布navigation groups indocs/docs.json(both languages, latest first) and moves the(latest)title marker to it. Since Issue #1096 both groups nest one collapsedEarlier releasessubgroup — the automated sync puts the new release at the head and moves every entry beyond the three newest into that subgroup, so the visible group keeps the three newest releases. Idempotent: an existing page with identical content is neither regenerated nor overwritten, and a run with nothing to change commits nothing; an existing page with different content fails fast — the workflow run fails, never a silent skip. - Apply
ai-mergedand close the release Issue (terminal delivery transition); the merged event clearsai-readyandai-in-progress, so the released Issue endsai-mergedALONE (Issue #1526). - Close the Milestone whose title is EXACTLY the released version
(Issue #214), then write the success comment (release URL, tag,
commit, evidence, Milestone evidence). Exact title match only (no
guessing, no fuzzy match,
never a different Milestone): close it when it has 0 open Issues;
already-closed is an idempotent success (no reopen); a missing
Milestone or remaining open Issues fail fast with the version, the
Milestone number/url and the open issue list (never a silent skip).
The release’s own ticket is never counted as unfinished work
(Issue #808): it is being closed by this release, so a stale-open
listing of exactly that ticket — the issue index lags seconds
behind the close (Issue #754) — does not block or delay the close,
while any other open Issue still refuses it.
Any failure:
ai-blockedALONE (a release is a human decision point — no automatic retry), the failure comment carries the run marker and the concrete reason, and the exception propagates so the tick fails fast.
ai-releaselabel is a type marker, NOT a delivery state: it is not part of the delivery-state machine, not an exclusion of the ready scan, and ordinary delivery transitions never add or remove it. It is applied when a person dispatches the release or when a configured milestone workflow creates the release task, together withai-ready. - Resolve the release contract. The version and scope come from the
Issue’s Milestone (its title is the version) and the base branch from
the repository configuration; an Issue without a Milestone fails fast.
The
-
P0 priority: the plain
p0GitHub label marks an urgent Issue (a production outage). It is NOT a delivery state — it only orders the ready pickup, never changes the Issue granularity, any delivery state, or the terminal-state semantics, and the Runner never adds or removes it. The ready pickup order is fixed:ai-ready+p0→ai-ready+bug→ plainai-ready(threegh issue listscans sharing the exact same exclusions and blockedBy semantics). Inside each scan the Issue that has waited longest is claimed first (sort:created-asc, Issue #1914 — the release and external-takeover fallback scans share the same order), so a busy queue drains in the order the maintainer queued it and a newer ticket never overtakes one labeled earlier. P0 obeys every existing exclusion rule and the single-slot constraint: a blocked P0 is skipped (falling back to the bug/plain scans) and an in-flight P0 is resumed by the restart scan. A failed P0 run entersai-blockedALONE (the claim already removed the queue label, and the blocked event removes any leftover), so no tick re-claims it — no infinite retry. There is no priority number or weighted queue.
Queueing dependent Issues with GitHub’s blocked by
A batch of dependent Issues needs no scheduler of its own: label the whole
batch ai-ready at once and let GitHub’s native blocked by relation
decide the order.
- Set the relation in the Issue sidebar under Relationships →
blocked by, or from the CLI with
gh issue edit <number> --add-blocked-by <blocker>(the flag takes an Issue number or URL;gh2.94.0 or newer is theblockedByprerequisite, see Getting started). - While ANY blocker of an Issue is still open, the Runner does not claim
it: the claim scan records the structured
blocked_byjournal line and considers the next ready Issue — no claim, no label change, no worktree, no Pi session. Closing the blocker is enough: the relation stays on the Issue, but a closed blocker is inert, so the next tick after the last blocker closes sees the Issue ready again and claims it (src/orbi/claim.py→open_blocker_numbers). - Among the ready Issues of one pickup scan the longest-waiting Issue
is claimed first (
sort:created-asc, Issue #1914), so a queued batch drains in the order you filed it. - A
Depends on #Nline in the Issue body is not parsed: only the native relation orders the queue. The body line stays prose for humans, never scheduling state. - The same relation queues a check that has to run AFTER a delivery: an
ai-ops-onlyticket blocked by the dev ticket (or by the release ticket) is claimed only once that ticket closed — see Verifying a deployed change after the merge.
Verifying a deployed change after the merge
A merged PR proves the change is in the base branch. When the outcome only exists after a deployment or a rollout — a deployed service, a rolled-out config, a hosted page — “merged” and “the user has it” are two different facts, and the second one needs a check against the running system. Orbi has no deployment step of its own, so that check is an ordinary ops ticket queued behind the delivery. When to use it. Only when the acceptance condition can be observed after the deployment or rollout and nowhere before it. A change whose outcome is already visible in the merged code, the PR or a CI run needs no ops ticket: a second ticket there would only repeat a fact the merge already carried. How to file it. One Issue,ai-ready + ai-ops-only (the ops row of the
ticket-type table above), whose body states:
- the exact thing to check — a URL, a command or a health endpoint;
- what output counts as healthy (the expected status, body fragment or metric), so the check has an observable pass condition instead of a judgment;
- the event it waits for when the deploy is asynchronous (“after the workflow
<name>on<branch>turns green”, “afterv<version>is published”).
src/orbi/pi_process.py, which passes os.environ to the child and removes
only the Telegram token), including the deploy home’s .orbi/env file
(src/orbi/config.py). What the session cannot do follows from the
credentials, never from a per-ticket switch:
- API actions are bounded by the deployment’s
ghtoken (src/orbi/github.py): the minimum permission set is contents, pull requests, issues and metadata (Security), and a GitHub App installation token carries only the permissions that installation approved — anything else answersResource not accessible by integration(HTTP 403), assrc/orbi/check_permission.pyreports it. - A push or a PR made with that credential starts the repository’s own
workflows, so a deploy wired to a
pushor to a published Release happens by itself (the CI usage section above). Starting one explicitly withgh workflow runneeds theactions: writepermission on that credential, which is outside the minimum set above. - A human approval gate is never performed by the session: environment
approvals, Release approvals and protected-branch bypasses stay with the
account owner (the ops playbook,
prompts/prompt_ops.md). - A code change is still the Runner’s ceremony: the session commits on the task branch and stops — it pushes nothing, opens no PR and merges nothing, and the Runner takes that branch through review and merge (the ops semantics above). Deploying stays with the repository’s own CI or platform: when the repository has no deploy path the session’s existing credentials can already use, the ops ticket checks the running result and does not invent one.
A pure ops run closes its Issue when the session committed nothing
(
src/orbi/ops_delivery.py). The engine does not check that an evidence
comment was posted, so closing alone does not prove the check ran: read the
ticket’s final evidence comment for the verdict, and treat a closed ops ticket
with no evidence comment as unverified (#2326). Closing also releases every
Issue marked blocked by it, because GitHub’s native dependency only checks
that the blocker is closed. A check that comes back red is not repaired
by that ticket — the quoted output is the reproduction for the next dev
ticket, and a fresh ops ticket checks the fix after it merges.
Repository-level delivery policy (.github/orbi.toml)
A repository can version its delivery policy as code. At claim the
Runner reads .github/orbi.toml from the repository’s default branch
tip through the GitHub contents API — never the task branch, never the
local worktree — and applies its whitelisted keys per key over the
host orbi.toml. A repository without that file behaves exactly as
before (zero change). The location is fixed; only the file NAME may be
overridden per source repo with the optional [[repositories]] entry
field config_path (default .github/orbi.toml).
Only delivery-policy keys are allowed:
active_milestone, it wins over the host config and that is the value
the claim scan uses. orbi milestone set <title> lands the new value in
the same place — the repository policy when it declares the key (a
contents PUT on the default branch), otherwise the host orbi.toml
line — and prints wrote: naming the target (Issue #1306).
A host-only identity/security key (see Security), invalid
TOML or a wrong type fails the claim fast with the offending key names
and the Issue becomes ai-blocked — one repository’s bad file never
affects another pool. Any other unrecognized key is ignored instead: one
repo_config_keys_ignored journal line names the key and the engine
version, the run comment carries the repo_config_ignored row, and
the claim proceeds with the known keys (Issue #1329). The file is read
by whatever engine version the delivery host runs, which is often older
than the code that wrote the file, so a new policy key must be safe for
an older engine to ignore: it defaults to the pre-feature behavior, and
an engine that does not know it delivers as before. The host-only set also owns host scheduling:
max_concurrency can never be delegated to a repository file — the
concurrency slot pool belongs to the deployment host.
dispatch_label must not be a delivery lifecycle label
(ai-in-progress, ai-merged, …): those roles are fixed by the engine’s
labels.toml (Issue #2347). The block
lands on the Issue the claim selected; a repository whose
dispatch_label is not ai-ready has no ai-ready candidate to block
when the file itself is malformed, so the fail-fast reason is the
journal’s repo_config_invalid line (no label change, no comment). The
run comment records repo_config: <sha>; when the sha differs from the
previous run it also carries the repo_config_changed annotation and,
when the previous content is readable, the effective policy diff as
repo_config_diff, so a change is always visible on the run. A read
that fails for a transport reason (rate limit, network) is logged as
repo_config_read_failed and the host config applies — the degradation
is visible as the missing repo_config field on the run comment.
These row names follow the repository’s message language (Issue #1746):
a Chinese repository (message_language = "zh") shows the three rows as
忽略的仓库配置键 / 仓库配置变更 / 仓库配置差异. Only the row LABEL
translates — the identifiers above are the English labels, and the
machine rows (repo_config: <sha>, run_id=) stay verbatim in both
languages.
Waiting for a Milestone decision: the one reply that answers it
When the whole chain goes quiet, the Runner says WHY instead of waiting silently. Two idle states are surfaced through the SAME decision notice — one Issue carrying the fingerprintorbi-milestone-advance old=<active> candidates=<titles> — and each of them is
answered by the same in-ticket command, a trusted /orbi milestone <version>
comment posted on that notice (the pre-#1922 /milestone <version> spelling
keeps working as a declared legacy alias):
Both notices are idempotent (one open notice per wait, never one per tick),
are closed automatically with a receipt once the wait ends, and never act by
themselves: the Runner never creates a release ticket and never advances the
Milestone without the reply. The reply runs the deterministic three-step
/milestone command (milestone → release ticket → active_milestone)
described in Operations; no model call is involved.