delivery
Review and merge of a worker’s branch: a plugin, not the core, which stays a job runner. arthur review <worker job> starts a read-only review of the branch’s tip on the reviewer role (orchestration’s roles.reviewer); its verdict, PASS or FAIL, moves the ticket, a FAIL hands the work back to the worker, and after 4 FAILs since the branch’s last PASS the next review waits for the owner’s word. arthur review-needed says whether a branch needs a review at all; one that changes a file on the always-review list always does. arthur merge merges a branch with a PASS into main and runs the checks on main; for a project with autoMerge (its piece, delivery.project({ autoMerge: true }) in its project file) arthur run runs it on its own after a PASS or a no review, and it merges once CI passed (arthur merge --help, “On its own”). arthur take-main takes main as it is, on the owner’s word, arthur changelog writes CHANGELOG.md from the merged tickets, as each merge does, and arthur commit-board commits the board’s files alone, after the project’s own commit check, in place of the coordinator’s git commit.
plugins: [orchestration({}), projects({ folders: [...] }), delivery({ review: { alwaysReview: ["**/env.ts", ".github/workflows/**"] } })],Options
Section titled “Options”review.alwaysReview: the files a branch that changes one always gets a review for, in every project, as glob patterns from its root; a list replaces the default, which holds what reads secrets, the CI’s workflows and its handling, the review rules, the prompt files every role reads, and what a merge and each spawn run (arthur review-needed --help, “The always-review list”).merge.stepSeconds: the seconds each step ofarthur merge’s checks on main (the install,npm run check,npm test) may run before it is killed and fails the merge; default 3600, an hour (arthur merge --help, “Steps”). Thecommit-msgscriptarthur commit-boardruns has the same limit.
An unknown option or key, a pattern that is empty or starts with /, or a stepSeconds that is no whole number of 1 or more, refuses the load.
Each command’s page, what arthur <command> --help prints, is in commands/.
A ticket’s jobs
Section titled “A ticket’s jobs”AR0555: what a ticket’s jobs hold goes once the ticket needs them no more. arthur merge prunes the merged job and every job of the ticket after it pushed main (arthur merge --help, “Steps”). A ticket moved to dropped (ticket-moved, from arthur ticket status <id> dropped) prunes every job of the project whose task names a file of the ticket’s folder, as arthur prune prunes them; a branch Git kept because main does not hold it, of a job that ended on this machine, is then deleted with git branch -D when it is arthur/<id>, the one the job’s spawn made (a record naming another keeps it, and the prune’s line says why, AR0610), and the job pruned again, so its commits go with the ticket, and the github plugin deletes its copy on origin when origin’s tip is the one it pushed (packages/github/docs/github.md, “Branches on origin”). A worker delivery hands back after a FAIL review (arthur review --help, “Hand-back”) is handed back no more: its hand-back ends, so one not in a run is pruned as the others are, and a hand-back that a FAIL of the dropped ticket would start, starts not; the coordinator is never told to hand it back. A job in a run is kept, <id>: kept: it is in a run; once it ends, delivery prunes it, its branch too: its end (job-ended, while arthur run runs, or at its next start) prunes it as the drop did, an unmerged branch included, once every plugin has read the ended job (the coordinator’s wake reads its final message first). A blocked job keeps everything until it ends, and a worktree with changes keeps its branch, checked out there. A repository whose own Git config sets a key that may name a program keeps every unmerged branch, and nothing is run. Each line goes to the log, delivery: <ticket> dropped: <prune's line>, then <branch> deleted, not merged: <ticket> is dropped and the second prune’s line; or kept every unmerged branch: <file> sets <key>, ….
Each prune also removes delivery’s own folder of the job, <home>/delivery/<id>/ (its recorded checks, a CI wait, the causes it merged on its own), and arthur review-needed’s answer of it, <home>/delivery/review-needed/<id>.json, through jobs.keep; delivery’s record of a review, <home>/delivery/reviews/<id>.json, stays, for the FAIL counts and the costs in outcome.md.
Processes a job leaves running
Section titled “Processes a job leaves running”AR0585: when a run of a job is about to end, at omp’s session_stop, which comes right before agent_end and before the run’s last message counts as the job’s result, delivery’s OMP extension, packages/delivery/src/checks-extension.ts, which every job’s agent loads with -e, lists the job’s processes other than the agent and its wrapper (the agent’s parent), as packages/delivery/src/processes-extension.ts finds them: in the job’s systemd scope, arthur-job-<id>.scope (arthur-job-<id>.<ms>.scope for a continued run), every process of the scope, a daemon that left the agent’s process tree included; in a job that runs bare, the agent’s descendants, as ps -A shows them. When there are any, the run goes on with one message, [Arthur] Before your run ends: these processes of your job are still running., a line - pid <pid>: <command line> for each, and the ask to stop each one it started and no longer needs, then to end with its final message again, whole, since the job’s result is its last message. Each @ that starts a word of a command line gets a word joiner (U+2060) before it, so omp reads no file it names. With none, or without ps, nothing is said of them.
AR0675: the run’s end gets one answer, from one handler, as omp keeps only the first continuation its session_stop handlers give. A worker whose checks have not passed on its clean committed tip is reminded of them at the same moment (AR0656: [Arthur] Before your run ends: Arthur starts no review yet: ..., with what arthur review would refuse and what to run); when both reminders are due, the run goes on with one message that holds both, the checks’ first, a blank line, then the processes’. With neither due, the run ends.
Each of the two is given at most once per run, one omp process: a run’s end that got only one may be followed by an end that gets the other, and the end after both were given, the run’s third at the latest, is its end, processes left and checks missing or not, so the reminders never loop; arthur continue and a resume start a new run, which may get them again. The extension only reminds: it stops nothing, and the wrapper still kills every process left in the job’s scope when the job ends (arthur spawn --help). A job whose record was written before AR0675 names processes-extension.ts as an extension of its own, and each later run of it still loads the file, which registers nothing.
arthur changelog
Section titled “arthur changelog”Usage: arthur changelog [--project <name>]. Comes with the delivery plugin (roadmap entries 56 and 105). Answered without the model, for one project, the main one unless --project names another.
Writes CHANGELOG.md at the project’s root from its merged tickets, and prints wrote CHANGELOG.md: <n> merged tickets. arthur merge writes it the same way after every merge that went in and commits it in its spec: <id> merged commit (arthur merge --help, “Steps”); arthur changelog commits nothing. The file is rebuilt whole each time, so a hand edit is overwritten at the next merge.
# Changelog
Generated from the merged tickets of `spec/build.json` by `arthur changelog`; a hand edit is overwritten at the next merge.
## 2026-10-21
### Added
- AC0003 Pay (4f2a9c1)
### Other
- AC0004 Plan the cart
## 2026-10-20
### Fixed
- AC0001 The total is off by a cent (9b0e7d2)- One
## <date>per day a ticket was merged, newest first. The day and the short hash come from the- Merged: <date>, <hash>line of the ticket’soutcome.md; a ticket without one (merged beforearthur mergewrote outcomes) takes the day of its last move on the board, incore.timeZone, and no hash. - Under each day, one heading per kind, in this order, a heading with no ticket left out:
Added(kindfeat),Fixed(fixorsecurity),Changed(any other kind of the ticket template,arthur ticket --help),Other(a kind the template does not list, or none). The kind is the- Kind:line under the ticket’s## Goal; a ticket without one, or whoseticket.mdis gone, goes underOther. - Each line is
- <id> <title>, the title as the board has it; within a heading the ids in order,AC9999beforeAC10000. - With no merged ticket, the file is the head and the one line
No merged ticket yet.
Releases
Section titled “Releases”A release is a commit of the first-parent line of the project’s checked-out branch, main where arthur merge writes the file, whose root package.json has a version that differs from its first parent’s. A version that appears where there was none (a project’s first package.json, or a version added to it) is no such change, nor is a commit whose own or parent package.json is missing or not JSON. A v<x.y.z> tag, lightweight or annotated, on that line is also the release of <x.y.z> at the commit it names, even where package.json shows no change there, unless a version change made that version, which stays its release; a tag off the line, or of another name (v1.0, v1.0.0-rc.1), is none. A commit is one release at most: its version change’s, else its highest tag’s. Before it rebuilds the file, arthur merge fetches origin’s v* tags into the main checkout (git fetch --no-tags --no-prune --refmap= origin 'refs/tags/v*:refs/tags/v*'), so a release tagged there counts. The fetch is refused, as the merge is (arthur merge --help), while the checkout’s own config sets a key that may name a program; it runs no prompt, askpass, hook or fsmonitor, nor a transport origin’s URL names that your ~/.gitconfig does not allow (protocol.<name>.allow; a folder is one); git runs in a session of its own, so ssh finds no terminal to ask on for a host key or a passphrase, even when the merge runs in one; it writes no other tag or ref, prunes none, and never moves a tag the checkout holds at another commit. A project without origin fetches nothing; a fetch that fails or is refused prints tags not fetched from origin: <why>; CHANGELOG.md counts the tags of <checkout>, <why> being the refusal, git fetch: <git's error line> with a quoted word, a URL or a word holding an @ said as origin, git fetch: exit code <n> when git said nothing, or Node’s error when git could not be run or was stopped after 60 s (git fetch: spawnSync git ETIMEDOUT), and the merge goes on. Outside a Git checkout there is no release. A project with no release gets the file above, byte for byte; once it has one, the days go under releases, newest first:
## Unreleased
### 2026-10-23
#### Added
- AC0006 Refunds (5d1e8a0)
## 0.2.0 (2026-10-22)
### 2026-10-22
#### Other
- AC0005 Release 0.2.0 (c3a7f12)
### 2026-10-21
#### Added
- AC0003 Pay (4f2a9c1)## <version> (<date>)per release, its date the day of its commit incore.timeZone; under it###per day and####per kind, as above. A release with no ticket saysNo merged ticket in this release.- A ticket belongs to the first release at or after its merge commit (the hash of its
- Merged:line) on that line, so a release ticket’s own merge,Release <version>(arthur version --help), writes its release’s section, its ticket in it. A ticket without a hash, or whose hash is not on the line, belongs to the first release made on its day or later. ## Unreleasedholds the tickets after the newest release, and is left out when there is none..github/workflows/release.ymltakes a release’s section, up to the next##heading, as the notes of its GitHub release.
The same board, files and history give the same file byte for byte: nothing in it depends on when it was written or the order the files are read in.
Refused: any word but --project <name> prints the usage line and exits 2; an unknown project is the core’s refusal, naming the known ones.
arthur commit-board
Section titled “arthur commit-board”Usage: arthur commit-board '<subject>' [--project <name>]. Comes with the delivery plugin (AR0738; AR0667’s plan, T2). For one project, the main one unless --project names another. A job may not run it.
Commits the project’s board, on the branch its checkout has, as <subject>. It is how the coordinator and a project agent commit what Arthur’s commands write on main, in place of git commit: the commit holds only the board’s files, and the project’s own check of what a commit holds always runs first, so none of them reaches main unchecked. It prints committed <subject>: <commit>, <n> files. When no board file changed it commits nothing and prints nothing to commit: no file of <the paths below> changed in <checkout>, exit code 0, so a second call is harmless.
What it commits
Section titled “What it commits”Each of these files that differs from HEAD, a new and a deleted one included, staged before or not, and nothing else:
spec/build.json, the board;spec/decisions.jsonl, the decision log;spec/schedule.json, the schedule’s entries;- every
.mdfile underspec/features/, at any depth: tickets, plans, reviews, findings, outcomes; - the reports
arthur ticket filefiles and their pages: the.mdfiles directly inspec/quality/,spec/retro/andspec/pyramid/, and the.htmlfiles directly inspec/retro/andspec/pyramid/; CHANGELOG.md, which a merge rebuilds and leaves uncommitted when its ownspec:commit is refused (arthur merge --help, step 8).
Every other change in the checkout stays as it was, staged or unstaged: code, the vision and the roadmap, a ticket’s attachment that is no .md, any other file under spec/. Those reach main on a worker’s branch or by the owner’s own commit. So does every file below a folder named as one of these files (spec/schedule.json/x_spec.rb, CHANGELOG.md/src/code.ts): a path is the commit’s only when it is one of the four files named above, or one of the .md and .html files in the folders named above.
- Takes the project’s merge lock (
<delivery folder>/<project>/merge.lock,arthur merge --help) for as long as it runs: a check that fails on main resets it, and a commit made on top of the merge commit meanwhile would go with it. - Asks the checkout’s own Git config, as
arthur mergedoes, before any git call that could run a program it names; every git call runs with the hooks off. - Lists the changed files the paths above name (
git status, then each entry held against the paths again, since Git also lists what is below a folder named as one), and refuses the whole commit when one of them is a symlink or a folder. - Stages exactly those files, then runs the project’s own check, since the hooks are off: when the
package.jsonHEAD holds declares acommit-msgscript,npm run --silent commit-msg -- <Git's COMMIT_EDITMSG file>in the checkout, with the subject written there, the way Git runs acommit-msghook, in the sandbox of a merge’s steps and on the PATH the nvm plugin answers for the checkout (arthur merge --help, step 8). npm reads the script from the checkout’s ownpackage.json, so an uncommitted change of that file or of a file the script runs changes the check. Arthur’s own runsnode test/other-projects.ts, so a board file that names another project of the owner never reaches GitHub. A project that declares no such script commits without a check. - Commits those files alone (
git commit -m <subject> -- <files>). Nothing is pushed: the nextarthur mergethat goes in pushes main.
Refused
Section titled “Refused”Exit code 1, nothing committed and none of the board’s files left staged:
- A merge of the project in a run, or another
arthur commit-board:main of <project> is held by pid <pid>, a merge or another commit; nothing committed: run it again once that ended. - The checkout’s own Git config sets a key that may name a program:
<file> sets <key>, …; nothing committed. - A symlink or a folder among the changed files, new or in a tracked file’s place:
<files>: a symlink or a folder, which this commit never holds; remove it; nothing committed. A tracked symlink’s removal is committed. - The project’s check refuses, or a file changed while it ran:
<subject> not committed: npm run commit-msg refused: <its last line>; fix what it names, then run it again, or… not committed: <files> changed while npm run commit-msg ran; …. Reword what the check names (a ticket’s line, a schedule entry) and run the command again; never commit past it withgit commit. - The check still running after
merge.stepSeconds(the delivery plugin’s option, an hour by default) is killed:<subject> not committed: npm run commit-msg refused: timed out after <n> s; …. - A project whose folder is no Git checkout:
git status in <folder> failed: <git's words>; nothing committed. - Git’s own refusal of the commit (no identity):
<subject> not committed: <git's last line>; …. - The
package.jsonHEAD holds is no JSON, so its check cannot be read: the command ends with the JSON parser’s own words. - A project not in the list:
no project <name> in the project list.
Wrong usage (no subject or an empty one, more than one word, a word starting with -) prints usage: arthur commit-board '<subject>' [--project <name>] and exits 2.
For other plugins
Section titled “For other plugins”The plugin provides delivery.commit, { project, subject, paths } to the same line or a throw: the steps above for paths in place of the board’s, each a file’s path from the checkout’s top or a :(glob) pathspec of * and **/; a file below a folder named as one of them is not committed. arthur init (the projects plugin) commits the files it wrote with it.
arthur merge
Section titled “arthur merge”Usage: arthur merge <job> (--auto | [--unreviewed] [--no-ci] --decision <id>). Comes with the delivery plugin, delivery() in arthur.config.ts; its option is merge.stepSeconds, the time limit of each check on main (below, “Steps”), and --auto reads the project’s piece, delivery.project({ autoMerge: true }) in its project file (arthur projects --help, “A project’s file”); a piece of another shape is refused at load, before the setup: plugin delivery: setup failed: project <name>: delivery.project(...): expected { autoMerge }, true or false.
Merges an ended job’s branch into the branch its project’s checkout has checked out, main, then does the rest of a merge’s mechanical part. The job is its full id or the 8 hex digits that end it: a worker, or any job with a branch, an onboarding included. It commits the merge, then its ticket’s side as spec: <id> merged; main is pushed only by the plugin that provides github.push, when one is loaded; then the job and its ticket’s other jobs are pruned (below, “Steps”). The procedure it prints last says what the coordinator does next.
The PASS
Section titled “The PASS”A branch goes in only when its tip, the commit it merges, has a PASS: the newest review of that commit with a verdict says PASS (arthur review --help), or arthur review-needed answered no review for that commit (arthur review-needed --help). A commit after the PASS needs a new one. --unreviewed lets the branch in without it, only with --decision <id>, the owner’s recorded decision (AR0355): call("decision.owner", { id, what, kind: "merge", ticket, job, use }), answered by the orchestration plugin (arthur decision --help, “What only the owner’s decision lets through”), asked after the PASS and before CI; its refusal refuses the merge, <refusal>; main is unchanged. The decision lets through only the flags its --what names (AR0533). Without --decision it names the ask to make, arthur decision ask --kind merge --what --unreviewed --question '<what he decides>' --option '<the approval>' --ticket <id> (--job <id> for a job naming no ticket); outcome.md’s Reviews: line then ends ; merged unreviewed (--unreviewed): no PASS on …. An onboarding is never reviewed, so its merge, which only the owner decides, is always --unreviewed.
Every merge but --auto goes in only on the owner’s recorded decision (AR0665), --decision <id>: the question arthur decision ask --kind merge --ticket <id> --option '<the approval>' recorded (--job <job> for a job naming no ticket) and his answer recorded with arthur decision answer <id> --picked 1, quoted from his own message naming the id: only an answer that picked option 1, its approval, lets a merge through, never his “no” (AR0677). A merge with neither flag asks decision.owner as --unreviewed does, what being arthur merge <job>, after the PASS and before CI; any approved merge decision of the ticket lets it through, one asked with --what too, and only the same job’s merge tried again (after a conflict or a failed check) passes it again. Without --decision: arthur merge <job> needs the owner's decision: arthur decision ask --kind merge --question '<what he decides>' --option '<the approval>' --ticket <id>, his answer recorded with arthur decision answer <its id> --picked 1, then arthur merge <job> --decision <its id>; main is unchanged. With --unreviewed or --no-ci, the decision is asked for each flag instead, as above and below. --auto asks none: it merges by policy (below, “–auto”).
Refused, touching nothing
Section titled “Refused, touching nothing”Exit 1, main unchanged, nothing written or moved:
- No such job:
arthur merge: no job <name>; arthur jobs lists them; a read-only one:<id> is a <kind> job, read-only: it has no branch to merge; one still in a run:<id> is in a run (<state>); merge its branch once the run has ended. - Another
arthur mergeof the same project still running, from its first look at main to its end, its checks on main included:a merge of <job> is in progress on <project>(a merge of pid <pid> …in the moment before it names its job). Its merge commit is not checked yet, and a failed check resets main under anything merged on top of it, so the second merge is refused, not queued; run it again once the first has ended. The lock is<delivery folder>/<project>/merge.lock, its job inmergingbeside it; any end of the merge removes both, a refusal or a failed check included, and a merge whose process died (killed, a crash) leaves a lock the next merge takes over.arthur commit-boardholds the same lock for its one commit (arthur commit-board --help): it is refused while a merge runs, and a merge started in that moment is refused asa merge of pid <pid> …. While a live process holds it, delivery names the merge to session (delivery.merging), which makes no restart meanwhile (AR0691:packages/session/docs/session.md); a lock whose process died holds none. - The job’s project not in the list; its branch not in the project’s checkout:
arthur/<id> is not in <folder>: pruned, or not brought back from its machine; a checkout on a detached HEAD:<folder> has no branch checked out (a detached HEAD); check out its main branch first. - The project’s checkout whose own Git config (
.git/config, the main checkout’sconfig.worktree, a file either includes) sets a key that may name a program, a filter, a merge driver, a credential helper or any key outside the setdocs/deploy.mdlists (“Threat model”), which a job’s program can write; asked once the project is found, before any git call:<file> sets <key>, which a job can write and which may name a program Arthur's git would run; remove it, or set it in your ~/.gitconfig; main is unchanged. Asked again before the reset after a failed check: a key set meanwhile keeps main merged,check failed on main (<command>), and main could not be reset to <commit>: <file> sets <key>, …. - Git with no identity for the merge commit in the project’s checkout, author or committer, as
git var GIT_AUTHOR_IDENTandgit var GIT_COMMITTER_IDENTthere find it (user.name/user.emailof the repository, the user or the system, orGIT_AUTHOR_*/GIT_COMMITTER_*):git has no identity for the merge commit: git var <variable> in <folder>: <git's last line>; set one: git config --global user.name "<your name>" and git config --global user.email "<your email>", or both with git -C <folder> config for this project alone; main is unchanged. Arthur never sets one of its own.arthur doctorand the start ofarthur runtell it earlier, before a review is paid for (below). - A task naming several tickets:
<id>'s task names 2 tickets (…); a merge is of one ticket's branch. Its one ticket not on the board; notin-progress,reviewordone:AC0001 is merged; a merge is of a ticket in-progress, review or done; or with anoutcome.mdalready:<folder>/outcome.md already exists: <id> was merged before. - A dirty main:
main has uncommitted changes in <paths>; commit or stash them first; main is unchanged. The board,spec/build.json, does not count: the moves since the last commit wait there for the merge’sspec:commit (step 8). Nor doesCHANGELOG.md, which every merge rebuilds whole (step 7). Untracked files do not count either, filed reviews among them;git mergerefuses one it would overwrite (below). - A branch with nothing main lacks:
arthur/<id> at <commit> adds nothing to main (<commit>): nothing to merge. - Code that reached main by another route than
arthur merge: a commit of main’s first-parent line since the last mergearthur mergemade, a merge made otherwise included, that changes a file outsidespec/,CHANGELOG.mdand*.mdagainst its first parent, asgit log --first-parent <last merge>..HEAD -- . ':(exclude)spec' ':(exclude)CHANGELOG.md' ':(exclude)*.md'lists them, the owner’s own included:main has <n> commits since its last merge that change code (<commits>); only a merge puts code on main; the owner decides, and arthur take-main lifts it: main is unchanged,<commits>the newest 10 and thenand <k> morewhen there are more (a history of plain commits, as squash or rebase merges and a solo project leave it, lists up to all of it). The last merge is the one each merge that went in records in<delivery folder>/<project>/last-merge(.arthur/delivery/<project>/last-merge, written under a temporary name and renamed), or the commitarthur take-mainrecorded there, so a merge commit a job makes on main hides nothing before it. Without that file, or with one holding no full commit hash, main’s last merge commit counts (the root in a repository with no merge yet). One naming no ancestor of main’s HEAD (main reset below it, or a commit this repository lacks) refuses (AR-D67):main no longer holds <commit>, the last merge arthur merge made; only a merge puts code on main; the owner decides, and arthur take-main lifts it: main is unchanged; one HEAD descends from only off its first-parent line (a merge made it a second parent) too:main's first-parent line no longer passes <commit>, the last merge arthur merge made; …, as above.--unreviewed,--autoand--no-cilift none of these. The merge’sspec:commit (the ticket’s folder, the board,CHANGELOG.md, step 8) changes no code. The owner either takes the commits out of main (resets it to the commit before them, when main was not pushed with them) or, having read them, takes main as it is witharthur take-main --decision <id>, on his recorded decision (arthur take-main --help). A project whose history has no merge since its last code commit needs that before its firstarthur merge. - No PASS on the tip, without
--unreviewed:no PASS on arthur/<id>'s tip <commit>: <why> (last PASS: <commit>|none); review it with arthur review <id>, or merge it with --unreviewed --decision <the owner's decision id>; main is unchanged,<why>beingno review of it has a verdictorits newest review, <review job>, says FAIL. - CI that failed, when a plugin provides
github.ci(the github plugin) and without--no-ci: a run on the branch’s own commits (a run further below the tip than the commits the branch adds ran on main and counts as none) that ended other thansuccess:arthur merge merges only with CI passed on the branch: run <id>, attempt <n>, on <commit>, the tip|<k> below the tip, ended <conclusion>: <url>; why: arthur ci <branch> --project <project>; or merge it with --no-ci --decision <the owner's decision id>; main is unchanged. No run on the branch’s own commits, one not finished, github not loaded or unable to tell: the merge goes on as without CI, waiting for nothing. --no-ciwithout the owner’s recorded decision (AR0503):--no-ciasks no CI, so it goes on only with--decision <id>, checked as for--unreviewed(above, “The PASS”),whatbeing--no-ci, after the PASS and before CI is asked; its refusal refuses the merge,<refusal>; main is unchanged, a decision of another kind, open or closed, of another ticket, used by another merge, or not asked with--what --no-ci(AR0533) included. Without--decisionit names the ask to make,--no-ci needs the owner's decision: arthur decision ask --kind merge --what --no-ci --question '<what he decides>' --option '<the approval>' --ticket <id>, …. With--unreviewedtoo, each flag asks for the decision, and only one asked with both,--what --unreviewed --what --no-ci, lifts both: the same merge passes it again.--no-cinever lifts the PASS: a branch without one is refused all the same.collect("merge.check", job), asked last with the job asarthur jobsholds it (id,kind,project,branch, …): any text answer refuses, every answer named:refused by merge.check: <answer>; <answer>; main is unchanged. The projects plugin answers for an onboarding, whose branch may change only the vision and the criteria files (arthur init --help). The orchestration plugin answers for a worker, whose branch may not add, change or delete a ticket’sspec/features/*/ticket.md, the decision logspec/decisions.jsonlor the boardspec/build.json, which only the coordinator’sarthur ticket,arthur decisionand board commands write on main; judged by path, HEAD against the tree the merge would make (git merge-tree --write-tree, so a branch with several merge bases is judged as the merge goes), each file named:arthur/<id> changes <files>, which only the coordinator's arthur ticket, arthur decision and board commands write on main; put each back as main has it on the branch (…) and commit, ….arthur review-neededasks it first too.
Wrong usage (no job, two, an unknown flag, --auto with --unreviewed, --no-ci or --decision, --decision without a value) prints the usage line and exits 2.
The merge without the owner, after a PASS (or a no review) and green CI. On top of the refusals above, and in place of the PASS above, each refusal naming its rule, exit 1, main unchanged:
- The project’s
delivery.project({ autoMerge })nottrue:--auto merges only in a project with autoMerge on; <project> has autoMerge false|unset, so its merges wait for the owner: arthur merge <job> --decision <the owner's decision id>. - No PASS on the tip itself:
--auto merges only with a PASS on the tip: arthur/<id>'s tip <commit>: <why>; review the tip: arthur review <job>,<why>beingno review of it says PASS,its newest review, <review job>, says FAIL,its review <review job> has no verdict(one in its run, or one that ended without a verdict), orthe last PASS, <review job>, is on an older commit, <commit>.arthur review-needed’sno reviewfor the tip counts as its PASS (AR0576) only while no review of the tip exists, so a review someone asked for is waited for, and itsreview: …answer never counts. - A held path among the files the branch changes from where it left main (both names of a renamed file): a role (any
roles/folder, and the project’sprompts.rolesDir, default.agents/arthur/roles), the vision (prompts.vision, defaultspec/vision.md), CI (.github/workflows/), anypackage.json, or a file on the always-review list (review.alwaysReview,arthur review-needed --help):--auto merges no held path: arthur/<id> changes <path> (a role|the vision|CI|package.json|the always-review list); its merge waits for the owner: arthur merge <job> --decision <the owner's decision id>. A role, criteria or vision file goes in when the job’s ticket, as main holds it (the branch’s own copy never counts), names its exact path in backticks in its## Scopebefore the line that, trimmed, startsOut:(AR0693): a*.mdin a role folder (above), acriteria/folder or the project’sprompts.criteriaDir(default.agents/arthur/criteria), or the vision. A path inside a<!-- -->comment, which the rendered ticket hides (an unclosed one up to the end of the file), names nothing, as for autopilot’s Scope check (arthur coordinator --help, “Autopilot”). Anything else stays held whatever the Scope names: CI, apackage.json, a lockfile, any other file on the always-review list, a file that is not*.mdin those folders. - No plugin provides
github.ci(the github plugin not loaded, or disabled):--auto asks CI of github, which is not loaded (…); without it, only the owner's decision merges: arthur merge <job> --no-ci --decision <the owner's decision id>.--autonever goes with--no-ci(wrong usage, above): a merge without CI is the owner’s, on his recorded decision. - CI not passed on the tip itself, as
call("github.ci", { project, branch })answers: the run that built the branch, asarthur cifinds it (packages/github/docs/commands/ci.md); a run below the tip, on main or on an older commit of the branch, counts as none (AR0359), and so does a run whose commit is not the tip delivery read, even one github puts 0 below it (AR0437). The cost: a tip no run builds (pushed with[skip ci], or left out by a workflow’spaths-ignore, such as a docs-only commit) never passes, so its branch waits for the owner’s--no-ci --decision <id>. Each--auto merges only with CI passed on the branch: …:github could not tell: <github's refusal>;run <id>, attempt <n>, on <commit>, the tip, ended <conclusion>: <url>; why: arthur ci <branch> --project <project>; or, for a run on the tip not finished or none on it yet,…, is queued|in_progressandno run built the tip yet, with(the nearest, <id>, ran on <commit>, <k> below the tip|not the tip <tip>)when there is one, each ending; it waits: when that run ends, the coordinator is woken with its verdict.
A wait is <delivery folder>/<job>/ci-wait. When the github plugin’s poll sees a run end on the branch (ci-finished), it asks collect("delivery.ciEnded", { project, branch, below, run }); a run on the branch’s tip (below 0), or one delivery cancelled at any depth (AR0437), its tip still the one that waited and its job not pruned, is delivery’s, and github’s own wake leaves the branch out (AR0257), once per run attempt (a rerun’s end again), across a restart too (<job>/ci-told). A success runs the merge again on its own (below, “On its own”), whose output is the coordinator’s wake, CI passed on arthur/<id> (run <id>, attempt <n>, on <commit>): <url>. <project> merges on its own …; in a project whose autoMerge was turned off since, the wake is CI passed on …: <url>. <project> no longer merges on its own (autoMerge off): its merge waits for the owner: arthur merge <job> --decision <the owner's decision id>. Any other conclusion gets one coordinator-message, delivery’s (marked [Arthur: delivery]), CI ended <conclusion> on …. Not merged; it waits on: …. Why: arthur ci …; then what to do for each case, as arthur ci --help says: a failure in the branch’s own code to its worker with arthur continue <job> '<the failed step and its lines>', one that looks transient rerun once with arthur ci … --rerun. Any other end, one below the tip included, is github’s to tell. While arthur run runs, delivery also asks github.ci for each wait every minute: a run on the branch’s own commits, the tip or one below it, not finished 30 minutes after its start is cancelled once through call("github.cancel", { project, run }), since a hung one may hold the runner the tip’s run waits for; its end then says cancelled by delivery after it ran 30 minutes, and a cancel GitHub refuses wakes the coordinator with the refusal and the run’s page. A wait ends when the branch is merged, its job is pruned, or its branch moves past the tip that waited; a broken wait file is said once on stderr.
On its own
Section titled “On its own”In a project with autoMerge on, nobody runs --auto (AR0576): while arthur run runs, delivery runs arthur merge --auto <job> itself, the core’s CLI on arthur run’s node in the folder it runs in, so the checks on main never hold arthur run’s loop. The merge outlives arthur run and the coordinator’s session (AR0629): it runs in a session of its own (its own process group) and, where a user manager makes one, a transient systemd scope of its own, arthur-merge-<job>-<pid>-<ms>.scope, so stopping either, a restart or a stop of arthur run’s own unit included, does not end it. Its output and exit status go to <delivery folder>/merge-runs/<job>-<x>/ (out, err, exit, run.json), which arthur run reads when the merge ends, or, for one an earlier arthur run started, at its start and every 5 seconds after. It does so after each of:
- a review’s
PASS(arthur review --help),<job>the worker its branch names; arthur review-needed’sno review(arthur review-needed --help), which emitsno-review(id,project,ticket,branch,commit) from its own process, andarthur runacts on it once it delivers that event, at its next start too;- CI passed on a branch an earlier
--autoleft waiting (above).
Each runs once per cause, the review, the no review of a commit, or the run attempt, as <delivery folder>/<job>/forwarded keeps them, so a repeated event runs no second merge; another process never runs one. What the merge printed, its standard output then its standard error, wakes the coordinator once, delivery’s coordinator-message: <cause>. <project> merges on its own (autoMerge), so delivery ran arthur merge --auto <job>: it went in; follow the procedure it printed last. What it printed: and the lines, or, for a merge that exited otherwise, …: exit <code>, it did not go in; act on its last line as arthur merge --help, "What the coordinator does with the result", says. What it printed: and the lines, killed before its end in place of exit <code> for one whose process went without an exit status and left no merge commit to roll back (below). <cause> is Review <review job> says PASS on <ticket>, arthur/<id> at <commit>, arthur review-needed answered no review for <ticket>, arthur/<id> at <commit>, or CI passed on … (above). Every refusal of --auto above holds for it: a held path, a FAIL, CI not passed waits for the owner or for CI as it does for the coordinator’s --auto.
Every coordinator-message delivery sends, these, the CI waits’ above and its hand-back’s (arthur review --help), names the project it is about (project), so a project with its own agent gets it in that agent’s inbox instead of the coordinator’s (arthur coordinator --help, “Project agents”).
A merge that died half done anyway (a reboot, a kill of its scope) is rolled back and run again (AR0629). At its start, and when a merge it watched went without an exit status, arthur run looks at each project’s merge.lock: one whose process is gone, with main’s HEAD still the merge commit of the job merging names (two parents, the second the branch’s tip), its checks not passed (last-merge is not it) and on no remote branch, goes: main moves back to the merge’s first parent only from that merge commit (git update-ref with the old value, so a commit that landed since stays), its index and files follow with git read-tree -m -u, as git reset --keep would, so the board’s uncommitted moves stay, the lock and merging are removed, and the merge runs again on its own, its wake’s <cause> The merge of <job> on <project> died half done, its process gone: main went back from its merge commit <commit> to <commit>, the board kept. A live lock is left as it is; a dead one with a HEAD of another kind (a commit on top of the merge, a merge of another branch), merging naming no job, or a merge whose checks passed or that a remote branch holds, is removed with its merging and main left as it is. Where autoMerge is off since, the wake is <that cause> <project> no longer merges on its own (autoMerge off): its merge waits for the owner: arthur merge <job> --decision <the owner's decision id>; where Git refuses to move the files (a local change to a file the merge changed), main goes back to the merge commit and the wake is …: main still holds its merge commit <commit>, as git read-tree -m -u <commit> <commit> refused: <git's last line>; reset main to <commit> in <folder>, then arthur merge --auto <job>.
Each printed as it is taken:
git merge --no-ff -m "Merge <ticket>: <title>" <tip>(Merge arthur/<id>for a job naming no ticket), thenmerged arthur/<id> into main: <hash>. A conflict aborts the merge,arthur/<id> conflicts with main in <files>; merge aborted, main is unchanged; any other failure ofgit mergeisgit merge arthur/<id> failed: <git's last line>; main is unchanged.- Checks on main. Each step runs in a transient systemd scope of its own,
arthur-merge-<pid>-<n>.scope, under the jobs’ slicearthur-jobs.slice, as a job does, and the scope is stopped once the step ended, so what the lifecycle scripts of an install or thecheckandtestscripts leave running is killed before the next step. Where no user manager can make one (a container, macOS, inside a job’s sandbox), the steps run bare, which one line says before them:uncapped: no systemd scope (<why>); the steps run bare, outside the jobs' slice, and what they leave behind is not killed. Each step also runs in a sandbox of its own, the one a job’s install runs in (arthur spawn --help, “The sandbox”): it writes only in main’s checkout as the next sentences say, the merge’s own cache folder, the temporary folder and/dev, reads every file but the env file (core.envFile),~/.sshand Git’s andgh’s stored credentials (arthur spawn --help), reads no other process’s environment (arthur run‘s, the coordinator’s, this merge’s), and opens no Unix socket but a datagram one, so the branch’s code the checks run (an install’s lifecycle scripts, thecheckandtestscripts) reads no secret of Arthur’s. The package managers’ caches are that folder,<delivery folder>/cache_<random>, made before the first step and removed after the last, whether the merge went in or not (one anarthur mergekilled during its steps left is removed at the start of a later merge once older than a day, to the minute; a younger one may be a running merge’s. Its_is in no project’s name, so a project’s own folder there,last-mergeand all, is never one); the reinstall below gets a fresh one of its own, removed after it, so main’s install takes nothing the branch’s left in the merge’s: each step runs withnpm_config_cache,BUN_INSTALL_CACHE_DIR,XDG_CACHE_HOME(pnpm’s and uv’s),PNPM_HOME(pnpm’s store) andCOMPOSER_CACHE_DIRpointed into it, so a step writes none of the shared caches (~/.npm,~/.cacheand the like), where the branch would leave what a later process outside any sandbox runs, such as annpxpackage in~/.npm/_npx; each merge’s install starts with a cold cache. On Linux each step also getsPLAYWRIGHT_BROWSERS_PATH, unlessarthur merge‘s environment sets one, pointed at the browsers Playwright installed for Arthur’s user ($XDG_CACHE_HOME/ms-playwrightof that environment, else~/.cache/ms-playwright), since Playwright would otherwise look in the merge’s empty cache folder: a step launches them and writes nothing there (unless that folder lies in one a step writes, such as the temporary folder). In main’s checkout a step writes each entry but.git, and but Arthur’s home (core.home),arthur.config.tsand the env file where one sits inside the checkout; of.gitonlyobjects,refs,logsand theindexfile in place, never itsconfig,hooksorinfo, so a step plants no hook orcore.fsmonitorthat your next git call there would run outside any sandbox: such a write failsPermission denied(git configprintscould not lock config file .git/config: Permission denied). Git’s own update of the index orHEADgoes through a lock file in.gitand is refused too, so a step’sgit addorgit commitfails. The checkout’s own folder, and each folder on the way to a path it keeps (ops/for a home inops/.arthur), takes no new entry and loses none: a step writes a top-level file or folder that is there, but making one (dist/,coverage/,tsconfig.tsbuildinfo), or renaming or removing one, fails; make it once outside a step (mkdir dist) and keep it in.gitignore. A symlink there opens no write where it points. Which entries those are is read before the merge’s first step, and again before the reinstall below. A step still writes the folders below the top, where it could make a repository of its own (git init src) or a.gitfile pointing to one elsewhere, untracked, so the reset after a failed check keeps it, whosecore.fsmonitoror hooks your next git call in that folder would run outside any sandbox. Git also takes a folder holding aHEADas a repository’s Git folder whatever its name (git init --bare src/cache, thencore.bare falseand acore.worktree), and follows a symlink to one elsewhere (src/link, to a repository outside the checkout or a folder in its.git). So after each step, passed or failed, with the sandbox or without it, every repository below the checkout’s top that was not there, the same, in main’s checkout just beforegit mergeis removed, one line each, so one the branch itself commits counts as a step’s and goes after the first step (AR0490): main’s checkout then lacks that tracked file, whichgit statusshows and the nextarthur mergerefuses as an uncommitted change until you restore or remove it, and checks that need it, a Git folder kept as a test fixture, fail. Those are: a.git(a folder, a file or a symlink), a folder holding aHEAD, and a symlink to a folder outside the checkout or in its.git, or a dangling one that points there, where a folder may come later, followed from its folder’s real path as the kernel follows it, also where the checkout’s own path goes through a symlink (a symlink to a file, a venv’spython, or to a folder inside the checkout stays, and so does any symlink there beforegit mergeand the same, whatever its target became, but one into a folder a step writes, the checkout’s.git, the temporary folder,/devor<delivery folder>, where the merge’s caches go, or that passes through a symlink there anywhere on its way (followed link by link, up to the kernel’s 40), which a step can point elsewhere, is judged by its target and each link on its way too, and by the.gitandHEADin each folder above its target and above each link down from that folder, where git walking up from the target would find a repository a step made: a file there a step replaced, a folder there it wrote in, or a dangling one’s target it made changes it, and one whose target Arthur’s user cannot read whole is removed after the first step,removed <path>, which <command> left: its target, in a folder a step writes, could not be read, so a repository there could not be told from the owner's own; one an install makes to a folder outside, an npmfile:../siblingdependency or a global pnpm store, is removed):removed <path>, which <command> left: a git call in that folder would run its config outside any sandbox, or, when it stays,<path>, which <command> left, could not be removed (<why>): a git call in that folder would run its config outside any sandbox. A.gitthat was there before, a submodule’s or a clone of your own, stays while a step only reads it with git: anindexgit rewrites there (git statusrefreshes one, a linked worktree’s inworktrees/<name>/too), itssharedindex.<hash>undercore.splitIndex, and a lock file git makes and removes in the.gitfolder or one holding an index do not count, wherepython3reads those folders’ extended attributes, an ACL among them, so a change of them still counts (wherepython3fails, a git read there counts as a change: a failed read after a step is tried once more first, and a.gitthat was there before is then removed withremoved <path>, which <command> left: python3 failed to read the extended attributes of its Git folders, so a git read there could not be told from a change, or the same reason aftercould not be removed (<why>)). One a step replaced, or in which it added, removed or rewrote any other file (itsconfig, a hook) or changed a folder’s permissions, owner, group or ACL, is removed; a folder a step made unreadable or unwritable to keep one gets its owner’s read and write back first. A check that needs a Unix socket (a tmux server, a database’s local socket, Docker, the user manager’s bus) fails there or skips, as it would inside a job. Where the sandbox cannot be set up (not Linux, nopython3, a kernel without Landlock), the steps run as before, their caches in the merge’s folder all the same, which one line says first:no sandbox: <why>; each step writes wherever Arthur's user can. Every step runs on the PATH the plugin that providesnvm.path(the nvm plugin) answers for{ root }, main’s checkout: the bin of the Node its.nvmrcnames first, as a worktree there gets it;"", or no plugin providing it, runs them on the PATHarthur mergehas. A throw ofnvm.path(that Node not installed, nvm missing) runs nothing and is a failed step:node: failed, <message>.. First the project’s install, the one a new worktree of the merge commit gets, as the plugin that providesprojects.install(the projects plugin) answers for{ project, commit: "HEAD" }: the project’sinstallinarthur.config.tswhen set, else the frozen install of its one known lockfile (arthur projects --help, “Install”);install: "", or no lockfile and noinstall, runs nothing. A throw ofprojects.install(two known lockfiles and noinstall, or no plugin providing it) runs nothing and is a failed step:install: failed, <message>.. Thennpm run checkandnpm test, each only when main’spackage.jsondeclares its script; with neither, and no install,no checks: package.json declares no check or test script. Each prints<command>: passed.,12/12 passed.orfailed, 11/12 passed.(the counts from node –test’s last summary, when it printed one), and a failed one its last 20 lines. Each step hasmerge.stepSeconds(delivery’s option, default 3600, an hour) to end: one still running then is killed, SIGKILL to its process and then its scope stopped, and fails,<command>: failed, timed out after <n> s.; run bare, what it started may live on, as theuncapped:line says. A failednvm.pathor install, or apackage.jsonthat is not JSON, ends the steps. - Records the merge commit in
<delivery folder>/<project>/last-merge(above, “Code that reached main by another route”). For a job naming no ticket:no ticket: no outcome.md, nothing moved, and the merge goes on at step 7. Otherwise, files every review of the branch with a verdict that noreview-N.mdof the ticket names yet, asarthur ticket filedoes:filed <path>, orreview <job>: not filed: <why>(a pruned review’s result is gone). - Hands the ticket’s findings to the plugin that provides
findings.onMerge(the findings plugin), asked with{ project, ticket, path, root, review, notes },paththe ticket’sfindings.mdfrom the project’s folder whether it exists or not,reviewthe job of the branch’s last filed PASS review andnotesits- (<kind>) <file:line>: <title>. <what>lines under## Notes(the reviewer’s role;""and none without a PASS review); its answer is the lines of## Left open, printed. With no provider the findings stay as they are, the notes stay in the review, and the merge says so once:- Findings: <path> left as it is, every open entry still open: no plugin provides findings.onMerge, or- Findings: none; no findings.md on this ticket.without the file. A provider that throws costs its own line:- Findings: findings.onMerge of <plugin> failed: <message>; <path> left as it is. - Writes
outcome.mdin the ticket’s folder, in the shape of the core’s template,wrote <folder>/outcome.md:- Merged: <date>, <hash>,- Branch:,- Reviews:(the branch’sreview-N.mdfiles with their verdicts),- Cost: worker $x, reviews $y; review rounds N($xthe sum of every worker job of the project whose task names the ticket, an earlier one whose branch a fresh one took over included, as their records hold it at the merge, so a worker pruned before it is left out; delivery keeps a review’s cost in its own record of it when its run ends, so a review pruned after that still counts;n/awhen the merged worker’s job record is gone or one of those workers has no cost, or a review was pruned and delivery’s record of it holds no cost, as one kept before AR0474 does),## What went in, each step under## Checks on main, and step 4’s lines under## Left open.## What went inholds the- <path>: <what it does now>lines (the path in backticks or not) of the## What went insection of the worker’s final message, as it wrote them, then- <path>: not describedfor each file the merge commit changes against main before it that none of them names; a final message without that section gives the branch’s commit subjects instead,- <subject>each. - Moves the ticket to
merged(ticket-moved, named by delivery),<id> merged, and names theplannedtickets whoseafterit completed:unblocked: <id>, <id>. - Fetches origin’s
v*tags into the checkout, so a release tagged there counts (arthur changelog --help, “Releases”, which names what the fetch never runs or writes); a fetch that fails or is refused, a tag held here at another commit included, printstags not fetched from origin: <why>; CHANGELOG.md counts the tags of <checkout>and goes on. Then rebuilds the project’sCHANGELOG.mdfrom its merged tickets, asarthur changelogdoes:wrote CHANGELOG.md: <n> merged tickets. - Commits the ticket’s folder, the tickets
findings.onMergemade in step 4,spec/build.json(the board’s other uncommitted moves with it) andCHANGELOG.mdasspec: <id> merged, with hooks off as the merge, and only those paths:committed spec: <id> merged: <hash>. Its git runs only after the config is asked again as for the reset after a failed check (above, “Refused, touching nothing”): a key set while the checks ran, or agit addorgit committhat fails, leaves them uncommitted and the merge in,spec: <id> merged not committed: <why>; commit <paths>. Since the hooks are off, the project’s own check of what a commit holds runs before the commit (AR0635): thecommit-msgscript of thepackage.jsonmain’s HEAD holds, asnpm run --silent commit-msg -- <Git's COMMIT_EDITMSG file>with the message written there and the paths staged, the way Git runs acommit-msghook, in the steps’ sandbox and on their PATH (step 2); Arthur’s own runsnode test/other-projects.ts, so a worker’s## What went inline that names another project of the owner never reaches GitHub. Its refusal,<why>beingnpm run commit-msg refused: <its last line>, or a path changed while it ran,<paths> changed while npm run commit-msg ran, leaves the paths staged and uncommitted, and the merge in and pushed without them; the coordinator then commits them witharthur commit-board 'spec: <id> merged', which runs the same check (arthur commit-board --help). A project that declares no such script commits without a check. A job naming no ticket commits nothing past the merge.
Then, when a plugin provides github.push (the github plugin, packages/github/docs/github.md, “Pushes”), main is pushed to origin, the spec: commit with it, and that plugin’s one line printed, github: pushed main to origin: <old>..<new> or the warning github: main not pushed to origin: <why> (a push rejected as non-fast-forward, no origin), which leaves the merge in: it is never retried and never asks for a password; without one, nothing pushed: no plugin provides github.push. Then the merged job and every job whose task names a file of its ticket’s folder are pruned, as arthur prune <id>... prunes them (arthur prune --help), a line each, <id>: <what was done>: their worktrees, the branches main now holds, their records, and what each plugin frees with them (jobs.keep: delivery’s own folder of the job, <delivery folder>/<id>/, while its record of a review, reviews/<id>.json, stays; the github plugin’s delete of the branch on origin, packages/github/docs/github.md, “Branches on origin”). A job in a run, held or blocked is kept (kept: it is <state>, not ended), and so are a worktree with changes and a branch main does not hold, as the prune says; no job of the ticket is handed back after a FAIL review any more (arthur review --help, “Hand-back”): its hand-back ends with the merge; main is pushed before, so origin has the commits of a branch it deletes. Last, a blank line and the procedure after a merge, packages/delivery/roles/coordinator/after-merge.md. A merge that refuses or fails prints none of these and pushes nothing.
When a check fails
Section titled “When a check fails”Main goes back to the commit before the merge with git reset --keep, which keeps the board’s uncommitted moves; nothing is filed or written and no ticket moves. When an install ran in the steps, main’s own is run again, as projects.install answers for main’s HEAD after the reset, on the PATH nvm.path answers for it then, reinstall of main's dependencies, <install>: passed. or failed.. It runs over a fresh cache folder, <delivery folder>/cache_<random> again, removed after it, in a sandbox of its own, so a host without the sandbox prints its no sandbox: line a second time before it; its step is swept for a repository against the same look before the merge’s first step as the checks were, so one that appeared since (a process a check left running, bare, may write one) is removed after it too. Exit 1 with check failed on main (<command>); main reset to <commit>, branch kept, ending , but reinstalling main's dependencies failed (<install>): they still hold the branch's install when that install failed. When the reset itself fails: check failed on main (<command>), and main could not be reset to <commit>: <git's last line>.
What the coordinator does with the result
Section titled “What the coordinator does with the result”- A merge that went in ends with the procedure: follow it in the same turn. Delivery’s own
--auto(above, “On its own”) wakes you with what it printed: act on it as on a merge you ran. github: main not pushed to origin: …: the merge and itsspec:commit are in; follow the procedure and tell the owner the line; the next merge’s push is the next try.a merge of <job> is in progress on <project>: main is unchanged; follow that merge to its end, then run this one again.check failed on main (…): main is as it was. Tell the owner which check failed, its command written out as the brackets name it (npm test), with its last lines; runarthur continue <job> '<what failed>'without asking him, and start a new review once it ends.- A conflict,
refused by merge.check: …orgit has no identity …: main is unchanged; tell the owner, in plain words, with the fix the line names. main has <n> commits since its last merge that change code …,main no longer holds …ormain's first-parent line no longer passes …: main is unchanged; tell the owner the commits, with their subjects (git log --oneline <commits>); the merge waits for his decision above (arthur take-main --decision <id>once he keeps them), and the branch goes in once he has made it.arthur merge <job> needs the owner's decision: …, or a refusal of his decision (<id> is of ticket …,<id> was used already …,<id> picked option <n>|none, not option 1, its approval …): main is unchanged; ask him, naming the idarthur decision ask --kind merge --ticket <id> --option '<the approval>'printed, record his answer from his own message naming it (arthur decision answer <id> --picked 1on his approval), and merge with--decision <its id>.no PASS on …: review the branch (arthur review <job>), or ask the owner for--unreviewed: record his decision first (arthur decision ask --kind merge --what --unreviewed --option '<the approval>' …, thenanswer --picked 1), and merge with--unreviewed --decision <its id>.arthur merge merges only with CI passed on the branch: run …, ended <conclusion>: tell the owner, with what itswhy:command says; the branch goes in only with--no-cion his recorded decision: record it first (arthur decision ask --kind merge --what --no-ci --option '<the approval>' …, thenanswer --picked 1), and merge with--no-ci --decision <its id>.--auto merges only with CI passed …; it waits: nothing to do; once CI passed, delivery runs the merge again itself and wakes you with what it printed; afterCI ended <conclusion>, as the next line.--auto merges only with CI passed on the branch: run …, ended <conclusion>: run itswhy:command; a failure in the branch’s own code is handled as a failed check above,arthur continuewithout asking included; one that looks transient is rerun once (arthur ci --help).- Any other
--autorefusal: the merge waits for the owner; tell him the rule it named.
arthur doctor
Section titled “arthur doctor”The plugin gives arthur doctor one requirement per project, never critical: delivery <project> identity: ok, or delivery <project> identity: missing: git var <variable> in <folder>: <git's last line>; without it: arthur merge refuses every branch of <project>: git has no author for the merge commit; fix: <the fix above>, the same check as the refusal above. So a machine with no identity hears it at arthur doctor, arthur setup and each start of arthur run, before the first merge.
arthur review-needed
Section titled “arthur review-needed”Usage: arthur review-needed <worker job>. Comes with the delivery plugin, delivery() in arthur.config.ts; its option is review.alwaysReview (below).
Decides whether an ended worker’s branch needs a review and prints one line, review: <why> or no review: <why>, naming the rule that decided. The worker job is its full id or the 8 hex digits that end it. The branch is judged at its tip in the main checkout, from where it leaves HEAD (git merge-base), as arthur review judges it.
no reviewmoves the job’s ticket todone(ticket-moved, named by delivery) and prints<id> moves to done.as a second line. It then asks the plugin that providesgithub.push(the github plugin,packages/github/docs/github.md, “Pushes”) to push the branch to origin, as after a review’sPASS, so its CI runs; that plugin’s one line, pushed or why not, is printed next. Without it, nothing is pushed. Last it emitsno-review(id,project,ticket,branch,commit), on whicharthur runmerges the branch itself in a project withautoMergeon (arthur merge --help, “On its own”), and there prints<project> merges on its own (autoMerge): arthur run runs arthur merge --auto <job> and wakes you with what it printed; nothing to do until then.reviewmoves, pushes and emits nothing: the review’s start moves the ticket toreview, and itsPASSpushes (arthur review --help).- Either answer is kept in
<home>/delivery/review-needed/<job>.json, a JSON object{ answer, ticket, branch, commit, at },committhe tip it judged; asked again, the newest answer replaces it. That folder is Arthur’s: no job’s sandbox grants it, unlike the job’s own<home>/delivery/<job>/(“The job’s checks”, below), soarthur mergeandarthur reviewread the answer only there, and areview-neededfile a job writes in its own folder is no answer (AR0499). A prune of the job removes it.
The rules
Section titled “The rules”In this order; the first that holds decides:
review: <path> is on the always-review list: a changed file matches the list, a renamed file by its old name or its new one.review: deletes <path>: the branch deletes a file, a rename’s old name included; a branch of docs that also deletes one is reviewed.review: changes <path>: a file whose name starts with.env(.env.exampletoo).review: the diff mentions .env in <path>:.envin a changed line of a file outside docs (*.md) and tests (atest/folder at any depth), where it is only text;process.env,.envrcand.environmentare not.env.review: changes a binary file <path>: a file Git counts no lines of (-ingit diff --numstat), whatever its size: a.wasmor.nodeaddon, an executable, an archive, an image, a binary*.mdtoo.no review: <n> files, all docs (*.md): every changed file is Markdown.review: <n> lines changed, over 30: lines added and removed.- With 30 lines or fewer, the job’s checks (below) decide, for each script,
checkandtest, that the tip’spackage.jsondeclares:no review: <n> lines changed; the job's checks: check pass, test pass 12/12when the latest line of each on the tip’s clean tree passes, elsereview: ...with the same list (no testfor a script with no line). Without them it isreview:the project's package.json declares no check or test script(none at the tip, or a broken one),the job recorded no checks, or, for a script whose lines all ran elsewhere, as its latest line says,the job's checks ran on <commit>, not the tiporthe job's checks ran on a dirty tree. With neither a check nor a reviewer nothing would have verified the code.
The always-review list
Section titled “The always-review list”review.alwaysReview in delivery’s options: glob patterns (path.matchesGlob) from a project’s root, the same list for every project; a list given replaces the default. ** does not enter a folder whose name starts with a dot unless the pattern names it: **/roles/** misses .agents/arthur/roles/worker.md, which .agents/** holds. The default holds what reads secrets, the core’s .env loading (roadmap entry 3) and the env guard (**/env.ts, **/env-*.ts), the CI-failure handling of roadmap entries 57 to 59 and the CI’s workflows (**/ci.ts, **/ci-*.ts, **/github-ci.ts, **/auto-merge.ts, **/merge-command.ts, .github/workflows/**), the review rules themselves (**/review-needed.ts, **/checks-extension.ts), the prompt files every job and the coordinator read, so a docs-only branch that rewrites them is still reviewed: every role and its procedures and every criteria file, Arthur’s own and a project’s prompts folders (**/roles/**, **/criteria/**), a project’s overrides and criteria under .agents/ (.agents/**) and the vision (spec/vision.md), the board (spec/build.json), whose ticket paths say where arthur ticket file writes and what arthur task prints, and what arthur merge and each spawn run as Arthur, in every project: the scripts, the install (npm’s, bun’s, yarn’s, pnpm’s, composer’s, uv’s), its manifest, its lockfile, its registry and the settings that change what it runs (yarnPath, the pnpmfile, bunfig.toml), the Node and the Git hooks (**/package.json, **/package-lock.json, **/npm-shrinkwrap.json, **/bun.lock, **/bun.lockb, **/yarn.lock, **/pnpm-lock.yaml, **/.npmrc, **/.nvmrc, **/composer.json, **/composer.lock, **/uv.lock, **/pyproject.toml, **/.yarnrc.yml, **/.pnpmfile.cjs, **/bunfig.toml, .githooks/**, .husky/**), however small the change. Other Markdown, a README or a guide, stays docs (rule 6).
The tradeoff: the same list holds arthur merge --auto (arthur merge --help) and autopilot, so a dependency bump or a one-line script change is never merged on its own nor pre-approved by policy; it waits for a review and the owner’s arthur merge. That is the intent: such a change runs code on the VPS at the next merge or spawn, which a passing check of the branch does not vouch for. The one exception is --auto’s: a role, criteria or vision *.md the approved ticket’s Scope names goes in on its own after its PASS and green CI (AR0693, arthur merge --help, “–auto”).
Other plugins ask it through call("delivery.alwaysReview", { project, paths }), which answers the paths on the list; orchestration’s autopilot refuses a ticket whose Scope names one (arthur ticket --help).
The job’s checks
Section titled “The job’s checks”Delivery registers an OMP extension (host.jobs.registerExtension, packages/delivery/src/checks-extension.ts), which every job’s agent loads with -e after the core’s own. After each bash call it appends to <home>/delivery/<job>/checks one line per run of the project’s own checks in the command, in its order, for the check, test and mutate scripts the worktree’s package.json declares at that moment: check pass or check fail for npm run check, failed by its exit status or a TypeScript error in its output (error TS<n>); test pass <passed>/<total> or test fail <passed>/<total> for npm test, npm t or npm run test, from node –test’s last summary in the output (fail 0 passes), and test pass or test fail from the exit status when there is none; mutate pass <run> run, <survived> survived, <not run> not run or mutate fail … for npm run mutate (npm run mutate -- --max 20 too), its counts from its last summary line, mutate: <run> mutants, <caught> caught, <survived> survived, and that line’s ; <not run> not run (--max <n>) when a cap left some (else 0 not run), a pass only when its exit status is 0 and that line says 0 survived; mutate fail alone when there is no summary. A run counts at the start of the command or after a separator, behind any NAME=value assignments (TMPDIR=$PWD/tmp npm run check), and through bun as bun run check, bun run test or bun run mutate; bun test is bun’s own runner and runs no script. Commands joined by ;, && or | count each (npm test | tail is read from its output, as its exit status is the pipe’s). A script the package.json does not declare, a missing or broken package.json, any other command, one that only mentions npm test (echo npm test, echo TMPDIR=x npm test, git commit -m 'npm test'), and a call the bash tool moved to the background give no line. arthur review-needed reads only the check and test lines.
A bash call that runs one of those checks, npm run mutate included, runs with a timeout of at least 1800 seconds, or with none: the extension’s tool_call handler returns the call’s input with timeout raised to 1800 when it names none or a shorter one, and omp runs the call with that input. omp kills a call at its timeout, 300 seconds when it names none, and a killed check gives no result. A longer timeout, up to omp’s 3600, is kept, and so is 0, which omp runs with no deadline (a long npm run mutate, AR0662); any other call is left as it is.
Each line ends with the commit the call began on (git rev-parse HEAD) and clean or dirty: test pass 12/12 <commit> clean. The extension reads the worktree as the bash call begins (OMP’s tool_call) and as it ends: clean only when both readings name the same commit and every tracked file (git ls-files) with the same inode, size and times, a write changing its ctime, and the second lists no file in git status --porcelain --untracked-files=no and none Git is told not to look at (git update-index --assume-unchanged or --skip-worktree, a tag other than H in git ls-files -v); else dirty. A mutate line, whose run writes files and puts them back, needs only the same commit and both readings clean in that way, so a file changed and put back within its call leaves it clean, while a check or test line of the same call is dirty. So npm test; git stash, npm test && git commit -am ..., and an older tree or file put in, tested and put back (git checkout <old> -- . && npm test && git checkout HEAD -- ., or the same with cp) are dirty, as is a call whose tool call the extension did not see. Outside Git as the call ends there is no line. An untracked file is on no branch and leaves the tree clean. These reads run no hook and no fsmonitor the worktree’s config names, nor read a replacement (refs/replace) (-c core.hooksPath=/dev/null -c core.fsmonitor=false --no-replace-objects). A line counts only on the tip’s clean tree, so a change after the run, through the edit tool or bash (sed -i, git checkout, git commit --amend), and a run on an earlier commit or beside uncommitted changes leave the tip without checks, and arthur review-needed answers review. A run again on the tip counts again.
The lines are the job’s own word: the job’s sandbox keeps <home>/delivery/<job>/ writable for the extension, which runs in the agent’s process, so any program the job runs (npm test included) can write them too. They keep a careless branch from no review; they are no proof against a job that writes false ones. In a project with autoMerge on, a no review goes in with no one looking once CI passed on its tip and no held path is in it (arthur merge --help, “–auto”): CI, not these lines, is then what vouches for the code.
A job on another machine writes its checks there, not here, so arthur review-needed reads none for it and answers review.
Before a review
Section titled “Before a review”The same lines decide whether a review may start at all (AR0580). arthur review (arthur review --help) and the hand-back’s next review start one only when, for each of check, test and mutate the tip’s package.json declares, the job’s latest line on the tip’s clean tree is there: check pass and test pass, and a mutate line with any result, whose survivors the worker names in its final message, that has its counts and ran at least min(100, all its mutants) (AR0637, AR0696): a run capped lower (npm run mutate -- --max 4 of 16, or --max 99 of 150) did not reach the whole change, as npm run mutate takes its mutants round-robin across the changed files so that its 100 reach each. A run its 1500 s deadline cut (; <n> not run (time)) counts once npm run mutate has been run again on the same commit: it goes on where the last call stopped, and its last summary adds up every call (AR0689). Otherwise arthur review is refused, exit 1, before any job exists: arthur review: arthur/<id> at <commit> is reviewed only once the job's checks passed on its clean tip (check and test pass, mutate ran at least min(100, all) mutants): <what is missing>, each missing script as no <script>, <script> ran on a dirty tree, <script> ran on <commit>, not the tip, its failing line (test fail 2/3), mutate capped at --max <n> (<run> run, <survived> survived, <not run> not run of <all>; it counts at <min(100, all)>), or mutate pass without its counts (a run with no summary, or a line an older Arthur wrote); arthur spawn --kind review with the task it would write is refused as any task it does not write now. The hand-back instead continues the worker once to run them (arthur review --help, “Hand-back”). A tip whose package.json declares none of them, and a job on another machine, whose lines are there, need none.
Refused
Section titled “Refused”Exit 1, nothing kept and nothing moved:
- No such job:
arthur review-needed: no job <name>; arthur jobs lists them; not a worker,<id> is a <kind> job; a review is of a worker's branch; still in a run,<id> is in a run (<state>); review its branch once the run has ended. - A worker whose task names no ticket, or several:
<id>'s task names no ticket; a review is of one ticket's branch. - A branch gone from the main checkout:
arthur/<id> is not in <folder>: pruned, or not brought back from its machine; a branch with no commits beyond HEAD:arthur/<id> at <commit> adds nothing to HEAD (<commit>): nothing to review. - A branch the merge would refuse, asked before the rules above: every text answer of
collect("merge.check", job), asarthur mergeasks it (arthur merge --help), such as orchestration’s refusal of a worker’s branch that changes aticket.md, the decision log or the board:refused by merge.check: <answer>; <answer>; no review until the branch passes it. No review is paid for a branch the merge refuses. - On
no review, a ticket the board cannot move todone(merged, dropped, planned): the board’s refusal, such asAC0001: merged cannot move to done; from merged: none, it is final.
Wrong usage (no job, two, a flag) prints the usage line and exits 2.
arthur review
Section titled “arthur review”Usage: arthur review <worker job> [--round <n>]. Comes with the delivery plugin, delivery() in arthur.config.ts; a review takes no option (delivery’s review.alwaysReview is arthur review-needed’s, which says whether a branch needs a review at all).
Starts a review of an ended worker’s branch at its tip and prints the review job’s id, as arthur spawn does (warnings and the model’s line on stderr). The worker job is its full id or the 8 hex digits that end it. The review is a job of the kind review:
- read-only, in a detached checkout of the branch’s tip, made by delivery’s
preparestep after the core’s checkout of HEAD, on the job’s machine (git checkout --detach <commit>);arthur reviewspawns it with the tip asfetch, so on another machine the core pushes the tip there with the base (refs/arthur/fetch), wherever the worker ran; a commit that still cannot be checked out there refuses the spawn:plugin delivery: prepare failed: arthur/<id> at <commit> cannot be checked out on machine <name>: <git's last line>, the worktree and record removed (arthur spawn --help); - role
reviewer(packages/delivery/roles/reviewer.md) with the project’s criteria filesstyleguide,reviewandverify, how a change is proved (arthur roles);packages/delivery/criteria/review.mdis the review criteria to start from, what fails a branch and what does not:arthur initwrites it to a new project’s<criteriaDir>/review.md(arthur init --help); copy it there for a project given earlier, and change it to fit. Every worker’s prompt holds the same file, as delivery’spromptsection## The review criteria your branch is judged by (<path>), read where the worker’s criteria files are (arthur roles --help): missing or empty, nothing; a symlink, under a symlinked folder, or no file, never read, the spawn warning<path> is a symlink or not a file; the worker goes without the review criteria. A fresh session, onroles.reviewerof orchestration’s options, else the agent’s own model, so a review is not judged by the worker’s model when the two differ; the core’s limits (core.jobs).
Its task starts with the lines placement and delivery read, then the range and the worker’s final message:
Ticket: spec/features/<id>-<slug>/ticket.mdBranch: arthur/<worker job>Commit: <the branch's tip>Round: <n> (only with --round)
Review the branch ... The range to judge is <base>..<commit> ... git show <HEAD>:<ticket path> ...
## The worker's final message (job <worker job>)<base> is where the branch leaves the main checkout’s HEAD (git merge-base). The range’s diff is git diff --text --no-ext-diff --no-textconv <base>..<commit>, so a .gitattributes on the branch (*.ts -diff, binary, a diff=<driver>) cannot show a text file as Binary files ... differ, through an external diff or a textconv; the reviewer reads a file it still shows as binary on disk, or fails the review. The Ticket: line names the worker’s one ticket, so placement (jobs.place, the machines plugin) reads that ticket’s requires labels and a review of a ticket with os=macos runs on a macOS machine, as its worker did. Ticket: in the worker’s message is written Ticket\:, so it names no second ticket.
arthur spawn --kind review '<task>', from the coordinator or a job, starts a review only when its task is byte for byte the one arthur review would write now: the worker its Branch: names exists, is a worker, has ended, and the branch’s tip in the project’s main checkout is its Commit: (the full sha), with that worker’s one ticket and final message; and only in that worker’s project, so a PASS’s push names the project the branch is in (--project naming another is refused). Any other task is refused (below). Every refusal below holds for it too. The hand-back’s next review is built the same way, so it starts.
The verdict
Section titled “The verdict”The last line of the review’s final message, exactly PASS or FAIL, alone. Anything else is no verdict: **PASS**, Verdict: PASS, a verdict followed by any text, a PASS above other lines.
- At the review’s start (
job-started) its ticket moves toreview. - At its end (
job-ended):PASSmoves the ticket todone,FAILback toin-progress. No verdict, or a run that did not finish (failed, stopped, a limit, blocked), moves nothing: the review failed, its ticket stays atreview, and it is never filed. The kind is registered withverdicts: ["PASS", "FAIL"], so the core resumes a run without one once and then ends itfailed: no verdict: the last line of its final message is not PASS or FAIL alone, in its record,arthur jobsandjob-ended(arthur spawn --help). - A
PASSthen asks the plugin that providesgithub.push(the github plugin,packages/github/docs/github.md, “Pushes”) to push the reviewed branch to origin, so its CI runs; that plugin’s one line, pushed or why not, goes toarthur run’s log. Without it, nothing is pushed. AFAILpushes nothing. In a project withautoMergeon,arthur runthen runsarthur merge --auto <worker job>itself and wakes the coordinator with what it printed (arthur merge --help, “On its own”). - The verdict is kept in delivery’s record of the review,
<home>/delivery/reviews/<job>.json(its ticket, branch, commit, start), so a review still counts oncearthur pruneremoved its job record. - The coordinator’s wake for an ended review adds one line: the verdict and the ticket’s move; for a PASS how to file it, or in a project with
autoMergeon that delivery runsarthur merge --auto <worker job>, whose merge files and prunes the review, and wakes the coordinator with what it printed, so the coordinator files and merges nothing meanwhile; for a FAIL that delivery files it and whether it hands the branch back (below); for no verdict, that the review failed though Arthur resumed it once for its verdict already, and how to review again; for a review thatarthur stop,arthur stopallor the hand-back’s cancel stopped, that it was stopped and is reviewed again only when the owner asks. A review delivery keeps no record of, an eval’s (arthur eval --help), gets the line from the record its job-ended data names,records.delivery{ ticket, branch, commit, autoMerge? }(autoMergetrue for a project that merges on its own), its verdict read from the final message the wake is asked with, and no FAIL of its branch before it; a record of another shape fails the wake:review <id>: records.delivery: expected { ticket: <id>, branch: arthur/<worker job>, commit: <sha>, autoMerge?: true | false }, got <it>. It writes nothing. - A FAIL’s line is the procedure
packages/delivery/roles/coordinator/review-failed.md, at the fourth FAILreview-failed-limit.mdbeside it, read as the wake is built,{branch},{commit},{fails},{ticket},{review}and{worker}filled in.
The limit: 4 FAILs since the last PASS
Section titled “The limit: 4 FAILs since the last PASS”A branch gets at most 4 FAIL reviews since its last PASS, or since its first review without one, each of the first 3 handed back by itself (below, “Hand-back”), so rounds 2 to 4 start without anyone. Reviews that run, ended with no verdict, or reviewed another branch do not count; a worker’s new branch starts again at 0.
- The fifth review is refused:
refused by delivery: 4 FAILs on arthur/<id> since its last PASS: <review job>, <review job>, <review job>, <review job>; the owner decides what comes next, and only on his word: arthur review <id> --round 5.arthur reviewprints the procedurepackages/delivery/roles/coordinator/review-limit.mdafter it, and the wake of the review that made the fourth FAIL carries the same procedure. --round <n>(the task’sRound: <n>) starts it, on the owner’s word only:nmust be the FAILs plus one, elseround <n> is not the next one of arthur/<id>: it has <fails> FAILs since its last PASS, so the next round is <fails + 1>.
Hand-back
Section titled “Hand-back”While arthur run runs, a FAIL hands the branch back to its worker, with no step of the coordinator’s (other processes, such as an arthur command, never act on one):
- The FAIL is filed, as
arthur ticket filedoes (below); the coordinator commits the file (arthur commit-board) and prunes the review. - Below the limit, the worker is continued, as
arthur continuedoes, with the instructionReview <review job> of your branch arthur/<id> says FAIL. Fix every finding below, run the project's checks, commit, and end: Arthur reviews the branch again when you end., then## The review's final messageand that message; and a new budget: its budget again on top of what it spent ($2with$1.25spent is$3.25), a budget of 0 (no limit) left as it is. - When the worker’s run ends
finished, the next review starts, asarthur review <id>does, at the branch’s new tip. A run that ends otherwise (failed, stopped, a limit) ends the hand-back, and the coordinator deals with it as with any worker; one that endsblockedkeeps it, and its next end counts. The worker’s wake says while its hand-back goes on:<id> is in delivery's hand-back after FAIL <review job>: delivery starts the next review of arthur/<id> itself when a slot is free; run no arthur review-needed or arthur review for it.A tip whose job’s checks did not pass there (arthur review-needed --help, “Before a review”) starts no review: the worker is continued once more, as in step 2 with the same budget rule, with the instructionArthur starts no review yet: <the refusal>. Commit your work, then run the project's check, test and mutate scripts (npm run check, npm test, npm run mutate) on the committed tip, change nothing after them, name each mutant that survives in your final message, and end: Arthur reviews the branch when you end., and step 3 comes again. A second miss in the same round ends the hand-back: the coordinator gets the refusal as<error>below. - That review’s verdict: a PASS ends the hand-back; a FAIL starts it again from step 1, and when it is the fourth FAIL since the last PASS, it stops after step 1: the wake carries the limit’s procedure. No verdict ends it too.
- Each continue and spawn goes through every plugin’s
beforeSpawn, somaxAgentsholds. Another plugin’s refusal (refused by <plugin>: ...), atmaxAgentsor for want of room, keeps the step: it is tried again at the next end of any run, when a slot may be free, and at the next start ofarthur run. A refusal bycore(the worker’s ticket cannot move to in-progress, merged or dropped meanwhile) or bydelivery(the review’s, its ticket moved to planned by hand), which no freed slot lifts, and any other error end the hand-back, and the coordinator gets, once,Delivery's hand-back of arthur/<id> after FAIL <review job> stopped: <error>. Hand it back yourself: arthur continue <id> '<the findings of <review job>>', then arthur review <id> once it ends.A filing that fails saysDelivery could not file FAIL <review job>: <error>; file it with arthur ticket file <ticket> <review job>. arthur stopall(/stopall) cancels every hand-back: one waiting for its worker’s end or for a slot starts nothing more, a FAIL that ended just before it is filed but not handed back, and a continue or review that was starting as it came is stopped again,blockedonuser: arthur stopall cancelled delivery's hand-back.- A dropped ticket ends its hand-backs (AR0555): the drop ends the hand-back of each of its jobs and prunes them (
packages/delivery/docs/delivery.md, “A ticket’s jobs”), and a review of it that ends after the drop is neither filed nor handed back, its wake saying onlyReview <id> ended on <ticket>, which is dropped: it is not filed, nothing is handed back, and delivery prunes it with the ticket's other jobs. Nothing to do.; the coordinator is never told to hand back a dropped ticket’s work. A merge ends the hand-backs of its ticket’s jobs likewise. - Each hand-back is kept in
<home>/delivery/hand-backs/<worker job>.json, so a restart ofarthur rungoes on with it; a review that ended whilearthur runwas down is acted on at its next start, when it delivers the events it missed.
Refused
Section titled “Refused”Before any job exists, exit 1:
- No such job:
arthur review: no job <name>; arthur jobs lists them. - Not a worker:
<id> is a <kind> job; a review is of a worker's branch; still in a run:<id> is in a run (<state>); review its branch once the run has ended. - A worker whose task names no ticket, or several:
<id>'s task names no ticket; a review is of one ticket's branch. - A branch gone from the main checkout:
arthur/<id> is not in <folder>: pruned, or not brought back from its machine; a branch that adds nothing to HEAD:arthur/<id> at <commit> adds nothing to HEAD (<commit>): nothing to review. - A tip
arthur review-neededansweredno reviewfor (arthur review-needed --help), as<home>/delivery/review-needed/<id>.jsonkeeps it:arthur review-needed answered "<answer>" for arthur/<id>'s tip: it merges without a review; no review starts. A review of that tip would outrank the answer at the merge (arthur merge --help), and one stopped without a verdict would then hold the merge back. Ano reviewfor an older commit, or areviewanswer, refuses nothing. - A tip without the job’s checks passed there:
arthur/<id> at <commit> is reviewed only once the job's checks passed on its clean tip (check and test pass, mutate ran at least min(100, all) mutants): <what is missing>(arthur review-needed --help, “Before a review”). - As
refused by delivery: <reason>, forarthur reviewandarthur spawn --kind reviewalike: a task without exactly oneTicket: spec/features/<id>-<slug>/ticket.md; a ticket not on the board; a ticket that is notin-progress,reviewordone(<id> is planned; a review is of a ticket in-progress, review or done); noBranch: arthur/<worker job>andCommit: <sha>lines before the task’s first blank line; the limit above; then any task that is not whatarthur reviewwrites now, a hand-written one, another commit, a worker in a run or a tip moved since, and a review spawned in a project other than its worker’s:a review's task is what arthur review writes; spawn it with arthur review <worker job>.
Wrong usage (no job, two, an unknown flag, --round twice or without a whole number of 1 or more) prints the usage line and exits 2.
Filing
Section titled “Filing”arthur ticket file <id> <review job> (arthur ticket --help) files a review that finished as the next review-N.md in the ticket’s folder, one above the highest N there, and prints its path: # <id> - Review <N>, - Job: <review job>, - Branch: arthur/<worker job>, - Commit reviewed: <commit>, - Verdict: PASS or FAIL, then ## Final message and the final message as it is. It never replaces a file and never files a job twice: <job> is already filed as <path>; a second filer that took the same N meanwhile: <path> was written meanwhile; file <job> again. Refused too, by the core: a review that did not finish, no verdict included (<job> ended ended (failed: no verdict: ...), not finished: its result is unfinished and is never filed; prune it); and by delivery, a job it has no record of. The coordinator commits what was filed with arthur commit-board (arthur commit-board --help).
arthur take-main
Section titled “arthur take-main”Usage: arthur take-main [--decision <id>] [--project <name>]. Comes with the delivery plugin (AR0441). For one project, the main one unless --project names another. A job may not run it.
Takes main as it is, on the owner’s word: arthur merge refuses a branch while main has a commit that changes code since the last merge arthur merge made, or no longer holds that merge on its first-parent line (arthur merge --help, “Refused, touching nothing”). Once the owner has read those commits and keeps them, this command records main’s HEAD in <delivery folder>/<project>/last-merge (.arthur/delivery/<project>/last-merge), the file each merge that went in writes with its merge commit, written under a temporary name and renamed; the next arthur merge lists main’s commits from there. It prints took main of <project> as it is at <commit>: the next arthur merge lists code commits from there. It changes nothing in the repository: no commit, no merge.
Only with --decision <id>, the owner’s recorded decision of kind merge, for no ticket and no job, which the orchestration plugin checks (call("decision.owner", { id, what: "arthur take-main", kind: "merge", use }), arthur decision --help, “What only the owner’s decision lets through”); a decision is used once. Record it first, <his words> his answer quoted from his own channel message, which names the decision id, never only the id, a sign or one word (arthur decision --help, “Answering”):
arthur decision ask --kind merge --question 'Take main as it is at <commit>, with <commits>?' --option 'Take it' --option 'Not yet'arthur decision answer <id> --decided 'take main as it is' --picked 1 '<his words>'arthur take-main --decision <id>Refused, exit 1, nothing written:
- No decision, or one orchestration refuses (an answer that did not pick option 1, its approval, included: AR0677):
<orchestration's refusal>; nothing taken. Without--decisionthe refusal names the ask to make,arthur take-main needs the owner's decision: arthur decision ask --kind merge --question '<what he decides>' --option '<the approval>', his answer recorded with arthur decision answer <its id> --picked 1, then arthur take-main --decision <its id>. - The project’s checkout whose own Git config sets a key that may name a program, as
arthur mergerefuses it:<file> sets <key>, …; nothing taken. - A project not in the list:
no project <name> in the project list.
Wrong usage (any word but --decision <id>, --decision without a value) prints the usage line and exits 2.