Skip to content

chore(devex): expose 'make check' / 'check-all' on the existing Makefile (backend#1606) - #465

Open
LukasWodka wants to merge 1 commit into
developfrom
chore/1606-makefile-check
Open

chore(devex): expose 'make check' / 'check-all' on the existing Makefile (backend#1606)#465
LukasWodka wants to merge 1 commit into
developfrom
chore/1606-makefile-check

Conversation

@LukasWodka

@LukasWodka LukasWodka commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Today every repo in the org has a different incantation for "run your
tests": python manage.py test here, yarn test:coverage there,
make ci in cli, pytest tests/ -m "not slow" somewhere else. That
makes "run your tests before you push" a rule you can only obey if you
already know the repo — which means it is not really a rule, it is
tribal knowledge with a rule's wording. The people most likely to break
it are exactly the people least likely to know the incantation.

backend#1606 fixes that by giving every active repo the same three
targets:

make check lint + fast tests. Budget: UNDER 60 SECONDS.
make check-all everything CI runs, minus the CI-only heavy suites.
make setup install what those targets need.

The 60-second budget is not decoration. It is the property that decides
whether anyone runs the thing: a make check that takes ten minutes is
a rule people learn to skip, and skipping one rule teaches skipping
others. So the split between check and check-all is drawn on
measured wall-clock time, not on taste.

The Makefile is a THIN WRAPPER. Every command in it was lifted from the
workflow that already runs it. It adds no tool, no config, and no rule,
and it changes no CI workflow — making CI call make check is a
separate, later wave (decision 2 on backend#1606), deliberately kept out
of this PR so that a Makefile bug cannot redden the pipeline. No
pre-commit or pre-push hook is installed here either; that is step 4.

In this repo

cli already had a Makefile with a ci target, so this EXTENDS it rather
than replacing it. ci keeps its name — too much muscle memory and too
many docs point at it — and check-all is an alias for it.

make check — MEASURED 19.6 s, versus 56 s for the same set with the
race detector on:

vet + test-fast + fmt-check + file-budget + check-style

test-fast is new: go test ./... without -race. That single flag is
the difference between fitting the budget and not (18 s vs 56 s for
identical assertions), and ci still runs the -race form, so no race
signal is lost from the PR gate.

Held back from check for measured reasons:

  • -race 3x the wall clock for the same assertions.
  • lint/lint-full go run tool@version builds from source on a cold
    cache; golangci-lint alone is 1-2 minutes.
  • vulncheck needs https://vuln.go.dev.
  • schema-check fetches data-ingestors at the pinned ref.
  • deadcode another go run tool@version fetch.

The k3d e2e suite stays CI-only by name, per decision 1 on backend#1606.

Related

Step 1 of tracebloc/backend#1606 — a Makefile with a uniform check target in every active repo. One PR per repo; this is this repo's.

Type of change

  • Tech-debt / refactor (developer experience)

Test plan

make check run for real: green in 19.6 s. The same set with -race
measured at 56 s, which is exactly why test-fast exists. make help and the
dry runs of every target parse clean; ci is unchanged and still runs test
(with -race).

No CI workflow is touched in this PR. CI parity — making the workflows call make check — is decision 2 on backend#1606 and lands as its own wave, deliberately after the Makefiles exist and are proven locally. No pre-commit or pre-push hook is installed here either; that is step 4.

Checklist

  • Works from a clean checkout — .PHONY on every target, help is the default goal
  • No CI workflow modified
  • No pre-commit / pre-push hook installed
  • No secrets / credentials in the diff
  • Every command is copied from the workflow that already runs it — no new tool, no new config, no new rule
  • Portable to GNU Make 3.81 (the macOS system make)

Note

Low Risk
Makefile-only developer-experience wrappers; ci behavior is unchanged and no CI or runtime code is modified.

Overview
Aligns tracebloc/cli with backend#1606 by exposing the same three Makefile entry points as other org repos: make check (fast pre-push gate), make check-all (alias for existing ci), and make setup (go mod download).

make check runs vet, new test-fast (go test without -race), fmt-check, file-budget, and check-style so the loop stays under ~60s; race detection, lint, vulncheck, schema-check, and deadcode remain on ci / check-all. help is now the default goal and documents the targets.

No CI workflows or hooks are changed—only thin wrappers over commands that already existed.

Reviewed by Cursor Bugbot for commit 8975c68. Bugbot is set up for automated code reviews on this repo. Configure here.

…ile (backend#1606)

Today every repo in the org has a different incantation for "run your
tests": `python manage.py test` here, `yarn test:coverage` there,
`make ci` in cli, `pytest tests/ -m "not slow"` somewhere else. That
makes "run your tests before you push" a rule you can only obey if you
already know the repo — which means it is not really a rule, it is
tribal knowledge with a rule's wording. The people most likely to break
it are exactly the people least likely to know the incantation.

backend#1606 fixes that by giving every active repo the same three
targets:

  make check      lint + fast tests. Budget: UNDER 60 SECONDS.
  make check-all  everything CI runs, minus the CI-only heavy suites.
  make setup      install what those targets need.

The 60-second budget is not decoration. It is the property that decides
whether anyone runs the thing: a `make check` that takes ten minutes is
a rule people learn to skip, and skipping one rule teaches skipping
others. So the split between `check` and `check-all` is drawn on
measured wall-clock time, not on taste.

The Makefile is a THIN WRAPPER. Every command in it was lifted from the
workflow that already runs it. It adds no tool, no config, and no rule,
and it changes no CI workflow — making CI call `make check` is a
separate, later wave (decision 2 on backend#1606), deliberately kept out
of this PR so that a Makefile bug cannot redden the pipeline. No
pre-commit or pre-push hook is installed here either; that is step 4.

In this repo
------------

cli already had a Makefile with a `ci` target, so this EXTENDS it rather
than replacing it. `ci` keeps its name — too much muscle memory and too
many docs point at it — and `check-all` is an alias for it.

`make check` — MEASURED 19.6 s, versus 56 s for the same set with the
race detector on:

  vet + test-fast + fmt-check + file-budget + check-style

`test-fast` is new: `go test ./...` without -race. That single flag is
the difference between fitting the budget and not (18 s vs 56 s for
identical assertions), and `ci` still runs the -race form, so no race
signal is lost from the PR gate.

Held back from `check` for measured reasons:
  * -race          3x the wall clock for the same assertions.
  * lint/lint-full `go run tool@version` builds from source on a cold
                   cache; golangci-lint alone is 1-2 minutes.
  * vulncheck      needs https://vuln.go.dev.
  * schema-check   fetches data-ingestors at the pinned ref.
  * deadcode       another `go run tool@version` fetch.

The k3d e2e suite stays CI-only by name, per decision 1 on backend#1606.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@LukasWodka LukasWodka self-assigned this Aug 6, 2026
@LukasWodka
LukasWodka requested a review from saadqbal August 6, 2026 11:00
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