# Landing

Every change reaches trunk through a landing on the forge, zeitforge
(`https://zeitforge.app/r/dmestas/pi-c`). Nothing is pushed to trunk directly, and `zit landing
accept` is not used: it merges locally and skips the forge's gates.

## How a change lands

1. Work on a branch, run `make test-pic` (and `make test-docs`, which it includes), and commit.
2. Push the branch, then open a landing for it (`zit landing open --branch B -m ...`).
3. The forge runs the required `test` check and a merge check against current trunk; the landing
   lands when both pass. Landings that queue behind each other are stacked as strata and land
   bottom-up.
4. A merge check that fails with a conflict means: merge trunk into the branch, test, push again.

## The changelog

Add an entry under today's date in `CHANGELOG.md` with each landing, in words a user would use;
`make` regenerates `src/changelog.inc`, which is not committed.

Commit messages, landing messages and documents carry no attribution to an AI tool or model.

## CI

`ci/test.yml` runs on every push and landing: `make test-pic` (sanitizer and release builds, every
suite), then a 30-second fuzz pass per target when the runner has an LLVM clang. Fil-C runs
separately on hetzner-hel (`tools/remote/run.sh … pic`). Results show on each check-in's page at
zeitforge; trunk's required check, `test`, makes landings wait for a pass.

`ci/linux-nightly.yml` runs the same `make test-pic` on Linux (gcc and glibc) each night at 03:17
UTC and on demand (`workflow_dispatch`). It is reported, not required, and names no host: Quarry
routes it to the Linux runner. A run takes two to three hours there.

### The runner

One zeitforge runner on the Mac mini (macOS arm64), reached as `mac-mini` over SSH. It runs as
`dmestas` under the LaunchAgent `app.zeitforge.quarry-runner.pi-c`. macOS runners cannot isolate
jobs per user, so a job can read that account's files and the runner takes no job that uses secrets;
the user chose this over a dedicated account (2026-11-18).

**Set up** (on the mini, as `dmestas`):
1. Download `https://zeitforge.app/runner/quarry-runner-darwin-arm64`, check it against
   `https://zeitforge.app/runner/SHA256SUMS`, make it executable (installed as
   `~/.local/bin/quarry-runner`).
2. `quarry-runner install https://zeitforge.app/r/dmestas/pi-c`. It prints a code and waits; the
   repository owner approves the matching runner request at zeitforge. The installer collects its
   own worker token into `~/Library/Application Support/quarry-runner/pi-c/` (0600, never shown),
   loads the LaunchAgent and runs `doctor`.

**Check:** `quarry-runner doctor pi-c` (connected, which repository, token accepted); the log is
`~/Library/Application Support/quarry-runner/pi-c/runner.log`.

**Tear down:** `quarry-runner uninstall pi-c` unloads the agent, deletes its files and retires the
token at the forge.
