Repository navigation
Description
Question
Tools like Dagger run CI logic in a containerized engine: the forge YAML shrinks to dagger call, steps run in pinned containers with content-addressed caching, and a local run matches the CI run. chant approaches the same problem from the other end. Where do the two meet, and what is chant missing?
Where chant sits today
chant already covers most of the ground pipeline engines claim:
- Pipelines as code: Ops, typed and phased, with gates, a gate ledger and
onFailurecompensation, run in-process or--on fountain. - Durable runs: fountain stewards run an Op on a machine of their own and keep the record on a thread.
- Native CI for three forges: one TypeScript source builds GitHub Actions, GitLab CI and Forgejo Actions YAML (One shared layer under chant's three CI generators #3765 shares a layer between them; the dialect and migration map GitHub to GitLab).
- Which commits passed:
chant cirecords green and revoked commits as git tags. - Releases: components build once and promote a recorded digest without rebuilding, with SBOMs, signing and provenance.
- Local runs: emulators run the real deployer against an emulated cloud.
- Pipeline security and forge governance: the audit engine (GHA029–058, WGL029–048), and the wardens, which are built on chant's reconcile loop.
What it doesn't have is the engine half: steps run on the host with no isolation, no cache and no pinned toolchain (the build archive is promotion, not caching; epic #551 left the build engine pluggable and never chose a default). This issue is about that half, and about chant running CI itself rather than only generating it (#4016 explores a forge built that way).
Both chant and Dagger promise pipelines that aren't tied to one forge:
- Dagger does it at run time. Its engine runs in every CI job.
- chant does it at build time. It writes each forge's own YAML, so nothing extra runs in CI, and forge-side tooling (required checks, the security tab, zizmor) keeps working.
The docs make neither argument. concepts/comparison.mdx covers Terraform, CDK and Pulumi only, and Dagger is not mentioned on the site.
Gaps to research
- Hermetic Op steps. An Op's
shell(...)orkubectlApplystep runs on whatever machine runs the Op, so chant's determinism ends atchant build. TheopRuntimehook (chant run --on <lexicon>, used by fountain) could host adaggerruntime that runs each step in a pinned container, with caching, the same way locally and in CI.- What does a step need to declare to run in a container (image, mounts, secrets, cache keys)? Can that come from existing step builders, or does each lexicon's builder need a container form?
- How do gates, the gate ledger and
onFailurephases map onto a runtime that executes steps elsewhere? - Is Dagger the right engine, or is the hook better served by plain BuildKit, or by running steps as jobs in the generated CI?
- Running generated CI locally. chant holds a typed model of every job it generates. Could it run a job locally (directly, or through the runtime in 1) instead of pointing people at act, which re-parses the YAML chant wrote?
- Warden policy as a chant lexicon. The wardens read
governance.yml, which is hand-written YAML without types, lint or a deterministic build. Agovernancelexicon would build that file from TypeScript and lint it beside the workflows it protects. github-warden docs(github,gitlab): document runtime observation as N/A (#56) #62 already makes each pipeline's job names required status checks, which points at one source for a pipeline and the rules that enforce it. Does that belong in the github lexicon, a new lexicon, or the wardens? - Positioning. A Dagger row (and maybe Bazel) on the comparison page, and the build-time versus run-time argument in the CI room.
Out of scope
Replacing generated CI YAML with an engine. The build-time approach is the point; this issue looks for what an engine adds beside it.
Deliverable
A short write-up in this issue answering the questions in 1 to 3, with a recommendation for each: build, defer or drop. If 1 is a go, a design sketch of the runtime and the step declaration it needs. Item 4 can go straight to a docs PR.
Activity
lex00 commentedon Oct 19, 2026
The chant runner's first slice is epic #4101. Container isolation and a step cache stay here.
lex00 commentedon Oct 21, 2026
Write-up (2026-10-20)
chant claims are cited at 232b9bb (v0.124.32). (inferred) marks my reading. Prior-art claims come from the pages in Sources, read 2026-10-20.
The runner itself shipped as epic #4101:
chant ci runruns a pipeline job as an Op on the local executor, from the same typed value the forge generators wrap, andci serveruns those jobs on one host [1, 2]. What #4101 left here is the engine half: step isolation, a step cache and a pinned toolchain.Prior art
dagger checkruns declared checks the same way locally and in CI, and Cloud Checks runs them on managed machines in early access. In v0.21 (2026-05-22) Dagger began replacing BuildKit's solver with its own engine and an e-graph cache; Modules v2, withdagger.tomland a lockfile, is still in development [S1].shellstep lacks [4].ci run --localruns the jobs it generates from their typed values and never reads YAML [1, 5]. act covers hand-written workflows anduses:actions, which chant does not model.1. Hermetic Op steps
Build a container form of the
shellstep. Defer the step cache. Drop Dagger as the default engine; defer adaggerop runtime as a lexicon.Today a
shellstep is theshellCmdactivity with a command, an environment and a timeout, run on whatever host runs the Op [4].ci runnames an image only to choose setup lines; the steps still run on the host [6, 7]. Build-time sandboxing exists forchant build --sandbox, not for Op steps [8].Design sketch:
shell(cmd, { image: "<ref>@sha256:<digest>", mounts?: { workspace: "ro" | "rw" }, outputs?: string[] }). The digest is required, so a step pins its toolchain. Env and secrets come from the step'senvand the job's existing allowlist and secrets file [1].docker run --rm(or podman) with the checkout mounted at a fixed path, the env passed by name, and the declaredoutputscopied back. The step record gainsimageand its digest, so the run ledger shows what ran [9].onFailure: unchanged. They stay in chant's executor; only the step body moves into a container, so a gate never runs inside one (inferred).imageoption by passing it through toshellCmd; modeled steps that call an SDK in-process keep running on the host (inferred).imagewithout a digest fails a new lint rule (inferred: no existing rule covers Op step images).Cache, deferred: a cache key needs each step's inputs, and no step declares them [4]. A first cut would key on image digest, command, env names and values (secrets excluded) and the content digest of declared
inputs, and replay declaredoutputs. That needs aninputsfield on every builder that wants it, so it waits on a user with a slow step to justify it.Why not Dagger by default: it needs its engine in each job, and its solver and module format are mid-change in 2026 [S1]. A
daggerruntime can still hang off the existingopRuntimehook as a lexicon, the way fountain does, without core importing it [10, 11].This is step isolation. Runner isolation (an ephemeral machine per job) is #4147 and the isolated-runners group in #4168 section 8.
2. Running generated CI locally
Done for the jobs chant generates from typed values; drop for hand-written workflows.
chant ci run plan|apply --localruns a pull-request job fromprLoopJobs, the value the three generators wrap, and nothing reads YAML [1, 5]. Gated wave jobs runchant run wave --spec <file> --wave <k>, which is the same command locally [12, 13]. A hand-written workflow in the github lexicon can use anyuses:action, and running those means re-implementing the Actions runner, which act already does [S3]. Point people at act for those.3. Warden policy as a chant lexicon
Drop the chant lexicon. Defer a TypeScript policy file to github-warden.
The warden's policy is already typed:
GovernanceConfiginsrc/config/types.ts:532, validated bysrc/config/load.tswith an error naming the field path [14, 15]. What it lacks is authoring in TypeScript: the file is YAML or JSON [15]. github-warden#62 already reads generated job names from chant's workspace contract and turns them into required checks (checks) and CODEOWNERS (codeowners) [16]. So the link between a pipeline and the rules that protect it exists without a lexicon. A chantgovernancelexicon would copy the warden's types into chant and keep two schemas in step (inferred). The smaller change is for the warden to acceptgovernance.tsexporting aGovernanceConfig, which is a github-warden issue, not a chant one.4. Positioning
Build: a docs PR.
concepts/comparison.mdxcovers Terraform, CDK, Alchemy, Formae and ConfigHub and has no Dagger row [17]. Add a section on pipeline engines with Dagger and Bazel rows, and add the build-time versus run-time argument to the CI room [18]: chant writes each forge's native YAML [3], so nothing extra runs in CI and forge tooling keeps working; github-warden'schecksalready reads those job names as required checks [16], where Dagger runs an engine in every job [S1].Sources
PR_LOOP_IMAGE)OpRunStepRecord)S1. https://dagger.io/changelog/
S2. https://github.com/moby/buildkit
S3. https://github.com/nektos/act
S4. https://bazel.build/basics/hermeticity
op: a shell step can run in a container pinned by digest (#4015) (#4176)
lex00 commentedon Oct 21, 2026
Built in #4176 (merged as a24eebc):
shell()runs in a container when it has animagepinned by digest. The working directory is read-only at/workspaceby default,outputsdirectories are mounted writable,envis passed by name, and the run ledger records the image on the step. OPS018 refuses an unpinned image. The terraform apply and adopt composites passcompensate.imagethrough.Follow-ups from the write-up:
daggerop runtime as a lexicon on theopRuntimehook: op: a dagger op runtime as a lexicon (parked) #4172, parked.governance.tspolicy file: config: accept governance.ts exporting a GovernanceConfig github-warden#69.Running hand-written workflows locally stays with act, as the write-up says.