Skip to content

CI and the site

This repo’s rule is that its infrastructure is chant. A pipeline is infrastructure, so every workflow is declared and rendered rather than written by hand.

Terminal window
just ci # render every workflow
just ci-check # fail if any committed file has drifted from its source
sourcerendered
ci/pipeline.ts.github/workflows/ci.yml
pages/pipeline.ts.github/workflows/pages.yml
e2e-k8s/pipeline.ts.github/workflows/e2e-k8s.yml
image-pin/pipeline.ts.github/workflows/image-pin.yml
workflows/shared.tspins they share — checkout SHA, just and k3d versions

GitHub reads YAML from the default branch, so the rendered file has to be committed. That makes hand-editing it possible, and a hand edit would win silently while the declaration still looked authoritative. ci-check is the gate that stops it, and it runs in CI as well as locally.

✓ .github/workflows/ci.yml matches ci/pipeline.ts
✓ .github/workflows/pages.yml matches pages/pipeline.ts
✓ .github/workflows/e2e-k8s.yml matches e2e-k8s/pipeline.ts
✓ .github/workflows/image-pin.yml matches image-pin/pipeline.ts

check is the same just check chain you run locally: typecheck, lint, test, build. Deliberately identical, so the thing people run before pushing keeps predicting what CI does.

e2e is the same just e2e, for the same reason.

Terminal window
just e2e

Stands up from nothing and asserts, in order:

readiness/health/ready answers {"database":"ok"}, so the app reached Postgres, not just booted
the master keyre-running just up leaves MASTER_SECRETS_KEY byte-identical
a clean startthe app’s restartCount is 0, so the Postgres wait has not regressed
the backuptaken, then restored into a throwaway and table-matched against live
the account pathregister over the API, verified (self-verified on pins past v0.4.0; verify-email is idempotent either way), headless throughout
the first-admin bootstrapthe account ends up admin — in-app on pins past v0.4.0 (promote-admin reports it already admin), granted by the release task on older ones
the conversation gatea turn completes on a spritzer pod: fountain’s ACP fixture runtime is enabled for the e2e account, a persistent agent writes an artifact, the turn ends end_turn, and the artifact is read back out of the sprite pod with kubectl exec
every seamjust crds then just dry-run, validated by a real API server

Then it tears down. On failure it leaves the cluster up so there is something to look at; CI runs its own teardown regardless.

Actions are pinned by commit SHA, tools by release version. A tag is a moving pointer, and whoever controls it controls what runs here.

image defaults to a pinned fountain release, and the version is written in exactly one place: FOUNTAIN_VERSION in src/lib/fountain-image.ts, which both chant.config.ts’s declared default and src/params.ts’s fallback read.

It used to be spelled out in both files, with nothing reading either one, and it stopped at v0.7.0 for nine upstream releases — long enough that just up was standing up an instance with no team roster, no teammate schedules, no webhook endpoints and no sandboxes routes, against docs that describe all four (#119). Every other pin here has something that would notice it moving. This one now does too:

Monday 06:17 UTC, or whenever the button is pressed
read FOUNTAIN_VERSION, ask GitHub for fountain's latest release
same -> nothing
behind -> one PR on image-pin/<tag>, moving that one line
branch exists -> nothing, so a declined bump stays declined

The pull request is the prompt, not the work. Taking a bump means reading what changed upstream between the two releases and running just e2e against the new image, the way the v0.6.1 -> v0.7.0 bump did — a pin move is a deploy-path change, and that is this repo’s bar for one. The PR body lists the files that still name the old version, because the pin is quoted in prose that a sed would wreck.

It arrives with no CI run on it. That is GitHub’s rule, not a misconfiguration: pushes made with GITHUB_TOKEN do not start workflow runs. Close and reopen the PR, or push to the branch, to get one.

Astro and Starlight, built and deployed by the pages workflow on every push to main.

Terminal window
cd docs-site && npm install && npm run dev

The write scopes Pages needs (pages: write, id-token: write) sit on the deploy job alone rather than at workflow level, so no other job in the file holds the credential that publishes.