Files
fleet/scripts/ci/cicd-hygiene.baseline
CatoandClaude Fable 5.1 97da8a75d9 feat(ci): the auto-merge caller is a template, and a miswired caller turns hygiene red (#77)
## What the inventory showed

Read every bitbaum repo's `.github/workflows/auto-merge.yml` from its default branch via the API (not local checkouts): 33 repos carry one. **32 are already callers of `auto-merge-sweep.yml` (`workflow_call`)**; the 33rd is this repo, which runs the script inline because it *is* the reusable workflow. The ratchet in `shared-inventory.baseline` already reads `automerge-script 1 1`. So the consolidation the SHARED.md row still described as "6 remaining, datacat/petvity/solon convert when clear" finished a while ago — that row was stale, and the caller was documented nowhere in `templates/ci/`.

Eight repos across six caller shapes (heidi, ai-kit, sbb-fundbuero, datacat, petvity, solon, evig, orangecat) were checked to actually *run* the reusable job today: each latest Auto-merge run has the nested `sweep / sweep` job checking out `bitbaum/fleet` and executing `Sweep`.

## What it also turned up

- **dotfiles** declared `secrets:` twice under the same job. GitHub refused the file: the workflow is listed by its *path*, every run since 2026-09-13 is a zero-job failure, and the repo has merged nothing — silently. Fixed in bitbaum/dotfiles#69.
- **substrata** and **camille-boulangerie** re-armed a `publish.yml` neither repo has; the sweep dispatched it after every merge and logged an error. Fixed in bitbaum/substrata#36 and bitbaum/camille-boulangerie#34.

## What this PR does (all additive)

- `templates/ci/auto-merge.yml` — the caller, with `CHANGEME` lines, so the next repo copies a template instead of a neighbour.
- `templates/ci/README.md` — "Auto-merge: call it, never copy it": the snippet, an inputs table with what each wrong value looks like, and the findings above.
- `scripts/ci/cicd-hygiene-audit.sh` — a fourth ratcheted check, `automerge-miswired`: a duplicate mapping key, a job that neither calls the reusable workflow nor runs the canonical script, or an input naming a workflow file the repo does not have. Baseline `0` (the three findings have PRs open; see below).
- `scripts/ci/test-cicd-hygiene-audit.sh` — six new mutation cases, both directions: fires on the dotfiles shape, the substrata shape and a hand-rolled job; stays quiet on a sound caller (including two `- cron:` list items, which a naive key counter would flag), on fleet's own inline run, and on a repo with no caller at all. 16/16 pass. Run over the real 33-repo inventory it reports exactly the three known cases and nothing else.
- `SHARED.md` — the row now says 1, and why.

If `--check` runs before the three repo PRs merge it will report `0 → 3`; they are green one-liners and should be in before Monday's scheduled run.


Claude-Session: https://claude.ai/code/session_012KAn51JHFcTrPeCjZDGXM8

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-14 22:49:48 -07:00

5 lines
74 B
Plaintext

deploy-cancels 0
deploy-reverifies 0
cold-ci-build 0
automerge-miswired 0