The go suite tests a library change with everything downstream of it (MQ-7) #337

Merged
merge-queue merged 3 commits from anvil-group-job into main 2026-11-30 23:15:13 -08:00
Owner

https://openproject.home.romaine.life/wp/MQ-7: the go suite gains the job that tests a Go library's change with every module downstream of it, in one workspace, before it lands. merge-queue starts it (its PR follows this one) and gates landing on it.

Added

  • suites/go/group.yml (Suite go group), workflow_dispatch only, inputs pr and group ({"version":1,"repo","sha","libraries":[{"module","dir"}],"members":[{"repo","sha","topics","modules":[{"path","dir"}]}]}). Jobs plan, test-linux, test-windows; a newer dispatch for the same repo and PR cancels the older run. plan refuses a run whose repository or commit isn't the group's (the branch moved).
  • suites/go/group.mjs: validates the group; picks each member's platforms from its topics with the go suite's own rule (inputs.mjs testJobs), Linux also for members with test services; fetches each member at its commit (depth 1, four at a time, the job's read token from actions/forgejo-token, nothing stored); writes one go.work (library modules from the checkout, member modules from their clones; newest go line, toolchain when asked); starts the Linux members' services as check-services does; go list -deps -test picks the member packages that build any library package (a package failing to load on a library import is kept so it fails); go vet -p 4, go test -p 4 -json, and -race for go-race members on Linux. Prints ANVIL_GROUP_V1 {"platform","members":{"<repo>":{"result","failed"}}} and fails on any member failure; a workspace that won't load fails with no result line.
  • suites/tests/go-group.test.mjs: input validation, platform choice, workspace layout, go.work, package selection, output parsing, the workflow's shape.

Changed: inputs.mjs gains testJobs (the one copy of the test-platform rule; scope's outputs read it and are unchanged); go/environment.mjs goEnvironment takes an optional go.mod text and gains tofuAcceptance() (moved from go/test.mjs, which calls it, unchanged behaviour); workflows.test.mjs lets a workflow's first job be plan as well as scope.

Left alone: ci.yml, dependencies.yml, services.mjs, config.mjs, every action.

Not yet exercised by a real dispatch (merge-queue's PR does that): runner path, token, services on the runner, input size at logline's 45 modules. Checked locally on Windows with logline and three members, including a deliberately broken library change.

🤖 Generated with Claude Code

https://openproject.home.romaine.life/wp/MQ-7: the go suite gains the job that tests a Go library's change with every module downstream of it, in one workspace, before it lands. merge-queue starts it (its PR follows this one) and gates landing on it. **Added** - `suites/go/group.yml` (`Suite go group`), `workflow_dispatch` only, inputs `pr` and `group` (`{"version":1,"repo","sha","libraries":[{"module","dir"}],"members":[{"repo","sha","topics","modules":[{"path","dir"}]}]}`). Jobs `plan`, `test-linux`, `test-windows`; a newer dispatch for the same repo and PR cancels the older run. `plan` refuses a run whose repository or commit isn't the group's (the branch moved). - `suites/go/group.mjs`: validates the group; picks each member's platforms from its topics with the go suite's own rule (`inputs.mjs testJobs`), Linux also for members with test services; fetches each member at its commit (depth 1, four at a time, the job's read token from `actions/forgejo-token`, nothing stored); writes one go.work (library modules from the checkout, member modules from their clones; newest go line, toolchain when asked); starts the Linux members' services as check-services does; `go list -deps -test` picks the member packages that build any library package (a package failing to load on a library import is kept so it fails); `go vet -p 4`, `go test -p 4 -json`, and `-race` for go-race members on Linux. Prints `ANVIL_GROUP_V1 {"platform","members":{"<repo>":{"result","failed"}}}` and fails on any member failure; a workspace that won't load fails with no result line. - `suites/tests/go-group.test.mjs`: input validation, platform choice, workspace layout, go.work, package selection, output parsing, the workflow's shape. **Changed**: `inputs.mjs` gains `testJobs` (the one copy of the test-platform rule; scope's outputs read it and are unchanged); `go/environment.mjs` `goEnvironment` takes an optional go.mod text and gains `tofuAcceptance()` (moved from `go/test.mjs`, which calls it, unchanged behaviour); `workflows.test.mjs` lets a workflow's first job be `plan` as well as `scope`. **Left alone**: `ci.yml`, `dependencies.yml`, `services.mjs`, `config.mjs`, every action. Not yet exercised by a real dispatch (merge-queue's PR does that): runner path, token, services on the runner, input size at logline's 45 modules. Checked locally on Windows with logline and three members, including a deliberately broken library change. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
go/group.yml, dispatched by anvil on a library pull request's head branch with the group (the
library modules the change touches and each downstream repository at its commit), plans once
and tests on Linux and Windows: one Go workspace of the changed library modules and every member
module tested on that platform, go vet and go test -p 4 over the member packages that build a
library package, each member tested where its own pull request's go suite would test it, with
its test services on Linux. Each test job prints one ANVIL_GROUP_V1 line of every member's result.

inputs.mjs's testJobs is the go suite's own rule for where tests run, which scope's outputs and
the group plan both read; go/environment.mjs takes the go.mod text for the private-module
settings and holds the OpenTofu provider test setup go/test.mjs had inline.

https://openproject.home.romaine.life/wp/MQ-5
go/group.yml names its runs by Forgejo's default title, which anvil doesn't read (MQ-5)
Some checks failed
CI / release-version (pull_request) Has been skipped
Suite default / scope (pull_request) Successful in 20s
merge-queue 2nd in line, behind #336: auth-client joins the fleet (AUT-14)
CI / cache-save (ubuntu-latest) (pull_request) Has been skipped
CI / changes (pull_request) Successful in 15s
CI / azure-cli (pull_request) Has been skipped
CI / home-cache-linux (pull_request) Has been skipped
Suite default / check-rules (pull_request) Successful in 35s
Tofu providers / lock (pull_request) Successful in 12s
CI / prune-releases (pull_request) Has been skipped
CI / check-versions (pull_request) Has been skipped
CI / check-fetches (pull_request) Has been skipped
CI / check-image-digests (pull_request) Has been skipped
CI / cached-images (pull_request) Has been skipped
CI / container-health (pull_request) Has been skipped
CI / manifest-check-linux (pull_request) Has been skipped
Fleet / align (pull_request) Successful in 11s
CI / home-cache-windows (pull_request) Has been skipped
CI / cache-save (windows-latest) (pull_request) Has been skipped
Suite default / check-fetches (pull_request) Has been skipped
Suite default / check-logs (pull_request) Successful in 36s
CI / service-runtime (two) (pull_request) Successful in 1m2s
CI / service-cancellation (pull_request) Successful in 1m11s
Suite default / reused-checks (pull_request) Successful in 16s
CI / setup-linux (cluster) (pull_request) Has been cancelled
CI / setup-windows (pull_request) Has been cancelled
CI / suite-tests-linux (pull_request) Has been cancelled
CI / suite-tests-windows (pull_request) Has been cancelled
CI / actionlint (pull_request) Successful in 25s
CI / service-runtime (one) (pull_request) Successful in 1m4s
f8c1f7de31
https://openproject.home.romaine.life/wp/MQ-5
Merge branch 'main' into anvil-group-job
All checks were successful
CI / check-versions (pull_request) Has been skipped
CI / actionlint (pull_request) Successful in 13s
CI / service-runtime (two) (pull_request) Successful in 40s
Fleet / align (pull_request) Successful in 7s
CI / home-cache-windows (pull_request) Has been skipped
CI / cache-save (ubuntu-latest) (pull_request) Has been skipped
CI / cache-save (windows-latest) (pull_request) Has been skipped
CI / service-cancellation (pull_request) Successful in 46s
Suite default / check-fetches (pull_request) Has been skipped
CI / suite-tests-linux (pull_request) Successful in 56s
Tofu providers / lock (pull_request) Successful in 7s
CI / changes (pull_request) Successful in 10s
CI / check-fetches (pull_request) Has been skipped
CI / cached-images (pull_request) Has been skipped
CI / release-version (pull_request) Has been skipped
CI / check-image-digests (pull_request) Has been skipped
Suite default / scope (pull_request) Successful in 13s
CI / prune-releases (pull_request) Has been skipped
CI / container-health (pull_request) Has been skipped
CI / azure-cli (pull_request) Has been skipped
CI / home-cache-linux (pull_request) Has been skipped
CI / manifest-check-linux (pull_request) Has been skipped
Suite default / check-logs (pull_request) Successful in 15s
Suite default / check-rules (pull_request) Successful in 18s
CI / service-runtime (one) (pull_request) Successful in 40s
Suite default / reused-checks (pull_request) Successful in 23s
CI / suite-tests-windows (pull_request) Successful in 1m28s
CI / setup-linux (cluster) (pull_request) Successful in 1m37s
CI / setup-windows (pull_request) Successful in 2m24s
merge-queue landed on main
33f641c9d1
merge-queue deleted branch anvil-group-job 2026-11-30 23:15:13 -08:00
Sign in to join this conversation.
No description provided.