Skip to main content

Airlock

The release CLI (Python 3.14+). It prepares reviewed versions and changelogs with native pnpm, then publishes npm packages, Python packages, containers and GitHub Actions declared in airlock_targets.toml. Merging a prepared feature PR into main starts publication automatically.

How does a code change become a published release?

flowchart TD
    Change["Change release contents"] --> Intent["pnpm change: choose targets, bump and notes"]
    Intent --> Prepare["pnpm release:prepare: versions, changelogs and lockfiles"]
    Prepare --> Check["./just c: tests and Cerberus"]
    Check --> Review["Commit and review the prepared feature PR"]
    Review --> Merge["Merge into main"]
    Merge --> Plan["Airlock plans pending publication batches"]
    Plan --> Npm["npm jobs: wait for dependencies, publish package"]
    Plan --> Python["Python jobs: uv build and publish"]
    Plan --> Container["Container jobs: images and release assets"]
    Plan --> Action["Action jobs: versioned tags and major aliases"]
    Npm --> Github["Per-target GitHub release with reviewed notes"]
    Python --> Github
    Container --> Github
    Action --> Github

Prepare a feature PR

  1. Run uv run cerberus --check release_surface_version_bump to identify changed published targets.
  2. Run pnpm change, select those targets and choose patch for fixes, minor for compatible features or major for breaking changes. Write a concise consumer-facing summary, including migration steps for breaking changes; pnpm adds the list marker. Use separate fragments when targets need different descriptions.
  3. Run the commands below. Review the versions, dependency changes, changelog entries, .changeset/ledger.yaml, .changeset/preparation.json and both lockfiles, then include those edits with the feature. CI runs the full test suite and Cerberus.
  4. Submit the PR through the repository's normal review process. After merge, check the automatic release run and its per-batch summaries; each GitHub release should contain the prepared entry for that version.
pnpm release:prepare
./just lint typecheck

Preparation invokes pnpm version -r, consumes change intents and propagates dependency versions. Set versioning.changelog.storage: repository in pnpm-workspace.yaml so generated changelogs are reviewed in the PR. Only declared release targets publish; private dependent workspaces can also receive version bumps.

For GitHub Packages, preparation preserves configured pnpm credentials and falls back to NODE_AUTH_TOKEN, GH_TOKEN, GITHUB_TOKEN or gh auth token. Fallback credentials are scoped to the declared GitHub package scopes in the pnpm child environment; lockfile refresh retains the configured dependency registries. No authentication files are written.

Python targets have a private pnpm tracking package.json beside pyproject.toml; preparation synchronizes the native Python version through uv. Preparation initializes or refreshes every target's fingerprint after versioning. Cerberus's release_readiness bite rejects unconsumed fragments, mismatched versions, stale fingerprints and missing or empty changelog entries.

Add further change intents and rerun preparation while a release is pending. Airlock records only pending releases in .changeset/preparation.json: changed manifest fields, pending changelog sections, ledger edits and consumed intent text. Published history and unchanged manifest fields stay out of the record. Replay validates those edits and publication state, undoes only preparation-owned changes, restores consumed intents alongside new ones, then reruns pnpm's planner. Two patch intents produce one patch release; a patch and a minor produce one minor release. Both notes appear once, dependency versions are replanned, and source edits are preserved. Commit the preparation record so the same baseline survives checkout and review.

Once all recorded releases have GitHub releases or uploaded artifacts, preparation discards their record and starts a new baseline. No pending metadata changes means no preparation record. Existing full-snapshot records are read and replaced with pending edits during preparation. A partial PyPI upload or an existing Action version tag also freezes that version. Finish or retry a partially published preparation before adding more release intents. If a newer version has published elsewhere, merge the latest target branch first. Prepared releases without a preparation record must publish before adoption, or have their original baseline and intents restored; the ledger records intent IDs, not their deleted text. Overlapping manual edits to generated metadata require resolution before replay; write additional release notes as intents.

On a reported preparation failure, Airlock restores the release metadata present at invocation: manifests, versions, changelogs, intents, ledger, lockfiles, fingerprints and the preparation record. Existing staged, unstaged and untracked edits remain; the Git index is untouched. Run preparation without concurrent edits. Build-hook outputs outside release metadata are retained. This recovery handles raised errors and interrupts, not an abrupt process kill or filesystem failure.

Release content validation

Cerberus's release_surface_version_bump bite enforces single-step version bumps against finalized GitHub releases and the pull request target branch. Set GITHUB_BASE_REF to compare against a target branch; published versions also require unchanged fingerprinted contents. Target-branch versions can be repaired without another bump before their first registry upload. Once any package artifact exists, including an incomplete PyPI upload, the target branch's fingerprint and includes selection must remain unchanged until that version's GitHub release is finalized.

airlock prepare records each target's hash in airlock_targets.toml after preparing versions, changelogs and lockfiles. npm and Python fingerprints use sha256:v2:<digest>; other targets use sha256:<digest>. Hashes cover sorted paths, file contents and executable permissions; source fingerprints also cover entry kinds and symlink destinations. Timestamps, ordering and compression are ignored. Release manifest comments and layout are preserved.

The npm hash ignores the root package.json's devDependencies and JSON whitespace. The Python hash ignores the root pyproject.toml's [dependency-groups] and TOML formatting. Runtime dependencies, npm peer dependencies, Python extras, build requirements, other metadata and built output still count. Bump detection, readiness and publication use this same hash. Existing unversioned package hashes retain their original validation rules until preparation refreshes them.

Package archives must exclude airlock_targets.toml to avoid self-referential fingerprints.

Each target accepts an optional includes array of globs. It defaults to ["**/*", "!**/*.md", "!**/*.markdown"]; positive patterns select files and ! patterns exclude them. An explicit array replaces the defaults: includes = ["**/*"] includes Markdown. Archive paths are package-relative and container paths are relative to the target's manifest directory. Actions default to their manifest directory; an explicit includes array uses repository-relative paths. For an Action whose manifest lives elsewhere, select its sources with includes = ["apps/action-airlock/**", "!**/*.md", "!**/*.markdown"]; individual files such as shared/schema.json can also be selected. Container selection also follows its build-context ignore rules. Python README descriptions follow the same selection, and derived wheel checksum indexes are omitted from fingerprints.

Target Fingerprinted contents
npm The normal pnpm pack archive, including bundled code and package metadata.
Python Both the wheel and source distribution produced by uv build.
Action Git-visible repository files selected by includes, plus the major/minor version of its optional sync_minor_from target.
Container A build-input fingerprint of the selected context and Dockerfile paths, the Dockerfile, the selected ignore file and all build-context files admitted by its rules, filtered with Docker's SDK matcher. Git ignore rules do not filter container inputs.

Git-visible Action files include tracked files and new files permitted by Git's ignore rules. The release manifest is excluded from source fingerprints because it stores the fingerprints themselves. Container ignore rules must exclude .git when present, keeping fingerprints stable across commits and checkouts. Action and container hashes are a best-effort check of the selected inputs; container fingerprints do not resolve remote base images or execute builds.

Python packages pin uv_build exactly in build-system.requires. uv uses that backend version even when its bundled backend differs, keeping wheel metadata and fingerprints consistent across preparation, CI and publication.

Bump detection is a best-effort reminder using prepared fingerprints; release readiness owns artifact validation. Cerberus compares each prepared fingerprint with the latest finalized stable GitHub release's tagged manifest, without rebuilding packages. The current PR's fingerprint cannot replace that baseline. One GitHub release-history lookup serves all targets; comparisons read Git history without downloading published artifacts. Fingerprints are comparable when their format and includes policies match; the first release under those rules establishes its baseline.

Preparation also records each package's depends_on list of matching workspace target names from its built metadata, for example depends_on = ["airlock"]. References use the target's table name; its manifest supplies the exact version to await during publication. The field is omitted when there are no dependencies; an explicit empty list has the same meaning. Cerberus's release_readiness bite recalculates every target's fingerprint and package dependency list. Run uv run cerberus --check release_readiness for a focused readiness check. Publication verifies the same npm/Python archives it uploads and verifies Action/container inputs before publication. Build and fingerprint failures are errors.

Actions can set sync_minor_from = "airlock" to include that target's major/minor version in their fingerprint. Airlock patch bumps and source edits leave the Action hash unchanged. This setting only controls fingerprinting; package publication ordering uses depends_on.

Release checks require the GitHub CLI to read published releases. Authenticate locally with gh auth login; in CI, set GH_TOKEN to the workflow token with contents: read permission.

Cerberus reports release readiness and enforces the version-bump policy. It reuses Airlock's fingerprints, manifest parsing, GitHub release history and version parsing through its zyplux-airlock Python dependency.

Private GitHub registry reads use NODE_AUTH_TOKEN for npm, or GH_TOKEN/GITHUB_TOKEN, and otherwise reuse gh auth token --hostname github.com. Local users can sign in with gh auth login --scopes read:packages. Tokens need access to the package; Actions use the job token and package access granted to the repository. Explicit credentials take precedence, and registry failures remain errors.

Automatic publication

The release workflow has a planning job and a publication matrix. airlock plan validates prepared releases and emits matrix and pending action outputs. Each row contains the exact release tags, a stable concurrency ID, an environment and a runner. airlock publish --batch JSON validates that row against the checked-out configuration and publishes its selected targets.

Every target has its own publication job, concurrency ID and GitHub release. Environments default to npm, pypi, ghcr and actions; set environment on a target to override it. The shared setup supports Linux runners.

Planning selects pending targets without building or packing packages. Each npm job packs its target once, inspects the archive's manifest after lifecycle scripts and beforePacking hooks, then publishes that same archive. Declare workspace dependencies retained in dependencies or optionalDependencies as npm release targets; private implementation packages removed during packing need no release target. A matching retained dependency on a declared workspace package is treated as a release edge, regardless of local linking settings. Each job waits for those workspace versions and tarballs before uploading. Development-only dependencies do not delay publication. Missing dependencies are checked every ten seconds for up to sixty retries; failed dependencies block their consumers while unrelated jobs continue. Packing failures affect only their target's job.

Each successful job finalizes its target's release; a failing job leaves the other jobs running. Npm publication requires each target to match a non-private workspace package at its configured version. Native pnpm publishes the inspected archive. Airlock verifies the exact version in registry metadata and uses GET to check tarball accessibility before creating its GitHub release. Airlock owns availability waiting; pnpm's HEAD-based wait is disabled because GitHub Packages rejects that method. Repairing a missing GitHub release for an existing npm or PyPI version rebuilds and validates its current fingerprint without uploading again. PyPI completion requires a wheel and source archive; uv checks the index to skip existing files when retrying incomplete uploads. Action publication creates a fixed versioned release and advances its compatible major alias to the newest published stable version. Package prepack hooks own npm builds and archive validation; publish-only lifecycle hooks are rejected before packing.

Python publication reads Requires-Dist from the built wheel and waits for matching versions of other configured PyPI targets before uploading those same archives. Matching dependencies include optional and conditional installations. The dependency's wheel and source archive must both be visible on PyPI; missing artifacts and transient registry failures use the same bounded wait as npm. A failed dependency blocks its consumers while unrelated jobs continue.

Each npm and Python job rejects cycles among its reachable unpublished workspace dependencies before waiting. Cycle checks use the prepared depends_on lists, validated against the actual archives during readiness checks and publication. Packing hooks, bundled dependencies and dynamic Python metadata are resolved during preparation; publication does not repack peer packages. Existing publications break dependency cycles; unrelated jobs remain independent.

To recover from a failed run, fix the cause and rerun the failed jobs in GitHub Actions, or dispatch release.yml on main with an optional tag to select one release.

Add Airlock to a repository

Configure pnpm versioning and declare airlock_targets.toml. Cerberus includes Airlock in its Python dependencies, so repositories using Cerberus can run uv run airlock. For a standalone CLI, use uv tool install zyplux-airlock. Use the release workflow as the consumer template, replacing its local action references with:

- uses: zyplux/zyplux/apps/action-airlock@action-airlock-v2
  with:
    command: plan

The publishing step uses the same action with command: publish and batch: ${{ toJSON(matrix) }}. Planning sets up uv and the publisher runtime. Publication also sets up pnpm, installs the repository's locked build dependencies and configures GitHub Packages authentication. It installs Airlock from the action's versioned source and uv.lock in a separate environment; the action reference selects the publisher version. Its token defaults to the job's GitHub token.

The calling workflow declares triggers, permissions, concurrency and environments. A single matrix uses their combined token permissions; separate job definitions can narrow permissions by publication kind. Keep OIDC publishing jobs in this top-level workflow to support PyPI trusted publishing.

Airlock supplies each npm scope's publishConfig registry to pnpm for preparation lookups. Targets in one scope must share a publication registry. Public npm and PyPI use trusted publishing; GitHub Packages and GHCR use the job token with packages: write.

Add a release target

manifest is a repository-relative JSON or TOML package manifest. Airlock reads JSON name and version or TOML project.name and project.version; its parent directory defines the target directory. The release kind defaults to npm for JSON and pypi for TOML. Actions and containers declare their kind explicitly.

  1. Add a named table with its manifest to airlock_targets.toml. The table name identifies the release target and supplies the <name>-v tag prefix. Optional release_tag overrides that base name: release_tag = "short" produces short-vX.Y.Z. Dependency references use table names independently of release tags.
  2. Ensure pnpm discovers its version manifest. Python packages need the private tracking manifest described above; actions use a workspace package.json, with private: true when there is no npm package.
  3. Complete the registry setup below, then prepare and merge the release through the feature PR procedure.

Manifests and declared paths must be repository-relative and resolve inside the repository:

[airlock]
manifest = "apps/airlock/pyproject.toml"

package_name defaults to the name read from the manifest. An explicit override supplies the publishing identity, which npm and Python archives must match. GHCR targets require their full container name in package_name.

Actions publish releases and tags in the checked-out GitHub repository. Airlock publishes as Python distribution zyplux-airlock with airlock-vX.Y.Z tags; its action uses fixed action-airlock-vX.Y.Z tags and the action-airlock-vX alias. The package-manager action uses setup-pm-vX.Y.Z and setup-pm-vX.

Container releases

Declare a GHCR target with a manifest, build paths and container package name:

[zyploop]
kind = "ghcr"
package_name = "ghcr.io/zyplux/zyploop"
manifest = "apps/zyploop/package.json"
dockerfile = "apps/zyploop/Dockerfile"
build_context = "."

Both build paths are relative to the repository root and must stay inside it. The build context defaults to the manifest's directory. When dockerfile is omitted, Airlock selects Containerfile or Dockerfile in the build context.

Airlock selects .containerignore or .dockerignore beside the Dockerfile, falling back to the build-context directory. Within each directory, .containerignore takes precedence. The same selection filters the build-input fingerprint and is passed to Podman with --ignorefile. Fingerprint mismatch diagnostics identify the selected context, Dockerfile and ignore file.

Airlock authenticates GHCR, builds the versioned image with org.opencontainers.image.version and org.opencontainers.image.revision labels, and pushes it with Podman's --digestfile. It validates the returned SHA-256 digest and verifies registry availability before generating release.json:

{
  "version": "1.2.3",
  "image": "ghcr.io/zyplux/zyploop@sha256:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
}

Airlock attaches this manifest to a draft GitHub release, then finalizes the release with its prepared changelog. Retrying an unfinished release rebuilds and records the newly pushed digest. Finalized releases retain their manifest and image; missing artifacts fail validation. Dispatch release.yml with the target tag to retry a container release. Deployment consumes the manifest separately.

Registry setup

npm

Follow the manual first-publication guide to publish a new public npm package and configure trusted publishing for subsequent releases.

PyPI

Add a pending publisher before first publication: distribution name, owner and repository, workflow filename release.yml and environment pypi or the target's configured override. Preparing and merging the release publishes it with OIDC. PyPI requires no bootstrap token.

Metadata

Release files for zyplux-airlock 2.2.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zyplux-airlock 2.2.5
File Size Uploaded Provenance Actions
zyplux_airlock-2.2.5.tar.gz 30.0 kB Without provenance Details for zyplux_airlock-2.2.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for zyplux-airlock 2.2.5
File Interpreter ABI Platform Actions
zyplux_airlock-2.2.5-py3-none-any.whl Python 3 none any Details for zyplux_airlock-2.2.5-py3-none-any.whl

Total release size: 67.7 kB

Release files / zyplux_airlock-2.2.5.tar.gz

Download URL zyplux_airlock-2.2.5.tar.gz
Size 30.0 kB
Tags Source
SHA-256 checksum
How to use checksums
c71e49a2c6bd54facac1b217032a79a2754a3a72ebae09ff0223ea1978581703
BLAKE2b-256 checksum
How to use checksums
b9ff46a66cea1fa0c9f286466b119dae39d17443246fb1794fffdd0a8792f988
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.4 {"installer":{"name":"uv","version":"0.13.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / zyplux_airlock-2.2.5-py3-none-any.whl

Download URL zyplux_airlock-2.2.5-py3-none-any.whl
Size 37.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
29c031f2678203cf494b8aab92a1d309761dd1f9f3390e3e83f600dd82242188
BLAKE2b-256 checksum
How to use checksums
4b1e8a9a368b9971890d52bcf3f31ed12b95f9c4ae99b49c1eeee2c3e2154e64
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.4 {"installer":{"name":"uv","version":"0.13.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for zyplux-airlock 2.2.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page