• v0.9.0 31530e7bd9

    v0.9.0
    All checks were successful
    release / release (push) Successful in 5s
    test / changelog (push) Successful in 3s
    test / lint (push) Successful in 32s
    test / scripts (push) Successful in 51s
    Stable

    city-root released this 2026-11-12 20:38:36 +00:00 | 5 commits to main since this release

    Added

    • The roles pack's failures order mails the Operator when an order keeps failing, which nothing read before: gc records each failed run as an order.failed event and each run that went through as order.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 the merge order of one rig reading a forge that answered 503. When an order has failed three runs in a row (FAILURES_STREAK) it sends ORDER FAILING <order>: <n> runs in a row from controller with --notify, a body of the order, the count, the first and last failure and the end of the last error, and the dedup key order-failing:<order>:<seq of the first failure>; when that order runs again it sends ORDER RECOVERED <order>, without --notify, with order-recovered:<order>:<seq>. A streak that ends before three mails nothing, and each order and scope is counted apart. The order has scope = "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 on order.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 in failures.json under 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 is roles order failures in the roles Go tool, and assets/scripts/failures.sh starts it.
    • FORGEJO_TOKEN_COMMAND in the forgejo pack: a command, run with sh -c, whose trimmed stdout is the Forgejo API token. When it is set it wins over FORGEJO_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 the merge, checks, schedule and review orders) 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_COMMAND or gc forgejo token prints; it opens, reads and comments on pull requests with the gc forgejo pr commands, which read it themselves. tests/formula.sh checks the line in the prompt as gc renders it.
    • tests/doctor.sh, run by the lint job: 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 version prints the version of the roles pack's Go tool, roles/assets/roles, which also runs the handover order. It starts as go 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's merge, schedule and checks orders now take from it.
    • internal/budget, a Go test run by go test ./..., holds the packs' shell to the rule of docs/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 the lint job in warning mode, so it prints what it would fail and passes; SHELL_BUDGET=fail makes 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 through gc.
    • REVIEW.md states 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_COMMAND when that variable is set and not empty: the command is run with sh -c and 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 roles pack carries mol-researcher-work, the Researcher's formula, which its agent already names as default_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 reason Findings posted: [research-<bead id>], gc.work_outcome=no-op and gc.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 bash blocks are 24 code lines, under the 60 that docs/shell.md allows a formula, so it needs no Go tool.
    • tests/researcher-formula.sh compiles 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, no rm, 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 stub gc. CI runs it.
    • The README says what the trial by hand found: under full-auto a call of the Agent tool is refused and nothing prompts; the tool names of the allow list are Claude Code's own; claudeacp accepts full-auto; and an allow list cannot limit Bash to commands that only read, because the city's list allows Bash as a whole and a deny list names only the commands it lists.
    • gc roles waiting [--json] [agent] and gc 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's operator-nudge order, 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 with gc bd list --assignee, with the HQ store read as the city's own whichever rig the caller stands in. waiting prints one line for each bead (id, status, store and title, separated by tabs), or with --json one object with schema_version ("1"), agent, count and beads. nudge sends one gc session nudge with the line <n> bead(s) wait on you: <up to five ids> (and and more after five) when at least one bead waits and no nudge to the agent's session is pending or in flight in gc nudge status, and sends nothing otherwise. The agent is $OPERATOR, else the one city-scoped agent named operator, when none is named; both commands take gc's --city, which they give to every gc call. 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: waiting prints nothing and nudge sends 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 failed gc nudge status for 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 --city on every call and the command lines; tests/waiting.sh, run by the scripts job, tests the wrappers and the real tool against a stub gc. The README says what the city's order becomes (exec gc roles nudge) and how the Operator learns that an order keeps failing: from the failures order.

    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 the handover and failures orders. handover.json is written as before.
    • The Reviewer's formula mol-forgejo-review takes 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.sh pins that every request of the formula is authorized that way and that no line of it names FORGEJO_TOKEN_FILE or FORGEJO_TOKEN_COMMAND but to say that no other agent's names the Reviewer's token, and its stub curl refuses a request that does not carry the token the stub gc forgejo token prints. The Reviewer's prompt says the account is the one whose token the pack's token command prints. A Reviewer started by a city that sets only FORGEJO_TOKEN_FILE reads the same file as before.
    • The doctor of the forgejo pack accepts either variable: with FORGEJO_TOKEN_COMMAND set 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 review and pr comment says the same.
    • Breaking: the Researcher's Perplexity server no longer reads ~/.config/gascity-root/perplexity-token. Without PERPLEXITY_API_KEY_COMMAND, it reads the file named by PERPLEXITY_API_KEY_FILE, and with neither variable set it does not start. A city that kept the file sets PERPLEXITY_API_KEY_FILE to its path in the env of a patch of roles.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 apply and upgrade orders no longer fail when they fire together. Both fetch origin/main into the city repository, and git lets only one of two concurrent fetches that find it moved update refs/remotes/origin/main: the other failed with "cannot lock ref" and mailed the Operator, and the merged change waited for the next apply run. Both now fetch through roles 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. The upgrade order now needs go on the supervisor's PATH, as apply already did.
    • The schedule order 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 raised no_worker only 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 carries review_head is now skipped, as one that carries pr_event already was.
    Downloads
  • v0.8.0 fbc07a552e

    v0.8.0
    Some checks failed
    release / release (push) Successful in 4s
    test / changelog (push) Successful in 4s
    test / lint (push) Successful in 26s
    test / scripts (push) Has been cancelled
    Stable

    city-root released this 2026-11-12 19:27:23 +00:00 | 14 commits to main since this release

    Added

    • The apply order installs the changelog checker as changelog in REX_BIN_DIR, with a new command of the roles tool, roles changelog install <pin-file> <bin-dir>, that apply.sh calls in three lines. It is built at the version that changelog.pin in the city repository names (module@version, as sarak.sh/mikluko/changelog/v2@v2.0.1). It builds when the installed changelog is not that build, moves it into place only when the build succeeded, and, when the build fails, mails the Operator, keeps the old changelog and does not move the city directory. A city with no changelog.pin gets no changelog.
    • 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 --json prints the comment's id and URL; an empty body is refused with exit status 2. The Worker's worker-rework skill uses it for the note that a round of rework is done, in place of a curl to the forge.
    • The roles pack carries the Researcher, roles.researcher: a pool of the city, at most two sessions, that takes a bead of any store routed to it with gc sling roles.researcher <bead>. It runs on an acp box in gc's full-auto mode and claims with gc hook --claim --drain-ack --json. Its formula mol-researcher-work and its skill researcher are not in the pack yet.
    • The Researcher's settings, roles/agents/researcher/overlay/per-provider/claude/.claude/settings.json, deny the Agent, Edit, Write and NotebookEdit tools, 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.sh resolves 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.toml defines the official MCP server, @perplexity-ai/mcp-server pinned to 1.3.0, which an acp session receives in its session/new request, so gc mcp list --agent roles.researcher shows 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 the bao command that makes it. Its allow list is to name perplexity_search and perplexity_ask and nothing else of Perplexity.
    • The researcher skill 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 says perplexity_research and perplexity_reason are not available to it.
    • The researcher skill, 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's research skill, with its UPSTREAM file and MIT LICENSE.
    • The forgejo pack has a review order: for each pull request head whose checks have completed, it makes the review bead (labels service and review, review_round counted) and slings it to the rig's Reviewer, once per pull request and head, for a bead handed over in either shape.
    • The review order is off until FORGEJO_REVIEW=on is in its environment, and holds its review back until the schedule order has marked the bead unless FORGEJO_REVIEW_NEEDS_SCHEDULE=off is 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 does gc roles view beads started in a rig's directory or below it; started anywhere else it shows every rig, as it did.
    • gc roles view beads has 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 labelled parked).
    • 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.sh holds the skill to both by their phrases.

    Changed

    • A Worker and the Reviewer run the checker as changelog from PATH and 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 their option_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 is unrestricted for claude (--dangerously-skip-permissions), so such a city sees no change; a city that sets a mode of its own, such as full-auto, now has it apply to both, and a city that wants the old mode for them alone patches roles.worker and forgejo.reviewer. The README's "Permission mode" section says so, and the Reviewer's patch there no longer sets permission_mode.
    • Breaking: the Operator's permission_mode is auto-edit (--permission-mode acceptEdits) in place of unrestricted. The file tools come back, AskUserQuestion keeps working, and the user is prompted in the Operator's tab for a call that no allow rule covers: a city must list in permissions.allow of the settings file gc passes to claude what the Operator may run without asking, or it is prompted for every Bash call. A city that wants the old mode patches roles.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 -rf of 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 and rm: the command is stopped and comes back as a refusal, and a refusal of the rm would 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 beads shows 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 beads reads the claim mark of mol-worker-work (in_progress with worker_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 beads reads 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_INTERVAL sets the interval.

    Fixed

    • CI no longer runs a gc binary on the registry's word for its checksum. test.yaml keeps the expected SHA-256 of the pinned gc beside GC_SHA, one per architecture (GC_SHA256_AMD64, GC_SHA256_ARM64), and runs the download only when it matches; the .sha256 file 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 building gc at GC_SHA, as an unpublished pin does. The lint and scripts jobs set cache: false on setup-go, so the runner's cache service, which answers 500 on every save, no longer leaves a warning. Changing GC_SHA now means changing the two checksums with it.
    • tests/formula.sh compiles mol-worker-work from the checkout whatever GC_CITY and GC_CITY_PATH say, 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-request order mails each pending request on a host with jq 1.6, where it mailed none when its state file was missing or empty.
    • pr state no 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_items in /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 merge order no longer closes a review bead as shipped, or hands it to the Operator, when its pull request merges or closes.
    • gc forgejo pr review posts 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 (official false). 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 says posted when it counts. When the new review is not counted either, it exits 12 as before, with the new review in review and 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 in mol-forgejo-review is unchanged.
    • The Reviewer's formula, mol-forgejo-review, carries the rules the Worker's skill got for scratch files and rm: scratch files go in a directory made with mktemp -d under $TMPDIR and stay there; the Reviewer never runs rm, 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 to bash -c or env -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 an rm in the command that hands a bead over; and a refusal of such a command does not end its turn, so it goes on without the rm. Claude Code stops an rm on a path it cannot resolve with a permission prompt, bypass mode or not, and a Reviewer of claudeacp raised one on 2026-11-12 while it tried a changelog guard in a scratch repository, and one of rexcity on the same day ran rm .changelog/bad.md inside a bash -c script. The rule replaces the formula's "you remove nothing with rm -rf", which said nothing of rm without -r and was not held by a test. tests/reviewer.sh holds each rule by its phrase and fails if a command of the step runs an rm, inside a bash -c string 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.sh waits for the stopped stream of gc roles view mail to 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; COLUMNS and LINES are used only where stdout is no terminal. Under bash 3.2 the views had cut and capped nothing.
    • gc roles view mail no longer takes a message id that starts with - for an option of gc mail peek.
    • The one line a view prints when jq fails ends with a newline.
    • gc roles view mail shortens a name with characters of more than one byte as it does one of ASCII, under jq 1.6 and 1.7.
    Downloads
  • v0.7.0 4a39722705

    v0.7.0
    All checks were successful
    release / release (push) Successful in 5s
    test / changelog (push) Successful in 4s
    test / lint (push) Successful in 22s
    test / scripts (push) Successful in 36s
    Stable

    city-root released this 2026-11-12 16:38:08 +00:00 | 32 commits to main since this release

    Added

    • The forgejo pack's checks order 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, from controller with --notify and --dedup checks:<bead>:<sha>. Every two minutes, for each bead of its store that carries a pull request (an open bead with a pr_url, or a closed one with merge_result=pull_request; not a bead with pr_event or review_head), it reads the head's combined checks as pr state --json does and mails when they are success or failure and the last head and state it recorded for that bead, in checks-<rig>.json under GC_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 is forgejo order checks in the Go tool; assets/scripts/checks.sh starts it. A city gives the order FORGEJO_TOKEN_FILE with an [[orders.overrides]] entry named checks, as for merge.
    • A city that imports the forgejo pack at the city level gets a Reviewer of its own, forgejo.reviewer with 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 no scope now, 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 of GC_RIG_ROOT, or of GC_CITY_PATH where 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 own AGENTS.md or CLAUDE.md names, read from the target branch as REVIEW.md is, with --city "$CLONE" for a clone of the city repository. It never merges. A city that patches the rigs' Reviewer with rig = "*" 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 handover order mails the Operator once when a Worker hands a bead over: on each bead.updated event it reads the events of the last 10 minutes, and for each bead whose latest state is open, carries a pr_url and is assigned to human or to the user of a rig's formula_vars, it sends HANDOVER <bead>: <pr_url> from controller with --notify, a body of rig, title, branch and pull request, and the dedup key handover:<bead>:<pr_url>. The mails sent are recorded in handover.json under 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_LOOKBACK and HANDOVER_USERS set the lookback and extra user names.
    • The roles pack has a Go tool, roles, and roles order handover is its first command; roles/assets/scripts/handover.sh is the stub the order's exec names.
    • The Operator's own settings, the roles pack's overlay roles/agents/operator/overlay/per-provider/claude/.claude/settings.json, also allow SendMessage and ListAgents beside Bash(gc *) and Bash(bd *). The Operator resumes a reviewing sub-agent with SendMessage and lists agents with ListAgents, 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 own assets/overlays/operator/per-provider/claude/.claude/settings.json in the pull request that upgrades the pin: its CI step "operator overlay matches the roles pack" compares the two.
    • tests/operator-overlay.sh holds 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-level overlay/, 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-review now sends, in Part 5 after the verdict is on the bead and before the bead closes, one mail to the escalation target: subject REVIEW <work bead>: <pass|fail|void> <pr_url> (void for 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.sh asserts the order (verdict, mail, close of the bead, close of the step, acknowledgement) and runs the lines against a stub gc, 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, or duplicate <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_sessions of a forgejo.reviewer patch 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) and worker-halt (halting). gc internal materialize-skills puts them in an acp Worker's directory, as it does the skill worker.

    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] in CHANGELOG.md; test / changelog fails 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 into CHANGELOG.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.mod with the module path sarak.sh/mikluko/gascitypacks, in place of forgejo/go.mod; it holds the forgejo and the roles tool. The forgejo commands and the merge and schedule orders find it from the pack directory as before. CI and the README run go vet ./... and go 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 list when 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 the handover order: 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's checks order; a failure is a rework bead; more than three beads in one run come as one CHECKS: <n> pull requests settled mail that lists them) and REVIEW <bead>: pass|fail|void <pr_url> (fail is rework, pass is told to the user, void needs a review bead for the new head). The handover and checks orders 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.sh and trial-watch.sh are named only to say they are deleted and not to be started. tests/formula.sh asserts the rule, the five subjects and that no other file of the repository names the scripts.
    • The Operator's skill and the shared skill city follow 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 label parked and a note (gc bd list --label parked is 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 by created_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; the schedule order (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.sh asserts 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_sessions would have done nothing. The default is still one session, and gc 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-review takes its review bead with review take in 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-work is 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.sh fails a step past 8000 characters.
    • Part 1 of mol-worker-work prints WORK_BEAD_ID and BRANCH once, 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 send takes its sender from --from, else from GC_SESSION_ID, GC_ALIAS or GC_AGENT, else it writes human, and an order runs under the controller with none of the three, so the merge order's mail ("Pull request closed unmerged", "Pull request merged"), the upgrade and apply orders' failure mails and the permission-request order's mail all showed human → operator. Every gc mail send of the two packs' orders now passes --from controller: the three of forgejo order merge and the schedule order's (forgejo/assets/forgejo/order.go), and one each in apply.sh, upgrade.sh and permission-request.sh. controller is the one form, since at the city's gc pin (6bd609f) a --from is accepted only when it names a live session, a configured named session, or human or controller, the two names gc reserves; --from order:merge is refused with invalid sender "order:merge": session not found, so an order's own name cannot be the sender. The mail log reads controller → 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 name gc mail send takes from GC_SESSION_ID (the log shows roles__worker-<session id> for a Worker on an acp box, as tried). The Go tests of order.go and tests/apply.sh and tests/upgrade.sh assert the --from of every mail; tests/permission-request.sh is new, run by the scripts job, and asserts it for the permission-request order, which had no test.
    • The schedule order 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 answers 405 "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). On forge_refused the order now reads the pull request with the code of pr state (the pull request alone, no checks or reviews) and acts on its mergeable: not_mergeable is the rework order's, so the order makes no bead for the Operator and only keeps its clock (auto_merge_trouble with the reason not_mergeable; two hours in a row is still the one stuck bead); mergeable or draft is 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's mergeable is 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 with mergeable false, true and a draft; the other answers of the order are unchanged, and the order is still switched off by default.
    • The apply order 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 lacked rexcity, its gc-runtime-rex link or a declared tool (claudeacp, which the acp box needs) was never repaired. Now any apply that has an origin/main to apply also builds when go list tool names a tool, or rexcity or the link, that REX_BIN_DIR lacks. An install writes the names it put there to REX_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-acp of rexcity 0.29.0 and 0.30.0) is removed by hand once. A failing ln or mv after 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.sh takes 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 before gc 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 merge order 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 set merge_result=closed on 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 with pr_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 as merge_result=missing, never closed, 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_batch or missing_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 as merge_result=closed and records missing on 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-work has the Worker read the repository's AGENTS.md and CLAUDE.md at 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
  • v0.6.0 d9d5ad4648

    v0.6.0
    All checks were successful
    release / release (push) Successful in 6s
    test / changelog (push) Successful in 4s
    test / lint (push) Successful in 21s
    test / scripts (push) Successful in 34s
    Stable

    city-root released this 2026-11-12 11:45:21 +00:00 | 48 commits to main since this release

    Added

    • gc forgejo pr state --json prints a pull request's state as one JSON object on one line: schema_version ("1"), state (open, merged, closed, missing or foreign), 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) and checks, an object {"state", "completed"} for the checks of the head, whose state is not_started, pending, success, failure or none. 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 is waiting, running or blocked. A head with no status and no run is none, completed and no pass, when its tree holds no workflow file, and not_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" is missing, any other failure is an error with exit status 1 and nothing on stdout, a --pr on another host or that is no pull request URL is foreign without a request, and the token goes to the forge's host only. Without --json the command prints what it printed, with no further request, so the merge order behaves as before.
    • gc forgejo pr state --json also prints mergeable and reviews, two fields added to version 1 (schema_version stays "1"; the fields that existed keep their names and meaning, and an older caller ignores the new ones). mergeable is mergeable, not_mergeable or draft for 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, so not_mergeable does not say which, and the README says how a caller waits for a second read before it takes it as a conflict. reviews is every review of the pull request, oldest first, for every state the forge has a pull request for (null for missing and foreign), each with id, 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, dismissed and submitted_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's X-Total-Count confirms. The rules of pr state hold: only the pull request's own "not found" is missing, any other failure is an error with exit status 1 and nothing on stdout, a foreign --pr gets no request, and the token goes to the forge's host only. With --json the 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 no mergeable field, where the command before printed its object, since it asked for neither. Without --json the command prints what it printed, so the merge order 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 a reason of its own for each case: 3 head_moved (the head is not --expect-head, a full SHA), 4 not_open, 5 wrong_base (the base is not --target), 6 no_diff (no changed file, no addition, no deletion), 7 missing and 8 foreign (no request is made). It prints scheduled, already_scheduled (the forge answered 409 for a pull request that has a scheduled merge) or merged, with exit status 0, and exits 9 with outcome rejected when the forge itself refuses with a 405 or 409. --json prints one object on one line, for a refusal too, with schema_version ("1"), outcome, reason, state, head, base, merge_commit, forge_status, forge_message and schedule_cancelled. --cancel takes a scheduled merge back and prints cancelled, or not_scheduled when 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 and head_commit_id is 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's 201 and cancels its own schedule when the head has moved. The rules of pr state hold: only the forge's own 404 is missing, a 5xx, a timeout or a bad token is an error with exit status 1 and nothing on stdout, a foreign --pr gets 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 a reason of its own for each case: 3 head_moved, 4 not_open, 7 missing and 8 foreign (no request is made), as pr merge has them, and 10 own_pull_request (the pull request is by the account of the token, which the forge lets nobody review), 11 empty_body (a request for changes needs a body). It reads the reviews back after the post, through the code of pr state --json, and exits 12 with outcome not_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 as official, 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 prints already_reviewed; otherwise it prints posted, both with exit status 0. A 422 from the forge is exit 9 with outcome rejected. --json prints one object on one line, for a refusal too, with schema_version ("1"), outcome, reason, state, head, account, event, review, lifted, forge_status and forge_message. The README answers question 7 of the city's docs/handoffs.md from Forgejo 17.0.1's source, and says so in lifted: a new approval by an account clears official on 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 of pr state hold: only the forge's own 404 is missing, a 5xx, a timeout or a bad token is an error with exit status 1 and nothing on stdout, a foreign --pr gets no request, and the token goes to the forge's host only.
    • The Reviewer, forgejo.reviewer, and its formula mol-forgejo-review (row L14 of the city's docs/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's mol-forgejo-pr-review less its wait for the checks. The agent is a rig's named session ([[named_session]] in forgejo/pack.toml, mode = "on_demand"), max_active_sessions = 1, session = "acp", permission_mode = "unrestricted", claiming with gc 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 names pr_url, review_head and work_bead: it voids the bead (review_verdict=void, nothing posted) when the pull request is not open or its head is not review_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's REVIEW.md, AGENTS.md, CLAUDE.md and README.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 with env -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 with gc forgejo pr review --expect-head (APPROVED, or REQUEST_CHANGES with its findings as the body; a pull request that does not merge cleanly gets a request that says it needs a rebase), and writes review_verdict (pass, fail or void), review_reviewed (the head), review_url and a note on the review bead, then closes it with the work outcome no-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 of forgejo.reviewer for every rig (the acp provider, the model and effort its pin check demands, max_active_sessions = 1 and the review account's token file as FORGEJO_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's docs/handoffs.md and a trial's to settle; a bead assigned with no workflow makes the Reviewer mail the Operator and exit. tests/reviewer.sh, run by the lint job, 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 stub gc and curl.
    • gc roles view beads leaves out a bead labelled service, as it leaves out gc's other bookkeeping: bookkeeping in roles/assets/jq/view.jq tells 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 carries service and review; a rework bead carries rework and is work, so the view's groups show it, queued or being worked, as they show any bead, and a convoy with gc.synthetic is left out whatever its labels. A bead with no such label reads as before. The three labels are spelt once, as labels in view.jq, for the orders that will put them on with gc bd create --labels, and tests/view-beads.sh pins 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 bare bd list, which only gc can change.
    • forgejo order merge, a subcommand of the forgejo pack's Go tool, is the merge order's logic: the order's script is now one line that runs it as go tool -C "$PACK_DIR" forgejo order merge. It settles both shapes of a bead that carries a pull request. An open bead with a pr_url is settled exactly as the script did: closed as shipped at the merge, whoever holds it, with no mail; handed to the Operator with a --notify mail and pr_closed when 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, with merge_result=pull_request (listed by --status closed --has-metadata-key merge_result), gets merge_result=merged and merged_sha on 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 get merge_result=closed and 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 code pr state runs on, once for each pull request in a run, with no request for its checks or reviews; it runs gc in the directory the order was started in, for which $GC_BIN names 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 of tests/merge.sh, which tested the script with stubs of gc and go, are Go tests in forgejo/assets/forgejo/order_test.go, with a fake of gc and the forge behind httptest; tests/merge.sh now tests the wrapper.
    • The schedule order of the forgejo pack, built and not switched on. Every two minutes it reads the closed beads whose merge_result is pull_request and, for each, asks the forge to schedule the merge of its pull request as gc 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's docs/handoffs.md says: it writes auto_merge=scheduled on the bead at the first scheduled, already_scheduled or merged and asks again every cycle, never cancels a schedule, leaves a pull request that is not open to the merge order, 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 of no_diff, or for two hours for any reason; a bead with no pr_url or no full gc.work_commit is 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 also pr_head and work_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 is forgejo order schedule, a subcommand of the pack's Go tool, started by a two-line script. It does nothing unless FORGEJO_SCHEDULE=on is in its environment, which a city gives with the order's [[orders.overrides]] entry, beside FORGEJO_TOKEN_FILE: with the variable unset, or set to anything but on, 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 before dismiss_stale_approvals is confirmed on main. 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 open refuses to open a pull request without a description. It exits 2, with its usage and before it asks the forge for anything, when --summary-file is missing, when the file holds only whitespace, or when it holds only <summary>, the placeholder Part 6 of mol-worker-work leaves 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-summary opens it anyway. The upgrade order 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 limit tests/formula.sh keeps.
    • Part 1 of mol-worker-work marks 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's docs/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_session names the Worker's session and worker_step the 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 bead open, assigns the Operator and unsets both keys, and Part 6 sets it open, assigns the user and unsets both keys, as the hand-over did without them. tests/formula.sh runs the lines against a stub gc that 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's gc hook --claim returns 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 calls gc bd update, when WORK_BEAD_ID is 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 characters tests/formula.sh allows a gc bd show of 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 -d under $TMPDIR, left where it is, and never rm -rf or rm -r on a path that comes from a command substitution or a variable, nor any rm in the command that hands the bead over. Claude Code stops such an rm -rf with 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, the permission-request order 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 the rm. The skill's new section keeps a Worker from raising the prompt at all. mol-worker-work is 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.mod declares as a tool is named claudeacp (it was claude-acp in rexcity 0.29.0 and 0.30.0, and has been claudeacp since 0.31.0), and the apply order's header comment and tests/apply.sh now say so: the test's fixture declares cmd/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-work says what its command does: it takes $GC_DIR, and the current directory only where GC_DIR is unset. The text said $GC_DIR, "not $(pwd)", while the command passes ${GC_DIR:-$(pwd)}.
    • The merge order no longer needs jq or a gc found on PATH by its script: it is the Go tool, which runs $GC_BIN or the gc on PATH. A run is limited to ten minutes where the script had no limit, and a gc call that fails now fails the bead it was for with gc's own message on stderr, as merge: <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 / scripts on a pull request that touched neither tests/ nor roles/ (run 104, exit 141). tests/gnu-tools.sh read the first row with rows | head -n 1 under set -euo pipefail: head exits after one line, the loop feeding it is killed by SIGPIPE on its next write, and pipefail makes that the failure of the line. It reads the first line with sed -n 1p now, which reads to the end. The same holds for every other test that stops reading early: grep -q, head and an awk that calls exit at the end of a pipe now read all their input (grep through a grepq helper that sends its output to /dev/null, in tests/formula.sh, tests/view-beads.sh, tests/view-mail.sh, tests/worktree.sh and tests/worktree-setup.sh), so none of them depends on how fast the writer is. Nothing a pack runs changes: no script under roles/ or forgejo/ stops reading early.
    • gc roles permission deny accepts the global flag --city <dir> and --city=<dir>, which gc passes on to a pack command run as gc --city <dir> roles permission deny ..., and ignores it, as gc roles view beads and view mail do; 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 merge order no longer fails at every run on a bead whose pull request the forge no longer has. gc forgejo pr state prints missing when 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 in metadata.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 state sends its token to no host but its forge's: the host of FORGEJO_URL when that is set, otherwise the host of the worktree's origin. A --pr on another host, or one that is not a pull request URL, prints foreign without any request being made, and the merge order skips such a bead with one line on stderr instead of failing the run.
    Downloads
  • v0.5.0 3e3cb9a004

    v0.5.0
    All checks were successful
    release / release (push) Successful in 4s
    test / changelog (push) Successful in 5s
    test / lint (push) Successful in 13s
    test / scripts (push) Successful in 32s
    Stable

    city-root released this 2026-11-12 06:33:28 +00:00 | 66 commits to main since this release

    Added

    • The worktree setup command, gc roles worktree setup [--checkout <dir>] <work dir> [<default branch>], which makes the Worker's directory a linked worktree of its repository, detached at origin/<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 what assets/scripts/worktree-setup.sh does for the Worker's pre_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 of mol-worker-work. gc creates the Worker's work_dir for 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, where gc roles worktree branch refuses it and git reads the city's repository, whichever rig the Worker works for. Part 2 now runs gc roles worktree setup "$GC_DIR" <base_branch> before any git command, and halts the bead, without touching the checkout, when it fails. The Worker's pre_start keeps 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 where GC_DIR is 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 --detach outside 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 comparing git rev-parse --git-dir and --git-common-dir with --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.sh fills 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 .git is a dangling symlink, which the copy-back would have put over the new worktree's .git: no worktree, and git there reading the city's repository.
    Downloads
  • v0.4.0 20da6c650a

    v0.4.0
    All checks were successful
    release / release (push) Successful in 5s
    test / changelog (push) Successful in 4s
    test / lint (push) Successful in 15s
    test / scripts (push) Successful in 34s
    Stable

    city-root released this 2026-11-12 01:47:37 +00:00 | 68 commits to main since this release

    Added

    • The apply order installs every tool that rexcity's go.mod declares beside rexcity, in REX_BIN_DIR, under the last element of the tool's package path. It builds with GOBIN=<dir> go install ./cmd/rexcity tool where it ran go build ./cmd/rexcity, which builds no tool directive, so that claude-acp, the adapter the acp box runs rexcity with (declared as a tool, sarak.sh/mikluko/claudeacp/cmd/claude-acp, by rexcity's main after v0.28.1, which is the newest rexcity release and does not declare it), lands on the supervisor's PATH with it. For a rexcity that declares claude-acp the order installs rexcity, gc-runtime-rex and claude-acp; for one that declares no tool, v0.28.1 for one, it installs rexcity and gc-runtime-rex as before, since go only warns that the tool pattern matched no package. As before, the order builds only in an apply whose packs.lock moves the rexcity pack.

    Fixed

    • One routed bead costs one Worker session from the claim to the hand-over. mol-worker-work is 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 has wake_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 check links date to gdate and sed to gsed in the shim directory before it checks, so a Worker whose box runs no pre_start, as on acp, no longer halts every bead with "Not GNU's in this session" when the tools are installed. The Worker's pre_start keeps 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's PATH "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-work are Parts 1 to 6 of the step work, and halting is a section of its own, where it was the sixth item of open-pull-request: load-context, workspace-setup, preflight-tests, implement, self-review and open-pull-request are no longer step ids, and gc.continuation_group and gc.session_affinity are gone with the siblings they pinned. gc roles view beads shows 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-work now 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
  • v0.3.0 2004097b52

    v0.3.0
    All checks were successful
    release / release (push) Successful in 4s
    test / lint (push) Successful in 16s
    test / changelog (push) Successful in 5s
    test / scripts (push) Successful in 24s
    Stable

    city-root released this 2026-11-11 20:48:12 +00:00 | 74 commits to main since this release

    Added

    • The gc roles worktree check command, which exits 1 with a one-line reason unless a Worker's worktree is on the bead's branch, and gc 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-work declares its six steps itself, no longer extending core's mol-polecat-base, and every step carries gc.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 after workspace-setup runs gc roles worktree check before 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
  • v0.2.0 c7ee39f8e1

    v0.2.0
    All checks were successful
    release / release (push) Successful in 5s
    test / lint (push) Successful in 14s
    test / changelog (push) Successful in 4s
    test / scripts (push) Successful in 24s
    Stable

    city-root released this 2026-11-11 20:35:14 +00:00 | 76 commits to main since this release

    Added

    • gc roles view beads draws 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 mail prints 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 check command, which exits 1 with a one-line reason when a macOS host lacks gdate or gsed, or when date or sed does 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, unless gdate and gsed are installed.
    • On macOS a Worker's date and sed run as GNU's: its PATH starts with $HOME/.local/share/gascitypacks/gnubin, where its start links them to gdate and gsed.
    Downloads
  • v0.1.0 eeb3aefa5f

    v0.1.0
    All checks were successful
    release / release (push) Successful in 5s
    test / changelog (push) Successful in 4s
    test / scripts (push) Successful in 6s
    test / lint (push) Successful in 3m5s
    Stable

    mikluko released this 2026-11-11 16:09:50 +00:00 | 80 commits to main since this release

    Added

    • The roles pack'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 *) and Bash(bd *): outside bypass-permissions mode, its gc and bd calls, gc mail inbox included, run without asking, and every other command keeps the prompt it had.
    • The roles pack's Worker: a pool of acp sessions for each rig, in bypass-permissions mode, each starting fresh in a worktree of its own, with mol-worker-work as its default sling formula.
    • The roles pack's Worker also runs for the city itself, as roles.worker: a pool that works the beads of the HQ store in worktrees of the city repository under .gc/worktrees/worker and 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 operator and worker, and the shared skills city and contact, 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's mol-polecat-base: it works a bead on worker/<bead-id>, opens its pull request with gc <forge> pr open, records branch and pr_url, and assigns the bead to the user; a blocked Worker records halt_reason and hands the bead to the Operator. Where rexcity is on PATH, the Worker labels its Rex tab with the bead's ID through rexcity label.
    • The apply order, which fast-forwards the city directory to origin/main once the incoming configuration validates, building rexcity and gc-runtime-rex when packs.lock moves rexcity.
    • The permission-request order, which mails the Operator each permission request from a session without permission prompts, and the gc roles permission deny command and deny-permission skill it answers them with.
    • The forgejo pack: gc forgejo pr open and gc forgejo pr state, and the merge order, which closes a bead whose pull request merged and puts a bead whose pull request closed unmerged on the Operator.
    • The release workflow: a push to main that brings a version section into this changelog tags that commit vX.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.N instead 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 upgrade order of the roles pack: every ten minutes it runs gc import upgrade in a worktree of the city repository's origin/main and, when an import moved, validates the result as apply does, pushes it to the branch upgrade/packs as the city's git identity, unsigned whatever the supervisor's git configuration says, and opens the one pull request for that branch with gc <forge> pr open. A sha: pin moves no import, so it proposes nothing; an upgrade is proposed once, told apart by the packs.lock entries it moves, so a pull request the user closed is not opened again whatever else lands on main; a run killed outright leaves nothing that stops the next; a failure mails the Operator.

    Changed

    • mol-worker-work no longer requires its forge variable: it defaults to forgejo.

    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 merge order closes a bead whose pull request merged while the bead is assigned to someone, as mol-worker-work leaves it, and records gc.work_outcome=shipped on it.
    Downloads