chant ci
Synopsis
Section titled “Synopsis”chant ci last-green [--json] [--lane <name>] [--from <rev>] [--branch <branch>]chant ci base [--json] [--phase <name> | --lane <name>] [--from <rev>] [--branch <branch>]chant ci verdict [--commit <sha>] [--wait [--retries <n>] [--timeout-minutes <n>]] [--branch <branch>]chant ci list [--json] [--branch <branch>] [--limit <n>] [--since <rev>] [--forge github] [--source checks|runs]chant ci tick [--dry-run] [--forge github] [--source checks|runs] [--key <runner key.pem>]chant ci quarantine checkchant ci quarantine filter --phase <name> --runner nextest|playwright|list [--only] [--json]chant ci quarantine report --phase <name> --junit <file>... [--commit <sha>] [--dry-run] [--json]chant ci run plan|record|apply|env-up|env-post|env-down|env-sweep --env <env> --base <sha> [--pr <n>] [--commit <sha>] [--head <sha>] [--result <r>] [--forge github|gitlab|forgejo] [--gate <name>] [--wave-gate <name>] [--wave <k>] [--branch <name>] [--events-json] [--report-url <url>] [--run-index-limit <n>] [--image <image>] [--before-script <line>]... [--pr-build] [--pr-build-command <line>] [--require-review] [--apply-before-merge] [--no-status] [--status-url <url template>] [--chant <command>] [--pass-env <NAME>]... [--secrets <file>] [--key <runner key.pem>] [-o <dir>] [--in-place | --local] [--no-push] [--require-runner-start] [--verbose]chant ci runner-start sign --key <runner key.pem> --principal <name> --job <json|@file> [-o <file>]chant ci runner-start verify [--base <rev>] [--commit <sha>] [--json]chant ci run --at <sha> [--release [--label <label>] [--levels <levels>]]chant ci runs [--report-url <url>] [--json]chant ci serve --forge forgejo|github|git --repo <owner/repo> --env <env> [--interval <s>] [--max-jobs <n>] [--state <dir>] [--author <login>]... [--once] [--rerun-failed] [--unsigned] [--apply-on-merge] [--build-command <line> [--land]] [--release] [ci run's job flags]chant ci serve --setup-key [--key-type ed25519|ecdsa-p256] [--trust [--principal <name>]] [--state <dir>] [--branch <name>]chant ci run --setup-key [--key-type ed25519|ecdsa-p256] [--trust [--principal <name>]] [--state <dir>] [--branch <name>]chant ci init --workflow trunk-curated|trunk-curated+apply-on-merge|apply-before-merge [--forge github|gitlab|forgejo] [--security <group|profile>]... [--yes]chant ci check [--base <rev>] [--branch <default>] [<target>...] [--output <dir>] [--json]chant ci evidence sign (--check-id <id>[,<id>...] | --from-report <dir> [--member <name>] --result <result>) [--at <rev>] [--base <rev>] [--key <file>] [--no-push] [--json]chant ci evidence sign --from-job <job> --check-id <id>[,<id>...] [--claims <dir>] [--at <rev>] [--base <rev>] [--key <file>] [--no-push] [--json]chant ci evidence sign --local --check-id <id>[,<id>...] [--at <rev>] [--base <rev>] [--key <file>] [--no-push] [--json]chant ci evidence verify [--local] --check-id <id>[,<id>...] [--at <rev>] [--base <rev>] [--json]chant ci forge-check [--env <env>] [--member <name>] [--forge github|gitlab|forgejo] [--repo <owner/name>] [--branch <default>] [--require-clouds] [--ref-gate-status] [--json]chant ci workflow [--workflow <name>]... [--output <file>] [--chant <command>] [--install <command>] [--token-secret <NAME> | --app-id-var <VAR> --app-key-secret <NAME>] [--runner-key-secret <NAME>]chant ci records which commits of a branch passed CI as git tags, from the ci.green block of the workspace declaration (#3573, ws-103). A commit that passes every required phase gets ci/green/<sha>. A green commit that later fails one gets ci/revoked/<sha>. Anyone with a clone can then find the newest commit that passed, for example to freeze it and release from it.
ci last-green
Section titled “ci last-green”Prints the full id of the newest first-parent commit of the branch that has a green tag and no revoked tag. The walk follows refs/remotes/origin/<branch> when the checkout has it, else the local branch. Only local tags are read, so fetch them first:
git fetch origin --tagsgit checkout "$(chant ci last-green)"When no commit qualifies, a message goes to stderr and the exit code is 1. With a list in ci.green.branch, --branch <branch> reads one of the listed branches instead of the first, and a branch not in the list is ci-branch-unknown. --from <rev> walks the first-parent commits of rev instead of the branch, so chant ci last-green --from <sha> prints <sha> exactly when that commit counts as green. --lane <name> reads a lane’s tags, ci/green-<lane>/ and ci/revoked-<lane>/, and a lane ci.green doesn’t declare is declaration-invalid. With signed tags, each tag the walk ignores is printed on stderr as a warning.
--json prints a read contract document, ci-last-green.schema.json, whose commit is { sha, tag, tagged, committed } or null, and exits 0 in both cases. ignored lists the tags the walk passed over for want of a valid statement, newest first, each with tag, status and reason. newer (#4169) lists up to 50 commits above the one found. Each has the commit’s record, or null when it has none. A failure has an error and exits 1. Its code is ci-green-undeclared for a declaration with no ci.green, ci-branch-unknown when the branch has no ref in this checkout, or the code of a declaration that can’t be read.
ci base
Section titled “ci base”Prints the commit a path filter should diff against when its phase declares build: "newest" (#4643). It walks the first-parent ancestors of --from (HEAD by default), leaving that commit out, and stops at the newest one whose record shows the phase built and passed on that very commit. A commit a newer build covered was never built, and a commit where the phase failed would let a change on top of the failure skip the job, so both are passed over. Without --phase, every required phase must have passed there. A commit with no record, from before the tick’s window, counts when it has a green tag and no revoked tag, as ci last-green reads them.
git fetch origin --tags +refs/heads/chant/lifecycle:refs/remotes/origin/chant/lifecyclebase=$(chant ci base --phase test) || base="" # no base: run everythingThe records are read from the local chant/lifecycle, or from origin/chant/lifecycle when the checkout has no local branch, which is the usual case in a CI job. When no commit qualifies, a message goes to stderr and the exit code is 1, and the caller should run the job. --phase must name a phase in ci.green. --lane <name> checks a lane’s phases instead, and its tags for a commit with no record; give --phase or --lane, not both. --branch picks the green branch as for ci last-green.
--json prints ci last-green’s document with two additions: phase, the phase asked about or null, and commit.via, record or tag. commit.tag is null for a commit whose record passed the phase but which has no green tag. The document exits 0 whether or not it found a commit.
ci verdict
Section titled “ci verdict”Judges one commit by the phases ci.green requires, from its check runs, as ci tick judges a commit (#4644), and prints the result. The commit is --commit <sha>, else GITHUB_SHA, else HEAD, and the check runs come from GitHub as the tick reads them (GITHUB_REPOSITORY and a token). Its own check run, chant-verdict, doesn’t count. It exits 0 when every required phase passed, 1 when one failed or wasn’t built, and 3 while one is pending. With --wait it reads again every 30 seconds until none is pending.
While it waits, GitHub answering 5xx or 429 is not a failure, and neither is a request that gets no answer (#4729). It looks again after 15 seconds and doubles the wait each time up to two minutes. After 8 such errors in a row it fails and names the last one. Any other error, such as a 404 or a missing token, fails at once. --timeout-minutes <n> bounds the wait: once that time is up it exits 1 with a message saying what it was still waiting for, so a job can end before Actions kills it at its own timeout-minutes.
--retries <n> gives a failed job more attempts before the commit fails, as the tick gives a commit on the branch one retry. It overrides ci.green.mergeQueue.retries, and both default to 0, which fails at the first failed job. Above 0, on a failed job of a required phase, the verdict waits for the job’s workflow run to finish (GitHub re-runs a run only then), and while the run’s attempt is no more than <n> it re-runs the run’s failed jobs (POST /repos/{repo}/actions/runs/{run}/rerun-failed-jobs) and keeps waiting. A run that fails on attempt <n> + 1 fails the commit with a message naming the phase and the job in its workflow run. A failed check run that is no Actions job has nothing to re-run and fails at once. The token needs actions: write.
A merge queue
Section titled “A merge queue”With "mergeQueue": true in ci.green, ci workflow adds merge_group (checks_requested) to the triggers of each workflow holding a phase that sets build, and writes .github/workflows/chant-merge-queue.yml beside the tick. Its one job, chant-verdict, runs chant ci verdict --wait on the group’s commit. Require chant-verdict in the branch’s ruleset, and the queue merges a group only when every required phase passed on it. chant-verdict runs only on merge groups, so a pull request never reports it: required on its own, it holds every pull request at “Expected”. Until it also reports on pull requests (#5129), require the phases’ own jobs, which ci workflow runs on both. With "mergeQueue": { "retries": 1 } the verdict re-runs a failed job’s workflow run once before it fails the group, and the job gets actions: write and runs chant ci verdict --wait --timeout-minutes 115, five minutes inside its two hours (#4729). true is { "retries": 0 }, and writes the file as before. A workflow holding a phase without build gets no trigger, so add merge_group to it by hand, or its phase stays pending and the verdict waits out its job’s two hours.
The queue lands the commit its group tested, so the group’s check runs are already on the branch’s commit, and the tick counts them. The push run on that commit reports the same jobs again. A skipped or cancelled attempt never replaces a decided one, so a job a path filter skips on the push, or a push run a newer one cancels, leaves the group’s result standing, and the commit’s record lists the group’s run.
Green lanes
Section titled “Green lanes”A lane is a named subset of the phases with tags of its own (#4662), for a repository that ships several things from one branch: a server release can wait on the server’s phases alone while ci/green/<sha> still needs every one.
"green": { "branch": "main", "phases": { "lint": ["lint"], "test": ["test"], "windows": ["windows"] }, "require": ["lint", "test", "windows"], "lanes": { "server": { "require": ["lint", "test"] } }}The tick judges each lane after the branch, from the check runs it already read, so a lane runs nothing and asks for no build or retry of its own; the bisect and the retry stay per phase. A commit that passes a lane’s phases gets ci/green-<lane>/<sha>, and a lane-green commit that later fails one gets ci/revoked-<lane>/<sha>. Each annotation’s record carries lane. Under signedSince the statement signs it, so a lane’s tag never counts as ci/green or as another lane’s, and a ci/green statement never counts for a lane. ci last-green --lane and ci base --lane read a lane, and the tick’s report has a line for each lane tag it makes. The _ci/<sha>.json records keep each phase’s verdict, from which any lane’s state follows.
Quarantine
Section titled “Quarantine”A test that fails on both tries on unrelated commits turns the branch red for everyone, and the tick can’t tell that red from a real one. Until someone fixes it, the test can go in ci.green.quarantine (#4677): the phase’s runner leaves it out, so the phase’s check runs and the verdict don’t depend on it, and a scheduled run of the quarantined tests alone says whether it still fails.
"green": { "branch": "main", "phases": { "test": ["test (*)"], "e2e": ["e2e"] }, "require": ["test", "e2e"], "quarantine": { "maxDays": 14, "phases": { "test": [ { "test": "arugulad::integration ssh::ssh_installs_runs", "issue": "1234", "until": "2026-11-10", "why": "Fails on both tries on unrelated commits (2ac1e89ba, c2b452072)." } ], "e2e": [ { "file": "chat-control.spec.ts", "test": "polish: edits the last message and Esc cancels", "issue": "https://github.com/acme/app/issues/1235", "until": "2026-11-10", "why": "Races the composer's focus." } ] } }}Each entry names the test as its runner does, the issue that tracks the fix (a number or a URL), the last day it stays out (until, UTC) and why. For nextest, test is the binary id, a space and the test’s name, as nextest prints them in its log, or the name alone to match it in any binary. For Playwright, test is the test’s title and file the spec’s path from the project’s testDir, as Playwright prints it. Any other runner can take the entries as a list.
chant ci quarantine filter --phase <name> --runner <runner> prints what the phase’s runner takes:
--runner | Prints | Pass it as |
|---|---|---|
nextest | A filterset over the phase’s entries without a file: not ((binary_id(=arugulad::integration) & test(=ssh::ssh_installs_runs))), or all() when there are none. | cargo nextest run -E "$(chant ci quarantine filter --phase test --runner nextest)" |
playwright | A pattern over the phase’s entries with a file, matching each test’s title path: (?:^| )chat-control\.spec\.ts (?:.* )?polish: edits the last message and Esc cancels(?: @\S+)*$, joined with |, or (?!), which matches nothing, when there are none. Regex characters in the file and title are escaped. | npx playwright test --grep-invert "$(chant ci quarantine filter --phase e2e --runner playwright)", or grepInvert: new RegExp(...) in the config |
list | Every entry of the phase, a line each: the test, or the file, a tab and the test. Nothing when there are none. | Whatever the runner takes |
Playwright’s CLI compiles --grep-invert case-insensitively, so a title that differs from a quarantined one only in case is left out too. --json prints the filter with the entries it covers.
The filter fails with declaration-invalid, at the entry’s line in the declaration, when an entry of the phase is past its until or the until is more than maxDays (14 by default) from today. The phase’s job then fails, as the test did, until someone fixes the test and deletes the entry, or deletes the test. chant ci quarantine check makes the same check over every phase without printing a filter; run it where the declaration is linted. The declaration’s reader checks only what holds on any day: each phase is declared, each until is a real day and no test is listed twice, so an expired entry never stops the tick or any other command. quarantine needs minReader 0.124.63 or newer.
--only prints the opposite selection for a run of the quarantined tests alone: nextest’s filterset without the not (none() when there are none), the same Playwright pattern for --grep, and the same list. It doesn’t fail on an expired entry, so the scheduled run still says whether that test passes. Run it under a job whose check run no phase’s patterns match, so the verdict never reads it.
The scheduled run
Section titled “The scheduled run”The quarantined tests still run, alone, on a schedule. chant ci workflow doesn’t write this job, because chant doesn’t know what a phase’s job sets up before its tests (a toolchain, a database, browsers); copy the phase’s own setup into a workflow like this one:
name: quarantineon: schedule: - cron: "47 7 * * *" workflow_dispatch: {}
permissions: contents: read
jobs: quarantined: # No pattern in ci.green.phases matches this check run, so the verdict never reads it. name: quarantined tests runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 # The setup the test phase's own job does. - name: Anything quarantined? id: any run: | if [ -n "$(npx chant ci quarantine filter --phase test --runner list)" ]; then echo "run=true" >> "$GITHUB_OUTPUT"; fi - name: The quarantined tests if: steps.any.outputs.run == 'true' run: cargo nextest run --profile ci --ignore-default-filter -E "$(npx chant ci quarantine filter --phase test --runner nextest --only)" - name: What became of each, and who is told if: always() && steps.any.outputs.run == 'true' env: CHANT_WEBHOOK: ${{ secrets.CHANT_WEBHOOK }} CHANT_WEBHOOK_KEY: ${{ secrets.CHANT_WEBHOOK_KEY }} run: npx chant ci quarantine report --phase test --junit target/nextest/ci/junit.xmlThe job is red while a quarantined test still fails, and nothing requires it. Give its check run a name no phase’s patterns match: a broad pattern such as * would make the verdict wait on it.
chant ci quarantine report reads the run’s JUnit XML: nextest writes it with [profile.ci.junit] in its config (target/nextest/ci/junit.xml for path = "junit.xml"), and Playwright with --reporter=junit and PLAYWRIGHT_JUNIT_OUTPUT_NAME. For Playwright, run npx playwright test --grep "$(npx chant ci quarantine filter --phase e2e --runner playwright --only)". The report prints each quarantined test of the phase as passed, flaky, failed, skipped or not run. A nextest test that passed only on a retry is flaky, not passed, and a Playwright test passes when its case passed in every project. For each test that passed, it sends ci.quarantine-passed through ci.green.notify, naming the test, its issue and until, so someone can check the issue and take the entry out. It sends again on each scheduled run the test passes in, until the entry goes, with an id made from the test and the commit. It exits 0 whatever the tests did, and 1 only when it can’t read the declaration or a JUnit file. --dry-run sends nothing and says what it would send; --json prints the outcomes. The commit is --commit, else GITHUB_SHA, else HEAD.
ci list
Section titled “ci list”Prints what happened to the branch’s recent history: the first-parent commits inside ci.green.window, newest first. Each has a state and the result of every required phase (#4021). It follows the same ref as ci last-green and reads local tags only, so fetch them first with git fetch origin --tags.
| State | Meaning |
|---|---|
green | The commit has ci/green/<sha> and no revoked tag. |
revoked | The commit has ci/revoked/<sha>. |
undecided | The commit has neither tag. |
A phase’s result comes from the tags. A green tag’s annotation records the runs of each phase that passed, so a green commit lists every required phase as pass with its runs. A revoked one keeps those and shows the phase its revoked tag names as fail, with the failed run. An undecided commit has no tag to read, so its phases are unrecorded and have no runs. Add --forge github to read the check runs of undecided commits from the forge, as ci tick does, and each phase becomes pass, fail or pending. The forge is asked about nothing else, and without --forge the command reaches no network. When the source is chant runs, an undecided commit’s phases are judged from the signed Op runs on the local chant/lifecycle instead, still with no network, and --forge is refused. Each run then has an opRun object naming the run, and each commit has ignoredRuns, listing the runs that do not count.
A line for an unlinked or wrong commit ends with ; why unknown: and the reason. Link commits to work items says how a commit names one.
With signed tags, the state counts only the tags that carry a valid statement. A tag that does not is listed on its own line under the commit, as ignored <tag> (<status>): <reason>, and in --json under the commit’s ignored. The green and revoked objects name the runner that signed the tag in signer, which is null for a tag that counts unsigned.
--limit <n> keeps the newest n. --since <rev> lists what came after rev and replaces the window, so a reader holding the last sha it saw can ask for what is new.
--json prints a read contract document, ci-list.schema.json, with window, since, require and a commits array. Each entry has sha, committed, state, phases, and a green and a revoked object holding the tag and the time it was made, plus the failed phase and run for a revoked tag. Either object is null when the tag is absent. Each entry also has work (#4029), { state, ids, problems }, where state says whether the commit names its work item. The judgement is the one workspace check --changes makes, against the work records at the listed ref. work is null when the workspace declares no work kind. chant 0.124.28 added it within contract 1, and a reader ignores fields it does not know. A failure uses the codes of ci last-green, and revision-unknown when --since names no commit, with exit code 1.
Each entry also has record, what the commit’s record on the local chant/lifecycle says, or null when it has none (#4169): its state (green, red, unbuilt or pending), and the first reason, coveredBy and culprit its required phases carry. An undecided commit with a record gets a second line, recorded <state>, <reason>, covered by <sha>, culprit <sha>, with the parts it has. A phase read from the forge whose runs were cancelled is unbuilt.
ci tick
Section titled “ci tick”One pass over the branch. With a list in ci.green.branch, it makes the pass for each listed branch in turn, and prints a section for each (#4325). It fetches the branch and the ci/* tags from origin, and the fetch prunes a ci/* tag deleted there by hand. It reads the check runs of each first-parent commit within window, then makes the tags that are due and pushes them, never forced:
| A commit with | that now | gets |
|---|---|---|
| no green tag | passes every required phase | ci/green/<sha> |
| a green tag and no revoked tag | fails a required phase | ci/revoked/<sha> |
| a revoked tag | anything | nothing, and its check runs are not read |
A revoked tag also revokes every release cut from its commit, and the tick writes nothing more for that: the readers join each release’s commit to the tags (#4033). The tick never cuts a release.
Running it again over the same check runs changes nothing. --dry-run prints what it would tag and makes no tag. With signed tags, the tick signs each tag it makes and judges the tags already there as every other reader does, so a hand-pushed tag doesn’t count. Since chant never moves or deletes a tag, a hand-pushed tag that holds the name of a tag the tick would make stops it, and the tick says which tag to delete. A commit that names no work item, or a wrong one, has ; why unknown: and the reason at the end of its line, as in ci list.
Compose branches
Section titled “Compose branches”The tick also fetches every chant/compose/<name> branch on origin (#4168, mode b). It judges each branch’s first-parent commits within window that trunk does not have, by the same phases, and makes their tags. A tag’s record names the compose branch, and with signed tags its statement does too, so readers check it against that branch. Its output lists each branch and its composed commits after trunk’s. Builds, retries and _ci records are trunk’s only. When the tick revokes a trunk commit that a composed commit carries in its Chant-Composed-From trailer, it warns and names the composed commit, whose own tags decide its releases. release compose makes the branches.
Builds and records
Section titled “Builds and records”A run that was cancelled leaves its commit unbuilt, not red (#4169). A commit with no tag whose failed run has one attempt is held pending while the tick runs the failed job again, once: through the forge’s re-run on GitHub, which needs actions: write, or with a build request for chant runs. On GitHub the re-run covers every failed job of the job’s workflow run (#4219), so a job that only collects other jobs’ results, such as chant’s suites over its e2e shards, runs again with the shards that failed rather than against their old results. A retry that has not started within an hour counts as the failure it was. A green commit’s failure is never retried, since it is already a second run.
A phase declared build: "every" that has no run on a commit half an hour after the commit landed, because the forge never started its push run, gets one build request, missing, for those phases (#4216). The tick starts the workflows holding them at the ci/build/<sha> tag as it does for a bisect step, and the commit’s record keeps missing, so it is asked for once. A phase that sets no build is never asked for.
A phase declared build: "newest" runs only on the newest commit when a runner frees. A commit below a newer one that ran the phase is unbuilt, covered by it. When the newest commit the phase ran on is red, the tick bisects the unbuilt commits back to the last one the phase passed on, asking for one build per tick: the commit halfway when more than four are left, else the one just below the red. It asks with an annotated tag, ci/build/<sha>, whose record names the phases and the reason, and on GitHub it starts each workflow holding the phases at that tag with workflow_dispatch. Under chant runs, ci serve --build-command serves the tag. A phase a request waits on is pending, a request no runner served within six hours leaves it unbuilt, and once its phases are decided the tick deletes the tag. The first red commit is the culprit, named on it and every commit after it. --dry-run reports the requests and retries it would make, and makes none.
A job that skips itself by the paths a push changed needs care under newest. The push’s previous commit (github.event.before) may have been superseded and never built, so a tip that changes only docs would skip a job whose code a commit below it changed, and with skipped: "pass" the tip would go green with that change untested. Diff against chant ci base --phase <name> instead, and run the job whenever it finds no base.
Records
Section titled “Records”The tick keeps a record of each commit it judges in _ci/<sha>.json on chant/lifecycle. It writes only the records whose content changed, all in one commit, and pushes it. The fields are in the declaration reference. A record left pending when its commit leaves the window is rewritten unbuilt, for the reason aged-out. If the tick can’t write or push the records, it warns and carries on. A request or a retry it can’t make is a warning too. The green and revoked tags are pushed before any of these. With recording off (CHANT_NO_RECORD) it writes no record.
With ci.green.notify, the tick tells people when the branch is red after its retry, when a bisect names a culprit, and when the branch is green again, once each, marking what it told in the records (notify, #4645). With notify.staleAfter it also sends ci.stale when the branch has had no green commit for that many hours, once per red stretch, marked in _ci/branch/<branch>.json (#4678).
By default the check runs come from the forge. GitHub is the only forge with a check-run reader: the tick reads GITHUB_REPOSITORY, a token from CHANT_FORGE_TOKEN, GITHUB_TOKEN or GH_TOKEN with checks: read, and GITHUB_API_URL for GitHub Enterprise Server. --forge gitlab and --forge forgejo are refused. GitLab and Forgejo get no status reader, and are covered through the results of chant’s own runs instead (#4044). Mapping pipeline jobs and commit statuses to check runs would need rules for retries and skips per forge, since GitLab reports jobs per pipeline and Forgejo reports statuses per context. An Op run’s result is the same on every forge. Pushing the tags needs contents: write on the remote.
Chant runs as the status source
Section titled “Chant runs as the status source”A project whose pipelines run as chant Ops can take its phase results from those runs in place of a forge’s check runs (#4044). This is how a project on GitLab or Forgejo gets green and revoked tags. Set source to runs in ci.green, or pass --source runs to ci tick and ci list, which overrides the declaration either way. checks is the default.
"ci": { "green": { "branch": "main", "phases": { "lint": ["lint"], "test": ["test", "e2e-*"] }, "require": ["lint", "test"], "source": "runs" }}With runs, a phase’s patterns match Op names, with * standing for any run of characters, as they match check-run names otherwise. Each Op run’s record on chant/lifecycle (<env>/runs__<op>.jsonl, see chant run) names the commit it built from as gitSha, and counts for that commit. For each Op on a commit, the latest record by end time decides, so a re-run replaces the run before it. Status ok passes, fail fails, and a stop at a gate or a decision point leaves the phase undecided. Records from every environment count alike.
Signing is optional (#4156). An unsigned run counts, and ci list shows it with signer: null. To verify who ran a job, add a runner key: the run signs its record as it settles when chant run <op> is given one, with --key <file> or the PEM in CHANT_RUNNER_KEY, and ci list then names the signer. The key and its principal follow the rules for the tick’s own key: .chant/trust.json at the checkout’s HEAD must list it under runners, and the principal must hold the runner role. chant run --key refuses any other key before the run starts, and a key that is not an Ed25519 or ECDSA P-256 PEM is an error from either source. A key from CHANT_RUNNER_KEY that trust.json does not list leaves the run unsigned, with a line under --verbose.
Anyone who can write to chant/lifecycle can write an unsigned passing run. To require signatures, set ci.green.signedSince. It covers runs as it covers tags: an unsigned run on a strict first-parent ancestor of that commit counts, and one on any other commit, that one included, is ignored. With it set, ci run and chant run warn when they leave a run unsigned, and ci serve refuses to start without a trusted key.
The envelope format matches the tag’s, with its own predicate type, https://intentius.io/chant/op-run/v1, over the run’s commit. The predicate names the signer and the run, with the run’s status and the SHA-256 of its record without the statement. Stored on the record as statement, it makes the record and its signature one ledger line. Every run is checked against .chant/trust.json at the branch’s tip, and one whose statement fails is ignored with the statuses a tag uses, with or without signedSince. Such a run neither greens nor revokes its commit, and appears under the commit as ignored run <id> of <op> in <env> (<status>): <reason>.
| Status | When |
|---|---|
unsigned | The record carries no statement, and ci.green.signedSince asks for one on its commit. |
invalid | The envelope or its payload is not an op-run statement, or it names another signer than the key’s. |
untrusted | No key that .chant/trust.json lists under runners signed it, or its principal holds no runner role. |
mismatch | It signs another run, Op, env, status or commit, or the record changed after it was signed. |
A tick from runs fetches chant/lifecycle before it reads, without forcing it, and stops when the local branch and the remote’s have diverged. It needs no forge token. Given a runner key it signs the tags it makes. Without one its tags are unsigned, which signedSince refuses. A tag made from runs has source: "runs" in its record. Each run in it has id: null and an opRun object holding the Op run’s id, env, the runner that signed it (null for an unsigned run) and the run’s statement when it has one.
A pipeline on GitLab or Forgejo runs its Ops with the key and then the tick. chant run appends each run’s record to the local chant/lifecycle and does not push it, so push the branch for later ticks and other checkouts to see the runs:
chant run lint --key "$RUNNER_KEY_FILE"chant run test --key "$RUNNER_KEY_FILE"git push origin chant/lifecyclechant ci tick --source runs --key "$RUNNER_KEY_FILE"ci workflow writes only a GitHub Actions file, so on another forge the tick goes in the pipeline by hand, or in a scheduled job that runs it every few minutes.
Signed tags
Section titled “Signed tags”The tags are plain git tags, so anyone who may push a tag could make ci/green/<sha> by hand and go around CI (#4031). Setting ci.green.signedSince in the declaration closes that. It names the full sha of the first commit on the branch whose tags must be signed, and a tag on that commit or any later one counts only when its annotation carries a statement signed by a runner key. Without signedSince, every tag counts, as before.
"ci": { "green": { "branch": "main", "phases": { "test": ["test"] }, "require": ["test"], "signedSince": "8b045980cf9cd1351dd4f60c9c46ee69d45ec0d7" }}The statement is the one runner evidence and agent-run statements use: an in-toto statement in a DSSE envelope, signed with the runner key: Ed25519, or ECDSA P-256 with SHA-256. Its subject is the tagged commit, and its predicate (https://intentius.io/chant/ci-tag/v1) holds the signer and the tag’s JSON record. The envelope sits in that record as statement, so a reader that doesn’t know it reads the record as before.
A reader counts such a tag when all of these hold, and otherwise ignores it with one of four statuses:
| Status | When |
|---|---|
unsigned | The annotation carries no statement, as with a lightweight tag or one made by hand. |
invalid | The envelope or its payload is not a ci-tag statement, or it names another signer than the key’s. |
untrusted | No key that .chant/trust.json lists under runners signed it, or its principal holds no runner role there. Both are read where the branch is, at refs/remotes/origin/<branch> or the local branch. |
mismatch | It signs another commit, another kind of tag or another branch, the annotation’s record is not the one signed, or the tag points at another commit than its name gives. |
A tag on a strict first-parent ancestor of signedSince counts without a statement, so the tags a workspace already has keep working. Position in history decides, never a date: whoever makes a commit or a tag sets its time, so a backdated commit or tag outside that ancestry gains nothing. A signedSince that names no commit in the clone is refused with declaration-invalid, so fetch the branch before reading the tags. Every reader judges the tags the same way: ci tick, ci list, ci last-green and release cut.
The runner key
Section titled “The runner key”The tick signs with an Ed25519 or ECDSA P-256 private key in PEM, from --key <file> or from the CHANT_RUNNER_KEY environment variable. .chant/trust.json lists its public half under runners, as an ssh-ed25519 or ecdsa-sha2-nistp256 line, and the principal it names holds the runner role:
{ "schema": 1, "runners": [{ "principal": "ci:acme/app", "class": "runner", "key": "ssh-ed25519 AAAA..." }], "roles": { "runner": ["ci:acme/app"] }}The tick refuses a key the file doesn’t list, a principal without the role and a key the signers file lists, before it makes any tag. A person’s key never signs a tag. With signedSince set, the tick refuses to run without a key, apart from --dry-run. Both files are read at the branch’s tip, and changing either is a protected write, as for runner evidence. Make the key as for runner evidence:
openssl genpkey -algorithm ed25519 -out runner.pemA tick given a key the file doesn’t list yet refuses it and prints the key’s ssh-ed25519 line to add under runners. Keep runner.pem out of the repository. chant workspace trust runner add writes both the entry and the role, from the PEM file or the ssh-ed25519 line, and leaves the commit to you:
chant workspace trust runner add ci:acme/app --key runner.pem --by github:alexgit commit -S -m "trust the ci:acme/app runner" .chant/trust.jsonOn GitHub the key lives in a repository secret, and chant ci workflow --runner-key-secret <NAME> hands it to the tick as CHANT_RUNNER_KEY. Turn signing on in this order: add the key to runners and the principal to roles.runner, store the secret and regenerate the workflow, then set signedSince to the sha of the branch’s current tip. A commit can’t name its own sha, so the commit that sets signedSince comes after it, and its tags and every later commit’s must be signed. A chant older than 0.124.28 refuses a declaration with signedSince, so set minReader to 0.124.28 with it.
ci run
Section titled “ci run”Runs one job of the pull-request pipeline as a pipeline Op on this machine, with no forge runner (#4094). Each job runs its command: plan runs chant components pr-plan, and record runs chant components pr-record (#4168). apply runs chant components pr-apply. Each gets the flags and variables the job in a generated workflow has: chant builds the job from the same typed value the github, gitlab and forgejo generators use, and reads no YAML. Pass the flags you generated the pipeline with (--env, --gate, --branch, --events-json, --report-url, --image, --before-script, --pr-build, --pr-build-command, --wave-gate) so the two run the same command. With --wave-gate <name> the apply runs pr-apply --wave-gate <name> with no --wave, so it applies the waves in order and stops at the first whose moved plan waits on its own gate (#4003).
The job runs in a fresh checkout of --commit, HEAD by default: a detached git worktree in a new temporary directory outside the repository, removed when the job ends. The worktree shares the repository’s refs, so what pr-apply records on chant/lifecycle and the remote it pushes to are the repository’s own. ci run copies the job’s report directory to -o <dir>, by default .chant/pr in the directory it was run from. A forge keeps the same directory as an artifact. Inside a workspace member the job runs in the member’s directory and passes --member, as the member’s generated pipeline does.
The Op has a setup phase with the setup lines of the default image, a build phase with the --before-script lines and then, with --pr-build or --pr-build-command, the job’s build and lint lines (#4088), and a phase named plan or apply with the command. Each line is a step that runs with a clean environment, which holds only these variables:
| Variables | From |
|---|---|
PATH, HOME, USER, LOGNAME, SHELL, LANG, LC_ALL, LC_CTYPE, TMPDIR, TZ | this process, when set |
CHANT_FORGE_TOKEN, GITHUB_TOKEN, GH_TOKEN, GITHUB_REPOSITORY, GITHUB_SERVER_URL, GITHUB_API_URL, GITLAB_TOKEN, CI_API_V4_URL, CI_PROJECT_ID, CI_SERVER_HOST, CI_SERVER_URL | this process, when set: the forge and token the commands post with |
each --pass-env <NAME> | this process, such as the cloud credentials a deploy needs |
| the secrets the job gets | the secrets file given with --secrets, which replace a variable of the same name above |
CHANT_ENV | --env, as the generated workflow sets it |
GITHUB_SHA, or CI_COMMIT_SHA on GitLab | the commit the job runs at |
BASE_SHA | --base, in place of the push’s or the pull request’s base commit |
PR_NUMBER | --pr, which the plan needs |
CHANT_RUN_EVENTS_DIR | the job, with --events-json |
A step of the plan job gets no forge token (#4295), since the plan runs the pull request’s code. Every name in FORGE_TOKEN_VARS (packages/core/src/ci-handover.ts) is left out of its environment, wherever it came from (ciRun in packages/core/src/workspace/ci-run.ts). The plan’s pr-plan runs with --no-status. Once the steps settle, ci run posts the note and the chant/plan status from the report itself, with its own token, as pr-post does. A report for another pull request or head fails the status and posts no note, and so does one for another environment or member. The record and apply jobs run the target branch’s code and keep their token.
CHANT_RUNNER_KEY is never passed to a step: --pass-env CHANT_RUNNER_KEY and a secrets file that sets it are refused. A secret doesn’t replace the variables from CHANT_ENV down, which the runner sets for the job. --chant <command> runs chant in the job’s command and in its build and lint lines with another command, such as npx chant, and --before-script 'npm ci' installs what that command needs in the fresh checkout. The forge comes from --forge, or from the environment inside a forge’s own job.
The run is recorded as the job’s Op (pr-<job>) in <env>/runs__<op>.jsonl on chant/lifecycle, with gitSha the commit and runOrigin { "forge": "chant" }, and ci run then pushes chant/lifecycle to the remote, unless --no-push. A tick from runs counts it. With --key <file>, or the PEM in CHANT_RUNNER_KEY, the record also carries a statement signed by the runner key. The key follows the rules for chant run --key, checked against .chant/trust.json at the commit the job runs. A phase pattern such as "plan": ["pr-plan"] matches the job. The run’s events are kept on this host for chant run events, with kind: "pipeline" and runtime: "ci". With --events-json they are printed on stdout as well. Each line the job prints goes to stderr as it arrives, and the summary follows it there. It exits 0 when the job passed. When the command failed with an exit code, ci run exits with that code, such as 4 for a moved plan or 3 for a wave that waits on its gate, as the command did in a forge job. Any other failure exits 1.
In a forge job
Section titled “In a forge job”ci run also runs the jobs of a pull request’s environment: env-up, env-post, env-down and env-sweep (#4330). Their --env defaults to pr-<n>, and to local for the sweep. env-up runs with no forge token in its steps, and the runner then runs env-post at --base with the token and the report env-up wrote, unless the run is --local or --in-place. env-post on its own runs at --base and takes --head <sha> and, on GitHub and Forgejo, --result <r>. Their reports land under .chant/pr-env, and the run index lists only the pull-request jobs.
A generated job runs chant ci run plan|record|apply --in-place (#4156), so a forge job writes the same record as a job on this host. --in-place runs the job in the checkout it is started in, at its HEAD, with no worktree, no setup phase and no commit status of its own, since the forge shows the job. The steps get the job’s whole environment except CHANT_RUNNER_KEY, since the forge job is already the boundary. The report stays where the command wrote it, and a record that can’t be written is a warning. The record’s runOrigin names the forge’s run: forge (github for GitHub and Forgejo, gitlab), repo, url, jobId (GITHUB_JOB, or CI_JOB_ID on GitLab) and attempt (GITHUB_RUN_ATTEMPT).
The plan job passes --no-push, so the pull request’s code writes nothing to the remote chant/lifecycle. Since #4295 a generated plan holds no forge token, and its plan-note job posts. In place, ci run plan still leaves every token out of the steps. A token in its own environment means the pipeline predates #4295. Then ci run posts after the steps and warns to regenerate, since the pull request’s code ran beside the token. An apply job of a pipeline generated with a gate per wave passes --wave <k>, which ci run hands to pr-apply. --require-review passes --require-review to pr-apply, for a pipeline generated with requireReview: true, chant build --pr-loop --require-review, or in a workspace that opts into the review-rules security group. Review is off without one of those (#4168). --apply-before-merge makes ci run apply the apply before merge of a pipeline generated with --apply-before-merge: pr-apply --before-merge with --base and --pr, run at the pull request’s head (#4301, apply before merge). --no-require-review, which pipelines generated before that pass, is still accepted and is the default. Who ran a job shows how to give the jobs a runner key. --require-runner-start refuses the job before its first step unless a runner-start statement names it.
A failed job’s record says why in failure, as does its run-settle event. failure holds code and a one-line reason, with phase and exitCode when known. When the command failed and its report (pr-plan.json or pr-apply.json) exists, code is the report’s refusal (not-approved, plan-changed, not-a-reviewer, author-approved, no-pull-request, locked) or else its status (plan-failed, failed, refused), and reason is the report’s message or else the members that failed. A command that failed with no such report gives command-failed, and a failed setup or build line gives setup-failed or build-failed with the line as the reason. A revoke that a failed run caused names the code in the tag’s subject line.
chant ci run plan --env prod --forge forgejo --base "$(git merge-base origin/main HEAD)" --pr 42 --key runner.pemchant ci run record --env prod --forge forgejo --base "$(git rev-parse HEAD^)" --key runner.pemchant ci tick --source runs --key runner.pemOn this machine
Section titled “On this machine”--local (#4161) runs the job the same way, in a fresh worktree of --commit, and writes nothing outside this machine. It implies --no-push and --no-status. It writes nothing under a report URL and nothing to the run index, even when --report-url is given. The job’s command gets no --report-url and gets --no-status, so pr-plan and pr-apply post no status and no note on the pull request. --events-json still streams, and the exit code is the same as without --local. A runner key still signs the record when one is given, and with none the record is unsigned and nothing warns.
The record is still written to chant/lifecycle in this repository, as pr-plan or pr-apply, so a reader on this machine can show it next to CI’s run for the same commit. Its runOrigin is { "forge": "local" } and its events say runtime: "local", where a CI job’s say ci. ci tick --source runs and ci list never count a record with runOrigin.forge local, signed or not. A pr-apply still pushes its own release records and gate facts, since a local apply changes the same infrastructure a CI one does. --local and --in-place are refused together.
chant ci run plan --local --events-json --env prod --forge github --base "$(git merge-base origin/main HEAD)" --pr 42Secrets
Section titled “Secrets”--secrets <file> names a file on this host that holds the values jobs get, such as cloud credentials and the endpoint a deploy uses (#4096). It stands in for a forge’s repository secrets. Without the flag, ci run and ci serve read the file CHANT_CI_SECRETS names, and with neither a job gets no secrets.
It must belong to the user running chant and give its group and other users no permission at all, as ssh asks of a private key. Any other mode is refused before a job runs, with the chmod 600 that fixes it. Windows is not checked.
Write it as dotenv or as a JSON object. In dotenv, each line is NAME=value, and a line may start with export or be a # comment. A value in single quotes is taken as written. A value in double quotes may span lines and takes the escapes \n, \t, \" and \\:
# /etc/chant/ci.env, chmod 600AWS_ACCESS_KEY_ID=AKIAEXAMPLEAWS_SECRET_ACCESS_KEY='wJalrXUtnFEMI/K7MDENG'AWS_ENDPOINT_URL=http://floci.localhost:4566A JSON file is either a map of name to value, or a secrets map with a jobs allowlist that names, for plan or apply, the secrets that job gets:
{ "secrets": { "AWS_ACCESS_KEY_ID": "AKIAEXAMPLE", "AWS_SECRET_ACCESS_KEY": "wJalrXUtnFEMI/K7MDENG", "READ_ONLY_TOKEN": "ro-0000" }, "jobs": { "plan": ["READ_ONLY_TOKEN"] }}jobs may also name release: the secrets the step that publishes a release ci serve --release serves gets, such as a registry’s credentials. A job the allowlist doesn’t name gets every secret, so with no jobs both jobs get them all. The allowlist lives in the file on the host and not in the repository, so a pull request can’t change what its own plan gets. Only the JSON form takes an allowlist.
chant redacts every value in the file from what the run writes, whether the job got it or not. It also redacts the value of each variable in the job’s environment whose name looks secret, which is a name with TOKEN, SECRET, KEY or PASSWORD in it. GITHUB_TOKEN is one, and so is a --pass-env AWS_SECRET_ACCESS_KEY. Each one then reads *** in these places:
| Where | What is redacted |
|---|---|
| Run events | Each line on stdout with --events-json, and the copy kept on this host. |
The run record on chant/lifecycle | The whole record, step errors and failure.reason included. It is redacted before it is signed, so the statement covers the redacted record and verifies. |
The report ci run copies out | Every text file in it, the change set and the component events too. A JSON file stays JSON. |
| The console | Each line a step prints, and what ci run and ci serve print after. |
A value shorter than 4 characters is not redacted, since it would match too much ordinary text. A value that spans lines is also redacted line by line, as step output arrives a line at a time. What the job itself uploads with --report-url is the job’s own copy and is not redacted, and neither is the resume record ci serve keeps.
ci run runs one job when you run it, and a re-run of a failed apply plans every member again, since ci run keeps no resume record between runs. ci serve watches the forge and keeps one.
Commit status
Section titled “Commit status”When the environment has a forge token (CHANT_FORGE_TOKEN, GITHUB_TOKEN or GH_TOKEN), ci run sets a commit status on the forge at the job’s commit, so the pull request shows the job as Actions would (#4097). The status is pending when the job starts and success or failure when it settles. It is set through the GitHub and Forgejo clients’ setCommitStatus, which posts to /repos/{owner}/{repo}/statuses/{sha}. GitLab jobs set none.
| Job | Context |
|---|---|
| plan | chant/pr-plan |
| apply | chant/pr-apply, or chant/<gate> when --gate renamed the gate |
These differ from the chant/plan and chant/apply statuses and the pull request note that pr-plan and pr-apply post themselves, which are unchanged. The description of a passed job is pr-plan passed in 12s. A failed job’s is the run record’s failure.code and reason, such as not-approved: no reviewer approved this plan, cut to the 140 characters the forge keeps. A job that stops on an error of its own gets an error status.
The status links to the job’s report. With an https:// --report-url the link is <url>/<pr>/<commit>[/<member>]/, the key --report-url uploads under, with unknown in place of the pull request when --pr is not given. For an s3:// URL, which a browser can’t open, --status-url <template> maps it: --status-url 'https://host/reports/{key}' fills {key} with the same key. --status-url also overrides an https --report-url. Without either, the status has no link.
A status the forge refuses is a warning, and the job’s result and exit code stand. --no-status sets none. ci serve takes both flags and passes them to every job.
The run index
Section titled “The run index”With --report-url, ci run also adds the job to <report-url>/runs/index.json when it settles (#4098). Without the flag, ci run, ci serve and ci runs use the workspace’s ci.reportUrl when it declares one, and ci serve says so when it starts (#4160). The flag wins over the field. A declaration that can’t be read stops the command with its reason code, such as declaration-invalid, before any job runs. Outside a workspace nothing is read. A failed job is added too. ci serve passes its job flags on, so it keeps the same index. Entries are newest first. The index keeps the newest 200, or as many as --run-index-limit says.
| Entry field | Holds |
|---|---|
job, commit, runId | plan or apply, the full commit, and the Op run id |
pr | the pull request, or null when the job found none |
status, failure.code | ok or fail, and the run record’s failure code for a failed job |
started, ended | the run’s instants |
key | the folder of the job’s report below the report URL: <pr>/<commit>, unknown for no pull request, and /<member> after for a member |
runOrigin | { "forge": "chant" }, or the forge’s run for a forge job |
signer | the runner that signed the record, or null for an unsigned run. Chant 0.124.32 and newer write it |
exitCode | the code ci run exited with: 0 for a pass, the command’s own code such as 4 for a moved plan or 3 for a waiting wave, and 1 otherwise (#4165). Chant 0.124.32 and newer write it, and older entries lack it |
The update uses the upload path --report-url already has: aws s3 cp for s3://, and a temporary file and a rename for file://. Two runners writing one index can lose an entry, so keep one host per report URL. A problem with the index is a warning, and the job keeps its own result. The format is the ci-run-index contract.
ci runner-start
Section titled “ci runner-start”A runner-start statement is a provisioner’s signed word that it started a runner for one CI job (#4147). A persistent self-hosted runner keeps files and processes between jobs, so a plan job that ran a pull request’s code can leave something behind for the next apply. An apply job that requires the statement refuses to run on a runner no trusted provisioner says it started for this job, before the job’s first step and so before it trades for any credentials. Nothing requires it by default, and a job that doesn’t ask never reads it.
The statement differs from the signed run record in three ways. The provisioner signs it before the job runs, where a runner signs a run record when the run settles. The provisioner holds the key, so a job on the runner can’t sign one for itself. And it names the job, so a statement made for one job doesn’t verify in another.
The envelope and key type are the ones the ci tag statement uses. The subject is the commit the job runs, and the predicate https://intentius.io/chant/runner-start/v1 holds:
| Field | What it says |
|---|---|
signer | the principal .chant/trust.json lists the provisioner’s key for |
ci.system | github, gitlab or forgejo |
ci.repo | owner/name, or the GitLab project path |
ci.run, ci.attempt, ci.job | the run, its attempt and the job, as the forge’s variables below name them |
runner.name | the runner’s name, required on GitHub and Forgejo |
runner.singleJob | always true: the runner was started for this one job |
issuedAt | when the provisioner signed it |
Signing, for the provisioner
Section titled “Signing, for the provisioner”The provisioner is whatever starts the runner for a job, such as a webhook handler that registers a just-in-time GitHub runner, a Forgejo runner started per job, or a GitLab autoscaler hook. It knows the job’s ids when it starts the runner, and it signs them with a runner key listed under runners in .chant/trust.json, whose principal holds the runner role, as for the tick’s key. Keep that key on the provisioner. The runner and the job never get it.
cat > job.json <<'JSON'{ "system": "github", "repo": "acme/infra", "run": "4242", "attempt": "1", "job": "apply", "commit": "8b045980cf9cd1351dd4f60c9c46ee69d45ec0d7", "runner": "jit-apply-4242-1" }JSONchant ci runner-start sign --key provisioner.pem --principal ci:acme/provisioner --job @job.json -o runner-start.json--job takes the JSON or @<file>, and refuses a field chant doesn’t know. attempt defaults to 1. A GitHub or Forgejo job needs runner, since GITHUB_JOB is the job’s key in the workflow and repeats across a matrix’s jobs, while the runner’s name tells them apart. On GitLab job is CI_JOB_ID, which a retry changes, so runner is not needed there. A provisioner written in JavaScript can call signRunnerStart(job, signer) from @intentius/chant/runner-start instead.
Where the job finds it
Section titled “Where the job finds it”The provisioner puts the envelope where the job looks for it, through the runner’s environment or its image:
| Forge | The statement | The job’s ids come from |
|---|---|---|
| GitHub | CHANT_RUNNER_START (the envelope’s JSON) or a file at CHANT_RUNNER_START_FILE, else /run/chant/runner-start.json | GITHUB_REPOSITORY, GITHUB_RUN_ID, GITHUB_RUN_ATTEMPT, GITHUB_JOB, GITHUB_SHA, RUNNER_NAME |
| Forgejo | the same | the same GITHUB_* names, with FORGEJO_ACTIONS or GITEA_ACTIONS set. When the runner doesn’t set RUNNER_NAME, set it in the runner’s envs |
| GitLab | the same | CI_PROJECT_PATH, CI_PIPELINE_ID, CI_JOB_ID, CI_COMMIT_SHA |
The commit is the one the forge gives the job, so sign the commit the job checks out. A push’s job and the forge’s job event name the same commit, while a GitHub pull_request job checks out a merge commit the job event doesn’t name, so sign for push-triggered jobs such as an apply.
Verifying, in the job
Section titled “Verifying, in the job”chant ci runner-start verify takes the job’s ids from the forge’s variables and checks the statement against .chant/trust.json at --base. Without --base it reads the remote’s default branch (origin/HEAD), or HEAD when there is no remote. It exits 0 when the statement verifies and 1 otherwise, printing the status and the reason. --commit checks against another commit than the forge’s variable, and --json prints the verdict as JSON.
In chant ci run the flag runs this check with the job’s own commit, reading .chant/trust.json at the run’s --base. For an apply that is the commit before the change. A key that the change itself adds to trust.json doesn’t count for it. The run’s notes name the provisioner that signed. A --local run has no forge job to check, so it refuses the flag.
| Status | When |
|---|---|
verified | A key listed under runners, whose principal holds the runner role, signed a statement for this system, repository, run, attempt, job, commit and, on GitHub and Forgejo, runner. |
missing | The job has no statement, or the environment names no forge job. |
invalid | The envelope or its payload is not a runner-start statement, has a field chant doesn’t know, or names another signer than the key’s. |
untrusted | No key listed under runners signed it, or its principal holds no runner role. |
mismatch | It names another job, attempt, run, repository, commit or runner. |
A stage bundled without chant’s CLI can import verifyRunnerStartForJob from @intentius/chant/runner-start, which needs only node:crypto and node:fs, and pass the runners and roles from .chant/trust.json. The CLI also drops a runner entry the signers file lists, and a stage that passes the lists itself skips that check.
The statement proves that a provisioner holding a listed key said it started this runner for this job. It doesn’t prove what the runner image holds, or that the provisioner tore the runner down afterwards. Those are the provisioner’s to keep.
ci run —at
Section titled “ci run —at”chant ci run --at <sha> asks for every required phase to be built at a first-parent commit of the green branch, so you can make that commit releasable (#4169). It fetches the branch and the build requests, pushes ci/build/<sha>, and prints the tag. On GitHub, with GITHUB_REPOSITORY and a token in the environment, it starts each workflow holding a required phase at the tag at once and names them. Otherwise the next tick starts them, or ci serve --build-command serves the tag for chant runs. A commit that already has a request is left as it is. A workflow holding a phase without a workflow_dispatch trigger can’t be started at a tag, and is named in a warning. Once the phases pass there, the tick tags the commit green.
With --release, it asks for a release instead: see Release requests.
ci runs
Section titled “ci runs”chant ci runs --report-url <url> lists the index, one line per run, newest first. Without --report-url it reads the workspace’s ci.reportUrl. With --json it prints the index document unchanged. The command exits 1 when the URL has no index or the index can’t be read.
ci serve
Section titled “ci serve”Watches a forge and runs the pull-request jobs on this host with ci run (#4095). Each poll reads the open pull requests into the target branch (--branch, default main) and the branch’s head through the forge’s API. It runs the plan for each pull request head it has not planned, with --base the pull request’s base commit and --pr its number. It runs the record for each new commit on the target branch (#4168), with --base the head the previous job on that branch was measured to, which is the push’s before on a forge. The record applies nothing. With --apply-on-merge it also runs the apply at the newest green commit of the branch, once per commit, as pr-apply --green (#4168 step 9), and --wave-gate needs that flag. The pull request whose merge commit a recorded commit is comes from the same pullRequestFor call pr-record uses, and the job gets it as --pr, so its commit status link and run index use the <pr>/<commit> key. When the forge finds none, or the lookup fails, the job runs without --pr as before. The first poll only notes the head: a commit the branch held before the runner watched it is not run.
After each job settles, ci serve runs ci tick from the runs its jobs recorded (--source runs), signed with the same runner key, so a merged commit can go green with no other workflow. A workspace with no ci.green gets no tick. A tick that fails is an error on stderr and does not fail the job. --forge is forgejo or github. The token and, on Forgejo, GITHUB_SERVER_URL and GITHUB_API_URL come from the environment as for pr-plan, and --repo sets GITHUB_REPOSITORY for the poll and for every job. Each job it starts gets the job flags ci serve was given, which are ci run’s, such as --gate, --chant, --secrets and --key. It reads the secrets file once when it starts, so a loose or broken file stops it before the first poll, and a changed file is read on the next start.
Where ci serve runs decides the branches it polls (#4325). In a member that ci.branches routes, it polls the route alone and gives the member’s record and apply jobs --branch <route>. In any other member it polls --branch, main by default. At the workspace root it polls main and each routed branch. The state file keeps a head for each branch it polls. --branch naming a branch other than a routed member’s route is refused.
It runs in host mode. Each job runs in a fresh worktree on this host as the user running ci serve, with the clean environment ci run gives it, and the plan runs the pull request’s code. A pull request from a fork is never planned. --author <login> (repeatable) plans only the pull requests those people opened. Run it only for a repository whose authors you trust with the host’s credentials; a container per job is #4015.
The state lives in --state <dir>, by default chant/ci-serve in the repository’s common git directory:
| Path | Holds |
|---|---|
<group>.json | Every job started, keyed by job and commit (plan:<pr>:<sha>, record:<sha>, apply:<sha>), with its status, attempts and report, and the target head the last job on the branch was measured to. A job already there is not started again. |
resume/<key>.json | Each apply’s resume record, named by the forge cache key with the commit (chant-apply-<env>-<commit>, chant-apply.<member>.<env>-<commit> in a member). ci serve copies it into the job’s checkout at .chant/pr-resume/pr-apply.json before pr-apply --resume reads it, and back after, so a re-run at the same commit skips the members that applied. |
reports/<group>/<op>-<sha> | Each job’s report directory, as ci run -o copies it. |
<group> is the apply’s concurrency group, chant-apply-<env>, or chant-apply.<member>.<env> in a workspace member. Before an apply runs, ci serve takes a lease on refs/chant/lease/<group>, the git-ref lease chant operator uses. It renews the lease while the apply runs and releases it after. It pushes the lease to the remote, so two hosts serving one repository run one apply per group between them. An apply that finds the lease held waits for a later poll. At most --max-jobs jobs run at once, 1 by default, and a job over the limit waits for a later poll too.
ci serve runs a job for a new head on the target branch only when it descends from the head it saw before (#4122). Any other move leaves the new head recorded as seen and not run, and ci serve says so on stderr. A force push back to an older commit is such a move. The next commit pushed on top of that head runs as usual. As on Actions, a head whose commit message contains [skip ci] or [ci skip] is recorded as seen and not run, and a pull request whose head commit says so is not planned.
Before each job, ci serve makes its clone’s chant/lifecycle follow the forge’s (#4121). The clone’s branch is deleted if the forge has none, and reset to the forge’s if neither contains the other, as after a rewrite. Either way ci serve warns on stderr and never pushes the old ledger back. A clone’s branch ahead of the forge’s keeps its facts for the next apply to push.
--build-command <line> serves build requests (#4169). Each poll fetches the ci/build/* tags and runs <line> once for each tag it has not served, oldest first, in a fresh detached worktree of the tag’s commit, with CHANT_BUILD_COMMIT, CHANT_BUILD_PHASES (comma-separated) and CHANT_BUILD_REASON (bisect, retry, requested or missing) set. The line runs the phases’ Ops, such as npm ci && npx chant build && npx chant run suites, and their run records are what the tick reads. A build counts against --max-jobs, and the state file keeps it under build:<sha> with how it ended. A failed build is not run again. Without the flag, the tags are left alone.
Land branches
Section titled “Land branches”--land lets a change reach the target branch without a pull request (#4168 4.4). It needs --build-command and a ci.green.preMerge list in the workspace declaration, and ci serve refuses to start without either. Each poll lists the chant/land/<name> branches on origin and takes each head it has not seen:
- A head that does not descend from the target’s head is refused and left on the remote. Rebase it and push again.
<line>runs in a fresh worktree of the head, as for a build request.CHANT_BUILD_PHASESholds thepreMergephases andCHANT_BUILD_REASONisland.- The phases are judged from the Op run records on the head, as
ci tick --source runsjudges them, with the trust config read at the target’s head. An unsigned run counts unlessci.green.signedSinceis set, so a land needs no runner key. - When
<line>exits 0 and every phase passes,ci servepushes the head to the target branch. The push is a plain one, so the remote refuses it if the target moved meanwhile. Then it deletes the land branch.
A land that exits non-zero, fails a phase, or records no finished run for one is refused, and the target and the land branch stay as they were. The state file keeps each head under land:<name>:<sha>, so the same head is never tried twice and a new push to the branch is. The next poll sees the target’s new head and runs the record job, whose merge record names the work items the head’s Chant-Record trailers name, or a direct push. A land counts against --max-jobs.
chant ci serve --forge github --repo acme/app --env prod --land \ --build-command 'npm ci && npx chant run check'Any git server
Section titled “Any git server”--forge git serves a repository on a git server with no forge API, such as plain sshd, Soft Serve or a bare repository (#4016 gap 6). The target’s head comes from git ls-remote origin. There are no pull requests to plan, so the target moves only through land branches and direct pushes. No commit status is set, and ci serve says so once on stderr. The jobs run without --forge. --repo is optional and only names the state file’s repository, by default origin’s URL. The remote should protect the ci/* and release/* tags itself, with a pre-receive hook where it has no rule for them. The ref gate writes a pre-receive hook that refuses a push to a protected branch whose commit lacks the evidence .chant/trust.json at base requires.
chant ci serve --forge git --env prod --land --build-command 'npm ci && npx chant run check'Releases
Section titled “Releases”--release publishes releases on this host. Each poll fetches the tags and takes each one the release workflow chant release workflow renders would run on: release/<label>, the tags a release.tag template makes (not its floating tag), or at a train’s root release-train/<env>/<id>. The tags there on the first poll were published by whatever ran then, so ci serve notes them and runs none. Each new one is published once.
To publish a tag, ci serve makes a fresh detached worktree of its commit and runs the steps of the rendered workflow’s publish job there, in order: the install, the pull logins, the doctor when release.workflow.doctor asks for it, the stamp, the fetches of the ci/* tags and chant/lifecycle, the images, the build, release artifacts, release verify under verified-releases, and chant release publish with the flags the security groups add. For a train it runs chant workspace train prepare and chant workspace train publish. The steps are rendered from the same release config the workflow file is, read at the tag’s commit, so the two hold the same steps. A config that can’t be read at the tag before its install, because it imports a package, is read from the clone ci serve runs in, with a warning.
A step runs as a forge runner runs it, under bash -eo pipefail in the job’s working directory, with RUNNER_TEMP, GITHUB_ENV, GITHUB_OUTPUT, GITHUB_PATH, GITHUB_REF_NAME and GITHUB_SHA set, and what one step writes to GITHUB_ENV reaches the next. It gets the host’s base variables and --pass-env, and never GITHUB_ACTIONS or another forge’s run variables. The checkout is the worktree, and the toolchain set-up steps are the host’s own toolchains, so Node and anything else the build needs must be installed on the host. A step that runs any other action, or a release.workflow.builds entry, which needs a runner of its own, fails the release with the reason.
The job is rendered for the host’s own image platform, linux/arm64 on an arm64 host and linux/amd64 on an amd64 one, so building that platform needs no emulation. For another platform in release.images the job runs the docker run --privileged line that installs QEMU’s binfmt handlers, as a step, because the host runs no actions; the host’s docker must allow privileged containers.
The tools the workflow installs are installed on the host instead: cosign when the release signs, and grype and syft when it scans. Each comes from the pins chant carries, checked against its SHA-256, and is cached under tools/ in the state directory. A host that sets CHANT_COSIGN, CHANT_GRYPE or CHANT_SYFT uses its own. ci serve --release installs them before its first poll, so a host that can’t download one, or runs on a platform chant pins none for, stops there and names the tool.
${{ secrets.NAME }} in the release config reads the secrets file, as a forge reads the repository’s secrets, in the step or job that names it. The step that publishes also gets the file’s secrets for release (all of them, unless jobs lists release), such as OCI_USERNAME and OCI_PASSWORD for a registry. No other step gets them.
The host has no CI OIDC token, so it signs with a key. ci serve --release refuses to start when a release signs keylessly, and under supply-chain when a release that publishes does not sign with release.signing.kms or release.signing.key. It also refuses to start without a trusted runner key. Every step gets the key’s fingerprint in CHANT_RELEASE_RUNNER_KEY_FINGERPRINT, so the SLSA statement the publish signs names this host as its builder, and that statement meets --require-provenance. Each line the publish adds to _releases/publishes.jsonl names the runner key in runnerKey and the run ci serve gave it in runId.
A release counts against --max-jobs, and a host runs one release at a time. The state file keeps each tag under release:<tag> with how it ended, and the publish job’s output, redacted, goes to reports/releases/ in the state directory and to stderr. A failed release is run again with --rerun-failed, and the publish resumes from its record, so nothing that went out is sent again.
Before it publishes a tag, ci serve takes the git-ref lease refs/chant/lease/release at the workspace root and pushes it, renews it while the publish runs, and releases it after. A host that finds it held waits for a later poll. With the lease held it looks for refs/chant/released/<tag> on the remote, which a host pushes after it publishes a tag. A tag that has it was published by another host, and is recorded as elsewhere and not run. So two hosts serving one repository publish each release once.
Release requests
Section titled “Release requests”chant ci run --at <sha> --release asks a host to cut a release of a commit and publish it. It pushes an annotated tag, ci/release/<sha>, whose message holds the label (--label, default auto, the label chant release next computes) and, for a train, the levels (--levels, default auto). A commit that already has a request keeps it.
For each request, ci serve --release takes the same lease, checks the request is still on the remote, and runs the gate and cut jobs of the release workflow’s dispatched shape in a worktree of the commit, the way it runs a publish job. It renders them with gate: "head", so the requested commit is the one cut and must itself be green. The gate refuses a commit that is not green, and the request is recorded as refused with the gate’s line, such as <sha> is not green (the newest green commit below it is <sha>), so no release is cut. Otherwise the cut job runs the doctor, the stamp, the images and chant release cut (or chant workspace train cut), and pushes the release’s tag. When the release scans, the cut runs the scan before the tag with the host’s grype and syft, and a finding the policy blocks fails the request with no tag pushed. The next poll publishes that tag as it publishes any. Served or refused, the request tag is deleted on the remote, and the state file keeps the request under dispatch:<sha>.
The first poll against a state directory that has not served releases records the release tags there and returns (no release tag yet; each new one is published here, or a count of the tags it noted). It serves no request on that poll either, so a request already waiting stays on the remote until the next one. Each poll reads the tags before it serves requests, so the tag a request’s cut pushes is published by the poll after the one that served it. A one-shot host (--once) started on a fresh state directory with a request waiting therefore needs three runs: one to record the baseline, one to cut, and one to publish. A host that keeps polling does the same in three polls.
chant ci serve --forge git --env prod --release --secrets /etc/chant/release.env# from any clone, once the commit is green:chant ci run --at "$(git rev-parse HEAD)" --release --label 1.4.0Re-runs and polling
Section titled “Re-runs and polling”A failed job stays failed. --rerun-failed runs again the failed record at the target’s head, the failed apply at the newest green commit, and the failed plan of each open pull request head, as a forge’s re-run button does: after you approve a plan the apply refused, run chant ci serve --once --rerun-failed. With --wave-gate, the same re-run carries on from a wave that waited on its own gate, once that wave’s plan is approved, since the resume record keeps the waves that applied. --interval sets the time between polls, in seconds or as a duration such as 2m, 30 seconds by default. --once runs one poll, waits for the jobs it started and exits 1 when one failed. Without it ci serve polls until it is stopped and waits for its running jobs on SIGINT or SIGTERM.
GITHUB_SERVER_URL=http://forgejo.localhost GITHUB_API_URL=http://forgejo.localhost/api/v1 CHANT_FORGE_TOKEN=... \ chant ci serve --forge forgejo --repo demo/estate --env local --author demo-driver \ --chant 'npx chant' --before-script 'npm ci' --secrets /etc/chant/ci.env --key runner.pemThe host’s runner key
Section titled “The host’s runner key”ci serve signs each run when it has a trusted runner key (#4099). Without one it serves unsigned and says nothing about it, apart from one line under --verbose (#4156). It takes the key from --key, then CHANT_RUNNER_KEY, then the host’s own key, runner-key.pem in the state directory. Before its first poll it fetches the target branch and reads .chant/trust.json at its head. When that file doesn’t list the key under runners for a principal holding the runner role, ci serve prints one warning with the command that lists it, and serves unsigned. A key that is not an Ed25519 or ECDSA P-256 PEM stops it. With ci.green.signedSince set, it refuses to start without a trusted key. --unsigned is still accepted. It skips the key, and has no effect under signedSince.
--setup-key sets the host’s key up, on ci serve or ci run. When the state directory (--state, by default chant/ci-serve in the common git directory) holds no key, it makes an Ed25519 key in PEM there, with mode 0600 in a directory of mode 0700. --key-type ecdsa-p256 makes an ECDSA P-256 key instead, for a host whose crypto module approves ECDSA and not EdDSA (see Signatures and crypto modules). It prints the public key, an ssh-ed25519 or ecdsa-sha2-nistp256 line, on stdout. A key already in the state directory is kept whatever its kind, and --key-type naming the other kind is refused rather than replacing it. On stderr it says whether .chant/trust.json at the target’s head lists the key, and if not, the exact chant workspace trust runner add command that would. A key file that other users can read is refused.
With --trust it makes that change itself, on a branch for review. In a temporary worktree at the target’s head it runs trust runner add for --principal, by default chant-runner:<host>, and commits the result on chant/trust-runner/<principal>. It then pushes that branch to origin and never writes the target branch. Open a pull request from it. Changing the trust config is a protected write, so when the policy has signers, an admin signs the commit before it merges. The commit is made with the host’s git identity and signing settings. Once it has merged, ci serve starts signed.
chant ci serve --setup-key --trust --principal chant-runner:demo-host# open a pull request from chant/trust-runner/chant-runner-demo-host, and merge itchant ci serve --forge forgejo --repo demo/estate --env localci run uses the host’s key too when it is given no --key and no CHANT_RUNNER_KEY. As with the variable, a host key the commit’s trust config doesn’t list leaves the run unsigned, with a warning only under signedSince.
ci serve takes no webhook yet. It polls, so the host needs no inbound port, and a webhook checked with an HMAC secret is a follow-up.
ci check
Section titled “ci check”chant ci check --base <rev> [<target>...] runs the ci.hooks.check hooks the workspace declaration at --base names (#4556). A product’s check job runs it before any plan. Without --base it takes the job’s base (#4966): a pull request’s target branch (GITHUB_BASE_REF, CI_MERGE_REQUEST_TARGET_BRANCH_NAME) as origin/<target>, else origin/<default> for a push to a branch other than the default branch, which is CI_DEFAULT_BRANCH on GitLab and --branch <name> on GitHub and Forgejo. With neither it exits 1 asking for --base. Each target is a root, stack or component the change touches, and a perRun hook runs once per target. The hooks run with no forge token or cloud credentials in their environment. When they pass, each lexicon the project lists runs its own check steps for its members (#4633): the pulumi lexicon runs pulumi install, a stack config check and pulumi about --json for each pulumi member (The pulumi member), in the same environment. check-hooks.json under --output (default .chant/check) lists each hook’s and step’s result, and --json prints it. --summary <file> (#4914) appends the report as a markdown section (a ### Check hooks heading naming the base, a line per hook run and step, the failure, and the checks signed) to the file, so a product’s check step keeps it in its own report; a job with GITHUB_STEP_SUMMARY set gets the section in its summary too. checkReportSummary (@intentius/chant/components/check-hooks) renders the same lines from a report, and CHECK_SUMMARY_FLOOR is the first chant with both. The command exits 1 when a hook or step failed, and 0 when every one passed or there were none. Hooks on Pull-Request Jobs has the shape.
With a runner key in CHANT_RUNNER_KEY (#4870), each hook whose every run passed is signed as a named check, by the hook’s name, over HEAD, and attached where the ref gate reads evidence: a git note under refs/notes/chant/evidence, pushed to origin unless --no-push. The key never reaches a hook. The key’s public half must be listed under runners in .chant/trust.json at --base; a key it does not list fails the job, so a job asked to sign never passes while signing nothing. check-hooks.json then has evidence, the checks signed and the runner, and the log says which.
A hook whose check takes local evidence is skipped when current local evidence for the commit’s tree is kept under refs/notes/chant/local-evidence, which the job fetches from origin first. Each hook is judged on its own: the others run, the skipped one is skipped in check-hooks.json with localEvidence (who signed it, at which commit), and the job passes when the rest do, so jobs that need the check job still run. With a local key in CHANT_LOCAL_EVIDENCE_KEY in place of a runner key, every hook runs and each one that passed is signed as local evidence instead. Nothing is fetched or skipped when .chant/trust.json at --base names no check under local.checks. A product whose check job calls runCheckHooks (@intentius/chant/components/check-hooks) itself gets the same skip by passing localEvidence: { base }, the full commit of the base.
ci evidence
Section titled “ci evidence”chant ci evidence signs and verifies evidence for the named checks a pipeline runs (#4870). The evidence is the runner evidence of workspace evidence with no record subjects: it binds the commit, its tree and the check’s name, and counts for any commit with the same tree, so the squash of a pull request whose tree is the head’s carries the head’s evidence.
sign --check-id plan,policysigns that each check passed at--at(defaultHEAD) with the key in--keyorCHANT_RUNNER_KEY, attaches it underrefs/notes/chant/evidence, and pushes the notes unless--no-push. Without a key it signs nothing and says so.sign --from-report .chant/pr --result <result>is the plan note job’s form. The policy (Rego, CrossGuard, a product’s rules) runs inside the plan, so the plan job stands for two checks:planwhen the plan job succeeded and leftpr-plan.jsonorpr-plan-note.json, andpolicywhen a policy ran and denied nothing that stands. It writesevidence.jsonbeside the report, andpr-postends the note with a line naming the checks signed and those not signed, with why. With--member <name>(#4964), a workspace member’s plan job’s report, the two areplan:<name>andpolicy:<name>: a member’s plan job plans that member alone, so its pass says nothing of another member’s.memberEvidenceCheck("plan", name)(@intentius/chant/ci-evidence-jobs) gives the name arefsrule lists. A product plan withtargetssigns each target’s plan job the same way,--member <target>(#4978), so its checks areplan:<target>andpolicy:<target>(targetEvidenceCheck, andproductPlanEvidenceChecks(targets)for the whole list). The name is letters, digits,-and_.--membergoes with a plan report only; a check job’s hooks keep their own names.sign --from-report .chant/check [--result <result>]is thecheck-evidencejob’s form (#4935): the directory holdscheck-hooks.jsonfrom a check job, and each hook whose every run passed is signed by its name, with its runs as the claim, asci checkwith a runner key signs them. A hook skipped on local evidence did not pass there and is not signed. A--resultother thansuccessorfailuresigns none. The check job ran the change’s code, so the report is read as data, and the key stays in this job, which runs none of it.sign --open --job <job> --from-report <dir> -o <out>is the GitLab signing job’s form (#4914), in a pipeline of the target branch (--branch, defaultCI_COMMIT_BRANCH). For each open merge request into the branch it finds the newest pipeline’s<job>(plan,<target>-plan,check), readspr-plan.json,pr-plan-note.jsonorcheck-hooks.jsonfrom that job’s artifact under<dir>, fetches the head (refs/merge-requests/<iid>/head), and signs it as--from-reportdoes, against the runner identities at--base. A check whose evidence for the head’s tree is already current is not signed again. It writes<out>/<iid>/evidence.json, naming the merge request and the head, whichpr-post --open --evidence-dir <out>reads to end that note with the checks line. A job that has not settled waits for the next pipeline;--no-forkssigns for no merge request from a fork.--member <name>signs a workspace member’s plan job asplan:<name>andpolicy:<name>, as above; a member’s file names the job<name>-planand reads the report from the member’s directory (--from-report <dir>/.chant/pr).sign --from-job <job> --check-id <id>[,<id>...] --claims <dir>is a wave’s evidence job’s form (#4926). It reads the job of that name in this run from the forge with the job token (GITHUB_RUN_IDandGITHUB_SHA, orCI_PIPELINE_IDandCI_COMMIT_SHA), and exits 1 when that job ran for another commit or belongs to another run.CHANT_EVIDENCE_SOURCESnames, for each check, the step whose conclusion stands for it, or another job of the run; on GitLab, which reports no steps, a check is read from its job’s status. A check is signed when its step concludedsuccessand its claim file in<dir>(<check>.json,:turned into-, written by the step) says it passed. The step ran the change’s code, so the file alone never signs: a policy step that failed gets nopolicy:evidence whatever its file says. Each statement’s predicate carriessource: { run, job, step }, the ids it relied on.--atmust be the run’s commit. A job it reads that has not finished is waited for, up to 30 minutes, reading the run’s jobs again every 15 seconds (#4978); one still going after that is not signed.verify --check-id <id>reads the evidence for--at’s tree and verifies it against the runner keys at--base. It exits 1 when one is not current.
In generated pipelines
Section titled “In generated pipelines”A pipeline generator signs when its options name the secret that holds the runner key, evidence: { runnerKeySecret: "<NAME>" }, the same secret ci workflow --runner-key-secret takes. Without it every generated file is byte for byte as before.
| Generator | What signs | Checks |
|---|---|---|
generateProductPlanPipeline, generateForgejoProductPlanPipeline | the note job, after it takes the report back and before it posts; the key is in that one step, in a job that runs none of the change’s code | plan, policy |
generateGitlabProductPlanPipeline | <plan job>-evidence, in the plan notes pipeline before the note jobs, for every open merge request’s settled plan job, from its artifact (#4914) | plan, policy |
chant build --pr-loop with --evidence-runner-key-secret <NAME> or --evidence-identity oidc (#4935) | the plan-note job on GitHub and Forgejo; on GitLab plan-evidence, in the plan notes pipeline, as above | plan, policy; in a workspace member’s pipeline plan:<member>, policy:<member> (#4964) |
checkJob (--check-job) with evidence (#4935) | check-evidence, at the target branch’s commit, from the check job’s report (sign --from-report .chant/check, or the job’s own checkJob.dir); on GitLab in the plan notes pipeline, for every open merge request’s check job | each hook that passed, by name |
productPipelineJobs | post.evidence (and each productPlan[].evidence): the lines and variables for a product that renders its own note job | plan, policy; with member, plan:<member>, policy:<member>; for each productPlan target, plan:<target>, policy:<target> (#4978) |
| the Op waves pipelines | each deciding wave job’s chant run wave step, once the wave is planned; with holds.policy, or a keyless wave that trades cloud credentials, <wave job>-evidence after it (#4926); on GitLab with a runner key, <wave job>-evidence always, and no wave job holds the key (#4964) | plan:<wave>, policy:<wave> when ci.policy ran and denied nothing |
A wave’s policy step and evidence job
Section titled “A wave’s policy step and evidence job”In a waves pipeline that signs, a wave with holds.policy runs its policy as a step of its own, chant run wave --spec <file> --wave <k> --policy-only, before the wave’s command (#4926). The step plans the wave and runs ci.policy over the plans, applies nothing, and exits 0 only when the policy ran and denied nothing (7 when it denied a run, 1 when it did not run). On GitHub and Forgejo it is a step with id: chant-policy, and the command step runs after it whether it passed or failed, since a denied run may still apply under an override. On GitLab it is a job of its own, <wave job>-policy, an allowed failure the wave job needs.
A job <wave job>-evidence follows the wave job. It checks out the base, so none of the change’s code runs there, takes back the wave job’s claim files, and runs chant ci evidence sign --from-job <wave job>. It signs policy:<wave> from the policy step’s result, and for a wave that trades cloud credentials and signs keyless, plan:<wave> from the command step’s: after the trade no step of the wave job may request the signing token, so the command step signs nothing there (CHANT_WAVE_EVIDENCE: job). Any other wave signs plan:<wave> in its command step as before (CHANT_WAVE_EVIDENCE: plan). The job asks for actions: read and, signing keyless, its own token; it runs in the same workflow, so the statement verifies under the identity .chant/trust.json already lists. On GitLab it reads the pipeline’s jobs with CHANT_GITLAB_TOKEN when set (a token with read_api), else the job token, and it is an allowed failure.
A later wave whose evidence.requires names a check an earlier wave’s evidence job signs, such as "policy:dev", needs that evidence job. A wave with no holds.policy and no keyless cloud trade renders as before. WAVE_EVIDENCE_JOB_FLOOR is the first chant with this.
On GitLab with a runner key (#4964) every deciding wave job signs in its evidence job. A wave job names its own deploy environment, and a GitLab job names one environment, so the wave job cannot name chant-evidence, the environment the key’s variable is scoped to; the evidence job names it (action: access) and gets the key, and the wave job writes the plan’s claim file and signs nothing (CHANT_WAVE_EVIDENCE: job). Scope the variable as below, and no wave job of a push or tag pipeline is handed it. A wave job that stops at its gate exits 3, outside its allowed failure, so its evidence job is skipped, and GitLab runs a skipped job again after the wave job’s retry. An evidence job that already ran, after a try that ended otherwise, is not run again by GitLab; chant run resume and chant approve --resume retry it together with the wave job (#4978). The retried evidence job needs the wave job, and sign --from-job waits for the wave job’s new try to end should it start first, so it signs plan:<wave> from that try. A wave job you retry by hand in GitLab, after a try that was not a stop at the gate, still needs its evidence job retried by hand. GITLAB_WAVE_EVIDENCE_RETRY_FLOOR is the first chant with this. Signing keyless renders as before. GITLAB_WAVE_KEY_SCOPE_FLOOR is the first chant with this.
An Op waves spec’s evidence.requires, read at base, names the checks whose current evidence the applied commit needs. A wave whose commit lacks one plans and applies nothing, exits 1, and names each missing check and the command that signs it:
{ "name": "roots", "evidence": { "requires": ["plan", "policy"] }, "waves": [] }The signer is an EvidenceSigner (@intentius/chant/workspace/trust/check-evidence): a runner key .chant/trust.json lists, or the job’s own OIDC identity, below. CHECK_EVIDENCE_FLOOR is the first chant with all of this.
The runner key on GitLab
Section titled “The runner key on GitLab”GitLab builds a merge request pipeline from the merge request’s own .gitlab-ci.yml, so any job in it, and any unset in its script, is the change’s to rewrite. A CI/CD variable that reaches a merge request pipeline reaches the change’s code. Since #4914 no generated job of a merge request pipeline signs: plan-evidence (or <target>-plan-evidence) and check-evidence run in the plan notes pipeline of the target branch (#4328), whose jobs come from the branch’s own files, before the note jobs, with chant ci evidence sign --open. Each names the environment chant-evidence (action: access, so it records no deployment) and keeps .chant/evidence/<job> as its artifact, and the note job’s pr-post --open --evidence-dir ends each note with the “Checks:” line. A signing job that fails leaves the notes to post without it. GITLAB_OPEN_EVIDENCE_FLOOR is the first chant with this.
To keep the key out of the jobs that run the change (plan, <target>-plan, check) and out of the Op waves pipeline’s wave jobs, set its CI/CD variable up as:
- Protected, so GitLab hands it only to pipelines of protected branches and tags. A merge request pipeline of an unprotected source branch does not get it.
- Scoped to the environment
chant-evidence, so a job that names no environment, as the plan and check jobs do, does not get it in any pipeline, the target branch’s included. - Optionally,
chant-evidencemade a protected environment (a paid tier) with the maintainers as the only deployers, so a job naming it runs only for them.
What stays exposed:
- A merge request whose source branch is protected, and whose pipeline file names
chant-evidence, gets the key in that job; a protected environment limits this to its deployers. - Anyone who may push to the target branch changes what its pipeline runs, the signing jobs included.
- Whoever starts the plan notes pipeline (a schedule’s owner, or a person running it from the web or the API) may pass variables that change how its jobs run. Set the project’s minimum role to override pipeline variables to Maintainer or above.
- The signing job reads each merge request’s report as data and runs none of its code, but the report itself was written by the change’s code in the plan or check job, as on GitHub and Forgejo.
- GitLab cannot mask a multi-line PEM, so a job of the target branch that prints the variable shows the key in its log.
A stored key leaks once and signs anything until it is rotated. Keyless signing (#4869, below) stores no key at all and remains the recommended path on GitLab: with evidence: { identity: "oidc" } the same jobs ask for an id_tokens token, and since they run in the target branch’s pipeline the certificate names the branch (<server>/<project>//.gitlab-ci.yml@refs/heads/main), which is the default ciRunnerIdentity writes.
Keyless, from the job’s OIDC identity
Section titled “Keyless, from the job’s OIDC identity”A runner key is a secret to store and rotate, and a leaked one signs anything until someone does. A job can sign keyless instead (#4869). It asks the forge for an OIDC token with the audience sigstore, trades it at a Fulcio certificate authority for a ten-minute certificate over a key it made for this run, signs the same DSSE envelope with that key, and has the signature timestamped by an RFC 3161 timestamp authority. The envelope’s signature carries the certificate chain and the timestamp, so it verifies offline, and still does after the certificate expired: the certificate is judged at the timestamp’s time. Nothing is sent to a transparency log.
.chant/trust.json at base lists the identities that may sign, next to or instead of runners:
{ "schema": 1, "roles": { "runner": ["ci"] }, "keyless": { "trustedRoot": ".chant/trusted_root.json", "identities": [ { "principal": "ci", "class": "runner", "issuer": "https://token.actions.githubusercontent.com", "subject": "https://github.com/acme/infra/.github/workflows/chant-*.yml@refs/heads/main" } ], "since": "8b045980cf9cd1351dd4f60c9c46ee69d45ec0d7" }}issueris the OIDC issuer the certificate names, exactly.subjectis a pattern over the certificate’s subject alternative name, which names the repository, the workflow file and the ref: on GitHubhttps://github.com/<owner>/<repo>/<workflow>@<ref>, on GitLab<server>/<project>//<ci config>@<ref>.*matches within one/segment and**across them.trustedRootis a file in sigstore’strusted_root.jsonformat with the certificate authorities’ and timestamp authorities’ certificates. For sigstore’s public instances it is thetrusted_root.jsonthe sigstore TUF repository publishes; for a private instance, the file its operator publishes. Changing it is a protected write, as for the rest of the policy.fulcio,timestampandaudiencesay where a signing job trades its token. They default tohttps://fulcio.sigstore.dev,https://timestamp.sigstore.dev/api/v1/timestampandsigstore. A Forgejo job’s token is accepted only by a certificate authority the project runs, so name it and its timestamp authority there.sinceswitches from keys to identities the wayci.green.signedSinceswitches to signed tags. A statement over a strict ancestor of that commit still counts when a runner key signed it; one over that commit or any other counts only when it is signed keyless. Withoutsince, both count.
A job signs keyless with CHANT_RUNNER_IDENTITY=oidc and no CHANT_RUNNER_KEY: ci check, ci evidence sign and the wave jobs read both in one place. Every reader verifies keyless statements: the ref gate, ci evidence verify, a wave’s evidence.requires, and the ci tags and Op runs ci tick, ci list and release cut judge. The tick and chant run still sign their tags and runs with a runner key.
In a generator, evidence: { identity: "oidc" } takes the place of runnerKeySecret, with audience when keyless.audience is not sigstore. The signing step gets CHANT_RUNNER_IDENTITY: oidc and its job asks for the token, so a product adds nothing: id-token: write on GitHub, enable-openid-connect: true on Forgejo, and on GitLab id_tokens: CHANT_ID_TOKEN_SIGSTORE: aud: sigstore, which no hook sees. A wave that trades cloud credentials signs in its evidence job, since the steps after the trade may request no token; before WAVE_EVIDENCE_JOB_FLOOR a GitHub or Forgejo one was refused. KEYLESS_EVIDENCE_FLOOR is the first chant with this.
An init writes the identity with ciRunnerIdentity and withRunnerIdentity from @intentius/chant/workspace/trust/runner-identity: the first names the generated workflow’s identity on its forge, the second adds it to the file’s text under keyless and its principal to roles.runner.
Local evidence
Section titled “Local evidence”Lint, type checks and unit tests that already passed on a developer’s machine needn’t run again in CI (#4868). Local evidence is a check statement signed on that machine, by a person’s key or an agent session’s own key, which .chant/trust.json at base lists under local:
{ "schema": 1, "local": { "keys": [ { "principal": "alice@example.com", "class": "person", "key": "ssh-ed25519 AAAA..." }, { "principal": "agent:review-bot", "class": "agent", "key": "ssh-ed25519 AAAA..." } ], "checks": [ { "check": "fmt", "from": ["person", "agent"] }, { "check": "tflint" } ] }}checksnames each check whose CI run local evidence stands in for, by the hook’s name, andfromwho may sign it (default["person"]). A check it doesn’t name accepts none, so the default is no for every check.plan,policy,apply,drift,release,gate,approvalandconfirm, and any of them followed by:(a wave’splan:<wave>), can’t be named: a policy that names one doesn’t parse, and CI then accepts no local evidence at all.- A local key is never a runner key. The statement has its own predicate type (
https://intentius.io/chant/local-evidence/v1) and is kept underrefs/notes/chant/local-evidence, so the ref gate and an Op waves spec’sevidence.requiresnever count it. A check the ref gate requires still needs runner evidence; don’t name it underlocal.checkstoo, or a skipped run leaves the ref gate without it. - The statement binds the commit and its tree, and counts for any commit with the same tree: a rebase or an amend that keeps the tree keeps it current, and one that changes the tree means the check runs again. On a pull request whose CI checks out a merge commit, the merge’s tree is the head’s only while the branch is up to date with its base.
- The policy is read at base, like the rest of
.chant/trust.json: a key the change adds signs nothing CI accepts until it is merged.
On the developer’s machine, chant ci check --base origin/main with the key in CHANT_LOCAL_EVIDENCE_KEY runs the hooks and signs each one that passed, or chant ci evidence sign --local --check-id fmt,tflint signs named checks. Both push refs/notes/chant/local-evidence to origin unless --no-push. chant ci evidence verify --local --check-id fmt says, per check, whether CI would skip it: accepted, not-accepted (the policy doesn’t name it), missing, untrusted (a key the policy at base doesn’t list, or an agent’s key where the check takes people only) or refused (a check that gates an apply). LOCAL_EVIDENCE_FLOOR is the first chant with local evidence.
ci forge-check
Section titled “ci forge-check”chant ci forge-check reads the forge, each cloud identity’s trust and Pulumi Cloud’s OIDC policies, and compares them with the pull-request pipelines ci.identity.cloud gives the workspace (#4608). Each pipeline has three jobs: the plan job on the pull request, and the record and apply jobs on the default branch. --env picks the environment (default production), and --member one member; without it every member is read. Each identity should trust its own jobs and no other subject. The check prints one row per setting:
| Where | Row |
|---|---|
| GitHub | each protected branch has branch protection or a ruleset, the default branch requires the plan status, each apply environment deploys from the default branch only, each apply runner group is limited to selected workflows |
| GitLab | each protected branch is protected, merge requests need a passing pipeline, each apply environment is protected, the apply runners take protected refs only |
| Forgejo | each protected branch has a rule, and the default branch’s rule checks the plan status |
| AWS | each role’s trust policy admits its jobs’ subjects and audience, and nothing wider (iam:GetRole) |
| GCP | the workload identity provider’s attribute condition is its jobs’ condition, or a narrower one |
| Azure | each app’s federated credentials are its jobs’, and no other |
| Pulumi Cloud | the forge is a registered OIDC issuer of the organization, and the issuer’s policies grant each token to its own jobs alone |
The plan status is the product’s, such as chant/plan or plywood/preview. Each required status also gets a row for whether it has been posted on the default branch’s head. One not posted yet reads unknown, since the pipeline may not have run.
For pipelines built with --ref-gate-status, pass it here too (#4913): the default branch then also requires the ref gate’s status, named as the refs rule for the branch in .chant/trust.json names it (by default chant/ref-gate), read at origin/<default> when the checkout has it, else at HEAD. With no rule for the branch the ref-gate job sets no status, so none is required and the check says so. A policy that can’t be read fails the check. A product’s forge check passes the status to pipelineContract as refGateStatus.
A row reads match or mismatch. It reads unknown when the setting could not be read, such as a scope the token lacks or a GitLab edition without protected environments, and not-checked when no credentials for that cloud are set. Credentials come from the environment:
| For | Variables |
|---|---|
| The forge | GH_TOKEN, GITLAB_TOKEN or FORGEJO_TOKEN |
| AWS | AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY, or a profile with static keys |
| GCP | GOOGLE_OAUTH_ACCESS_TOKEN |
| Azure | AZURE_GRAPH_TOKEN, a Microsoft Graph token |
| Pulumi Cloud | PULUMI_ACCESS_TOKEN, an organization admin’s |
On a laptop pass --forge and --repo; in a forge job both come from the job. --branch sets the default branch when the repository read cannot.
The command only reads. Every request is a GET, or the one POST of IAM’s GetRole, and anything else is refused before it is sent. It exits 1 on a mismatch, and with --require-clouds also when a cloud went unchecked; otherwise 0. --json prints the rows. terragucci’s terragucci forge check and plywood’s plywood forge check run the same check from @intentius/chant/forge-check.
ci init
Section titled “ci init”Sets the workspace up for a prescribed delivery workflow (#4168): trunk-curated, where a merge records the plan and deploys nothing, trunk-curated+apply-on-merge, or apply-before-merge (#4301). The workflows and what each requires are on CI Workflows, and Set Up Trunk with Curated Releases walks through it.
chant ci init --workflow trunk-curatedchant ci init --workflow trunk-curated --yesIt runs WSP151 over the workspace as it would be with ci.workflow set, and proposes what answers each finding:
| Finding | What it proposes |
|---|---|
no ci.workflow | ci.workflow in the declaration |
ci-workflow-green-undeclared | a ci.green block: on GitHub, one phase per workflow file with its jobs as the check runs, those a pull request runs as preMerge; elsewhere, one check phase to edit |
ci-workflow-no-pre-merge | preMerge, from the phases a pull request runs |
ci-workflow-no-environments | environments: ["staging", "prod"] after export default {, when the default export is a plain object |
ci-workflow-no-components | <member>.component.ts, a stub with a gate and a TODO(chant ci init) line, which WSP151 reports until it is filled in |
ci-workflow-pipeline-missing, -pipeline-differs | runs chant build --components --generate <forge> --pr-loop in each member, with --env set to the first environment, --apply-on-merge under that workflow and --apply-before-merge under apply before merge, then chant ci workflow on GitHub |
ci-workflow-publish-missing | runs chant release workflow |
The proposal is printed first: each file as a diff, then each generator. Nothing is written without --yes or a yes at the prompt. A key the declaration lacks is added as text, so the rest of the file keeps its layout. A component someone wrote is never edited, and one with no gate gets a note instead. A JSONC declaration is refused, since its comments would be lost. A rerun proposes only what is still missing.
| Flag | Description |
|---|---|
--workflow <name> | trunk-curated, trunk-curated+apply-on-merge or apply-before-merge. Required. |
--forge <forge> | github, gitlab or forgejo. Inferred from .github/workflows, .forgejo/workflows or .gitlab-ci.yml. |
--security <group|profile> | Add a security group, or a security profile (fedramp-moderate, cccs-medium) that turns every group on, to the top-level security, repeatable. Without it nothing is turned on. |
--yes | Write and run without asking. |
ci workflow
Section titled “ci workflow”Writes .github/workflows/chant-ci-green.yml (or --output), the root CI file that runs the tick. A tick starts when a workflow holding a required check run completes on the branch, so a result or a re-run is acted on within seconds. A cron every 15 minutes covers an event that was dropped or late, and is what sends ci.stale when nothing else runs the tick (#4678). All ticks share one concurrency group that never cancels, so they run one at a time.
It finds the workflows to listen to by reading the other files in .github/workflows/. A job reports its name or its id as its check run, followed by (<matrix values>) for a matrix job, and a workflow is kept when one of its jobs can report a check run that a required phase’s pattern matches. It warns about each required pattern no job matches. --workflow <name> adds a workflow the scan can’t see, such as one whose job names are built from expressions, and it is repeatable.
The tick runs in the workspace root as npx --yes @intentius/chant@<version> ci tick, at the version that wrote the file. --chant <command> runs chant with another command instead, and ci tick is put after it. --install <command> adds a step before the tick that installs what that command needs, in the same directory. When the workspace root has a package-lock.json, the install step also gets setup-node’s npm cache. Both flags go into the regenerate command in the header. The file’s first line is the generated-file header naming the command. When the command runs in a member’s directory, that member records the file as one it generates (ws-042). Regenerate it after changing ci.green or the workflows it listens to.
For each phase that sets build (#4169), ci workflow also writes the top-level blocks of the workflows holding it. Each block sits under a comment naming ci workflow, and the rest of the file stays as it is:
build | on: | concurrency: |
|---|---|---|
newest | pushes to the branch and workflow_dispatch, with any schedule removed and other triggers kept | chant-build-<phases>-${{ github.ref }}, never cancelling a run in progress, so GitHub keeps the newest push waiting and drops the ones between, and each ci/build/<sha> tag runs on its own. When a phase it holds sets skipped: "pass", a comment in the block names ci base for its path filters (#4643) |
every | kept, with workflow_dispatch added so the tick can start a run the forge never started (#4216) | the commit itself on the branch, so no push cancels or replaces another’s run, and the ref elsewhere, where a new push cancels the run it supersedes |
A workflow holding a phase of each value is refused, since no one group serves both. The tick’s workflow then also has actions: write, to re-run a failed job and start a workflow at a tag, and its workflow_run trigger listens on ci/build/** as well as the branch. With no phase setting build, every file comes out as before.
When the workspace declares a ci.workflow, at the top level or on a member, composed releases live on chant/compose/<name> branches (#4220). Under newest, pushes to chant/compose/** start a run too. For every, the filter joins a push that lists branches (a push that lists none already runs on all of them), and the concurrency group keys a compose branch’s runs by commit, as the branch’s. The tick’s workflow_run lists chant/compose/** too. Without a ci.workflow the files come out as before.
For chant runs, a push Op’s trigger takes build too, in chant run --generate (#4169). On GitHub and Forgejo, newest runs on pushes to the branch, on ci/build/** tags and by hand, in a concurrency group per ref; every gets a group per commit. On GitLab, newest adds a rule for ci/build/ tags, and the file’s header says to keep the project’s auto-cancel of redundant pipelines on for newest and off for every, since a waiting pipeline is dropped only by that setting.
Pushing tags to commits that change workflows
Section titled “Pushing tags to commits that change workflows”By default the tick pushes its tags with the Actions token, GITHUB_TOKEN, which actions/checkout leaves in the clone. GitHub treats a new ref to a commit whose files under .github/workflows/ differ from the default branch’s as an update to those workflows. That needs the workflows permission, and the Actions token can never have it. So on a branch where a commit changes a workflow file, every push of that commit’s tag fails with refusing to allow a GitHub App to create or update workflow ... without workflows permission, and chant ci tick says so in its error.
Give the push a token that may update workflows, kept in a repository secret, and regenerate the workflow with it:
chant ci workflow --token-secret CI_GREEN_TOKENThe checkout then uses ${{ secrets.CI_GREEN_TOKEN || github.token }}, so the push does too. Where the secret is unset, as in a fork or a fresh repository, the checkout falls back to the Actions token: the tick still runs, and only the tags for commits that change .github/workflows/ fail to push, which ci tick reports. A fine-grained personal access token for the repository needs Contents read and write and Workflows read and write. The tick still reads check runs with the Actions token and the job’s checks: read, because a fine-grained token can’t call the Checks API.
A GitHub App with Contents and Workflows write works too. Put its id in an Actions variable and its private key in a secret, and the workflow mints an installation token with actions/create-github-app-token before the checkout:
chant ci workflow --app-id-var CI_GREEN_APP_ID --app-key-secret CI_GREEN_APP_KEY--runner-key-secret <NAME> passes the repository secret NAME to the tick step as CHANT_RUNNER_KEY, so the tick signs its tags. The secret holds the runner key as PEM, and the key’s principal needs the runner role in .chant/trust.json. When the declaration sets ci.green.signedSince and the flag is missing, ci workflow warns, since every tick would fail.
Regenerating keeps the token flags you passed, since the header records them. Leave them out and the file comes out byte for byte as 0.108.0 wrote it.
chant’s own repository
Section titled “chant’s own repository”chant declares ci.green for its own main in its chant.workspace.json. The phases are check, test, validate and suites. The first three are the checks branch protection requires, each one check run of the same name from the chant workflow, where test is the job that passes only when the unit shards passed. That workflow holds the fast checks, and it is all that runs on a push or a pull request. Those checks are the unit tests and typechecks, plus lint and some small guards. suites is the job of the same name in release-suites.yml. That project is every *.e2e.test.ts, which covers the CLI goldens and the corpus differentials as well as the reference workspace. The first three phases declare build: "every" and suites declares build: "newest" (#4169), so ci workflow writes the triggers of both files: the chant workflow runs on every push to main, none is cancelled, and the tick starts it at a ci/build/<sha> tag on a commit GitHub never ran it on, and release-suites.yml runs on the newest push when its last run ends, and at each ci/build/<sha> tag the tick bisects with. A commit is green only when all four passed, so a release never tags a commit the long suites have not passed. A commit release-suites.yml never ran on is unbuilt, and its record names the commit that covers it. The other large suites live in large-suites.yml and helm-survey.yml, which run only when a person dispatches them; no phase and no release waits on those. Other workflows can run on main’s commits too, so none of their jobs is named check, test, validate or suites, which keeps their runs out of those phases.
Its tick runs the source at the commit it checks out, so a change to chant ci is tested on main before it ships:
chant ci workflow --chant 'npx tsx packages/core/src/cli/main.ts' --install 'npm install --ignore-scripts'The install skips the lexicon builds, and the tick needs none of them. just release-when-green starts the phases a commit lacks and the tick, waits for the green tag, then runs just release (scripts/release-when-green.sh, #4218). just release dispatches the release train in the generated publish.yml, whose gate takes the newest green commit from these tags (chant ci last-green); the cut of each member checks the commit’s green tag again, so a commit with none is never released.