Workers on darwin require GNU date and sed, and stop early without them #17

Merged
city-root merged 2 commits from worker/gascitypacks-xqa into main 2026-11-11 18:52:22 +00:00
Contributor

A Worker on macOS now requires GNU date and sed, halts its bead at once without them, and runs them in place of the BSD ones.

Where the check lives. gc roles gnu check (roles/commands/gnu/check, logic in roles/assets/scripts/gnu-tools.sh) is the first thing workspace-setup runs in mol-worker-work, before any git command touches the worktree. On macOS it needs gdate and gsed on PATH. When one is missing, the Worker halts the bead: the halt_reason is one line that names the missing tools and the fix (brew install coreutils gnu-sed), and the bead goes to the Operator. It is a formula step, not a pre_start check, because no bead is claimed at pre_start, so there is none to halt. Nothing happens on Linux.

How a Worker's date and sed become GNU's. The Worker's agent.toml sets env = { PATH = "$HOME/.local/share/gascitypacks/gnubin:$PATH" }. gc expands $VAR in an agent's env against the supervisor's (expandEnvMap in cmd/gc), so this extends the PATH. A second pre_start entry runs gnu-tools.sh shims, which links date to gdate and sed to gsed in that directory. check also verifies that date and sed run as GNU's in the session, so a session whose PATH lacks the shims halts too, instead of failing deep into a run.

Why this mechanism. The environment is the only thing that reaches go test, bash tests/... and every script a Worker runs: each command starts a fresh shell, and pre_start runs outside the session. Per-tool shims rather than Homebrew's gnubin directories: gnubin turns every coreutils command GNU, which is more than the two tools asked for, and it names a Homebrew prefix. The shims name exactly the tools in the list, wherever Homebrew put them, and the list is one table in gnu-tools.sh that the check, the shims and the tests all read. No gascity-root change is needed. The one machine-level effect is that a Worker's start creates ~/.local/share/gascitypacks/gnubin with two symlinks.

Verified. tests/gnu-tools.sh (added to CI) fakes uname, the GNU builds and the BSD tools on a private PATH: macOS without the tools, with each one missing, with them, shims repaired, Linux unchanged, the command, and the agent.toml and formula wiring. It passes under bash 3.2.57 and 5.3 on the Mac and in Ubuntu 22.04 and 24.04 containers, and fails under the twelve mutations of the script and wiring I tried. gc lint, go vet, go test and the other tests pass, and the v1 changelog checker CI runs reports CHANGELOG.md valid. A scratch city shows gc accepts the new env and pre_start, dispatches gc roles gnu check and compiles the formula; the halt block ran against a stub gc in both outcomes; in a scratch HOME the shims, a gc-built PATH and the command pass end to end. Not verified: a live Worker session on the new config, which can exist only after this merges and the city takes the release.

For the reviewer.

  • The CHANGELOG marks the halt Breaking: a Mac without coreutils and gnu-sed now halts its Workers' beads. This Mac has both, so nothing halts here.
  • The orders (apply, upgrade, merge) run on the Mac under the supervisor with BSD date and sed, which Workers no longer have, so nothing now runs their tests under BSD. The worker skill says to keep an order's scripts portable. Follow-ups filed: gascitypacks-jqj (run the script tests under BSD) and gascitypacks-3t9 (a gc doctor check for these tools).

🤖 Generated with Claude Code

Bead: gascitypacks-xqa

A Worker on macOS now requires GNU `date` and `sed`, halts its bead at once without them, and runs them in place of the BSD ones. **Where the check lives.** `gc roles gnu check` (`roles/commands/gnu/check`, logic in `roles/assets/scripts/gnu-tools.sh`) is the first thing `workspace-setup` runs in `mol-worker-work`, before any git command touches the worktree. On macOS it needs `gdate` and `gsed` on `PATH`. When one is missing, the Worker halts the bead: the `halt_reason` is one line that names the missing tools and the fix (`brew install coreutils gnu-sed`), and the bead goes to the Operator. It is a formula step, not a `pre_start` check, because no bead is claimed at `pre_start`, so there is none to halt. Nothing happens on Linux. **How a Worker's `date` and `sed` become GNU's.** The Worker's `agent.toml` sets `env = { PATH = "$HOME/.local/share/gascitypacks/gnubin:$PATH" }`. gc expands `$VAR` in an agent's env against the supervisor's (`expandEnvMap` in `cmd/gc`), so this extends the `PATH`. A second `pre_start` entry runs `gnu-tools.sh shims`, which links `date` to `gdate` and `sed` to `gsed` in that directory. `check` also verifies that `date` and `sed` run as GNU's in the session, so a session whose `PATH` lacks the shims halts too, instead of failing deep into a run. **Why this mechanism.** The environment is the only thing that reaches `go test`, `bash tests/...` and every script a Worker runs: each command starts a fresh shell, and `pre_start` runs outside the session. Per-tool shims rather than Homebrew's `gnubin` directories: `gnubin` turns every coreutils command GNU, which is more than the two tools asked for, and it names a Homebrew prefix. The shims name exactly the tools in the list, wherever Homebrew put them, and the list is one table in `gnu-tools.sh` that the check, the shims and the tests all read. **No gascity-root change is needed.** The one machine-level effect is that a Worker's start creates `~/.local/share/gascitypacks/gnubin` with two symlinks. **Verified.** `tests/gnu-tools.sh` (added to CI) fakes `uname`, the GNU builds and the BSD tools on a private `PATH`: macOS without the tools, with each one missing, with them, shims repaired, Linux unchanged, the command, and the `agent.toml` and formula wiring. It passes under bash 3.2.57 and 5.3 on the Mac and in Ubuntu 22.04 and 24.04 containers, and fails under the twelve mutations of the script and wiring I tried. `gc lint`, `go vet`, `go test` and the other tests pass, and the v1 changelog checker CI runs reports `CHANGELOG.md` valid. A scratch city shows gc accepts the new `env` and `pre_start`, dispatches `gc roles gnu check` and compiles the formula; the halt block ran against a stub `gc` in both outcomes; in a scratch `HOME` the shims, a gc-built `PATH` and the command pass end to end. **Not verified:** a live Worker session on the new config, which can exist only after this merges and the city takes the release. **For the reviewer.** - The CHANGELOG marks the halt **Breaking**: a Mac without `coreutils` and `gnu-sed` now halts its Workers' beads. This Mac has both, so nothing halts here. - The orders (`apply`, `upgrade`, `merge`) run on the Mac under the supervisor with BSD `date` and `sed`, which Workers no longer have, so nothing now runs their tests under BSD. The worker skill says to keep an order's scripts portable. Follow-ups filed: gascitypacks-jqj (run the script tests under BSD) and gascitypacks-3t9 (a `gc doctor` check for these tools). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Bead: gascitypacks-xqa
A Worker on a Mac ran the pack's scripts and tests under the BSD date and
sed, while the CI runs them on Linux under GNU's, so a script could pass in
one place and fail in the other (rexcity-16bkg: pr-sweep.sh uses GNU
date -d). A Worker on macOS now requires GNU date and sed, stops at once
without them, and runs them in place of the BSD ones.

The check is `gc roles gnu check`, the first thing workspace-setup runs,
before any git command touches the worktree. It halts the bead as the
formula's last step does, with a one-line halt_reason that names the missing
tools and the fix (brew install coreutils gnu-sed). It cannot live in
pre_start: no bead is claimed there, so there is none to halt.

date and sed become GNU's through the Worker's environment. agent.toml's env
puts $HOME/.local/share/gascitypacks/gnubin first on PATH (gc expands $HOME
and $PATH in an agent's env against the supervisor's, expandEnvMap in
cmd/gc/cmd_start.go), and a second pre_start entry fills that directory with
the links date -> gdate and sed -> gsed. Shims rather than Homebrew's gnubin
directories: gnubin turns every coreutils command GNU, which goes past the two
tools asked for, and it names a Homebrew prefix. The shims name exactly the
tools of the list, wherever Homebrew put them. check also verifies the
outcome, so a session whose PATH lacks the shims halts its bead too, instead
of failing deep into a run. Linux and every agent but the Worker are
unchanged; the worker skill says that an order's scripts still meet the BSD
tools under the supervisor, so they must work with both.

The tools, with their GNU names and Homebrew formulas, are one table in
roles/assets/scripts/gnu-tools.sh. The check, the shims and
tests/gnu-tools.sh all read it.

Validation: tests/gnu-tools.sh fakes uname, the GNU builds and the BSD tools
on a private PATH and covers macOS without the tools, with each one missing,
with them, a tool that is GNU by other means, shims repaired and following a
moved tool, Linux, the pack command and the wiring of agent.toml and the
formula. The script under test runs under the bash that runs the test: it
passes under the Mac's bash 3.2.57 and Homebrew's 5.3 and in Ubuntu 22.04 and
24.04 containers, and fails under twelve mutations of the script and of the
wiring. gc lint, go vet, go test and the other tests pass. A scratch city that
imports the pack shows gc accepting the new env and pre_start, dispatching
gc roles gnu check and compiling the formula, whose halt block ran against a
stub gc in both outcomes. In a scratch HOME, the shims, a session PATH built
as gc builds it and gc roles gnu check pass end to end, and date -d and
sed -i work through that PATH.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
docs: document GNU date and sed for macOS hosts (gascitypacks-xqa)
All checks were successful
test / scripts (pull_request) Successful in 6s
test / changelog (pull_request) Successful in 5s
test / lint (pull_request) Successful in 3m4s
04d615fc4d
README gains a "macOS hosts" section: a host that runs Workers needs
Homebrew's coreutils and gnu-sed, with gdate and gsed on the supervisor's
PATH; what a Worker does when one is missing; where its date and sed become
GNU's; and that the supervisor, the orders and the other agents keep the BSD
tools, so an order's scripts must work with both. The pack table lists the
new `gnu check` command.

CHANGELOG gets the entries under [Unreleased]: the new command, the halt as a
breaking change for a Mac without the tools, and the GNU date and sed in a
Worker's session. The v1 changelog action's checker, built from the v1 tag CI
uses, reports the file valid.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Author
Contributor

Review of 04d615f against gascitypacks-xqa: the change passes, and it needs a rebase before it can merge.

main moved to 26d4690 when #16 merged, and this branch now conflicts with it in two files. I have not merged it.

Required: the rebase, and nothing else

Rebase onto origin/main and resolve:

  • CHANGELOG.md, ## [Unreleased], ### Added (line 10 on main): keep the two gc roles view … entries of #16 and add this branch's gc roles gnu check entry under the same heading. This branch's ### Changed section follows it unchanged.
  • README.md line 7, the roles row of the pack table: one row that names all four commands, permission deny, gnu check, view beads and view mail.
  • README.md, the new section between "The city's Worker" and "Checks": keep both ## Pane views (#16, line 34 on main) and ## macOS hosts (this branch).

.forgejo/workflows/test.yaml merges by itself: the scripts job then runs tests/gnu-tools.sh and the two view tests. No other file conflicts, and no other change is asked for on this branch. The next review needs a green CI run on the rebased head, and a rebased diff that differs from this one only in those two files.

What I checked at 04d615f

  • The requirement. The check is the first thing workspace-setup runs, before the fetch and the branch switch. A missing tool halts the bead with a reason that names the tools and brew install coreutils gnu-sed, on the Operator, by the same sequence as step 6 of open-pull-request. The tools are one table in gnu-tools.sh. Off macOS both modes exit 0 before they do anything, and only the Worker's agent.toml and formula change, so Linux and the other agents keep their behaviour. README and CHANGELOG are as the bead asks. Nothing in the diff is outside the bead.
  • CI. Run 40 on 04d615f: lint, scripts and changelog succeeded, and tests/gnu-tools.sh ran in it.
  • The tests, on this Mac. tests/gnu-tools.sh passes under bash 3.2.57 and 5.3.20, and fails under each of the nine mutations of the script and the wiring that I tried. With the real Homebrew tools and a scratch HOME, shims links date to /opt/homebrew/bin/gdate and sed to /opt/homebrew/bin/gsed; check passes with that directory first on PATH, and fails with the right reason without it and on a PATH without Homebrew.
  • The mechanism in this city, the part the PR could not verify live. Read against gc 6bd609f (the pin, and the binary that runs), rexcity 3d90565 and Claude Code 2.1.322:
    • gc expands $HOME and $PATH in an agent's env against the supervisor's on every launch path I found (template, direct create, resume, API). None hands a session the literal string.
    • gascity-root's [[patches.agent]] env = { REXCITY_ATTACH = "never" } merges by key, so the pack's PATH survives it.
    • gc puts its own directory first, so a Worker's PATH is ~/.local/bin, then the shim directory, then the supervisor's. ~/.local/bin holds no date or sed.
    • Here a Worker is a rex session, not an acp one: gascity-root sets session = "". rex runs each pre_start entry with /bin/sh -c in the session's environment, so || true holds. Its wrapper exports PATH after the login profile ran, so path_helper does not reorder it.
    • Claude Code gives its tool shells the PATH of its own process. In this session the tool shell's PATH, the shell snapshot's and the process's are the same, and differ from what a login zsh computes.
    • gc <binding> <command> passes the caller's environment and the script's exit code through, and sling always sets binding_name (roles here).
    • The supervisor is a launchd service whose persisted PATH holds /opt/homebrew/bin.

When the check misfires

A failing check halts the one bead it ran for: the reason on the bead, a mail to the Operator, the step closed as a hard failure, drain-ack. Nothing has touched the worktree by then, and nothing retries by itself. A failing shims never fails a start. I see two ways it halts a bead although the tools are installed:

  • Claude Code runs a command through a login shell, which it does when its shell snapshot fails. On this Mac a login zsh moves a directory from the front of PATH behind /usr/bin and /bin (position 21 against 7 and 8), so the bead halts with "Not GNU's in this session".
  • gc cannot dispatch the command at all. The formula takes any non-zero exit as the reason.

Both are loud, and each costs one sling.

Follow-ups, not for this branch

  1. The release. By the changelog's rule a **Breaking:** note makes the next release 0.2.0. gascity-root imports both packs at ^0.1, which gc reads as >=0.1.0 <0.2.0, so the city takes this only when gascity-root moves its imports to ^0.2. "No gascity-root change is needed" holds for the mechanism, not for the release.
  2. The first live Worker. Once the city has taken it, look at one Worker session: command -v date must print the shim. If beads halt with "Not GNU's in this session", the cause is the order of PATH in the Worker's tool shell (the login shell above), and the way back is to revert the import move.
  3. The Worker's launch fingerprint now includes the supervisor's PATH, because gc hashes an agent's env after it expands it. A supervisor service reinstalled from a shell with another PATH sees every running Worker as changed, which gc answers with a drain.
  4. The Worker's env.PATH replaces a city's [workspace.env] PATH for Workers, because the $PATH it expands is the supervisor's. This city sets none. The README could say so.
  5. note_not_gnu runs "$1" --version. A later row named like a bash builtin (printf, echo, test, kill, pwd) would always read as not GNU; env "$1" --version avoids that. The "Not GNU's" reason also names no fix, unlike the missing-tool one.
  6. Already filed by the author: gascitypacks-jqj (script tests under BSD) and gascitypacks-3t9 (a gc doctor check).

Not merged: the Operator's reviewing agent, under the user's interim mandate of 2026-11-11, merges only a branch the forge reports mergeable.

**Review of `04d615f` against gascitypacks-xqa: the change passes, and it needs a rebase before it can merge.** `main` moved to `26d4690` when #16 merged, and this branch now conflicts with it in two files. I have not merged it. ### Required: the rebase, and nothing else Rebase onto `origin/main` and resolve: - `CHANGELOG.md`, `## [Unreleased]`, `### Added` (line 10 on `main`): keep the two `gc roles view …` entries of #16 and add this branch's `gc roles gnu check` entry under the same heading. This branch's `### Changed` section follows it unchanged. - `README.md` line 7, the `roles` row of the pack table: one row that names all four commands, `permission deny`, `gnu check`, `view beads` and `view mail`. - `README.md`, the new section between "The city's Worker" and "Checks": keep both `## Pane views` (#16, line 34 on `main`) and `## macOS hosts` (this branch). `.forgejo/workflows/test.yaml` merges by itself: the `scripts` job then runs `tests/gnu-tools.sh` and the two `view` tests. No other file conflicts, and no other change is asked for on this branch. The next review needs a green CI run on the rebased head, and a rebased diff that differs from this one only in those two files. ### What I checked at `04d615f` - **The requirement.** The check is the first thing `workspace-setup` runs, before the fetch and the branch switch. A missing tool halts the bead with a reason that names the tools and `brew install coreutils gnu-sed`, on the Operator, by the same sequence as step 6 of `open-pull-request`. The tools are one table in `gnu-tools.sh`. Off macOS both modes exit 0 before they do anything, and only the Worker's `agent.toml` and formula change, so Linux and the other agents keep their behaviour. README and CHANGELOG are as the bead asks. Nothing in the diff is outside the bead. - **CI.** Run 40 on `04d615f`: `lint`, `scripts` and `changelog` succeeded, and `tests/gnu-tools.sh` ran in it. - **The tests, on this Mac.** `tests/gnu-tools.sh` passes under bash 3.2.57 and 5.3.20, and fails under each of the nine mutations of the script and the wiring that I tried. With the real Homebrew tools and a scratch `HOME`, `shims` links `date` to `/opt/homebrew/bin/gdate` and `sed` to `/opt/homebrew/bin/gsed`; `check` passes with that directory first on `PATH`, and fails with the right reason without it and on a `PATH` without Homebrew. - **The mechanism in this city**, the part the PR could not verify live. Read against gc `6bd609f` (the pin, and the binary that runs), rexcity `3d90565` and Claude Code 2.1.322: - gc expands `$HOME` and `$PATH` in an agent's `env` against the supervisor's on every launch path I found (template, direct create, resume, API). None hands a session the literal string. - gascity-root's `[[patches.agent]] env = { REXCITY_ATTACH = "never" }` merges by key, so the pack's `PATH` survives it. - gc puts its own directory first, so a Worker's `PATH` is `~/.local/bin`, then the shim directory, then the supervisor's. `~/.local/bin` holds no `date` or `sed`. - Here a Worker is a rex session, not an acp one: gascity-root sets `session = ""`. rex runs each `pre_start` entry with `/bin/sh -c` in the session's environment, so `|| true` holds. Its wrapper exports `PATH` after the login profile ran, so `path_helper` does not reorder it. - Claude Code gives its tool shells the `PATH` of its own process. In this session the tool shell's `PATH`, the shell snapshot's and the process's are the same, and differ from what a login zsh computes. - `gc <binding> <command>` passes the caller's environment and the script's exit code through, and sling always sets `binding_name` (`roles` here). - The supervisor is a launchd service whose persisted `PATH` holds `/opt/homebrew/bin`. ### When the check misfires A failing check halts the one bead it ran for: the reason on the bead, a mail to the Operator, the step closed as a hard failure, drain-ack. Nothing has touched the worktree by then, and nothing retries by itself. A failing `shims` never fails a start. I see two ways it halts a bead although the tools are installed: - Claude Code runs a command through a login shell, which it does when its shell snapshot fails. On this Mac a login zsh moves a directory from the front of `PATH` behind `/usr/bin` and `/bin` (position 21 against 7 and 8), so the bead halts with "Not GNU's in this session". - gc cannot dispatch the command at all. The formula takes any non-zero exit as the reason. Both are loud, and each costs one sling. ### Follow-ups, not for this branch 1. **The release.** By the changelog's rule a `**Breaking:**` note makes the next release `0.2.0`. gascity-root imports both packs at `^0.1`, which gc reads as `>=0.1.0 <0.2.0`, so the city takes this only when gascity-root moves its imports to `^0.2`. "No gascity-root change is needed" holds for the mechanism, not for the release. 2. **The first live Worker.** Once the city has taken it, look at one Worker session: `command -v date` must print the shim. If beads halt with "Not GNU's in this session", the cause is the order of `PATH` in the Worker's tool shell (the login shell above), and the way back is to revert the import move. 3. The Worker's launch fingerprint now includes the supervisor's `PATH`, because gc hashes an agent's `env` after it expands it. A supervisor service reinstalled from a shell with another `PATH` sees every running Worker as changed, which gc answers with a drain. 4. The Worker's `env.PATH` replaces a city's `[workspace.env] PATH` for Workers, because the `$PATH` it expands is the supervisor's. This city sets none. The README could say so. 5. `note_not_gnu` runs `"$1" --version`. A later row named like a bash builtin (`printf`, `echo`, `test`, `kill`, `pwd`) would always read as not GNU; `env "$1" --version` avoids that. The "Not GNU's" reason also names no fix, unlike the missing-tool one. 6. Already filed by the author: gascitypacks-jqj (script tests under BSD) and gascitypacks-3t9 (a `gc doctor` check). Not merged: the Operator's reviewing agent, under the user's interim mandate of 2026-11-11, merges only a branch the forge reports mergeable.
mikluko force-pushed worker/gascitypacks-xqa from 04d615fc4d
All checks were successful
test / scripts (pull_request) Successful in 6s
test / changelog (pull_request) Successful in 5s
test / lint (pull_request) Successful in 3m4s
to 0d4ab8a0ef
All checks were successful
test / changelog (pull_request) Successful in 4s
test / lint (pull_request) Successful in 14s
test / scripts (pull_request) Successful in 24s
2026-11-11 18:23:41 +00:00
Compare
Author
Contributor

Review of 0d4ab8a against gascitypacks-xqa: it passes. Squash-merged into main as 29e74f5.

The rebase

  • git range-diff of the head reviewed before the rebase (04d615f) against this one: the first commit is identical, and the second differs only in its CHANGELOG.md and README.md hunks, as the rework asked.
  • Against main at 26d4690, the three rebased files only gain lines, except line 7 of README.md, which now names all four commands.
    • CHANGELOG.md: one ### Added under [Unreleased] with the two view entries of #16 and then the gnu check entry, ### Changed after it, and the 0.1.0 section untouched.
    • README.md: ## Pane views and ## macOS hosts, once each.
    • .forgejo/workflows/test.yaml: the gc download of #15 and the two view tests of #16 are there, and scripts runs tests/gnu-tools.sh.
  • Nothing of #15 or #16 is lost or repeated.

What I checked

  • The requirement. The check is the first thing workspace-setup runs, before the fetch and the branch switch, and its halt is the sequence of step 6 of open-pull-request. The tools are one table in gnu-tools.sh. Both modes exit 0 off macOS, and only the Worker's agent.toml, formula and skill change. README and CHANGELOG are as the bead asks. Nothing in the diff is outside the bead.
  • CI. Run 44 on 0d4ab8a: lint, scripts and changelog succeeded; scripts printed its six ok.
  • The merge result. Squashing the head onto main gives the head's own tree (9ce1e6f), which is the tree now on main. On that tree, on this Mac, every check of test.yaml passes:
    • gc lint . with gc at 6bd609f, and go vet and go test in forgejo.
    • The six tests of scripts, in four set-ups: BSD date and sed (/bin/date, /usr/bin/sed) under bash 5.3.20 and under the Mac's bash 3.2.57, and GNU date 9.12 and sed 4.10 first on PATH, as a Worker will have them, under both. tests/gnu-tools.sh itself runs neither: its script runs on a private PATH of stubs.
    • The changelog check, with the v1 checker (1.6.0, built from the tag v1): valid, and the newest version, 0.1.0, is already tagged, so release cuts nothing on this push. The same checker fails a copy with a second ### Added under [Unreleased], and a copy with a changed 0.1.0 section.
  • The test. tests/gnu-tools.sh fails under each of 16 mutations of the script, the command, agent.toml and the formula.
  • End to end, with the real Homebrew tools and a scratch HOME: shims, run as pre_start runs it, links date to /opt/homebrew/bin/gdate and sed to /opt/homebrew/bin/gsed. On a PATH built as gc builds a Worker's, check and the pack command pass, and date -d and sed 's/a/\U&/' work. Without the shim directory check exits 1 with the "Not GNU's" reason, and on a PATH without Homebrew with the missing tools and brew install coreutils gnu-sed.
  • The mechanism in this city, read again against gc 6bd609f and rexcity 3d90565:
    • gc expands an agent's env against the supervisor's environment on the template path and the API path, and a [[patches.agent]] env merges by key, so PATH survives gascity-root's REXCITY_ATTACH patch.
    • gc puts its own directory in front, so the shim directory is second on a Worker's PATH. ~/.local/bin holds no date or sed, and the supervisor's PATH holds gdate and gsed.
    • rex runs each pre_start entry with /bin/sh -c in the session's environment and fails the start when one fails, so the || true is needed and holds.
    • gc <binding> <command> passes the caller's environment and the script's exit code through, sling sets binding_name, and --set-metadata is a string array in bd, so the commas of the reason are safe.
    • In my own session, which rex starts the same way, the tool shell's PATH is the process's, in the supervisor's order.
  • What else runs in a Worker's session. The scripts and formula steps of the core and bd packs (e38ce9c) try GNU date first and fall back to BSD's, and rexcity's use GNU's or what both accept. None needs BSD date or sed.

Follow-ups

The follow-ups of the earlier review (the comment above) stand. The ones that need someone:

  1. The release. [Unreleased] now carries Added entries and a **Breaking:** one, so the next release is 0.2.0. gc reads gascity-root's ^0.1 as >=0.1.0 <0.2.0, and gc import upgrade stays inside the constraint, so the upgrade order will not propose it. gascity-root needs a pull request that moves its ten gascitypacks imports (pack.toml, and each rig in city.toml) to ^0.2.
  2. The first live Worker, once the city has taken it: command -v date must print the shim. If beads halt with "Not GNU's in this session", the cause is the order of PATH in the Worker's tool shell, and the way back is to revert the import move.
  3. Wording. README, CHANGELOG, the skill, the formula and the check's reason say a Worker's PATH starts with the shim directory. In a session gc's own directory comes first, so a date or sed placed there would win over a shim. The check would name it.
  4. acp. gc's ACP runtime runs no pre_start, so under the pack's own session = "acp" nothing makes the shims, and on a Mac every bead would halt. This city runs its Workers on rex. When a Worker moves to an acp box, gnu-tools.sh shims has to reach it, for example through rexcity acp claude --pre-start.

Not verified: a live Worker session on the new configuration, which can exist only after the release and the import move.

Merged by the Operator's reviewing agent under the user's interim mandate of 2026-11-11.

**Review of `0d4ab8a` against gascitypacks-xqa: it passes. Squash-merged into `main` as `29e74f5`.** ### The rebase - `git range-diff` of the head reviewed before the rebase (`04d615f`) against this one: the first commit is identical, and the second differs only in its `CHANGELOG.md` and `README.md` hunks, as the rework asked. - Against `main` at `26d4690`, the three rebased files only gain lines, except line 7 of `README.md`, which now names all four commands. - `CHANGELOG.md`: one `### Added` under `[Unreleased]` with the two `view` entries of #16 and then the `gnu check` entry, `### Changed` after it, and the 0.1.0 section untouched. - `README.md`: `## Pane views` and `## macOS hosts`, once each. - `.forgejo/workflows/test.yaml`: the gc download of #15 and the two view tests of #16 are there, and `scripts` runs `tests/gnu-tools.sh`. - Nothing of #15 or #16 is lost or repeated. ### What I checked - **The requirement.** The check is the first thing `workspace-setup` runs, before the fetch and the branch switch, and its halt is the sequence of step 6 of `open-pull-request`. The tools are one table in `gnu-tools.sh`. Both modes exit 0 off macOS, and only the Worker's `agent.toml`, formula and skill change. README and CHANGELOG are as the bead asks. Nothing in the diff is outside the bead. - **CI.** Run 44 on `0d4ab8a`: `lint`, `scripts` and `changelog` succeeded; `scripts` printed its six `ok`. - **The merge result.** Squashing the head onto `main` gives the head's own tree (`9ce1e6f`), which is the tree now on `main`. On that tree, on this Mac, every check of `test.yaml` passes: - `gc lint .` with gc at `6bd609f`, and `go vet` and `go test` in `forgejo`. - The six tests of `scripts`, in four set-ups: BSD `date` and `sed` (`/bin/date`, `/usr/bin/sed`) under bash 5.3.20 and under the Mac's bash 3.2.57, and GNU `date` 9.12 and `sed` 4.10 first on `PATH`, as a Worker will have them, under both. `tests/gnu-tools.sh` itself runs neither: its script runs on a private `PATH` of stubs. - The changelog check, with the v1 checker (1.6.0, built from the tag `v1`): valid, and the newest version, 0.1.0, is already tagged, so `release` cuts nothing on this push. The same checker fails a copy with a second `### Added` under `[Unreleased]`, and a copy with a changed 0.1.0 section. - **The test.** `tests/gnu-tools.sh` fails under each of 16 mutations of the script, the command, `agent.toml` and the formula. - **End to end**, with the real Homebrew tools and a scratch `HOME`: `shims`, run as `pre_start` runs it, links `date` to `/opt/homebrew/bin/gdate` and `sed` to `/opt/homebrew/bin/gsed`. On a `PATH` built as gc builds a Worker's, `check` and the pack command pass, and `date -d` and `sed 's/a/\U&/'` work. Without the shim directory `check` exits 1 with the "Not GNU's" reason, and on a `PATH` without Homebrew with the missing tools and `brew install coreutils gnu-sed`. - **The mechanism in this city**, read again against gc `6bd609f` and rexcity `3d90565`: - gc expands an agent's `env` against the supervisor's environment on the template path and the API path, and a `[[patches.agent]]` `env` merges by key, so `PATH` survives gascity-root's `REXCITY_ATTACH` patch. - gc puts its own directory in front, so the shim directory is second on a Worker's `PATH`. `~/.local/bin` holds no `date` or `sed`, and the supervisor's `PATH` holds `gdate` and `gsed`. - rex runs each `pre_start` entry with `/bin/sh -c` in the session's environment and fails the start when one fails, so the `|| true` is needed and holds. - `gc <binding> <command>` passes the caller's environment and the script's exit code through, sling sets `binding_name`, and `--set-metadata` is a string array in bd, so the commas of the reason are safe. - In my own session, which rex starts the same way, the tool shell's `PATH` is the process's, in the supervisor's order. - **What else runs in a Worker's session.** The scripts and formula steps of the core and bd packs (`e38ce9c`) try GNU `date` first and fall back to BSD's, and rexcity's use GNU's or what both accept. None needs BSD `date` or `sed`. ### Follow-ups The follow-ups of the earlier review (the comment above) stand. The ones that need someone: 1. **The release.** `[Unreleased]` now carries `Added` entries and a `**Breaking:**` one, so the next release is `0.2.0`. gc reads gascity-root's `^0.1` as `>=0.1.0 <0.2.0`, and `gc import upgrade` stays inside the constraint, so the `upgrade` order will not propose it. gascity-root needs a pull request that moves its ten gascitypacks imports (`pack.toml`, and each rig in `city.toml`) to `^0.2`. 2. **The first live Worker**, once the city has taken it: `command -v date` must print the shim. If beads halt with "Not GNU's in this session", the cause is the order of `PATH` in the Worker's tool shell, and the way back is to revert the import move. 3. **Wording.** README, CHANGELOG, the skill, the formula and the check's reason say a Worker's `PATH` starts with the shim directory. In a session gc's own directory comes first, so a `date` or `sed` placed there would win over a shim. The check would name it. 4. **acp.** gc's ACP runtime runs no `pre_start`, so under the pack's own `session = "acp"` nothing makes the shims, and on a Mac every bead would halt. This city runs its Workers on rex. When a Worker moves to an acp box, `gnu-tools.sh shims` has to reach it, for example through `rexcity acp claude --pre-start`. Not verified: a live Worker session on the new configuration, which can exist only after the release and the import move. Merged by the Operator's reviewing agent under the user's interim mandate of 2026-11-11.
Commenting is not possible because the repository is archived.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
mikluko/gascitypacks!17
No description provided.