Uh oh!
There was an error while loading. Please reload this page.
chore(devex): Makefile with a uniform 'make check' (backend#1606) - #630
Conversation
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 ------------ `make check` — MEASURED 5.3 s: bash -n on every shell script, shellcheck at error severity over the file set installer-tests.yaml lints, the three single-source drift guards (gen-manifest --check, check-facts --check, check-style), and helm lint --strict for all four platform values files plus the ingestor subchart. HONEST GAP — this is the one repo in the wave where I could not split fast from slow without lying. The bats suite IS this repo's unit suite (868 tests) and it takes ~2 minutes serially on macOS. It does not parallelise without GNU parallel, which is not on every dev machine, and the per-file timings show no natural fast tier: the slowest file (common.bats, 37 s) is also the most load-bearing, so any subset would be arbitrary and would rot. So bats sits in `check-all`, and `make check` here is lint-only. A `check` that quietly took two minutes would be a `check` nobody runs, which is worse. Splitting the bats suite is real work and belongs in its own ticket. `make check-all` adds bats, the 4-platform helm template render (with kubeconform if you have it), and helm unittest (with the plugin install line if you do not). CI-only by name: the 9-distro prereq matrix, e2e-cluster (k3d), e2e-proxy (squid), path-persist, Pester, windows-e2e, e2e-journey, and the three k3d seal/upgrade e2e jobs. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 1ec532c. Configure here.
Uh oh!
There was an error while loading. Please reload this page.
…ot, backend#1606) Bugbot on #630, medium severity, and this is the best kind of finding: the check was not merely wrong, it was silently reporting success. Make runs recipes under `/bin/sh`. On Debian and Ubuntu that is dash, and dash rejects `read -d` outright ("Illegal option -d", reproduced locally). The `while IFS= read -r -d '' f` loop body would therefore never execute, the pipeline would still exit 0, and `make check` would print "all shell scripts parse" having parsed nothing at all. GitHub Actions runs its steps under bash, so CI never showed the problem — and `make setup` steers Debian/Ubuntu users straight into it. Replaced with `find -print0 | xargs -0 -n1 bash -n`: POSIX, NUL-safe for paths with spaces, and xargs propagates a child failure as a non-zero exit, so a real parse error now actually reds the check. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
shujaatTracebloc
left a comment
There was a problem hiding this comment.
The Makefile itself is good — a genuine thin wrapper over the workflows, honest budget comments, and the one Bugbot finding (dash rejecting read -d and silently exiting 0) was correctly fixed to find … -print0 | xargs -0 -n1 bash -n. Content LGTM.
The only red is pii-gate / pii-check, and it isn't this PR: the check returns failure with null output, i.e. the fail-closed behaviour of the gate that was retired on 2026-08-06 (backend#1409) (documented in the very org-standards line #628 is updating). A Makefile-only diff has nothing for it to catch. This needs the pii-gate-override label or the required-check to be removed org-side — not a code change here. Everything else is green.

Summary
Today every repo in the org has a different incantation for "run your
tests":
python manage.py testhere,yarn test:coveragethere,make ciin cli,pytest tests/ -m "not slow"somewhere else. Thatmakes "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 checkthat takes ten minutes isa rule people learn to skip, and skipping one rule teaches skipping
others. So the split between
checkandcheck-allis drawn onmeasured 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 checkis aseparate, 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
make check— MEASURED 5.3 s:bash -n on every shell script, shellcheck at error severity over the
file set installer-tests.yaml lints, the three single-source drift
guards (gen-manifest --check, check-facts --check, check-style), and
helm lint --strict for all four platform values files plus the
ingestor subchart.
HONEST GAP — this is the one repo in the wave where I could not split
fast from slow without lying. The bats suite IS this repo's unit suite
(868 tests) and it takes ~2 minutes serially on macOS. It does not
parallelise without GNU parallel, which is not on every dev machine, and
the per-file timings show no natural fast tier: the slowest file
(common.bats, 37 s) is also the most load-bearing, so any subset would
be arbitrary and would rot. So bats sits in
check-all, andmake checkhere is lint-only. Acheckthat quietly took two minutes wouldbe a
checknobody runs, which is worse. Splitting the bats suite isreal work and belongs in its own ticket.
make check-alladds bats, the 4-platform helm template render (withkubeconform if you have it), and helm unittest (with the plugin install
line if you do not).
CI-only by name: the 9-distro prereq matrix, e2e-cluster (k3d),
e2e-proxy (squid), path-persist, Pester, windows-e2e, e2e-journey, and
the three k3d seal/upgrade e2e jobs.
Related
Step 1 of tracebloc/backend#1606 — a
Makefilewith a uniformchecktarget in every active repo. One PR per repo; this is this repo's.Type of change
Test plan
make checkrun for real: green in 5.3 s.Every bats file was timed individually looking for a natural fast tier. There
isn't one: the full suite is ~2 min serially, and the slowest file
(common.bats, 37 s, 68 tests) is also the most load-bearing — any subset would
be arbitrary and would rot. That is why bats sits in
check-alland why thegap is stated above rather than papered over.
make helpand the dry runs of every target parse clean.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
.PHONYon every target,helpis the default goalNote
Low Risk
Developer-experience only: new Makefile targets mirror existing CI commands and do not touch runtime, auth, or deployment code.
Overview
Adds a root Makefile so developers can run the same three entry points as other tracebloc repos:
make check(fast pre-push),make check-all(full local CI parity), andmake setup(tool presence check only—no installs or hooks).make checkwraps existing CI steps in ~4–5s:bash -non allscripts/**/*.sh, shellcheck at error severity on the installer-tests file set, the three drift guards (gen-manifest --check,check-facts --check,check-style), and strict helm lint for client platform values plus ingestor. The 868-test bats suite stays inmake check-allwith helm template render (optional kubeconform) and helm unittest, because it does not fit the under-60s budget.Commands are copied from
standard-checks.yml,installer-tests.yaml, andhelm-ci.yaml; no workflow files change. The lint recipe usesfind … | xargs -0 -n1 bash -ninstead of aread -d ''loop so parsing still runs under dash when Make uses/bin/sh—avoiding a silent no-op that CI on bash would not catch.Reviewed by Cursor Bugbot for commit a9bc22a. Bugbot is set up for automated code reviews on this repo. Configure here.