Skip to content

ci: add first-class Go lane to repo-required-gate (go-ci.yml + go stack/polyglot) #51

Description

@ArchonVII

Problem

repo-required-gate supports stack: node | python | minimal | polyglot(node+python) but has no Go lane. A real consumer — ArchonVII/archon (10 tracked Go modules: root + tsunami + 8 tsunami/demo/*) — ships Go that the shared gate cannot build, vet, or test. Today archon routes **/*.go to language-ci, but the only language CI that runs is node-ci, which compiles zero Go. That is a false-green required check, not just a missing one.

The gate is now a source-of-truth abstraction, so Go must have an explicit state. This issue makes Go first-class.

Scope

  1. New reusable .github/workflows/go-ci.yml mirroring node-ci.yml/python-ci.yml shape, but with multi-module discovery:
    • Discover module roots via git ls-files '**/go.mod' 'go.mod' (NOT a filesystem find — that catches gitignored build artifacts like dist/tsunamiscaffold/go.mod, and recurses into gitignored generated dirs such as tsunami/frontend/scaffold/dist/tw which contains conflicting package decls and breaks go build ./...). git ls-files returns exactly the tracked modules and excludes artifacts.
    • Per module: go mod download, go build ./..., go vet ./..., and go test ./... (test toggle).
    • Inputs: go-versions (JSON array), os-matrix, optional exclude-modules (newline globs), run-tests (bool), optional generate-command + verify-generated (run it, fail on dirty git diff — catches stale Go→TS bindings), cache toggle, build-tags/build-args passthrough (archon uses CGO/sqlite tags).
  2. Classifier (scripts/classify-pr.mjs): add go to VALID_STACKS; emit runGoCi; generalize polyglot to a third language via go-paths (so archon = polyglot node+go). go.mod/go.sum already match DEFAULT_PACKAGE_RE and .go already matches DEFAULT_CODE_EXTENSIONS.
  3. repo-required-gate.yml: add go-ci job + run-go-ci detect output + decision wiring + go-* inputs (go-versions, go-paths, go-test, go-generate-command, etc.).
  4. Tests (scripts/classify-pr.test.mjs): new cases for stack: go, polyglot node+go routing, push events, forced-full; all 37 existing tests stay green.
  5. Docs: new Go section in examples/repo-required-gate.yml; README workflow table; .changelog/unreleased/ fragment.

Verification

  • npm test (vitest) green incl. new Go cases.
  • actionlint clean on go-ci.yml + repo-required-gate.yml.

Release

After merge, v1 must be retagged (git tag -f v1 && git push -f origin v1) before consumers (archon) can use the Go lane.

Follow-up (not this issue)

languages: [<lang>] list-sugar on the caller + a resolver that asserts each declared language maps to a real lane — a cleaner surface than per-language *-paths, deferred to keep this PR reviewable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions