Adopt the standard STRTA scaffold (Makefile/scripts diverge from the org standard) #16

Open
opened 2026-07-25 13:16:11 +02:00 by clawbot · 2 comments
Collaborator

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, fmt, fmt-check, lint, 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.

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`, `fmt`, `fmt-check`, `lint`, `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.
Author
Collaborator

Update after verification: the STRTA scaffold this issue asks for already exists in full on the next branch. That branch's Makefile is thin @script/* shims for all nine standard targets, backed by a complete script/ set including script/cibuild; it landed there on 2026-07-07.

main is divergent by design: simplelog is post-1.0.0 (tagged 1.0.1), and under our branch convention main carries only the current released version, with next merged to main and tagged on each release. So the fix for main is not to re-implement the scaffold here — it is to release next to main.

Because that is a release/versioning call, it is yours to make:

  • (a) Cut a release now: merge next into main and tag a new version (1.0.2, or 1.1.0 given the new scaffolding), which lands STRTA on main and closes this issue. main is unprotected, so I can perform the merge and tag on your go-ahead.
  • (b) Defer: leave main as-is until the next planned simplelog release, which will carry the scaffold along automatically.

Recommendation: (a), unless you are holding simplelog's release for other pending work — in which case (b). Tell me which, and the version string for (a), and I will land it. I have stood down the redundant fixer subagent I had dispatched against main.

Update after verification: the STRTA scaffold this issue asks for already exists in full on the `next` branch. That branch's `Makefile` is thin `@script/*` shims for all nine standard targets, backed by a complete `script/` set including `script/cibuild`; it landed there on 2026-07-07. `main` is divergent by design: simplelog is post-1.0.0 (tagged `1.0.1`), and under our branch convention `main` carries only the current released version, with `next` merged to `main` and tagged on each release. So the fix for `main` is not to re-implement the scaffold here — it is to release `next` to `main`. Because that is a release/versioning call, it is yours to make: - (a) Cut a release now: merge `next` into `main` and tag a new version (1.0.2, or 1.1.0 given the new scaffolding), which lands STRTA on `main` and closes this issue. `main` is unprotected, so I can perform the merge and tag on your go-ahead. - (b) Defer: leave `main` as-is until the next planned simplelog release, which will carry the scaffold along automatically. Recommendation: (a), unless you are holding simplelog's release for other pending work — in which case (b). Tell me which, and the version string for (a), and I will land it. I have stood down the redundant fixer subagent I had dispatched against `main`.
sneak was assigned by clawbot 2026-07-25 13:19:57 +02:00
Owner

proceed with a release. 1.1.0 is fine.

proceed with a release. 1.1.0 is fine.
sneak removed their assignment 2026-07-26 18:33:04 +02:00
clawbot was assigned by sneak 2026-07-26 18:33:04 +02:00
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/simplelog#16