The Makefile diverges from our standard scripts-to-rule-them-all (STRTA) scaffold. Under STRTA, the Makefile is a set of thin shims that delegate to script/* POSIX-sh entrypoints, and CI runs script/cibuild. The living reference is the netwatch repo (Makefile + script/ + .gitea/workflows/check.yml); mirror it exactly.
Current state (nonconformance)
Makefile targets are inline recipes rather than @script/* shims: test, lint, fmt, fmt-check, check, docker, and hooks all contain inline commands.
Missing standard targets: bootstrap, setup.
No script/ directory.
.gitea/workflows/check.yml exists but runs docker build . directly instead of script/cibuild.
Definition of done
Makefile has a .PHONY declaration listing at least the nine standard targets: bootstrap, setup, test, lint, fmt, fmt-check, check, docker, hooks.
Each of those nine standard targets is a thin shim whose recipe is exactly @script/NAME (test calls @script/test, hooks calls @script/install-precommit, etc.). Repo-specific extra targets are allowed but must not replace the standard shims.
A script/ directory holds executable POSIX-sh entrypoints (#!/bin/sh, set -e) for bootstrap, setup, test, lint, fmt, fmt-check, check, docker, install-precommit, plus cibuild. The real logic currently inline in the Makefile moves into these scripts.
script/check runs the repo's full local verification (fmt-check + lint + test); script/cibuild is the CI entrypoint (typically docker build .), and the Dockerfile build runs make check so the image build fails on any check failure.
.gitea/workflows/check.yml invokes script/cibuild rather than a bare docker build ..
make check passes locally and docker build . succeeds (green) before the change lands.
The finishing commit's title must end with (closes #N) referencing this issue.
The `Makefile` diverges from our standard scripts-to-rule-them-all (STRTA) scaffold. Under STRTA, the `Makefile` is a set of thin shims that delegate to `script/*` POSIX-`sh` entrypoints, and CI runs `script/cibuild`. The living reference is the `netwatch` repo (`Makefile` + `script/` + `.gitea/workflows/check.yml`); mirror it exactly.
## Current state (nonconformance)
- `Makefile` targets are inline recipes rather than `@script/*` shims: `test`, `lint`, `fmt`, `fmt-check`, `check`, `docker`, and `hooks` all contain inline commands.
- Missing standard targets: `bootstrap`, `setup`.
- No `script/` directory.
- `.gitea/workflows/check.yml` exists but runs `docker build .` directly instead of `script/cibuild`.
## Definition of done
1. `Makefile` has a `.PHONY` declaration listing at least the nine standard targets: `bootstrap`, `setup`, `test`, `lint`, `fmt`, `fmt-check`, `check`, `docker`, `hooks`.
2. Each of those nine standard targets is a thin shim whose recipe is exactly `@script/NAME` (`test` calls `@script/test`, `hooks` calls `@script/install-precommit`, etc.). Repo-specific extra targets are allowed but must not replace the standard shims.
3. A `script/` directory holds executable POSIX-`sh` entrypoints (`#!/bin/sh`, `set -e`) for `bootstrap`, `setup`, `test`, `lint`, `fmt`, `fmt-check`, `check`, `docker`, `install-precommit`, plus `cibuild`. The real logic currently inline in the `Makefile` moves into these scripts.
4. `script/check` runs the repo's full local verification (`fmt-check` + `lint` + `test`); `script/cibuild` is the CI entrypoint (typically `docker build .`), and the `Dockerfile` build runs `make check` so the image build fails on any check failure.
5. `.gitea/workflows/check.yml` invokes `script/cibuild` rather than a bare `docker build .`.
6. `make check` passes locally and `docker build .` succeeds (green) before the change lands.
The finishing commit's title must end with ` (closes #N)` referencing this issue.
Landed on main as 3abeacf and independently reviewed (a reviewer separate from the author) — verdict PASS. The reviewer re-ran make check and docker build . (both green), confirmed the image builds and runs make check as the non-root builder user (uid 1000), and verified TestScanHardlinkRunFailsTogether is genuinely exercised as non-root (open ...: permission denied) rather than weakened — scan_test.go is untouched. All nine standard targets are pure @script/* shims, checks are honest, scope is limited to the scaffold, and there are no AI/trailer hygiene issues. Definition of done met; closing.
Landed on `main` as `3abeacf` and independently reviewed (a reviewer separate from the author) — verdict PASS. The reviewer re-ran `make check` and `docker build .` (both green), confirmed the image builds and runs `make check` as the non-root `builder` user (uid 1000), and verified `TestScanHardlinkRunFailsTogether` is genuinely exercised as non-root (`open ...: permission denied`) rather than weakened — `scan_test.go` is untouched. All nine standard targets are pure `@script/*` shims, checks are honest, scope is limited to the scaffold, and there are no AI/trailer hygiene issues. Definition of done met; closing.
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.
The
Makefilediverges from our standard scripts-to-rule-them-all (STRTA) scaffold. Under STRTA, theMakefileis a set of thin shims that delegate toscript/*POSIX-shentrypoints, and CI runsscript/cibuild. The living reference is thenetwatchrepo (Makefile+script/+.gitea/workflows/check.yml); mirror it exactly.Current state (nonconformance)
Makefiletargets are inline recipes rather than@script/*shims:test,lint,fmt,fmt-check,check,docker, andhooksall contain inline commands.bootstrap,setup.script/directory..gitea/workflows/check.ymlexists but runsdocker build .directly instead ofscript/cibuild.Definition of done
Makefilehas a.PHONYdeclaration listing at least the nine standard targets:bootstrap,setup,test,lint,fmt,fmt-check,check,docker,hooks.@script/NAME(testcalls@script/test,hookscalls@script/install-precommit, etc.). Repo-specific extra targets are allowed but must not replace the standard shims.script/directory holds executable POSIX-shentrypoints (#!/bin/sh,set -e) forbootstrap,setup,test,lint,fmt,fmt-check,check,docker,install-precommit, pluscibuild. The real logic currently inline in theMakefilemoves into these scripts.script/checkruns the repo's full local verification (fmt-check+lint+test);script/cibuildis the CI entrypoint (typicallydocker build .), and theDockerfilebuild runsmake checkso the image build fails on any check failure..gitea/workflows/check.ymlinvokesscript/cibuildrather than a baredocker build ..make checkpasses locally anddocker build .succeeds (green) before the change lands.The finishing commit's title must end with
(closes #N)referencing this issue.Landed on
mainas3abeacfand independently reviewed (a reviewer separate from the author) — verdict PASS. The reviewer re-ranmake checkanddocker build .(both green), confirmed the image builds and runsmake checkas the non-rootbuilderuser (uid 1000), and verifiedTestScanHardlinkRunFailsTogetheris genuinely exercised as non-root (open ...: permission denied) rather than weakened —scan_test.gois untouched. All nine standard targets are pure@script/*shims, checks are honest, scope is limited to the scaffold, and there are no AI/trailer hygiene issues. Definition of done met; closing.