The catalog has one gate, scripts/verify.sh, and two workflows that run it.
The script runs from the repository root and executes eight stages in order. Any failure stops the run.
For each compositions/*/composition.yaml:
metadata.namemust equal the directory namespec.typemust equal the directory nameschema.yamlmust exist beside itjobs/must exist beside it
The run also fails if no composition directories are found at all, so an empty or mis-staged tree cannot pass silently.
A job template is rendered with exactly three namespaces: .orun, .parameters and .env. A
condition on any other key is always false, so the step takes its else branch for every consumer
and nothing fails. Every {{if ...}} and {{with ...}} in compositions/ must therefore read one of
those three.
This is the bug that shipped in 0.18.1 through 0.20.0: turbo-package guarded pre-build, build and
typecheck on .preBuildCommand, .buildCommand and .typecheckCommand, so pre-build skipped every
component's tests and declared build and typecheck commands were ignored. Inside a range or with
block . is rebound; bind a variable there so this rule can still read the expression.
orun publish "ghcr.io/sourceplane/stack-tectonic:${stack_version}" \
--dry-run --root . --version "${stack_version}"stack_version is read from metadata.version in stack.yaml. This resolves the manifest and the
registry target without uploading anything.
orun pack archives whatever root it is given, but orun publish ships only stack.yaml,
compositions/, and examples/. The script stages exactly that subset into a temporary directory
and packs it, so the artifact under test is the artifact consumers actually resolve.
The script writes a throwaway intent.yaml pointing at the packed tarball with an archive
composition source:
compositions:
sources:
- name: stack-tectonic
kind: archive
path: <tmp>/stack.tgzIt then runs orun compositions list --intent intent.yaml and asserts that every composition
directory in the repo appears in the output.
This last stage is the point of the script. A dry-run publish only proves the manifest and target resolve; it is no evidence the package is loadable. Packing and re-resolving exercises the same code path a consumer repository runs, so a composition Orun cannot load or export fails here instead of in a downstream repo after release.
Resolving proves a composition loads, not that it renders what a component declares. The script plans
two fixture components through the same packed artifact, one declaring preBuildCommand,
buildCommand and typecheckCommand and one declaring none, on the verify profile. It then checks
the rendered steps: the first must run its three commands, and the second must skip pre-build and use
the default turbo run build and turbo run typecheck. Every structural check passed on the releases
that skipped pre-build; this one would have failed them.
The script plans two fixture workers on the deploy profile, one setting skipResourceProvisioning: true and one leaving it out. The deploy profile binds secrets, so this fixture's intent declares a
placeholder workspace and project; nothing is resolved at plan time. The first worker's deploy step
must pass --x-provision=false to wrangler deploy, the second's must not, and both must keep the
same wrangler deploy --config ... --env ... command. A consumer that has not opted in therefore
deploys exactly as before.
The same two fixture workers: the opted-in one also sets deployTokenEnv: CF_CONTAINERS_TOKEN.
Its pre-deploy, migrate, deploy and secrets-live steps must each export CLOUDFLARE_API_TOKEN from
that variable (failing loudly when it is empty); none of the default worker's steps may mention a
token switch, so a consumer that has not opted in deploys with the profile's token as before.
The script plans two migration components through the packed artifact, on stage and prod: the
composition's own smoke fixture, which sets buildFilter: "@example/db", and one that leaves it out.
Every build step of the first must render pnpm exec turbo run build --filter=@example/db. Every
build step of the second must render pnpm exec turbo run build --filter=@saas/db, the exact 0.21.0
command, so a consumer that does not set the parameter plans as before.
orun does not copy a schema's default into .parameters, so the default comes from the template's
else branch. A guard and a value that read different keys still renders a green build of @saas/db,
and the mismatch only shows when the apply step fails with MODULE_NOT_FOUND. This stage fails on it
instead.
.github/workflows/verify.yml runs on every pull request and every push to main. It is a single
verify-stack job: check out, log in to GHCR, set up Orun via sourceplane/orun-action, and run
./scripts/verify.sh.
.github/workflows/release.yml runs on tag pushes matching v*, and from its Run workflow
button (workflow_dispatch):
- Derive the version from
metadata.versioninstack.yaml. On a tag push, assert it equals the tag without its leadingv; a mismatched tag fails the release before anything is published. On a dispatched run the tag isv<version>: the run must be onmain, and it stops if that tag already points at a different commit, so a version cannot be released twice from two commits. - Run
./scripts/verify.sh— the same gate the pull request ran. - Create the GitHub release with
gh release create --generate-noteson the run's commit, skipping if it already exists. On a dispatched run this is also what creates the tag. - Publish the OCI package with an explicit target. The target is passed explicitly because with no
ref
oruninfersghcr.io/<owner>/<repo>/<package>from the git remote, which is the wrong repository path. - Confirm the package is pullable:
orun fetchinto a temp directory, assertstack.yamlis present, and report the exported composition count.
The package push deliberately runs after the release is created, so the tag and release notes are the record of record before the immutable artifact exists.