Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ jobs:
uvx ruff@0.17.4 format --check .
uvx ruff@0.17.4 check .
uvx ty@0.0.98 check
- 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 workflows
run: docker run --rm -v "$PWD:/repo" -w /repo rhysd/actionlint:1.7.12@sha256:b1934ee5f1c509618f2508e6eb47ee0d3520686341fec936f3b79331f9315667 -color
- name: The packages to build
Expand Down
61 changes: 61 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# AGENTS.md

**overpressure/packages** holds the Arch packages that [overpressure](https://github.com/overpressure/overpressure)
builds for its headsets' system images, and each headset's image definition. The packages are arranged in layers:
`common/` (Valve's Frame userspace on any headset), `sm8250/` (the Snapdragon XR2), and one folder per headset
(`phoenix/`, `hollywood/`). Each folder in a layer is one recipe with its patches, files and tests. Releases publish
the built packages, so a headset's image build downloads them instead of compiling them. What it is:
[README.md](README.md); its documents: [docs/README.md](docs/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

The checks need Python 3 and [uv](https://docs.astral.sh/uv/); a build needs Docker or Podman and runs as root in
overpressure's build image, pinned by digest ([building](docs/develop/building.md)):

```sh
python3 -m unittest -v # the layout: layers, names, recipes' local sources, image definitions
python3 build/shellcheck.py # every tracked shell script, the recipes' too, down to its warnings
uvx ruff@0.17.4 format --check . && uvx ruff@0.17.4 check . && uvx ty@0.0.98 check
python3 build/sums.py LAYER/RECIPE # a recipe's checksums, after any change to its files
python3 build/versions.py check # every recipe changed since the release raised its version
python OVERPRESSURE/scripts/check-docs.py --repo . # links, AGENTS.md; OVERPRESSURE: a checkout of it
python OVERPRESSURE/scripts/check-private.py --repo . --history # nothing private in any commit
```

A build of a headset's layers is `bash build/packages.sh <codename>/<flavour> WORKDIR OUTDIR` inside the build
image ([a build](docs/develop/building.md#a-build)); from a checkout of overpressure,
`python -m overpressure container run -- bash ...` runs the same image.

## Layout

- `common/`, `sm8250/`, `phoenix/`, `hollywood/`: the layers, one folder per recipe (`PKGBUILD` and its files).
- `headsets/<codename>/<flavour>/`: a headset's image definition (`layers`, `pacman.conf`, `packages.txt`,
`packages.lock`) ([image definitions](docs/reference/image-definitions.md)).
- `build/`: the build (`packages.sh`), CI's plan and keys (`plan.py`), release notes, versions, checksums,
shellcheck. `tests/`: the checks. Every folder: [layout](docs/reference/layout.md).
- `docs/`: [develop](docs/develop/README.md) (building, releasing), [reference](docs/reference/README.md).
`out/`: build output, ignored.

## Hard rules

- **Private data.** Never commit vendor files, Valve's or PICO OS's files, device data or identifiers: a headset's
own files reach its system from the owner's headset at the install. Stage files by name, never `git add -A`.
- **The lowest layer that fits:** what any headset needs goes into `common/`, a SoC's into its layer, one headset's
into its folder. Each layer's folders have their own code owners ([CODEOWNERS](.github/CODEOWNERS)).
- **Pinned and checksummed:** a recipe pins its upstream by version and hash or by commit; after any change to its
local files, regenerate its sums (`build/sums.py`). A recipe changed since the newest release raises its
`pkgrel` (or `pkgver`) ([versions](docs/develop/releasing.md#versions)). Files stay LF: the checksums depend on it.
- **One build at a time:** builds share their build roots and caches.
- **Releases only by the workflow** (*Actions*, *Packages*, *Run workflow* on `main`); a tag pushed by hand
releases nothing, and released tags never move ([a release](docs/develop/releasing.md#a-release)).

## Changes

A branch and a pull request against `main`, titled as a conventional commit; merged by rebase or squash once `ci`
passes and the code owners of every changed path approved
([conventions](https://github.com/overpressure/overpressure/blob/main/docs/develop/conventions.md#changes)). CI
builds each changed package once, on its pull request ([how CI builds](docs/develop/releasing.md#how-ci-builds)).
A headset uses a release only once it moves its pin.
1 change: 1 addition & 0 deletions CLAUDE.md