-
v0.7.0
Stablereleased this
2026-11-12 16:38:08 +00:00 | 32 commits to main since this releaseAdded
- The forgejo pack's
checksorder mails the Operator once when the checks of an open pull request's head settle, so that nobody polls the forge for it:CHECKS <bead>: <success|failure> <pr_url>, with the head and each context's status in the body, fromcontrollerwith--notifyand--dedup checks:<bead>:<sha>. Every two minutes, for each bead of its store that carries a pull request (an open bead with apr_url, or a closed one withmerge_result=pull_request; not a bead withpr_eventorreview_head), it reads the head's combined checks aspr state --jsondoes and mails when they aresuccessorfailureand the last head and state it recorded for that bead, inchecks-<rig>.jsonunderGC_PACK_STATE_DIR, are not those. A change of state on the same head while the earlier mail is unarchived is held back and sent after the archive. More than three beads owed in one run are one mail that lists them. The logic isforgejo order checksin the Go tool;assets/scripts/checks.shstarts it. A city gives the orderFORGEJO_TOKEN_FILEwith an[[orders.overrides]]entry namedchecks, as formerge. - A city that imports the forgejo pack at the city level gets a Reviewer of its own,
forgejo.reviewerwith no rig, which reviews the pull requests of the city's own repository from the HQ store with the same formula,mol-forgejo-review, and the same tool as a rig's Reviewer (Landing row L16). The agent has noscopenow, and the pack declares an on-demand named session for it beside the rig's. What differs for a repository that is no rig: Part 2 finds the repository by the origin ofGC_RIG_ROOT, or ofGC_CITY_PATHwhere there is no rig, and halts on a pull request that is not of it; the clone is under.gc/agents/reviewer; and Part 3 runs, on the merge result, the Quality Gates that the target's ownAGENTS.mdorCLAUDE.mdnames, read from the target branch asREVIEW.mdis, with--city "$CLONE"for a clone of the city repository. It never merges. A city that patches the rigs' Reviewer withrig = "*"has the city's patched as well and needs nothing new (the README's "The city's Reviewer" says so, and what a city that names its rigs one by one must add). - The
handoverorder mails the Operator once when a Worker hands a bead over: on eachbead.updatedevent it reads the events of the last 10 minutes, and for each bead whose latest state is open, carries apr_urland is assigned tohumanor to theuserof a rig'sformula_vars, it sendsHANDOVER <bead>: <pr_url>fromcontrollerwith--notify, a body of rig, title, branch and pull request, and the dedup keyhandover:<bead>:<pr_url>. The mails sent are recorded inhandover.jsonunder the pack's state directory, so a restart or the next tick does not send one twice. The Operator no longer has to watch a bead to learn that it waits for the user.HANDOVER_LOOKBACKandHANDOVER_USERSset the lookback and extra user names. - The roles pack has a Go tool,
roles, androles order handoveris its first command;roles/assets/scripts/handover.shis the stub the order'sexecnames. - The Operator's own settings, the roles pack's overlay
roles/agents/operator/overlay/per-provider/claude/.claude/settings.json, also allowSendMessageandListAgentsbesideBash(gc *)andBash(bd *). The Operator resumes a reviewing sub-agent withSendMessageand lists agents withListAgents, and the city's allow list, which every Claude session of the city takes, does not name them. Only the Operator has an overlay, so a Worker and a Reviewer do not get the two names. A city that imports this release has to copy the file, byte for byte, to its ownassets/overlays/operator/per-provider/claude/.claude/settings.jsonin the pull request that upgrades the pin: its CI step "operator overlay matches the roles pack" compares the two. tests/operator-overlay.shholds the overlay to this: its allow list and notification hook, that gc gives an overlay directory to the Operator and to no Worker or Reviewer of the city or of a rig, and that neither pack has a pack-leveloverlay/, which would go to every agent.- A Reviewer mails the Operator its result. Before this, a review bead's close was silent, and the Operator learned of a verdict only by watching the bead.
mol-forgejo-reviewnow sends, in Part 5 after the verdict is on the bead and before the bead closes, one mail to the escalation target: subjectREVIEW <work bead>: <pass|fail|void> <pr_url>(voidfor a head that moved or a pull request no longer open),--notify, and--dedup review:<review bead>:<head>, so a restarted Reviewer, which reads the verdict back from the bead, sends the same mail and does not stack a second. A mail that fails halts the Reviewer with the bead still open, so a restart finishes it.tests/reviewer.shasserts the order (verdict, mail, close of the bead, close of the step, acknowledgement) and runs the lines against a stubgc, for a pass, a fail, a void, and a close with no verdict. gc forgejo review take --bead <id> --step <id>takes a review bead for a Reviewer session and says whether the session is the one to review its head: of two review beads in progress for one head of one pull request, the one with the earlier claim reviews, and the other is voided with a note (taken, orduplicate <bead>with exit status 3).- A city can allow more than one Reviewer for each rig and for the city's own repository: the
max_active_sessionsof aforgejo.reviewerpatch is the number. The README's "More than one Reviewer" names what else a city raises with it (the rig's cap and the city's) and what each session costs. - Four skills of the Worker, loaded by the part that calls for each:
worker-rework(a bead that comes back with a pull request open),worker-worktree(what the commands of Part 2 do and what their failures mean),worker-gates(finding the gates, and reporting a failure on the base branch once) andworker-halt(halting).gc internal materialize-skillsputs them in an acp Worker's directory, as it does the skillworker.
Changed
- A pull request notes its change as a fragment, a Markdown file of its own in
.changelog/, and no longer as a line under[Unreleased]inCHANGELOG.md;test / changelogfails a pull request that adds none. - A release is cut with
go run sarak.sh/mikluko/changelog/v2/cmd/changelog@latest release, which folds the fragments intoCHANGELOG.md, deletes them and writes the version section; the README's "Releases" section says how. - The Go module is one at the repository root,
go.modwith the module pathsarak.sh/mikluko/gascitypacks, in place offorgejo/go.mod; it holds theforgejoand therolestool. The forgejo commands and themergeandscheduleorders find it from the pack directory as before. CI and the README rungo vet ./...andgo test ./...from the root. - The Operator's skill forbids every kind of watcher: no wait loop, sleep-and-check or background poller, whether of a bead's handover or of a pull request's checks. The Operator acts on mail, on the user, and on
gc bd listwhen the user asks for a listing, and the skill's "Do not wait" section now holds the table of mail subjects it reads:HANDOVER <bead>: <pr_url>(from thehandoverorder: review or merge is the Operator's to take, so it makes the review bead for that head as "After the Worker" says, until L15 lands, and tells the user),CHECKS <bead>: success|failure <pr_url>(from the forgejo pack'schecksorder; a failure is a rework bead; more than three beads in one run come as oneCHECKS: <n> pull requests settledmail that lists them) andREVIEW <bead>: pass|fail|void <pr_url>(failis rework,passis told to the user,voidneeds a review bead for the new head). Thehandoverandchecksorders and the Reviewer are in the city now, so the Operator has no gap to fill with a poller of its own.watch.sh,review-watch.shandtrial-watch.share named only to say they are deleted and not to be started.tests/formula.shasserts the rule, the five subjects and that no other file of the repository names the scripts. - The Operator's skill and the shared skill
cityfollow the factory review of 2026-11-12. The Operator routes by default: a bead is filed and slung in the same turn, every ready bead of the city's work is slung, and one is held back only for a stated reason that names what ends the wait, written on the bead as the labelparkedand a note (gc bd list --label parkedis the list); it reads a bead that someone else filed, or that is parked, before it slings it. It routes the user's own tickets only on the user's word, and tells them bycreated_by. A bead for a Worker quotes the excerpt and the command that checks the result, and does not say "read docs/x.md". It says who reviews and merges at this release: a rig's Reviewer reviews on a review bead, which the Operator makes until the review order (L15) lands, and the Operator never reviews or merges; thescheduleorder (L12) merges where it is on, and the user where it is not. The Operator does not wait on a pull request, a check or an agent and starts no shell that wakes it; what needs it arrives as mail. A long turn is cut into steps that end, decisions go to the user in a question dialog of up to four questions, and state lives on beads, not in mail to itself. The Rework and Escalations sections say the same.tests/formula.shasserts each rule by its phrase in the two skills. - The Reviewer is a pool that starts empty and takes the beads routed to it, as the Worker is, and no longer an on-demand named session: gc holds the demand of a template that backs a named session to one session, so a higher
max_active_sessionswould have done nothing. The default is still one session, andgc sling <rig>/forgejo.reviewer <bead>routes a bead as before. - Each Reviewer session works in a directory of its own,
.gc/agents/<rig>/forgejo.reviewer-<n>(the city's:.gc/agents/forgejo.reviewer-<n>), where every session of a rig started in.gc/agents/<rig>/reviewer. Clones left in the old directory stay where they are. mol-forgejo-reviewtakes its review bead withreview takein Part 1 and asks again in Part 4 before it posts, and then looks for a review of the head by its own account on the forge, which a rival that closed first leaves.- The step of
mol-worker-workis under 8000 characters, down from about 24000. It keeps the six parts, their order and their commands, and begins by telling the Worker to read the work bead, its description and notes, and to open a design document only at the lines the bead names.tests/formula.shfails a step past 8000 characters. - Part 1 of
mol-worker-workprintsWORK_BEAD_IDandBRANCHonce, and Parts 3 to 6 take them from there, where each part derived them again from the input convoy. - A Worker halts through the skill
worker-halt: its commands are no longer in the step, where Part 2 and Halting each held a copy.
Fixed
- Mail an order sends no longer reads as the user's own.
gc mail sendtakes its sender from--from, else fromGC_SESSION_ID,GC_ALIASorGC_AGENT, else it writeshuman, and an order runs under the controller with none of the three, so themergeorder's mail ("Pull request closed unmerged", "Pull request merged"), theupgradeandapplyorders' failure mails and thepermission-requestorder's mail all showedhuman → operator. Everygc mail sendof the two packs' orders now passes--from controller: the three offorgejo order mergeand thescheduleorder's (forgejo/assets/forgejo/order.go), and one each inapply.sh,upgrade.shandpermission-request.sh.controlleris the one form, since at the city's gc pin (6bd609f) a--fromis accepted only when it names a live session, a configured named session, orhumanorcontroller, the two names gc reserves;--from order:mergeis refused withinvalid sender "order:merge": session not found, so an order's own name cannot be the sender. The mail log readscontroller → operator, and the subject says which order wrote it. gc lets a caller with no session identity, as an order is, claim any sender, so the mail is accepted; a Worker's mail is unchanged, as it comes from a session, whose id and namegc mail sendtakes fromGC_SESSION_ID(the log showsroles__worker-<session id>for a Worker on an acp box, as tried). The Go tests oforder.goandtests/apply.shandtests/upgrade.shassert the--fromof every mail;tests/permission-request.shis new, run by thescriptsjob, and asserts it for thepermission-requestorder, which had no test. - The
scheduleorder tells a pull request that conflicts with its base by what the forge says of the pull request, not by the words of the forge's refusal. The trial of 2026-11-12 on a scratch repository found that Forgejo 17.0.1 answers405 "Please try again later"to the merge request of a conflicting pull request, with no "conflict" in the message, so the order's match on that word never hit and every conflicting pull request would have become a bead for the Operator instead of going to rework (gascitypacks-uuv). Onforge_refusedthe order now reads the pull request with the code ofpr state(the pull request alone, no checks or reviews) and acts on itsmergeable:not_mergeableis the rework order's, so the order makes no bead for the Operator and only keeps its clock (auto_merge_troublewith the reasonnot_mergeable; two hours in a row is still the onestuckbead);mergeableordraftis a refusal for another reason (a work-in-progress title, an account that may not merge) and is one bead for the Operator, as before. The forge'smergeableis a bare boolean, false for a conflict, for a conflict check still running and for one that failed alike, so the order takes the three as one and asks again every cycle: a check that was still running ends with the merge scheduled and the record removed. A pull request that is not open when read is left to the next cycle, and one that cannot be read is retried. Go tests carry the forge's real answer (405, "Please try again later") for a pull request withmergeablefalse, true and a draft; the other answers of the order are unchanged, and the order is still switched off by default. - The
applyorder builds rexcity and its tools when one is missing, removes a tool rexcity stopped declaring, and no longer fails silently while installing. It used to build only in an apply that moved the locked rexcity commit, so a city whose bin directory lackedrexcity, itsgc-runtime-rexlink or a declared tool (claudeacp, which the acp box needs) was never repaired. Now any apply that has anorigin/mainto apply also builds whengo list toolnames a tool, orrexcityor the link, thatREX_BIN_DIRlacks. An install writes the names it put there toREX_BIN_DIR/.rexcity-installed, and the next one removes those a later rexcity no longer declares; a file the record does not name is never touched, and a city installed before this change has no record, so a stale tool of it (claude-acpof rexcity 0.29.0 and 0.30.0) is removed by hand once. A failinglnormvafter a good build mails the Operator ("rexcity install failed") instead of exiting without a word, the scratch.build.*directory is removed when the run ends, and one a killed run left, older than an hour, is swept by the next.tests/apply.shtakes the tool from a module of its own that rexcity requires, as rexcity's is, and runs with a module cache of its own, so it adds nothing to the default one. - A Reviewer's prompt, for a review bead assigned by hand with no workflow behind it, has it hand the bead to the Operator (
--assignee roles.operator --status open) and mail it beforegc runtime drain-ack, which gc refuses while the session holds a bead it claimed. The first such session stayed up, holding its rig's one Reviewer seat, until the Operator closed the bead (gascitypacks-imy). - The
mergeorder no longer reports old history as news, takes a 404 for a closed pull request, or floods the Operator. Its first run in a store, on 2026-11-12 in rexcity's, made 29 beads and 29 notifying mails for pull requests another city had closed days before, and setmerge_result=closedon their beads, because the forge answered "not found" for them (they are gone from the forge: the API, the web page and the issues API all answer 404, and the numbers 16, 25 and 31 to 60 are missing from its numbering). Three changes: (1) The first run in a store, the one that finds no closed bead withpr_event=baseline, is its baseline: a pull request that has ended by then (merged, closed unmerged or gone) is history, recorded on its beads as it ended with no bead and no mail for the Operator, and the run leaves the marker, a closed bead, behind. A pull request that is still open at the baseline is not history, so it is told when it ends; a pull request the baseline could not read is left and is news later. (2) A "not found" for a pull request is recorded asmerge_result=missing, neverclosed, which means a person closed it unmerged. Forgejo answers "not found" for a pull request in a repository the token cannot read as well, so the order asks for the repository too, and settles nothing, and fails the run with the reason, when that is "not found" too, or fails otherwise. (3) A run that would tell the Operator of more than three pull requests of one kind (merged, closed unmerged, not found) files one bead that lists them,pr_event=closed_batchormissing_batch, and sends one mail, or one mail for the merges; the same for the open beads of the old shape, which are still assigned one by one but get one mail for each kind when there are more than three. The baseline run also rereads the beads recorded asmerge_result=closedand recordsmissingon those whose pull request the forge does not have, which corrects rexcity's 29 on the first run after the import, with no mail. - Part 2 of
mol-worker-workhas the Worker read the repository'sAGENTS.mdandCLAUDE.mdat the worktree's root once it is on the bead's branch, so a seat's first session on acp, which starts in the plain directory before the worktree exists, follows them as later sessions do; the repository's.claude/settings are still read at session start only.
Downloads
-
Source code (ZIP)
1 download
-
Source code (TAR.GZ)
1 download
- The forgejo pack's