Skip to content

CI: run the make gate on every push and pull request - #4

Merged
skyoo2003 merged 2 commits into
mainfrom
ci-gate
Aug 13, 2026
Merged

CI: run the make gate on every push and pull request#4
skyoo2003 merged 2 commits into
mainfrom
ci-gate

Conversation

@skyoo2003

@skyoo2003 skyoo2003 commented Aug 13, 2026

Copy link
Copy Markdown
Owner

Summary

The Makefile already defined this project's quality gate, but nothing ran it except a person. Makefile even said so out loud — the -race default was justified with "there is no CI to run it anywhere else."

This PR adds that CI. Every push to main and every pull request now gets an automatic pass/fail verdict, and the result is visible from the repository's first screen.

The gate is make all, not a list of commands copied out of the Makefile. If CI duplicated the commands, the two could drift and a local pass would stop meaning a CI pass.

Changes

  • Added .github/workflows/ci.yml: on push to main and on all pull requests, run make all on ubuntu-latest
  • Added a fmt target that fails on unformatted files, and folded it into allgo vet says nothing about formatting, so drift would otherwise only surface in review
  • Go version is read from go.mod via go-version-file, so the version is written in one place
  • Restricted the workflow token to contents: read
  • Added a CI status badge to the README and updated the Development section to match the actual targets
  • Dropped the now-false "there is no CI to run it anywhere else" clause from the test target comment

Deliberately not included: a multi-version Go matrix (go.mod requires 1.26, so older toolchains cannot build this at all), a module cache (zero external dependencies), concurrency: cancel-in-progress, and a separate make deps step — TestGoListDepsProvesFusionIgnorance and TestNoExternalDependencies already run under go test ./....

Validation

  • make fmtOK: gofmt clean
  • make all — fmt + build + vet + go test -race ./..., all packages pass locally in ~17s
  • The CI run on this PR is itself the validation of the parts that cannot be checked locally

Review Focus

Three things only a real CI run can settle, and this PR's own run settles them:

  • actions/checkout@v4 / actions/setup-go@v5 resolve on the runner
  • go-version-file: go.mod actually yields Go 1.26 there
  • The architecture tests that shell out to go list pass in a clean checkout with no module cache — they should, since there are no external dependencies to fetch, but this has never run outside a developer machine

Risks / Notes

  • No changes to any public Go API; pkg/ is untouched
  • The -race default that pkg/engine/persist_test.go:712 depends on is preserved
  • Merge blocking is not configured here. Branch protection is a repository setting, not a file, so requiring this check on main is a separate manual step — the PRD leaves "display only vs. block" open

The Makefile already defined the gate; nothing ran it but a person. CI now
calls `make all` rather than copying its commands, so what passes locally and
what CI judges cannot drift apart.

Adds a `fmt` target — go vet says nothing about formatting — and folds it into
`all`. Go version comes from go.mod so it is written in one place.
@skyoo2003 skyoo2003 self-assigned this Aug 13, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 978a297c99

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread Makefile Outdated
Comment thread .github/workflows/ci.yml
`files=$(gofmt -l .)` threw away gofmt's exit status. A file gofmt cannot
parse prints nothing to stdout, so the gate read it as clean — and build, vet
and test would miss it too if the file sat behind another platform's build
tag. Check the status before the output.

setup-go caches by default and looks for a go.sum. There is none and there
never will be, so every run warned about it. Say `cache: false` and the
comment claiming no cache becomes true.
@skyoo2003
skyoo2003 merged commit f4c301b into main Aug 13, 2026
1 check passed
@skyoo2003
skyoo2003 deleted the ci-gate branch August 13, 2026 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant