Repository navigation
Description
docs: forges, CI systems and wardens. Add a feature matrix, the cloud-native CI services, and why only forges get a warden.
Epic: #5351.
What exists
ci/your-forge.mdxhas a three-row forge table (GitHub, GitLab, Forgejo) and a section on a CI system other than the forge's own (Prow, Separate the forge from the CI system, so a GitHub repo can run its CI on Prow #5170). It also covers the chant runner on your own host (chant ci serve).reference/workspace-declaration.mdxdocumentsci.forgeandci.system.reference/workspace-kinds.mdxlists the three wardens asforge-governancekinds (workspace: a forge-governance member kind shipped by the wardens, so forge state is in the graph #3180).concepts/comparison.mdxmentions github-warden once.
Nothing says what a warden is for, or why there is one per forge and none per cloud. Nothing compares what each forge and CI system supports. A reader on AWS CodePipeline, Google Cloud Build or Azure DevOps cannot tell what chant does for them.
What to add
1. A matrix in ci/your-forge.mdx, the reference
There is one row per forge and CI system chant renders for today:
- GitHub Actions
- GitLab CI
- Forgejo Actions
- Prow with GitHub
chant ci serve --forge githuband--forge forgejochant ci serve --forge git, the chant-native forge: a plain git server, land branches and the ref gate (research: a forge without branches or pull requests (trunk, implements links, gates, flags as records), and the prior art #4016)
The columns:
- the pull-request pipeline (
--generate), and the release workflow (chant release workflow); - the plan note and status, comment commands, and approvals;
- the cloud login (OIDC), and the forge token it needs;
- keyless signing (
signingIdentityinlifecycle/publish-signing.ts); chant ci forge-check, and howci.green.sourcereads green;- the warden that governs the forge.
Each cell is checked against the code at the commit the page names, not taken from other pages. A cell that does not work says "no" and gives the reason in a footnote, such as "Forgejo: no OIDC token for keyless signing".
2. A concept page, concepts/forges-ci-and-wardens.mdx (explanation)
- Forge, CI system, cloud. The forge holds the repository, pull requests, reviews and branch protection. The CI system runs the jobs. The cloud holds what the jobs deploy. Sometimes one product is two of these: GitHub with Actions, GitLab with CI, Forgejo with Actions, and Azure DevOps with Repos and Pipelines. Sometimes it is one: Prow, AWS CodePipeline, Google Cloud Build.
- What a warden is. A warden keeps a forge's organization and repository settings in a declared state, with guardrails and drift correction. Examples are branch protection, required checks, teams and permissions. It reads the job names chant generates and requires them as checks, and it shows up in the workspace as a
forge-governancemember. - Why only forges get one. A warden exists for settings that no chant lexicon can declare, because they live in the forge's own API and not in a cloud's resource model:
- GitHub, GitLab and Forgejo settings are of that kind.
- CodePipeline, CodeBuild, CodeConnections, Cloud Build triggers and worker pools are cloud resources, which the aws and gcp lexicons already type (
AWS::CodePipeline::Pipeline,AWS::CodeBuild::Project,CloudBuildTrigger,CloudBuildWorkerPool). A team declares and diffs them as part of its estate, and governs them with IAM and the cloud's own policy (governance.tsin each lexicon). - A setting missing from a lexicon is a lexicon gap, not a reason for a warden.
- The chant-native git forge has no forge API, so there is nothing for a warden to reconcile. Its policy lives in the repository:
.chant/trust.jsonand the pre-receive hook the ref gate writes (cli/workspace-ref-gate.mdx). A warden is needed only where a forge keeps policy in its own API. - Cloud-hosted git (CodeCommit, Secure Source Manager) is a cloud resource too.
- Cloud-native CI today. Describe what works today: these services are declared as resources through the aws and gcp lexicons. Say plainly that chant does not render its pipeline for them, and does not render one for Azure DevOps, and stop there. Under the workspace rules, the page names nothing as coming.
- TypeScript as data. Pipelines, forge policy and cloud resources are all typed values in one estate (
concepts/typescript-as-data.mdx), so the matrix's rows are generators over the same jobs rather than separate tools.
3. A team on the chant-native git forge (in the concept page, or a guide it links)
This walks through what a team does when the forge is a git server, a hook and one chant ci serve host, with no forge API and no hosted CI. The page describes what works when it is written. The release step reads as today (by hand) until #5462 lands, and #5462 updates it.
Setup, once:
- A git server: Soft Serve, or a bare repository over SSH.
- The ref gate's pre-receive hook on it (
cli/workspace-ref-gate.mdx). A push tomainwhose commit lacks the evidence.chant/trust.jsonat base requires is refused. - One host runs
chant ci serve --forge git --env <env> --secrets <file>, with a runner key from--setup-key --trustthat signs its runs. chant.workspace.jsondeclaresci.green: the quickpreMergephases, the full phases that make a commit green, andsource: "runs".
A change:
- A developer commits with a
Chant-Record: work:<id>trailer, which links the commit to its work item. - They push it to a land branch:
git push origin HEAD:chant/land/<name>. ci serveruns the pre-merge phases on it and fast-forwardsmainwhen they pass.- On the new
maincommit it runs the record job and the full phases, thenci ticktags the commit green from its own signed runs. - Review is of the work item and of the change set a gate approves (
chant approve), not a diff. behold shows what is in flight: open work items, flags, and green commits waiting at each gate.
A release:
- By hand: a person with the registry credentials runs
chant release cutandchant release publishon a host, adding the doctor and verify the rendered workflow adds. Today a host has no keyless signing, and--require-provenancerefuses a publish with no CI OIDC token, sosupply-chaincannot be on for a host release. The page says exactly that until release.signing: KMS, key and private Sigstore modes, and signing on Forgejo #5458 lands, and release.signing: KMS, key and private Sigstore modes, and signing on Forgejo #5458's pull request updates this step to namekmsandkey. - From the host (ci serve: run releases on the host, with the same steps the rendered release workflow runs #5462): a release tag, or a
ci/release/<sha>request on a green commit, makesci serve --releaserun the same steps as the rendered GitHub job. It signs withkmsorkey, records the runner key, and takes a lease so two hosts publish once.
Where it fits: air-gapped or regulated sites that cannot use a hosted forge. A team on GitHub, GitLab or Forgejo uses the rendered pipelines, and can still serve jobs from its own host.
4. Links
concepts/comparison.mdx,reference/workspace-kinds.mdx(forge governance) and the warden READMEs link to the concept page.- The concept page links to each warden's site.
Done when
- The matrix is in
ci/your-forge.mdx, with each cell checked against code and the commit named. - The concept page is in the sidebar under Concepts, and
npm run buildindocs/passes (agent prompt lint, links). - When a new row lands (ci generators: Azure DevOps Pipelines #5350, ci generators: Bitbucket Pipelines #5346, ci generators: AWS CodePipeline, as ci: codepipeline beside the repository's forge #5459, ci generators: Google Cloud Build, as ci: cloudbuild beside the repository's forge #5460), its issue adds its row and its cloud-native line. Each of those issues gets a Done-when line saying so.
Activity