Adds a make check target that verifies formatting (gofmt), linting (golangci-lint), and tests (go test -race) without modifying files.
Also adds .gitea/workflows/check.yml CI workflow that runs on pushes and PRs to main and next.
make check passes cleanly on current next branch.
Adds a `make check` target that verifies formatting (gofmt), linting (golangci-lint), and tests (go test -race) without modifying files.
Also adds `.gitea/workflows/check.yml` CI workflow that runs on pushes and PRs to main and next.
`make check` passes cleanly on current next branch.
Pinned CI action references to commit SHAs for security (tags are mutable and an RCE vector):
- `actions/checkout@v4` → `actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5`
- `actions/setup-go@v5` → `actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff`
the Dockerfile should run "make check" early in its build process, and the CI action should simply ensure that "docker build ." works (which implicitly runs "make check").
the Dockerfile should run "make check" early in its build process, and the CI action should simply ensure that "docker build ." works (which implicitly runs "make check").
sneak
removed their assignment 2026-02-28 19:23:32 +01:00
clawbot
was assigned by sneak2026-02-28 19:23:32 +01:00
Per reviewer feedback: the Dockerfile now runs 'make check' early in
its build process (after dependencies are extracted). The CI workflow
is simplified to just run 'docker build .', which implicitly runs
'make check' as part of the Docker build.
Reworked per feedback:
1. **Dockerfile**: Added `RUN make check` early in the build (after modcache extraction, before the main build step)
2. **CI workflow**: Simplified to just `docker build .` — since the Dockerfile now runs `make check`, CI only needs to verify the Docker build succeeds
3. **Makefile**: Unchanged (check-fmt, lint, test, check targets as-is)
`make check` passes locally. Ready for re-review.
clawbot
removed their assignment 2026-02-28 19:25:02 +01:00
sneak
was assigned by clawbot2026-02-28 19:25:02 +01:00
Lint stage: Uses prebuilt golangci/golangci-lint:v1.64.8 image (sha256-pinned) for fast feedback — runs make fmt-check and make lint
Build stage: Uses golang:1.24-alpine (sha256-pinned) for tests and compilation — runs make test and make build
Build stage includes COPY --from=lint /src/go.sum /dev/null to force BuildKit to run the lint stage
Replaced sneak/builder:2022-12-08 (Go 1.19) since the project now requires Go 1.23
Removed vendor.tzst/modcache.tzst references (removed in prior commit); uses go mod download instead
Preserves source archive in final scratch image for posterity
Makefile changes
Added fmt-check target (checks gofmt formatting without modifying files)
Added build target (builds binary without requiring protoc for CI)
Added check target with prereqs: fmt-check, lint, test
Added hooks target (installs pre-commit hook running make check)
Removed mfer/mf.pb.go prerequisite from lint and test targets (the generated file is committed; avoids needing protoc in CI images)
CI workflow
Simple docker build . on push/PR to main/next — implicitly runs all checks via Dockerfile stages
actions/checkout pinned to commit SHA
README
Updated Go version requirement to 1.23
Documented new targets: make build, make fmt-check, make check, make hooks
docker build . passes cleanly — all tests pass, lint passes, format check passes.
Rebased onto next and squashed into a single commit.
Reworked per feedback to use the Dockerfile split approach from [clawbot/sdlc-manager#6](https://git.eeqj.de/clawbot/sdlc-manager/issues/6):
### Dockerfile changes
- **Lint stage**: Uses prebuilt `golangci/golangci-lint:v1.64.8` image (sha256-pinned) for fast feedback — runs `make fmt-check` and `make lint`
- **Build stage**: Uses `golang:1.24-alpine` (sha256-pinned) for tests and compilation — runs `make test` and `make build`
- Build stage includes `COPY --from=lint /src/go.sum /dev/null` to force BuildKit to run the lint stage
- Replaced `sneak/builder:2022-12-08` (Go 1.19) since the project now requires Go 1.23
- Removed vendor.tzst/modcache.tzst references (removed in prior commit); uses `go mod download` instead
- Preserves source archive in final scratch image for posterity
### Makefile changes
- Added `fmt-check` target (checks `gofmt` formatting without modifying files)
- Added `build` target (builds binary without requiring `protoc` for CI)
- Added `check` target with prereqs: `fmt-check`, `lint`, `test`
- Added `hooks` target (installs pre-commit hook running `make check`)
- Removed `mfer/mf.pb.go` prerequisite from `lint` and `test` targets (the generated file is committed; avoids needing `protoc` in CI images)
### CI workflow
- Simple `docker build .` on push/PR to main/next — implicitly runs all checks via Dockerfile stages
- `actions/checkout` pinned to commit SHA
### README
- Updated Go version requirement to 1.23
- Documented new targets: `make build`, `make fmt-check`, `make check`, `make hooks`
`docker build .` passes cleanly — all tests pass, lint passes, format check passes.
Rebased onto `next` and squashed into a single commit.
<!-- session: agent:sdlc-manager:subagent:bcea7f64-47b6-47b7-80ae-c49c43de1852 -->
sneak
merged commit acbdf3a376 into next2026-03-02 11:04:47 +01:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Adds a
make checktarget that verifies formatting (gofmt), linting (golangci-lint), and tests (go test -race) without modifying files.Also adds
.gitea/workflows/check.ymlCI workflow that runs on pushes and PRs to main and next.make checkpasses cleanly on current next branch.Pinned CI action references to commit SHAs for security (tags are mutable and an RCE vector):
actions/checkout@v4→actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5actions/setup-go@v5→actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff“make check” should have check-fmt and lint and test as prereqs and each should be its own makefile target.
5609365e07toae0e96eba3Restructured Makefile per review feedback:
make check-fmt— format checking (gofmt)make lint— golangci-lintmake test— runs testsmake check— depends on check-fmt, lint, test (runs all three)All checks pass:
the Dockerfile should run "make check" early in its build process, and the CI action should simply ensure that "docker build ." works (which implicitly runs "make check").
Reworked per feedback:
RUN make checkearly in the build (after modcache extraction, before the main build step)docker build .— since the Dockerfile now runsmake check, CI only needs to verify the Docker build succeedsmake checkpasses locally. Ready for re-review.rework this PR following the new method here:
clawbot/sdlc-manager#6
@clawbot aee above
6aed479650toffc400a140Reworked per feedback to use the Dockerfile split approach from clawbot/sdlc-manager#6:
Dockerfile changes
golangci/golangci-lint:v1.64.8image (sha256-pinned) for fast feedback — runsmake fmt-checkandmake lintgolang:1.24-alpine(sha256-pinned) for tests and compilation — runsmake testandmake buildCOPY --from=lint /src/go.sum /dev/nullto force BuildKit to run the lint stagesneak/builder:2022-12-08(Go 1.19) since the project now requires Go 1.23go mod downloadinsteadMakefile changes
fmt-checktarget (checksgofmtformatting without modifying files)buildtarget (builds binary without requiringprotocfor CI)checktarget with prereqs:fmt-check,lint,testhookstarget (installs pre-commit hook runningmake check)mfer/mf.pb.goprerequisite fromlintandtesttargets (the generated file is committed; avoids needingprotocin CI images)CI workflow
docker build .on push/PR to main/next — implicitly runs all checks via Dockerfile stagesactions/checkoutpinned to commit SHAREADME
make build,make fmt-check,make check,make hooksdocker build .passes cleanly — all tests pass, lint passes, format check passes.Rebased onto
nextand squashed into a single commit.