-
v0.9.0
Stablereleased this
2026-11-12 20:38:36 +00:00 | 5 commits to main since this releaseAdded
- The roles pack's
failuresorder mails the Operator when an order keeps failing, which nothing read before: gc records each failed run as anorder.failedevent and each run that went through asorder.completed, both with the order and its scope as the subject (merge:rig:rexcity), and in the 24 hours to 2026-11-12 15:35 the log held 138 failures, 128 of them themergeorder of one rig reading a forge that answered 503. When an order has failed three runs in a row (FAILURES_STREAK) it sendsORDER FAILING <order>: <n> runs in a rowfromcontrollerwith--notify, a body of the order, the count, the first and last failure and the end of the last error, and the dedup keyorder-failing:<order>:<seq of the first failure>; when that order runs again it sendsORDER RECOVERED <order>, without--notify, withorder-recovered:<order>:<seq>. A streak that ends before three mails nothing, and each order and scope is counted apart. The order hasscope = "city", so it runs once and not once per import of the pack, and it says on stderr when its last run is older than the lookback. The order is a five-minute cooldown order and not one onorder.failed, since the mail that an order runs again has no failure to wait for. It reads the events of the last two hours (FAILURES_LOOKBACK) above a cursor kept infailures.jsonunder the pack's state directory, so each event is counted once and the streak of an order that runs daily lasts across days; a mail that failed is sent by the next run. The logic isroles order failuresin the roles Go tool, andassets/scripts/failures.shstarts it. FORGEJO_TOKEN_COMMANDin the forgejo pack: a command, run withsh -c, whose trimmed stdout is the Forgejo API token. When it is set it wins overFORGEJO_TOKEN_FILE, and a command that fails or prints nothing is an error, not a fall back to the file; the error carries the command's stderr, cut to 300 bytes, and never its stdout. Every reader in the pack's Go tool (pr open,pr state,pr merge,pr review,pr comment, and themerge,checks,scheduleandrevieworders) takes it through one function, so a city can keep its token in a secret store and set the command that prints it, and the pack stays agnostic of the store. The command runs in the pack's directory with the environment of the process that started the tool. The Go tests (forgejo/assets/forgejo/token_test.go) carry the file, the command, the command beating the file, a command that fails, prints nothing or writes a long stderr, and the tool's commands reading the token from the command.gc forgejo token, which prints the token as the tool reads it, from the command or the file, for the one reader that is not the tool, the Reviewer's formula. It takes no argument, prints nothing and exits 1 when there is no token, and 2 for an argument. Its help says the token goes in the header of the request it is for and nowhere else.- A line in the Worker's prompt: the Forgejo token is a secret it never reads, neither the file, nor what
FORGEJO_TOKEN_COMMANDorgc forgejo tokenprints; it opens, reads and comments on pull requests with thegc forgejo prcommands, which read it themselves.tests/formula.shchecks the line in the prompt as gc renders it. tests/doctor.sh, run by thelintjob: the doctor for a file, a command, both, neither, and a command that fails or prints nothing, and that it never prints the token and runs the command once.gc roles versionprints the version of the roles pack's Go tool,roles/assets/roles, which also runs thehandoverorder. It starts asgo tool -C "$GC_PACK_DIR" roles version, as the forgejo pack's commands start their tool.internal/gcx, the code the two tools share, starting with the lookup of the city's Operator, which the forgejo tool'smerge,scheduleandchecksorders now take from it.internal/budget, a Go test run bygo test ./..., holds the packs' shell to the rule ofdocs/shell.md: it measures each unit of shell and compares it with the new ledger,docs/shell-ledger.txt, which lists the 10 units that exist and are over a threshold. CI runs it as its own step of thelintjob in warning mode, so it prints what it would fail and passes;SHELL_BUDGET=failmakes it fail.tests/pack-cache.sh, run by CI, starts both tools from a copy of the checkout as gc's pack cache holds one, offline and throughgc.REVIEW.mdstates the shell rule for the Reviewer, and the Worker's skill carries the same three paragraphs.- The Researcher's Perplexity server reads its key from
PERPLEXITY_API_KEY_COMMANDwhen that variable is set and not empty: the command is run withsh -cand its standard output is the key. A command that fails, or prints nothing, ends the start and does not fall back to the file. - The
rolespack carriesmol-researcher-work, the Researcher's formula, which its agent already names asdefault_sling_formula: one step of five parts (read the bead and mark it taken, scope the question, investigate, check, post), held by one session from the claim to the close. The Researcher posts its findings as one comment headed[research-<bead id>]on its own bead, then closes the bead with the reasonFindings posted: [research-<bead id>],gc.work_outcome=no-opandgc.work_verification, then closes the step and acknowledges the drain. The bead gets no branch, pull request or merge result. A restart counts the comments before it posts, so a comment is never posted twice. A bead that is not a question, or is a decision or a change, is halted to the Operator with the reason, as a Worker's is, with the commands in the step. - The formula's
bashblocks are 24 code lines, under the 60 thatdocs/shell.mdallows a formula, so it needs no Go tool. tests/researcher-formula.shcompiles the formula in a throwaway city and checks that it is one step of five parts, that the step is closed as passed once and as failed only by a halt, the order of its writes, that it runs no git command but a clone, norm, no sling and no write to a bead but the work bead and its step, its size, and its 60 code lines; it runs the lines that write the beads against a stubgc. CI runs it.- The README says what the trial by hand found: under
full-autoa call of the Agent tool is refused and nothing prompts; the tool names of the allow list are Claude Code's own; claudeacp acceptsfull-auto; and an allow list cannot limitBashto commands that only read, because the city's list allowsBashas a whole and a deny list names only the commands it lists. gc roles waiting [--json] [agent]andgc roles nudge [agent], two commands of the roles pack's Go tool that answer what waits on an agent and nudge it once: the logic of the city'soperator-nudgeorder, which gascity-root#44 wrote as an 18-line shell script and whose review found two defects of the kind a test catches. A bead waits on an agent when it is assigned to it and not closed (open, in_progress, blocked and deferred count alike), in the HQ store and in the store of every rig, read withgc bd list --assignee, with the HQ store read as the city's own whichever rig the caller stands in.waitingprints one line for each bead (id, status, store and title, separated by tabs), or with--jsonone object withschema_version("1"),agent,countandbeads.nudgesends onegc session nudgewith the line<n> bead(s) wait on you: <up to five ids>(andand moreafter five) when at least one bead waits and no nudge to the agent's session is pending or in flight ingc nudge status, and sends nothing otherwise. The agent is$OPERATOR, else the one city-scoped agent namedoperator, when none is named; both commands take gc's--city, which they give to everygccall. A store that cannot be read, the list of the rigs, and the nudge queue are errors that name what failed, with exit status 1:waitingprints nothing andnudgesends no nudge, not even for the stores that could be read, where the shell script took a failed HQ store or any rig but the last for "nothing waits" and a failedgc nudge statusfor success. Both read every store and the queue in each run, so a queued nudge does not hide a failure. The Go tests (roles/assets/roles/waiting_test.go) carry those cases with and without beads in the other stores, the five-id limit, the queue states, the--cityon every call and the command lines;tests/waiting.sh, run by thescriptsjob, tests the wrappers and the real tool against a stubgc. The README says what the city's order becomes (exec gc roles nudge) and how the Operator learns that an order keeps failing: from thefailuresorder.
Changed
- The roles tool's lookup of the Operator, its state directory and its atomic write of a state file are in
roles/assets/roles/common.go, shared by thehandoverandfailuresorders.handover.jsonis written as before. - The Reviewer's formula
mol-forgejo-reviewtakes its token from$(gc {{forge}} token)in each of the six places where it read$(cat "$FORGEJO_TOKEN_FILE"), so it and the tool cannot disagree about where the token is;tests/reviewer.shpins that every request of the formula is authorized that way and that no line of it namesFORGEJO_TOKEN_FILEorFORGEJO_TOKEN_COMMANDbut to say that no other agent's names the Reviewer's token, and its stubcurlrefuses a request that does not carry the token the stubgc forgejo tokenprints. The Reviewer's prompt says the account is the one whose token the pack'stokencommand prints. A Reviewer started by a city that sets onlyFORGEJO_TOKEN_FILEreads the same file as before. - The doctor of the forgejo pack accepts either variable: with
FORGEJO_TOKEN_COMMANDset it runs the command once and exits 2 when it fails or prints nothing, without showing what it printed; with neither variable set it exits 1 and says neither is set. Its message for a readable file is unchanged. - The README says where the token comes from, including that the command wins over the file even when the file is the agent's own and the command the workspace's, so a city that moves to the command moves every place that names the token. The help of
pr open,pr state,pr merge,pr reviewandpr commentsays the same. - Breaking: the Researcher's Perplexity server no longer reads
~/.config/gascity-root/perplexity-token. WithoutPERPLEXITY_API_KEY_COMMAND, it reads the file named byPERPLEXITY_API_KEY_FILE, and with neither variable set it does not start. A city that kept the file setsPERPLEXITY_API_KEY_FILEto its path in theenvof a patch ofroles.researcher. - The README's section on the Researcher no longer says that its formula and its skill are not in the pack yet.
Fixed
- The
applyandupgradeorders no longer fail when they fire together. Both fetchorigin/maininto the city repository, and git lets only one of two concurrent fetches that find it moved updaterefs/remotes/origin/main: the other failed with "cannot lock ref" and mailed the Operator, and the merged change waited for the nextapplyrun. Both now fetch throughroles git fetch <repo> <branch>, a command of the roles pack's Go tool that runs the fetch again, up to five tries 0.2 to 0.6 seconds apart, when it lost the lock on the ref; by then the ref is where the first fetch put it. Any other failure, and a lock still lost after the last try, still fails and still mails the Operator. The orders retry rather than take a lock of their own because a lock shared across two scripts needs a stale-lock rule for a run killed outright, and retrying also covers a fetch the user or a Worker runs in the city directory. Theupgradeorder now needsgoon the supervisor'sPATH, asapplyalready did. - The
scheduleorder no longer takes an open review bead for a Worker on the pull request. When the head of a pull request moved to one no bead holds, it raisedno_workeronly if no open bead carried the pull request's URL, and a review bead (pr_url,review_head) is open while the pull request is under review, so the Operator was never told that someone pushed to a branch nobody was working on. A bead that carriesreview_headis now skipped, as one that carriespr_eventalready was.
Downloads
-
Source code (ZIP)
1 download
-
Source code (TAR.GZ)
1 download
- The roles pack's
-
v0.8.0
Stablereleased this
2026-11-12 19:27:23 +00:00 | 14 commits to main since this releaseAdded
- The
applyorder installs the changelog checker aschangeloginREX_BIN_DIR, with a new command of the roles tool,roles changelog install <pin-file> <bin-dir>, thatapply.shcalls in three lines. It is built at the version thatchangelog.pinin the city repository names (module@version, assarak.sh/mikluko/changelog/v2@v2.0.1). It builds when the installedchangelogis not that build, moves it into place only when the build succeeded, and, when the build fails, mails the Operator, keeps the oldchangelogand does not move the city directory. A city with nochangelog.pingets nochangelog. gc forgejo pr comment --repo <worktree> --pr <url|number> --body-file <path>posts one comment on a pull request as the account of the token, and with--jsonprints the comment's id and URL; an empty body is refused with exit status 2. The Worker'sworker-reworkskill uses it for the note that a round of rework is done, in place of acurlto the forge.- The
rolespack carries the Researcher,roles.researcher: a pool of the city, at most two sessions, that takes a bead of any store routed to it withgc sling roles.researcher <bead>. It runs on an acp box in gc'sfull-automode and claims withgc hook --claim --drain-ack --json. Its formulamol-researcher-workand its skillresearcherare not in the pack yet. - The Researcher's settings,
roles/agents/researcher/overlay/per-provider/claude/.claude/settings.json, deny theAgent,Edit,WriteandNotebookEdittools, which the city's own allow list permits. - The Operator's startup prompt names the Researcher's pool,
roles.researcher, beside the Worker's two. tests/researcher.shresolves the Researcher in a throwaway city and checks its agent, its prompt, its settings and the Operator's line.- The Researcher has Perplexity, its own and no other agent's:
roles/agents/researcher/mcp/perplexity.tomldefines the official MCP server,@perplexity-ai/mcp-serverpinned to1.3.0, which an acp session receives in itssession/newrequest, sogc mcp list --agent roles.researchershows it and the same command for the Worker or the Operator shows none. Its key is the file~/.config/gascity-root/perplexity-token, read when the server starts and written into no tracked file; the README gives thebaocommand that makes it. Its allow list is to nameperplexity_searchandperplexity_askand nothing else of Perplexity. - The
researcherskill says Perplexity finds and is not a source: a claim in the findings cites the primary source that owns it, read with WebFetch or in a clone, never a Perplexity answer. It names the two tools the role may use to find where a claim lives (perplexity_search,perplexity_ask) and saysperplexity_researchandperplexity_reasonare not available to it. - The
researcherskill, the instructions of the Researcher role: it answers one question from primary sources and posts its cited findings as a comment on its bead; it comes from Matt Pocock'sresearchskill, with itsUPSTREAMfile and MITLICENSE. - The forgejo pack has a
revieworder: for each pull request head whose checks have completed, it makes the review bead (labelsserviceandreview,review_roundcounted) and slings it to the rig's Reviewer, once per pull request and head, for a bead handed over in either shape. - The
revieworder is off untilFORGEJO_REVIEW=onis in its environment, and holds its review back until the schedule order has marked the bead unlessFORGEJO_REVIEW_NEEDS_SCHEDULE=offis set. - A head whose checks have not started after half an hour becomes a bead for the Operator, with
pr_event=checks_not_started. gc roles view beads --rig <name>shows one rig's beads, and so doesgc roles view beadsstarted in a rig's directory or below it; started anywhere else it shows every rig, as it did.gc roles view beadshas the groups "in review" (a review bead of the bead is open), "in rework" (the bead has a pull request and a Worker holds it, the pool waits to, or its last review failed), "approved" (its last review passed) and "parked" (a count of the beads labelledparked).- The Worker's skill gives two rules to follow before it pushes, under "Handing over". The first: every sentence it wrote that states a fact about the code, in the README, the docs, a comment, the changelog fragment and the pull request's description, is checked against the commit it pushes, after its last change. The second: for each test it added or changed, it undoes the change the test is for, runs the test and sees it fail, then restores the change; the pull request's description says so and names any test for which it could not.
tests/formula.shholds the skill to both by their phrases.
Changed
- A Worker and the Reviewer run the checker as
changelogfromPATHand no longer build one. Where it is absent, a Worker runs no check, says so in the pull request and mails the Operator, one mail for the whole city while it is unarchived; the Reviewer says so in its review and sends no mail. - Breaking: the Worker and the Reviewer no longer set
permission_mode = "unrestricted"in theiroption_defaults: they take the city's provider default. A city that sets none gets gc's builtin default for the provider, which at gc 6bd609f isunrestrictedfor claude (--dangerously-skip-permissions), so such a city sees no change; a city that sets a mode of its own, such asfull-auto, now has it apply to both, and a city that wants the old mode for them alone patchesroles.workerandforgejo.reviewer. The README's "Permission mode" section says so, and the Reviewer's patch there no longer setspermission_mode. - Breaking: the Operator's
permission_modeisauto-edit(--permission-mode acceptEdits) in place ofunrestricted. The file tools come back,AskUserQuestionkeeps working, and the user is prompted in the Operator's tab for a call that no allow rule covers: a city must list inpermissions.allowof the settings file gc passes to claude what the Operator may run without asking, or it is prompted for everyBashcall. A city that wants the old mode patchesroles.operator. The README's "Permission mode" section says so, and the deny-permission skill no longer says that the agents it denies run in bypass-permissions mode. - The Worker's skill and the Reviewer's prompt tell the agent to read with Read, edit with Edit and write a new file with Write, not through Bash, and that a call the session's allow rules do not cover comes back as a refusal, which is not the end of the run: it goes on another way, and says in its pull request or review what it could not do.
- The Worker's skill no longer says that Claude Code asks for a permission on an
rm -rfof a computed path "in bypass mode too": the command is stopped and comes back as a refusal, and the rules on scratch files and on the hand-over stay. - The Reviewer's formula (
mol-forgejo-review) says the same of its rule on scratch files andrm: the command is stopped and comes back as a refusal, and a refusal of thermwould take the hand-over with it. Its phrases and the rule itself stay, and a test holds that the step no longer mentions bypass mode. gc roles view beadsshows what is in flight first: "with a Worker", "in review", "in rework" and "approved", one line for each bead with its pull request's number, before "waiting on you", "with the Operator", "queued" and "backlog".gc roles view beadsreads the claim mark ofmol-worker-work(in_progresswithworker_session) as a bead with a Worker, and shows the time the Worker took it instead of the step's title.- A bead assigned to the user that has a pull request in review, approved or in rework is no longer under "waiting on you" in
gc roles view beads. - A bead labelled
rework, or one with a pull request that is slung to a Worker again, is under "in rework" and no longer under "queued". gc roles view beadsreads the beads closed in the last day every 300 seconds, where it read them every 30, and at once when a bead leaves the list;VIEW_CLOSED_INTERVALsets the interval.
Fixed
- CI no longer runs a
gcbinary on the registry's word for its checksum.test.yamlkeeps the expected SHA-256 of the pinnedgcbesideGC_SHA, one per architecture (GC_SHA256_AMD64,GC_SHA256_ARM64), and runs the download only when it matches; the.sha256file the registry served beside the binary is no longer fetched. A download that does not match, or that takes longer than 180 seconds (curl --max-time), falls back to buildinggcatGC_SHA, as an unpublished pin does. Thelintandscriptsjobs setcache: falseonsetup-go, so the runner's cache service, which answers 500 on every save, no longer leaves a warning. ChangingGC_SHAnow means changing the two checksums with it. tests/formula.shcompilesmol-worker-workfrom the checkout whateverGC_CITYandGC_CITY_PATHsay, and counts the step in bytes whatever the locale, as CI does, so a Worker can run it in its session and agree with CI; the Worker's skill and Part 6 of the formula now say that fixing what a review sent back is the work while watching the run afterwards is not.- The
permission-requestorder mails each pending request on a host with jq 1.6, where it mailed none when its state file was missing or empty. pr stateno longer assumes the forge's pages hold 50 reviews: when a page of reviews comes back empty and the forge's total says more rows are left, it asks the forge for its page size (max_response_itemsin/api/v1/settings/api) and counts the rows against that, so a forge that caps a page below 50 cannot hide a review of the head behind pages of other accounts' pending reviews.- The
mergeorder no longer closes a review bead as shipped, or hands it to the Operator, when its pull request merges or closes. gc forgejo pr reviewposts the review again when the account's latest approval or request for changes of the head is the same event but the forge does not count it (officialfalse). Before this it posted nothing and exited 12,not_recorded, so an approval made before the rule on the base branch named the account could not be replaced by the tool: only a repository admin's dismissal or a new head freed it. Now it posts, reads the new review back as for any review, and sayspostedwhen it counts. When the new review is not counted either, it exits 12 as before, with the new review inreviewand both ids in the message. A stale review is still not posted again. The same holds for a request for changes, which the forge counts by the same rule. The Reviewer's own look for a review of the head inmol-forgejo-reviewis unchanged.- The Reviewer's formula,
mol-forgejo-review, carries the rules the Worker's skill got for scratch files andrm: scratch files go in a directory made withmktemp -dunder$TMPDIRand stay there; the Reviewer never runsrm, with or without-r, whatever its path: not on a path that comes from a variable or a command substitution, and not inside a script passed tobash -corenv -i ... bash -c, where Claude Code cannot resolve a path, a literal one included (a test that needs a file gone makes a new directory for each case, checks the file out from a commit that lacks it, or overwrites it with>); it never puts anrmin the command that hands a bead over; and a refusal of such a command does not end its turn, so it goes on without therm. Claude Code stops anrmon a path it cannot resolve with a permission prompt, bypass mode or not, and a Reviewer ofclaudeacpraised one on 2026-11-12 while it tried a changelog guard in a scratch repository, and one ofrexcityon the same day ranrm .changelog/bad.mdinside abash -cscript. The rule replaces the formula's "you remove nothing withrm -rf", which said nothing ofrmwithout-rand was not held by a test.tests/reviewer.shholds each rule by its phrase and fails if a command of the step runs anrm, inside abash -cstring or not. A review bead poured before the release keeps the old text, since the formula is poured into the workflow at the sling. tests/view-mail.shwaits for the stopped stream ofgc roles view mailto exit, so it no longer fails at random with "view mail left gc events --follow running".- The pane views read the size of the terminal they run on, with bash 3.2 as with bash 5, and read it again at every draw;
COLUMNSandLINESare used only where stdout is no terminal. Under bash 3.2 the views had cut and capped nothing. gc roles view mailno longer takes a message id that starts with-for an option ofgc mail peek.- The one line a view prints when
jqfails ends with a newline. gc roles view mailshortens a name with characters of more than one byte as it does one of ASCII, under jq 1.6 and 1.7.
Downloads
-
Source code (ZIP)
1 download
-
Source code (TAR.GZ)
1 download
- The
-
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
-
v0.6.0
Stablereleased this
2026-11-12 11:45:21 +00:00 | 48 commits to main since this releaseAdded
gc forgejo pr state --jsonprints a pull request's state as one JSON object on one line:schema_version("1"),state(open,merged,closed,missingorforeign),head(the head commit),base(the base branch),merge_commit(set for every merged pull request, null for the others; a merged pull request for which the forge names none is an error) andchecks, an object{"state", "completed"}for the checks of the head, whosestateisnot_started,pending,success,failureornone. The checks are the latest status of every context of the head, with all pages of them, and the workflow runs for the head: they have completed when no status is pending and no run iswaiting,runningorblocked. A head with no status and no run isnone, completed and no pass, when its tree holds no workflow file, andnot_started, not completed, when it holds one. The README says what the command prints for each state of a pull request and each outcome of the checks, and that no field of version 1 is removed or changes meaning. The rules of the other forms hold: only the forge's own "not found" ismissing, any other failure is an error with exit status 1 and nothing on stdout, a--pron another host or that is no pull request URL isforeignwithout a request, and the token goes to the forge's host only. Without--jsonthe command prints what it printed, with no further request, so themergeorder behaves as before.gc forgejo pr state --jsonalso printsmergeableandreviews, two fields added to version 1 (schema_versionstays"1"; the fields that existed keep their names and meaning, and an older caller ignores the new ones).mergeableismergeable,not_mergeableordraftfor an open pull request and null for the other states: Forgejo 17.0.1 answers a bare boolean that is false for a conflict, for a conflict check still running and for a failed one alike, sonot_mergeabledoes not say which, and the README says how a caller waits for a second read before it takes it as a conflict.reviewsis every review of the pull request, oldest first, for every state the forge has a pull request for (null formissingandforeign), each withid,account,team(the name of the team a review was requested of, where the forge gives no account),state(approved,request_changes,comment,pending,request_review,unknown, or another value the forge has, in lower case),commit,body,official,stale,dismissedandsubmitted_at. The README gives the two rules for deciding from them, with jq programs and a table of cases: whether the current head has an approval from the review account that counts, and whether a blocking review stands; it also says what a caller cannot know, since the branch protection and its whitelist are not readable with the city's token. The reviews are read to the end: Forgejo pages the list by row and then drops other accounts' pending reviews from each page, so a short page is not the last, and the tool reads on to an empty page that the forge'sX-Total-Countconfirms. The rules ofpr statehold: only the pull request's own "not found" ismissing, any other failure is an error with exit status 1 and nothing on stdout, a foreign--prgets no request, and the token goes to the forge's host only. With--jsonthe command now exits 1, with nothing on stdout, when the reviews of the pull request cannot be read or the forge gives an open pull request nomergeablefield, where the command before printed its object, since it asked for neither. Without--jsonthe command prints what it printed, so themergeorder behaves as before.gc forgejo pr merge --repo <worktree> --pr <url|number> --expect-head <sha> --target <branch>asks the forge to merge one head of a pull request when its checks succeed and its approvals are in, and prints what the forge answered. It posts{"Do": "squash", "head_commit_id": <sha>, "merge_when_checks_succeed": true}to the pull request's merge endpoint, so Forgejo lands it, as the account whose token the command uses, once the repository's required checks and approval are in; no agent merges. It refuses without calling the merge endpoint, with an exit status and areasonof its own for each case: 3head_moved(the head is not--expect-head, a full SHA), 4not_open, 5wrong_base(the base is not--target), 6no_diff(no changed file, no addition, no deletion), 7missingand 8foreign(no request is made). It printsscheduled,already_scheduled(the forge answered 409 for a pull request that has a scheduled merge) ormerged, with exit status 0, and exits 9 with outcomerejectedwhen the forge itself refuses with a 405 or 409.--jsonprints one object on one line, for a refusal too, withschema_version("1"),outcome,reason,state,head,base,merge_commit,forge_status,forge_messageandschedule_cancelled.--canceltakes a scheduled merge back and printscancelled, ornot_scheduledwhen there was none. The README says, from Forgejo 17.0.1's source, what the forge does with a scheduled merge: the schedule holds no head andhead_commit_idis ignored for it, a push does not remove it, so it merges whatever head the pull request has once the conditions are met, and the request never merges at once, so the command reads the pull request again after the forge's201and cancels its own schedule when the head has moved. The rules ofpr statehold: only the forge's own 404 ismissing, a 5xx, a timeout or a bad token is an error with exit status 1 and nothing on stdout, a foreign--prgets no request, and the token goes to the forge's host only.gc forgejo pr review --repo <worktree> --pr <url|number> --expect-head <sha> --event <APPROVED|REQUEST_CHANGES> [--body-file <path>]posts one review on one head of a pull request, as the account whose token the command uses, and checks that the forge recorded it as asked. It posts{"event": …, "body": …, "commit_id": <sha>}to the pull request's reviews endpoint, so the review is bound to the head the caller read. It refuses without posting, with an exit status and areasonof its own for each case: 3head_moved, 4not_open, 7missingand 8foreign(no request is made), aspr mergehas them, and 10own_pull_request(the pull request is by the account of the token, which the forge lets nobody review), 11empty_body(a request for changes needs a body). It reads the reviews back after the post, through the code ofpr state --json, and exits 12 with outcomenot_recorded, never a success, when the forge stored the review otherwise than asked: pending, a comment in place of a verdict, on another commit, stale, dismissed, an approval or request the forge does not count asofficial, or an approval after which an earlier request for changes of the same account still blocks. Asked again for the same head and event by the same account (its latest approval or request, on any page of the list), it posts nothing and printsalready_reviewed; otherwise it printsposted, both with exit status 0. A 422 from the forge is exit 9 with outcomerejected.--jsonprints one object on one line, for a refusal too, withschema_version("1"),outcome,reason,state,head,account,event,review,lifted,forge_statusandforge_message. The README answers question 7 of the city'sdocs/handoffs.mdfrom Forgejo 17.0.1's source, and says so inlifted: a new approval by an account clearsofficialon that account's earlier reviews, in the same transaction, so the approval of a newer head ends the account's own earlier request for changes by itself, and the command dismisses nothing (a dismissal takes a repository admin, and a push does not dismiss a request, only approvals). The rules ofpr statehold: only the forge's own 404 ismissing, a 5xx, a timeout or a bad token is an error with exit status 1 and nothing on stdout, a foreign--prgets no request, and the token goes to the forge's host only.- The Reviewer,
forgejo.reviewer, and its formulamol-forgejo-review(row L14 of the city'sdocs/handoffs.md): the pack's agent that reviews one head of one pull request of its rig and posts its verdict on the forge, a port of rexcity'smol-forgejo-pr-reviewless its wait for the checks. The agent is a rig's named session ([[named_session]]inforgejo/pack.toml,mode = "on_demand"),max_active_sessions = 1,session = "acp",permission_mode = "unrestricted", claiming withgc hook --claim --drain-ack --json; the city's own import makes none. The formula is one step of five parts, held from the claim to the close as the Worker's is. It works a review bead that namespr_url,review_headandwork_bead: it voids the bead (review_verdict=void, nothing posted) when the pull request is not open or its head is notreview_head, halts when the checks of the head have not completed, and otherwise reads the work bead and the pull request's description, the whole diff, the target branch'sREVIEW.md,AGENTS.md,CLAUDE.mdandREADME.md(from the target, never from the pull request), the merge of the head into the current target, what the repository's workflows run (in a clone of its own, with the city's variables removed withenv -i) and the head's own checks, of which a failed one is read, reported and never approved. It posts one review on that head withgc forgejo pr review --expect-head(APPROVED, orREQUEST_CHANGESwith its findings as the body; a pull request that does not merge cleanly gets a request that says it needs a rebase), and writesreview_verdict(pass,failorvoid),review_reviewed(the head),review_urland a note on the review bead, then closes it with the work outcomeno-op. The verdict is written after the review is on the forge and read back from it, so a restart posts nothing twice. It never merges, pushes or changes the work bead, writes only the review bead and its own step, and mails the Operator when it halts. The place where row L7's handoff check of the review bead belongs is marked in Part 1 and nothing calls it, since the check does not exist yet. The city needs a patch offorgejo.reviewerfor every rig (the acp provider, the model and effort its pin check demands,max_active_sessions = 1and the review account's token file asFORGEJO_TOKEN_FILE), which README section "The Reviewer" gives, and which the pull request that bumps the import carries. How a review bead reaches the session, by a sling or by an assignment, is question 4 of the city'sdocs/handoffs.mdand a trial's to settle; a bead assigned with no workflow makes the Reviewer mail the Operator and exit.tests/reviewer.sh, run by thelintjob, resolves the agent in a throwaway city, compiles the formula, checks its safety rules and the order of its writes in its text, and runs the lines that read and write the bead against a stubgcandcurl. gc roles view beadsleaves out a bead labelledservice, as it leaves out gc's other bookkeeping:bookkeepinginroles/assets/jq/view.jqtells it by the label, never by the id. The label is for a bead a pack makes for an agent and no person works, such as the review bead of a coming order, which carriesserviceandreview; a rework bead carriesreworkand is work, so the view's groups show it, queued or being worked, as they show any bead, and a convoy withgc.syntheticis left out whatever its labels. A bead with no such label reads as before. The three labels are spelt once, aslabelsinview.jq, for the orders that will put them on withgc bd create --labels, andtests/view-beads.shpins their values and shows with beads of the fixture that a service bead is left out whoever holds it, that a rework bead is queued and that a synthetic convoy is still left out. The Operator's skill says how to list a store without them:gc bd list --exclude-type convoy --exclude-label service. gc's own input convoys stay in a barebd list, which only gc can change.forgejo order merge, a subcommand of the forgejo pack's Go tool, is themergeorder's logic: the order's script is now one line that runs it asgo tool -C "$PACK_DIR" forgejo order merge. It settles both shapes of a bead that carries a pull request. An open bead with apr_urlis settled exactly as the script did: closed as shipped at the merge, whoever holds it, with no mail; handed to the Operator with a--notifymail andpr_closedwhen the pull request closed unmerged or is gone from the forge, once per URL; skipped with a line on stderr when the pull request is another forge's. A bead closed when its pull request opened, withmerge_result=pull_request(listed by--status closed --has-metadata-key merge_result), getsmerge_result=mergedandmerged_shaon it and on every bead of the same pull request when the pull request merged, and the Operator is mailed once for the merge (--notify,--dedup merge:<url>); when the pull request closed unmerged or is gone, the beads getmerge_result=closedand the Operator gets one bead (pr_url,pr_event=closed, assigned to it) and one mail for the pull request, whichever the number of beads. The order reads a pull request with the codepr stateruns on, once for each pull request in a run, with no request for its checks or reviews; it runsgcin the directory the order was started in, for which$GC_BINnames the binary. README section "The merge order" says what the order does, how a change to it reaches a running city, and what a city sees when the tool cannot be built. The cases oftests/merge.sh, which tested the script with stubs ofgcandgo, are Go tests inforgejo/assets/forgejo/order_test.go, with a fake ofgcand the forge behindhttptest;tests/merge.shnow tests the wrapper.- The
scheduleorder of the forgejo pack, built and not switched on. Every two minutes it reads the closed beads whosemerge_resultispull_requestand, for each, asks the forge to schedule the merge of its pull request asgc forgejo pr merge --expect-head <the bead's gc.work_commit> --target <the bead's target, else the repository's default branch>does, and handles each answer as the table of section 3.11 d of the city'sdocs/handoffs.mdsays: it writesauto_merge=scheduledon the bead at the firstscheduled,already_scheduledormergedand asks again every cycle, never cancels a schedule, leaves a pull request that is not open to themergeorder, and makes one bead for the Operator for a pull request that is not onto the target, is missing or foreign, that the forge refuses to schedule for a reason other than a conflict, that has a head no bead of the city holds, or that stays unscheduled for three cycles in a row of a 500 from the forge or ofno_diff, or for two hours for any reason; a bead with nopr_urlor no fullgc.work_commitis counted and, after three cycles in a row, is a bead for the Operator too. A bead for the Operator is the merge order's own kind (pr_url,pr_event, here alsopr_headandwork_bead; made by the code both orders share, looked up in any status before one is made, mailed once with--notify --dedup <event>:<url>:<head>), so the merge order does not take it for a bead of the old shape, and an event and a head get one. The order isforgejo order schedule, a subcommand of the pack's Go tool, started by a two-line script. It does nothing unlessFORGEJO_SCHEDULE=onis in its environment, which a city gives with the order's[[orders.overrides]]entry, besideFORGEJO_TOKEN_FILE: with the variable unset, or set to anything buton, it prints one line and reads no bead, asks the forge for nothing and calls gc for nothing. The README says how to turn it on, what it does with each answer and when it asks the Operator, and that the city must not turn it on beforedismiss_stale_approvalsis confirmed onmain. Nothing has been tried against the real forge: the pull request that added the order lists the trial the Operator runs first.
Changed
gc forgejo pr openrefuses to open a pull request without a description. It exits 2, with its usage and before it asks the forge for anything, when--summary-fileis missing, when the file holds only whitespace, or when it holds only<summary>, the placeholder Part 6 ofmol-worker-workleaves in the file. The bead id that the body ends with is no description, and the command used to open a pull request whose body was only that line.--allow-empty-summaryopens it anyway. Theupgradeorder passes a summary already. The formula is unchanged: its Part 6 already passes a summary file, the refusal says what to do, and an added sentence took the step past the size limittests/formula.shkeeps.- Part 1 of
mol-worker-workmarks the work bead taken once the Worker holds the step and has derived the bead:gc bd update "$WORK_BEAD_ID" --status in_progress --set-metadata worker_session="$GC_SESSION_NAME" --set-metadata worker_step="$STEP_BEAD_ID", so a rig's store says someone is on the bead (row L20 of the city'sdocs/handoffs.md, decision 10, option B). The bead gets no assignee and is not claimed (no--claim): gc reads an assignee as a claim and does more with it than record it, and nothing in gc's claim, wake or release paths reads a bead without a route or an assignee.worker_sessionnames the Worker's session andworker_stepthe step bead, written again by every Worker that takes the step, so a retry overwrites a dead Worker's; the keys are the pack's own and gc reads neither. A bead that is already closed is not marked and not reopened. A halt (Part 2's two and the Halting section) sets the beadopen, assigns the Operator and unsets both keys, and Part 6 sets itopen, assigns the user and unsets both keys, as the hand-over did without them.tests/formula.shruns the lines against a stubgcthat keeps one bead and checks its end state for the mark of an open bead, of a retry and of a closed bead, for each of the three halts, and for the hand-over. A bead slung before the release shows no change, since the formula is poured into the workflow at the sling. The trial that a restarted Worker'sgc hook --claimreturns its step while the work bead is in progress and unassigned is the Operator's, on a throwaway bead before the release reaches the city; it is written out in the pull request. The block stops with a clear failure, before it callsgc bd update, whenWORK_BEAD_IDis empty, as it is in a fresh shell that skipped step 2 (: "${WORK_BEAD_ID:?derive it as in 2}"). The step's text shrank to stay under the 28000 characterstests/formula.shallows agc bd showof it: Part 4's examples of strong and weak commit messages and the template's closing line about follow-ups are gone, and the commit template stays. - The Worker's skill says where scratch files go and what never to run: a directory made with
mktemp -dunder$TMPDIR, left where it is, and neverrm -rforrm -ron a path that comes from a command substitution or a variable, nor anyrmin the command that hands the bead over. Claude Code stops such anrm -rfwith a permission prompt, bypass mode or not ("Dangerous rm operation on statically-unresolvable target"), and a Worker that ran one held its hand-over behind the prompt until someone answered. On an acp box gc holds the request, thepermission-requestorder mails it to the Operator, who denies it; the denial reaches the Worker as a refusal that does not end its turn, and the skill tells it to run the hand-over again on its own, without therm. The skill's new section keeps a Worker from raising the prompt at all.mol-worker-workis unchanged, since its step is within a few dozen characters of the size a Worker's Bash call keeps. - The adapter that rexcity's
go.moddeclares as a tool is namedclaudeacp(it wasclaude-acpin rexcity 0.29.0 and 0.30.0, and has beenclaudeacpsince 0.31.0), and theapplyorder's header comment andtests/apply.shnow say so: the test's fixture declarescmd/claudeacp, so it shows what the order installs today. The order itself is unchanged, since it names each tool by the last element of its package path. - Part 2 of
mol-worker-worksays what its command does: it takes$GC_DIR, and the current directory only whereGC_DIRis unset. The text said$GC_DIR, "not$(pwd)", while the command passes${GC_DIR:-$(pwd)}. - The
mergeorder no longer needsjqor agcfound onPATHby its script: it is the Go tool, which runs$GC_BINor thegconPATH. A run is limited to ten minutes where the script had no limit, and agccall that fails now fails the bead it was for with gc's own message on stderr, asmerge: <bead>: <message>. What the script printed with the order's name (merge: <bead>: cannot read the state of <url>, the foreign-pull-request line) is kept, and the first now ends with the cause. A run with no bead to settle makes the two listings, one for each shape, where the script made one.
Fixed
- The shell tests no longer die of SIGPIPE at random, which failed
test / scriptson a pull request that touched neithertests/norroles/(run 104, exit 141).tests/gnu-tools.shread the first row withrows | head -n 1underset -euo pipefail:headexits after one line, the loop feeding it is killed by SIGPIPE on its next write, andpipefailmakes that the failure of the line. It reads the first line withsed -n 1pnow, which reads to the end. The same holds for every other test that stops reading early:grep -q,headand anawkthat callsexitat the end of a pipe now read all their input (grepthrough agrepqhelper that sends its output to/dev/null, intests/formula.sh,tests/view-beads.sh,tests/view-mail.sh,tests/worktree.shandtests/worktree-setup.sh), so none of them depends on how fast the writer is. Nothing a pack runs changes: no script underroles/orforgejo/stops reading early. gc roles permission denyaccepts the global flag--city <dir>and--city=<dir>, which gc passes on to a pack command run asgc --city <dir> roles permission deny ..., and ignores it, asgc roles view beadsandview maildo; it used to print its usage line and exit 2 without denying anything. The other global flags (--rig,--city-url,--context) are still refused, since ignoring one would deny the request in the wrong city.- The
mergeorder no longer fails at every run on a bead whose pull request the forge no longer has.gc forgejo pr stateprintsmissingwhen the forge answers "not found" in its own error object, and the order hands such a bead to the Operator once, as it does for a pull request closed unmerged: it assigns the bead, mails the Operator with--notify(subject "Pull request not found: BEAD", saying the pull request does not exist on the forge any more) and records the URL inmetadata.pr_closed. A 404 the forge did not write, a forge that cannot be reached, or any other error stays a failed run. gc forgejo pr statesends its token to no host but its forge's: the host ofFORGEJO_URLwhen that is set, otherwise the host of the worktree's origin. A--pron another host, or one that is not a pull request URL, printsforeignwithout any request being made, and themergeorder skips such a bead with one line on stderr instead of failing the run.
Downloads
-
Source code (ZIP)
1 download
-
Source code (TAR.GZ)
1 download
-
v0.5.0
Stablereleased this
2026-11-12 06:33:28 +00:00 | 66 commits to main since this releaseAdded
- The
worktree setupcommand,gc roles worktree setup [--checkout <dir>] <work dir> [<default branch>], which makes the Worker's directory a linked worktree of its repository, detached atorigin/<default branch>, and leaves a directory that is one already as it is. The repository is--checkout, else the rig's (GC_RIG_ROOT), else the city's (GC_CITY_PATH). It does whatassets/scripts/worktree-setup.shdoes for the Worker'spre_start, which now calls the same script.
Fixed
- A Worker on a box that runs no
pre_start, as gc's ACP runtime runs none, no longer halts its bead in Part 2 ofmol-worker-work. gc creates the Worker'swork_dirfor every transport, as an empty plain directory that it stages files into, and starts the session there, so the directory was no linked worktree and under the city's checkout, wheregc roles worktree branchrefuses it andgitreads the city's repository, whichever rig the Worker works for. Part 2 now runsgc roles worktree setup "$GC_DIR" <base_branch>before anygitcommand, and halts the bead, without touching the checkout, when it fails. The Worker'spre_startkeeps its own call for the boxes that run it, and the command does nothing for a directory that is a worktree already. Part 2 passes it${GC_DIR:-$(pwd)}, the directory gc made for the Worker, and the current directory only whereGC_DIRis unset; the current directory alone, from a subdirectory of the worktree, made a worktree nested there, and the command also refuses a directory inside a linked worktree. - A Worker that halts no longer runs
git switch --detachoutside a linked worktree: a Worker halting before Part 2 had made its directory one detached the city's own checkout. The Halting section tells the two apart by comparinggit rev-parse --git-dirand--git-common-dirwith--path-format=absolute; without it, in a plain directory under a checkout git prints the first as an absolute path and the second as a relative one, the strings differ, and the check took the directory for a linked worktree. worktree-setup.shfills the work directory it finds, empty or holding staged files, in place instead of moving it aside and creating it again, so a session already running in the directory keeps its working directory. It arms the restore of the files it moves aside before it empties the directory, so a delete that fails half way leaves them in place, and it refuses a directory whose.gitis a dangling symlink, which the copy-back would have put over the new worktree's.git: no worktree, andgitthere reading the city's repository.
Downloads
-
Source code (ZIP)
1 download
-
Source code (TAR.GZ)
1 download
- The
-
v0.4.0
Stablereleased this
2026-11-12 01:47:37 +00:00 | 68 commits to main since this releaseAdded
- The
applyorder installs every tool that rexcity'sgo.moddeclares beside rexcity, inREX_BIN_DIR, under the last element of the tool's package path. It builds withGOBIN=<dir> go install ./cmd/rexcity toolwhere it rango build ./cmd/rexcity, which builds notooldirective, so thatclaude-acp, the adapter the acp box runs rexcity with (declared as a tool,sarak.sh/mikluko/claudeacp/cmd/claude-acp, by rexcity'smainafter v0.28.1, which is the newest rexcity release and does not declare it), lands on the supervisor'sPATHwith it. For a rexcity that declaresclaude-acpthe order installsrexcity,gc-runtime-rexandclaude-acp; for one that declares no tool, v0.28.1 for one, it installsrexcityandgc-runtime-rexas before, since go only warns that thetoolpattern matched no package. As before, the order builds only in an apply whosepacks.lockmoves the rexcity pack.
Fixed
- One routed bead costs one Worker session from the claim to the hand-over.
mol-worker-workis a single step with six parts, no longer six steps: when a step closed, the next one was already pinned to the Worker's session but not claimed by it, and gc's fresh cycle (the city runs the v2 reconciler, and the Worker's pool haswake_mode = "fresh") stopped the session and started a new conversation for it, without the context of the first, at up to five boundaries of a run. The same hand-off left the session's row asleep with work assigned, which gc planned a clean session for; that session found nothing to claim and drained, and a stale demand reading could start another after a short step. A step held in progress and claimed by the session that works it leaves no other step assigned to the session, so a run has no boundary to cycle on. The step is closed once, as passed in Part 6 or as failed by a halt, and a Worker whose session restarts mid-step claims it again, runs Part 1 again, and reads the worktree to see which of the other parts are done. - A Worker claims with
gc hook --claim --drain-ack --json, in its nudge and in its skill, so that a seat that finds nothing to claim is stopped by gc. A seat that only ended its turn stayed alive, and gc counted it as capacity for the next bead, which it never woke to claim: a bead waited 28 minutes for its first step until the Operator closed the seat. gc roles gnu checklinksdatetogdateandsedtogsedin the shim directory before it checks, so a Worker whose box runs nopre_start, as on acp, no longer halts every bead with "Not GNU's in this session" when the tools are installed. The Worker'spre_startkeeps its own call. Where a tool is not installed the check still exits 1 and names it, and the message of a failed check, the README and the Worker's text no longer say that the Worker'sPATH"starts with" the shim directory: gc's own directory comes first, and the order between it and the shims does not matter.
Changed
- The parts of
mol-worker-workare Parts 1 to 6 of the stepwork, and halting is a section of its own, where it was the sixth item ofopen-pull-request:load-context,workspace-setup,preflight-tests,implement,self-reviewandopen-pull-requestare no longer step ids, andgc.continuation_groupandgc.session_affinityare gone with the siblings they pinned.gc roles view beadsshows the one step of a Worker's bead while it works. - A Worker hands the bead over once its pull request is open and exits: the Worker's skill and Part 6 of
mol-worker-worknow say that it does not wait for CI, watch a run or push fixes for a failing one, whatever the bead's "done" says about checks. The checks on the forge are the reviewer's gate, and a pull request whose checks fail comes back as rework. The pre-flights and the self-review, which a Worker runs itself before pushing, stay its job.
Downloads
-
Source code (ZIP)
1 download
-
Source code (TAR.GZ)
1 download
- The
-
v0.3.0
Stablereleased this
2026-11-11 20:48:12 +00:00 | 74 commits to main since this releaseAdded
- The
gc roles worktree checkcommand, which exits 1 with a one-line reason unless a Worker's worktree is on the bead's branch, andgc roles worktree branch, which puts it on that branch, detaching the worktree of a halted or dead run that still holds it.
Changed
mol-worker-workdeclares its six steps itself, no longer extending core'smol-polecat-base, and every step carriesgc.continuation_group = "worker": a pool of any size works a bead on the one Worker that claims its first step, and starts one session for it. Every step afterworkspace-setuprunsgc roles worktree checkbefore anything else, and halts the bead when the worktree is not on its branch; a halting Worker detaches its worktree, so the branch is free for the next Worker.
Fixed
- A Worker pool larger than one no longer hands the steps of one bead to two Workers, the second of which ran pre-flights on a stale detached worktree, could not take the branch the first held, and halted the bead.
Downloads
-
Source code (ZIP)
1 download
-
Source code (TAR.GZ)
1 download
- The
-
v0.2.0
Stablereleased this
2026-11-11 20:35:14 +00:00 | 76 commits to main since this releaseAdded
gc roles view beadsdraws the city's beads in a terminal pane, redrawn in place every three seconds: the beads waiting on the user, with the Operator, being worked and queued, a count of the rest for each rig, and the last five beads closed.gc roles view mailprints the mail the city sent, read, marked read and archived in the last hour, then each such event as it happens, one line each.- The
gc roles gnu checkcommand, which exits 1 with a one-line reason when a macOS host lacksgdateorgsed, or whendateorseddoes not run as GNU's in the session.
Changed
- Breaking: a Worker on macOS halts its bead, naming the missing tools and
brew install coreutils gnu-sed, unlessgdateandgsedare installed. - On macOS a Worker's
dateandsedrun as GNU's: itsPATHstarts with$HOME/.local/share/gascitypacks/gnubin, where its start links them togdateandgsed.
Downloads
-
Source code (ZIP)
1 download
-
Source code (TAR.GZ)
1 download
-
v0.1.0
Stablereleased this
2026-11-11 16:09:50 +00:00 | 80 commits to main since this releaseAdded
- The
rolespack's Operator: a city-scoped, always-on session in a tui box, in bypass-permissions mode, that writes each Claude notification to its tab as OSC 9. - The Operator's Claude settings allow
Bash(gc *)andBash(bd *): outside bypass-permissions mode, itsgcandbdcalls,gc mail inboxincluded, run without asking, and every other command keeps the prompt it had. - The
rolespack's Worker: a pool of acp sessions for each rig, in bypass-permissions mode, each starting fresh in a worktree of its own, withmol-worker-workas its default sling formula. - The
rolespack's Worker also runs for the city itself, asroles.worker: a pool that works the beads of the HQ store in worktrees of the city repository under.gc/worktrees/workerand opens its pull requests on that repository. - The Operator routes a bead of the HQ store to the city's Worker with
gc sling roles.worker <bead>. - The role skills
operatorandworker, and the shared skillscityandcontact, which carry each role's text; a role's startup prompt names the skills to load and the binding-qualified names they refer to, and nothing else: gc appends no list of the session's skills to it. mol-worker-work, extending core'smol-polecat-base: it works a bead onworker/<bead-id>, opens its pull request withgc <forge> pr open, recordsbranchandpr_url, and assigns the bead to the user; a blocked Worker recordshalt_reasonand hands the bead to the Operator. Whererexcityis onPATH, the Worker labels its Rex tab with the bead's ID throughrexcity label.- The
applyorder, which fast-forwards the city directory toorigin/mainonce the incoming configuration validates, buildingrexcityandgc-runtime-rexwhenpacks.lockmoves rexcity. - The
permission-requestorder, which mails the Operator each permission request from a session without permission prompts, and thegc roles permission denycommand anddeny-permissionskill it answers them with. - The
forgejopack:gc forgejo pr openandgc forgejo pr state, and themergeorder, which closes a bead whose pull request merged and puts a bead whose pull request closed unmerged on the Operator. - The
releaseworkflow: a push tomainthat brings a version section into this changelog tags that commitvX.Y.Z, one tag for both packs, and creates the Forgejo release with the section as its notes, so a city can import them at^0.Ninstead of pinning a commit. gc forgejo pr open --title <text>, which opens a pull request that no bead carries, in place of--bead <id>.- The
upgradeorder of therolespack: every ten minutes it runsgc import upgradein a worktree of the city repository'sorigin/mainand, when an import moved, validates the result asapplydoes, pushes it to the branchupgrade/packsas the city's git identity, unsigned whatever the supervisor's git configuration says, and opens the one pull request for that branch withgc <forge> pr open. Asha:pin moves no import, so it proposes nothing; an upgrade is proposed once, told apart by thepacks.lockentries it moves, so a pull request the user closed is not opened again whatever else lands onmain; a run killed outright leaves nothing that stops the next; a failure mails the Operator.
Changed
mol-worker-workno longer requires itsforgevariable: it defaults toforgejo.
Fixed
- A Worker session no longer fails to start when gc has staged files into its work dir before
pre_start: the worktree is created around them. - The
mergeorder closes a bead whose pull request merged while the bead is assigned to someone, asmol-worker-workleaves it, and recordsgc.work_outcome=shippedon it.
Downloads
-
Source code (ZIP)
1 download
-
Source code (TAR.GZ)
1 download
- The