From 653049d37cbbb8978b6b6f0cd53ad7b83b41ebb3 Mon Sep 17 00:00:00 2001 From: Xenolphthalein <21215869+Xenolphthalein@users.noreply.github.com> Date: Thu, 3 Dec 2026 12:41:49 +0100 Subject: [PATCH 1/2] docs: AGENTS.md as the agents' guide, with CLAUDE.md a link to it For overpressure#124. --- AGENTS.md | 47 +++++++++++++++++++++++++++++++++++++++++++++++ CLAUDE.md | 1 + 2 files changed, 48 insertions(+) create mode 100644 AGENTS.md create mode 120000 CLAUDE.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..a012c73 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,47 @@ +# AGENTS.md + +**overpressure/builder** is the container image every [overpressure](https://github.com/overpressure/overpressure) +build runs in: the userspace, the system image, the kernel ([overpressure/linux](https://github.com/overpressure/linux)) +and the packages. It is published as `ghcr.io/overpressure/builder` for amd64 and arm64; its consumers pin it by +digest, which keeps a build's tools the same on every computer. What it holds and how it runs: [README.md](README.md). + +The project's rules for issues, documents, code and changes: +[conventions](https://github.com/overpressure/overpressure/blob/main/docs/develop/conventions.md). + +## Setup and commands + +Docker (or Podman) and [uv](https://docs.astral.sh/uv/), from the repository root: + +```sh +python3 -m unittest -v # the recipe test; binfmt tests need bash on x86-64 Linux, hand-back tests root +uvx ruff@0.17.4 format --check . && uvx ruff@0.17.4 check . # the Python code +docker run --rm -i hadolint/hadolint:v2.15.1 hadolint --ignore DL3008 - < image/Dockerfile # the Dockerfile +docker build -t builder:local image # the image +``` + +CI runs the script tests inside the image, privileged, with the checkout at `/work`, as a build does. + +## Layout + +- `image/`: the `Dockerfile` (Ubuntu 24.04 pinned by digest) and the scripts it installs: `entrypoint.sh`, + `binfmt.sh` (the aarch64 handler), `hand-back.sh` (files root made go back to the host user). +- `tests/test_image.py`: the scripts' and the recipe's tests. `pyproject.toml`: ruff's settings only, overpressure's. +- `.github/workflows/image.yml`: lint, both variants built and tested, a tag's publication. + +## Hard rules + +- **The contract holds.** overpressure's tooling and the packages' CI rely on what + [the contract](README.md#the-contract) lists (privileged run, `/work`, `/var/tmp`, the entrypoint's steps, the + scripts' arguments). A change to it is a new image that the consumers pin on purpose. +- **Published images are kept**, so an old pin keeps working. Never pin or hand out the `ci-*` tags: they are CI's + cache of tested variants. +- **Apt packages stay unpinned** (hadolint's DL3008 off): the image, pinned by digest, is what pins the tools. +- Nothing of the image goes onto a headset; its packages keep their own licenses ([License](README.md#license)). + +## Changes + +A branch and a pull request against `main`, titled as a conventional commit; merged by rebase or squash once `ci` +(the lint and both variants) passes and the code owners approved +([conventions](https://github.com/overpressure/overpressure/blob/main/docs/develop/conventions.md#changes)). A +release is a tag `YYYY.M.PATCH`, this month's next free patch, which publishes the tested variants as one +multi-arch image with a release naming its digest ([publishing](README.md#publishing)). diff --git a/CLAUDE.md b/CLAUDE.md new file mode 120000 index 0000000..47dc3e3 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1 @@ +AGENTS.md \ No newline at end of file From fecd8987aa4ed0a2d4a5e16ca7d822f1f59f4ef6 Mon Sep 17 00:00:00 2001 From: Xenolphthalein <21215869+Xenolphthalein@users.noreply.github.com> Date: Thu, 3 Dec 2026 12:51:51 +0100 Subject: [PATCH 2/2] ci: AGENTS.md is checked, with CLAUDE.md a link to it, by overpressure's check-docs For overpressure#124. --- .github/workflows/image.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/image.yml b/.github/workflows/image.yml index 96482b8..7e27393 100644 --- a/.github/workflows/image.yml +++ b/.github/workflows/image.yml @@ -43,6 +43,12 @@ jobs: uvx ruff@0.17.4 check . # DL3008 (pin apt packages' versions) is off on purpose: the packages are Ubuntu's as they are when the # image is built, and the published image, pinned by digest, is what pins a build's tools (Dockerfile). + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + repository: overpressure/overpressure + path: .overpressure + - name: The documents' links, and AGENTS.md with CLAUDE.md a link to it (overpressure's check-docs) + run: python3 .overpressure/scripts/check-docs.py --repo . - name: The Dockerfile run: docker run --rm -i hadolint/hadolint:v2.15.1@sha256:32dac94127fd60b7b7e3fbfc65e1383b9b5e25c9bfd7b8536de7a539fe68a12d hadolint --ignore DL3008 - < image/Dockerfile - name: The workflows