• 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