Port rexcity's packs/forgejo and packs/github into gascitypacks #45

Closed
city-root wants to merge 1 commit from worker/gascitypacks-egf into main
Contributor

What this does

Ports rexcity's packs/forgejo and packs/github and their tests into this repository (bead gascitypacks-egf), as the user decided on 2026-11-12: rexcity is the runtime only. Nothing in rexcity, forgejo/ or roles/ changes. Removing the packs from rexcity is another bead, after this one is merged and released.

Taken from rexcity main at 6a38c88 (the bead said 8afa954 or later): packs/forgejo (11 files), packs/github (9 files) and the ten packs/*_test.go, moved as they were. The only edits are the ones the new home forces: the pack names, the READMEs' import examples and paths, and the tests' paths to the packs (tests/refinery/paths_test.go).

Names

Was Is Why
packs/forgejo (name forgejo) refinery-forgejo/ (name refinery-forgejo) this repository's forgejo is the gc forgejo pr tool and the merge order
packs/github (name github) refinery-github/ (name refinery-github) same shape, same prefix

I took the Operator's suggestion: both say what the pack is for (gastown's Refinery) before they say the forge, and refinery-forgejo cannot be read as forgejo. I found none better. A shorter pr-* would clash with gc forgejo pr. The formulas keep saying "the forgejo pack's fork" and "the github pack's fork" in their descriptions, since a test checks that text and the bead said no change of behaviour.

What an importer changes

Two lines of the import and nothing else (each pack's README, "Moving from rexcity", says so):

[rigs.imports.pr]
source = "https://sarak.sh/mikluko/gascitypacks.git//refinery-forgejo"   # or //refinery-github
version = "^0.6"

The source was https://sarak.sh/mikluko/rexcity.git//packs/forgejo (or packs/github), and the version was ^0.8 (forgejo) or ^0.23 (github) against rexcity's tags. ^0.6 assumes this change goes out as 0.6.0, the next minor after 0.5.0; the READMEs say "the first release that carries the pack", so if the release is numbered otherwise only the example changes. The binding pr, the fragment names (forgejo-refinery, github-mayor, ...) and the formula vars are unchanged. No city imports these packs today.

Tests in CI

  • They are a Go module of their own, tests/refinery (sarak.sh/mikluko/gascitypacks/tests/refinery), with testify, BurntSushi/toml and goldmark (what rexcity's go.mod required of them, same versions). The forgejo tool's module has no dependency and keeps none.
  • They run in the test / lint job, which already installs Go and jq: a new step refinery packs tests runs go vet ./... and go test ./.... No new required check is needed. The Go cache key now also names tests/refinery/go.sum.
  • How it fits docs/shell.md section 3 (one module at the root, not yet accepted): if the user accepts it, item 0 moves the files into the root module and the three requirements into its go.mod. I recommend keeping this module separate (the doc says why, and says I have not tried the alternative offline); nothing here depends on the answer.

The repository's own checks

  • gc lint . finds the two packs by itself: "4 pack(s) ok", with the same "not composed by city" warning each pack has. tests/formula.sh passes. The changelog tool v1.6.0, built from its tag, reports the changelog valid. tests/formula.sh and the other shell tests walk no pack but their own, so none needs to know of the new ones.
  • .forgejo/workflows/release.yaml: a comment said one tag covers "both packs"; it names four now. Nothing else of the workflow changed.

Run here

On this Mac, with a stub rex that exits non-zero first on PATH and GOPROXY=off: go vet ./... and go test -count=1 ./... in tests/refinery pass (68 s), also with the BSD date ahead of the GNU one (rexcity's #66 problem is gone at 6a38c88); go test ./... of the forgejo tool passes. No ported test fails here, so none is skipped.

Shell that came along

pr-sweep.sh (396 non-blank lines, S 353, D 56, P 33) and the formulas' shell (865 + 383 in refinery-forgejo, 673 + 514 in refinery-github: 2435 code lines of bash blocks) are moved as they are. What docs/shell.md needed and now has: a section 1.5 with the inventory rows and the counts (the totals and the tables of section 2 stay at e22b7f9, and say so), plan item 8 (pr-sweep as a Go command of the forgejo tool, after item 0 and after Landing's L12/L13/L15), the rexcity bullet of section 6 (rexcity's own pr-sweep.sh count goes with the port; it keeps 134 lines of CI and chart glue), the Appendix A command (it now also reads refinery-forgejo/orders), and a note on the tests' module. The formulas' shell is not planned for Go: most of the patrol formula is gastown's, held byte for byte by the drift test; the plan keeps them as ledger lines with that reason, if the rule is adopted.

Defects that travelled with the packs

All four stay open in rexcity's store; none is fixed here:

  • rexcity-k83: a blocked review bead keeps its claim, so the reviewer sleeps and holds the pool slot. rexcity's #30 fixes it and is in the files taken; the bead is still open there.
  • rexcity-0rbg: an apostrophe in the work title blanks the pull request's title and the review bead's pr_url, and gives a false "not protected" mail. Open, unfixed (the formula text is as it was).
  • rexcity-h89g: the Mayor's forgejo fragment does not hand a pull request it opens outside the Refinery to review and auto-merge. Open, unfixed.
  • rexcity-ncth: TestReviewOfAMovedHead/work_bead_names_a_round_no_review_bead_has failed on rexcity's main at 736605d. It passes at 6a38c88 (rexcity's #48, 76d21f7, changed the test); its bead is still open there.

The CHANGELOG entry under [Unreleased] says the same.

Bead: gascitypacks-egf

## What this does Ports rexcity's `packs/forgejo` and `packs/github` and their tests into this repository (bead `gascitypacks-egf`), as the user decided on 2026-11-12: rexcity is the runtime only. Nothing in rexcity, `forgejo/` or `roles/` changes. Removing the packs from rexcity is another bead, after this one is merged and released. **Taken from** rexcity `main` at `6a38c88` (the bead said 8afa954 or later): `packs/forgejo` (11 files), `packs/github` (9 files) and the ten `packs/*_test.go`, moved as they were. The only edits are the ones the new home forces: the pack names, the READMEs' import examples and paths, and the tests' paths to the packs (`tests/refinery/paths_test.go`). ## Names | Was | Is | Why | |---|---|---| | `packs/forgejo` (name `forgejo`) | `refinery-forgejo/` (name `refinery-forgejo`) | this repository's `forgejo` is the `gc forgejo pr` tool and the `merge` order | | `packs/github` (name `github`) | `refinery-github/` (name `refinery-github`) | same shape, same prefix | I took the Operator's suggestion: both say what the pack is for (gastown's Refinery) before they say the forge, and `refinery-forgejo` cannot be read as `forgejo`. I found none better. A shorter `pr-*` would clash with `gc forgejo pr`. The formulas keep saying "the forgejo pack's fork" and "the github pack's fork" in their descriptions, since a test checks that text and the bead said no change of behaviour. ## What an importer changes Two lines of the import and nothing else (each pack's README, "Moving from rexcity", says so): ```toml [rigs.imports.pr] source = "https://sarak.sh/mikluko/gascitypacks.git//refinery-forgejo" # or //refinery-github version = "^0.6" ``` The source was `https://sarak.sh/mikluko/rexcity.git//packs/forgejo` (or `packs/github`), and the version was `^0.8` (forgejo) or `^0.23` (github) against rexcity's tags. `^0.6` assumes this change goes out as 0.6.0, the next minor after 0.5.0; the READMEs say "the first release that carries the pack", so if the release is numbered otherwise only the example changes. The binding `pr`, the fragment names (`forgejo-refinery`, `github-mayor`, ...) and the formula vars are unchanged. No city imports these packs today. ## Tests in CI - They are a Go module of their own, `tests/refinery` (`sarak.sh/mikluko/gascitypacks/tests/refinery`), with testify, BurntSushi/toml and goldmark (what rexcity's `go.mod` required of them, same versions). The forgejo tool's module has no dependency and keeps none. - They run in the **`test / lint`** job, which already installs Go and `jq`: a new step `refinery packs tests` runs `go vet ./...` and `go test ./...`. **No new required check is needed.** The Go cache key now also names `tests/refinery/go.sum`. - How it fits `docs/shell.md` section 3 (one module at the root, not yet accepted): if the user accepts it, item 0 moves the files into the root module and the three requirements into its `go.mod`. I recommend keeping this module separate (the doc says why, and says I have not tried the alternative offline); nothing here depends on the answer. ## The repository's own checks - `gc lint .` finds the two packs by itself: "4 pack(s) ok", with the same "not composed by city" warning each pack has. `tests/formula.sh` passes. The changelog tool v1.6.0, built from its tag, reports the changelog valid. `tests/formula.sh` and the other shell tests walk no pack but their own, so none needs to know of the new ones. - `.forgejo/workflows/release.yaml`: a comment said one tag covers "both packs"; it names four now. Nothing else of the workflow changed. ## Run here On this Mac, with a stub `rex` that exits non-zero first on `PATH` and `GOPROXY=off`: `go vet ./...` and `go test -count=1 ./...` in `tests/refinery` pass (68 s), also with the BSD `date` ahead of the GNU one (rexcity's #66 problem is gone at `6a38c88`); `go test ./...` of the forgejo tool passes. **No ported test fails here, so none is skipped.** ## Shell that came along `pr-sweep.sh` (396 non-blank lines, S 353, D 56, P 33) and the formulas' shell (865 + 383 in `refinery-forgejo`, 673 + 514 in `refinery-github`: 2435 code lines of `bash` blocks) are moved as they are. What `docs/shell.md` needed and now has: a section 1.5 with the inventory rows and the counts (the totals and the tables of section 2 stay at `e22b7f9`, and say so), plan item 8 (`pr-sweep` as a Go command of the forgejo tool, after item 0 and after Landing's L12/L13/L15), the rexcity bullet of section 6 (rexcity's own `pr-sweep.sh` count goes with the port; it keeps 134 lines of CI and chart glue), the Appendix A command (it now also reads `refinery-forgejo/orders`), and a note on the tests' module. The formulas' shell is not planned for Go: most of the patrol formula is gastown's, held byte for byte by the drift test; the plan keeps them as ledger lines with that reason, if the rule is adopted. ## Defects that travelled with the packs All four stay open in rexcity's store; none is fixed here: - `rexcity-k83`: a blocked review bead keeps its claim, so the reviewer sleeps and holds the pool slot. rexcity's #30 fixes it and is in the files taken; the bead is still open there. - `rexcity-0rbg`: an apostrophe in the work title blanks the pull request's title and the review bead's `pr_url`, and gives a false "not protected" mail. Open, unfixed (the formula text is as it was). - `rexcity-h89g`: the Mayor's forgejo fragment does not hand a pull request it opens outside the Refinery to review and auto-merge. Open, unfixed. - `rexcity-ncth`: `TestReviewOfAMovedHead/work_bead_names_a_round_no_review_bead_has` failed on rexcity's main at `736605d`. It passes at `6a38c88` (rexcity's #48, `76d21f7`, changed the test); its bead is still open there. The CHANGELOG entry under `[Unreleased]` says the same. Bead: gascitypacks-egf
Port rexcity's packs/forgejo and packs/github as refinery-forgejo and refinery-github (gascitypacks-egf)
All checks were successful
test / changelog (pull_request) Successful in 5s
test / scripts (pull_request) Successful in 39s
test / lint (pull_request) Successful in 1m43s
11d02deb25
The user's instruction of 2026-11-12 is that rexcity is the runtime only: both
packs and their tests leave it. This brings them in, from rexcity's main at
6a38c88, moved as they were: the formulas, prompts, fragments, the pr-sweep
order and script, and the ten Go test files. The only edits are the ones a new
home forces: the packs' names, the READMEs' import examples and paths, and
the tests' paths to the packs.

The names are refinery-forgejo and refinery-github, because this repository
already has a forgejo pack (the gc forgejo pr tool and the merge order) and the
two must not be mistaken for each other. Each README says what an importer of
rexcity's packs changes: the source and the version constraint; the binding
name pr, the fragment names and the formula vars stay.

The tests are a Go module of their own, tests/refinery, with testify, toml and
goldmark: the forgejo tool's module has no dependency and keeps none, and a
root module is the user's open decision (docs/shell.md, section 3). The lint
job runs them after the forgejo tool's, so no new required check is needed.
docs/shell.md gets the inventory rows and the plan item the new shell needs
(pr-sweep.sh, S 353; 2435 code lines in the formulas' blocks).

Validation: go vet and go test ./... in tests/refinery pass, with a stub rex
first on the PATH, and with the BSD date too; go test in forgejo passes;
gc lint . passes with the four packs; tests/formula.sh passes; the changelog
tool v1.6.0 reports the changelog valid.

The four defects that travelled stay open in rexcity's store and none is
fixed: rexcity-k83, rexcity-0rbg, rexcity-h89g, rexcity-ncth.

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

Review of head 11d02deb25 (bead gascitypacks-egf). Verdict: changes required, one line.

Required

  • refinery-github/README.md:193 says: "Its name is refinery-github because this repository already has a github pack". It has none: the packs are roles, forgejo, refinery-forgejo and refinery-github. Give the true reason, for example that the name follows refinery-forgejo's, saying what the pack is for before the forge, and that a bare github beside this repository's forgejo would read as that pack's GitHub counterpart. Nothing else needs to change.

What I checked (all good)

  • Faithful move: rexcity at 6a38c88 (descends from 8afa954), diff -r file by file. All 11 + 9 pack files and all ten packs/*_test.go are here, nothing left behind, nothing extra beyond tests/refinery/{go.mod,go.sum,paths_test.go}. Differences: pack.toml name (both), the READMEs (title, intro, import example, paths, go test command, the new "Moving from rexcity" section), and in the tests only the pack paths (now forgejoPack/githubPack constants) plus one assertion that needs it: github_pack_test.go:97 expects refinery-github where it expected github. Formulas, prompts, fragments, script, order, upstream copies: byte-identical. go.mod requirements match rexcity's versions; go.sum lines identical.
  • Names: no agent, order, formula or fragment name is shared with forgejo or roles. Scratch cities (throwaway HOME, city variables removed) importing roles, forgejo and the ported pack as pr, at the city and on a rig: gc config show --validate says "Config valid." for both packs; gc formula list --rig shows each formula once.
  • Tests: they run in CI, test / lint step "refinery packs tests": the log of run 1658 has ok sarak.sh/mikluko/gascitypacks/tests/refinery 79.871s. On the merge result (main b3474d4 is the PR's base, so the tree equals the head's), with a stub rex first on PATH and GOPROXY=off: go vet, go test -count=1 -v (194 PASS, no SKIP, no FAIL) and -race pass in tests/refinery; the forgejo tool's tests pass. No skip was added; the only skips are rexcity's own, when bash/jq/curl/git are missing.
  • gc lint .: 4 pack(s) ok. tests/formula.sh passes (it walks only roles). Changelog tool v1.6.0, built from its tag: valid.
  • Nothing in forgejo/ or roles/ changed. CHANGELOG entry under [Unreleased]; the four rexcity defects listed.

Follow-ups, not blocking

  • On 2026-11-12 at 11:47, after this PR was opened, the user accepted docs/shell.md's single root module (with internal/gcx) and the Moderate rule. This PR adds a recommendation (section 3.2) to keep tests/refinery a separate module. That now runs against the decision. Plan item 0 has to move tests/refinery into the root module, with its three requirements, and the recommendation has to come out of the document when the decision is recorded.
  • Under the Moderate rule, pr-sweep.sh (S 353, unattended, with state) fails, and so do the four formulas' bash blocks. Each needs a line in the ledger when item 0 creates it, until plan item 8 moves the script to Go.
  • The Mayor fragments still say "imports the forgejo pack" / "the github pack", and the formulas still say "the forgejo pack's fork". That text was kept on purpose, but in a city that also imports this repository's forgejo it is ambiguous. Change it in a later change, together with the test that checks the text.
Review of head 11d02deb250cedf455dc0537ae0dd3bcc3f861bd (bead gascitypacks-egf). Verdict: changes required, one line. ## Required - `refinery-github/README.md:193` says: "Its name is `refinery-github` because this repository already has a `github` pack". It has none: the packs are `roles`, `forgejo`, `refinery-forgejo` and `refinery-github`. Give the true reason, for example that the name follows `refinery-forgejo`'s, saying what the pack is for before the forge, and that a bare `github` beside this repository's `forgejo` would read as that pack's GitHub counterpart. Nothing else needs to change. ## What I checked (all good) - Faithful move: rexcity at `6a38c88` (descends from 8afa954), `diff -r` file by file. All 11 + 9 pack files and all ten `packs/*_test.go` are here, nothing left behind, nothing extra beyond `tests/refinery/{go.mod,go.sum,paths_test.go}`. Differences: `pack.toml` `name` (both), the READMEs (title, intro, import example, paths, `go test` command, the new "Moving from rexcity" section), and in the tests only the pack paths (now `forgejoPack`/`githubPack` constants) plus one assertion that needs it: `github_pack_test.go:97` expects `refinery-github` where it expected `github`. Formulas, prompts, fragments, script, order, upstream copies: byte-identical. go.mod requirements match rexcity's versions; go.sum lines identical. - Names: no agent, order, formula or fragment name is shared with `forgejo` or `roles`. Scratch cities (throwaway HOME, city variables removed) importing `roles`, `forgejo` and the ported pack as `pr`, at the city and on a rig: `gc config show --validate` says "Config valid." for both packs; `gc formula list --rig` shows each formula once. - Tests: they run in CI, `test / lint` step "refinery packs tests": the log of run 1658 has `ok sarak.sh/mikluko/gascitypacks/tests/refinery 79.871s`. On the merge result (main b3474d4 is the PR's base, so the tree equals the head's), with a stub `rex` first on PATH and GOPROXY=off: `go vet`, `go test -count=1 -v` (194 PASS, no SKIP, no FAIL) and `-race` pass in `tests/refinery`; the forgejo tool's tests pass. No skip was added; the only skips are rexcity's own, when bash/jq/curl/git are missing. - `gc lint .`: 4 pack(s) ok. `tests/formula.sh` passes (it walks only roles). Changelog tool v1.6.0, built from its tag: valid. - Nothing in `forgejo/` or `roles/` changed. CHANGELOG entry under [Unreleased]; the four rexcity defects listed. ## Follow-ups, not blocking - On 2026-11-12 at 11:47, after this PR was opened, the user accepted `docs/shell.md`'s single root module (with `internal/gcx`) and the Moderate rule. This PR adds a recommendation (section 3.2) to keep `tests/refinery` a separate module. That now runs against the decision. Plan item 0 has to move `tests/refinery` into the root module, with its three requirements, and the recommendation has to come out of the document when the decision is recorded. - Under the Moderate rule, `pr-sweep.sh` (S 353, unattended, with state) fails, and so do the four formulas' bash blocks. Each needs a line in the ledger when item 0 creates it, until plan item 8 moves the script to Go. - The Mayor fragments still say "imports the forgejo pack" / "the github pack", and the formulas still say "the forgejo pack's fork". That text was kept on purpose, but in a city that also imports this repository's `forgejo` it is ambiguous. Change it in a later change, together with the test that checks the text.
Author
Contributor

Closed without merging, on the user's decision of 2026-11-12 12:07 CET. Asked where the two Refinery packs should live once gascitypacks is split into gascity-staff-pack and gascity-forgejo-pack, the user chose: Landing is the integration. Nothing is copied; rexcity keeps packs/forgejo until the forgejo pack's orders and Reviewer have taken over its work, and it is deleted then, together with packs/github. The review of this pull request found the move faithful (one README line apart); the work is not lost, the branch stays. From the Operator.

Closed without merging, on the user's decision of 2026-11-12 12:07 CET. Asked where the two Refinery packs should live once gascitypacks is split into gascity-staff-pack and gascity-forgejo-pack, the user chose: Landing is the integration. Nothing is copied; rexcity keeps packs/forgejo until the forgejo pack's orders and Reviewer have taken over its work, and it is deleted then, together with packs/github. The review of this pull request found the move faithful (one README line apart); the work is not lost, the branch stays. From the Operator.
city-root closed this pull request 2026-11-12 11:08:21 +00:00
Commenting is not possible because the repository is archived.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
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!45
No description provided.