Skip to content

chore(make): adopt the fleet Makefile vocabulary and test floor (#160) - #161

Merged
Gerrrt merged 3 commits into
mainfrom
gerrrt/fleet-makefile-vocabulary-285387
Sep 3, 2026
Merged

chore(make): adopt the fleet Makefile vocabulary and test floor (#160)#161
Gerrrt merged 3 commits into
mainfrom
gerrrt/fleet-makefile-vocabulary-285387

Conversation

@Gerrrt

@Gerrrt Gerrrt commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Closes #160. Fleet gate from dotgibson/dotfiles-core#691 (audit §5h, make fleet-vocabulary).

Core declares one canonical make vocabulary for every repo that vendors it — help, lint, check, dry-run, packages-check, core-verify, test — plus a test floor. This repo's row was missing lint, packages-check, core-verify, test, and had no test/ directory.

Changes

  • lint (new): aggregate of the existing linter legs — shell zsh actions md secrets, exactly the reusable lint-call.yml@v6 gate. check is now lint capabilities (same effective set as before, just DRY).
  • packages-check (new): runs ./test/check-packages.sh — resolves every install/packages.txt name via apk add --simulate, installing nothing.
  • core-verify (new canonical): renamed the recipe from verify-core; kept verify-core as a .PHONY alias so the old spelling still works.
  • test (new): runs the test/*.sh suite — no stub form, per the floor.
  • test/check-packages.sh (new, 100755): the smallest useful suite, modeled on dotfiles-Debian/test/check-packages.sh but adapted to apk and trimmed of the version-floor pass — Alpine carries no # min: floors in packages.txt (its one floor, tree-sitter-cli's, lives in bootstrap.sh as TREESITTER_FLOOR).

Verification (Alpine 3.24.1)

  • make packages-check / make test → all 72 names resolve and are co-installable, exit 0
  • make lint / make check → clean (actionlint/markdownlint/gitleaks absent locally → SKIP by design)
  • make core-verify + verify-core alias → both delegate correctly
  • test/check-packages.sh is shellcheck -x + bash -n clean and, now tracked, is covered by make shell/make lint

Could not run the authoritative make fleet-vocabulary: the sibling Core checkout is at v6.0.1 and predates the §5h register, so this follows the issue's explicit contract and the Debian model.

🤖 Generated with Claude Code

Core (dotfiles-core#691) declares one canonical `make` vocabulary for every
repo that vendors it — help, lint, check, dry-run, packages-check, core-verify,
test — plus a test floor. This repo's register row was missing lint,
packages-check, core-verify and test, and had no test/ dir.

- lint: new aggregate of the existing linter legs (shell zsh actions md
  secrets) == the reusable lint-call.yml gate; check is now `lint capabilities`
  (same effective set as before, DRY).
- packages-check: new — runs test/check-packages.sh, which resolves every
  install/packages.txt name via `apk add --simulate` (installs nothing).
- core-verify: canonical rename of verify-core; verify-core kept as a .PHONY
  alias so the old spelling still works.
- test: new — runs the test/*.sh suite; no stub form, per the floor.
- test/check-packages.sh: the smallest useful suite, modeled on Debian's but
  adapted to apk and trimmed of the version-floor pass (Alpine has no `# min:`
  floors — tree-sitter-cli's floor lives in bootstrap.sh as TREESITTER_FLOOR).

Verified on Alpine 3.24.1: make packages-check / test resolve all 72 names;
make lint / check clean; the script is shellcheck -x and bash -n clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings September 3, 2026 14:44

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new test/check-packages.sh can misclassify apk permission/lock failures as “package drift” (exit 2) and needs robust privilege/diagnostic handling to avoid false failures.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR updates the Alpine OS-layer repo to match the fleet-wide make vocabulary and “test floor” defined in dotfiles-core, ensuring consistent local/CI gates across all repos that vendor Core.

Changes:

  • Adds canonical Makefile verbs (lint, packages-check, core-verify, test) and keeps verify-core as a .PHONY compatibility alias.
  • Introduces a minimal test/ suite with test/check-packages.sh to validate that install/packages.txt entries resolve via apk add --simulate.
  • Refactors check to be lint + capabilities to align with the fleet model while keeping the same effective gates.
File summaries
File Description
Makefile Adds the canonical fleet targets (lint, packages-check, core-verify, test) and updates help/aliases accordingly.
test/check-packages.sh New test script to gate package-name resolution/co-installability using apk add --simulate.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread test/check-packages.sh
Comment thread test/check-packages.sh Outdated
…ift (#161)

Addresses Copilot review on PR #161.

- test/check-packages.sh sim() no longer runs apk blindly: it keeps the fast
  unprivileged --simulate path (apk's db is world-readable on a normal box, so
  the gate runs green as a plain user) but now detects a lock/permission error
  and retries once under bootstrap.sh's own doas/sudo selection. If apk still
  cannot open its database, that is an ENVIRONMENT failure (exit 1), not package
  drift (exit 2) — the false-failure the reviewer flagged.
- Reference bootstrap.sh's apk_install() by function name in the header instead
  of a line number that drifts as the file changes.

Verified: happy path exit 0, a bogus name exits 2, a forced lock/permission
error exits 1. shellcheck -x and bash -n clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Gerrrt
Gerrrt enabled auto-merge (squash) September 3, 2026 14:54
@Gerrrt
Gerrrt merged commit b42c960 into main Sep 3, 2026
12 checks passed
@Gerrrt
Gerrrt deleted the gerrrt/fleet-makefile-vocabulary-285387 branch September 3, 2026 14:55
Gerrrt added a commit that referenced this pull request Sep 3, 2026
…tgibson/dotfiles-core#691) (#163)

The floor is "a suite exists AND CI runs it". The suite landed with the vocabulary
adoption (#161) — test/check-packages.sh and a `make test` runner — but no workflow
ran it, so Core's register reported this repo as `not-in-ci`: the last red cell in
the fleet. This is the missing half.

A CONTAINER, not ubuntu-latest, and that is the whole point:
test/check-packages.sh exits 0 with a stated skip when the host has no apk ("run
this on Alpine, or in CI"). On a plain runner this lane would be green while
asserting nothing — precisely the failure the floor exists to prevent. The image
matches bootstrap.yml's alpine:3.24, so both lanes answer for the same branch.

`apk update` is load-bearing for the same reason bootstrap.yml's prep records:
`apk add --simulate` resolves against the LOCAL index and a base image ships none,
so without it every name reports unresolved — a false red on the whole list. bash
and make because the base image has neither; git so checkout clones rather than
falling back to the REST tarball.

It runs `make test` rather than the script path, so the canonical verb is what CI
exercises — if the target ever stops running the suite, this lane notices instead
of sailing past it.

Not redundant with bootstrap.yml's packages_check leg: that resolves names with
`apk info`, an index lookup, while the suite uses `apk add --simulate` — apk's real
resolver, which also sees single-provider virtuals and `provides=` names the index
form misses.

With this in place `fleet-vocabulary.sh --check` from a dotfiles-core checkout
passes for the whole fleet: 9 repos x 7 verbs, every floor met.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
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.

chore(make): adopt the fleet Makefile vocabulary and test floor (dotfiles-core#691)

2 participants