Repository navigation
Description
What this is
INTENTIUS/choudoufu's examples/ci-pipelines generates GitHub, Forgejo and GitLab pipelines from one chant project: five Ops, generateOpsPipeline once per forge. Since 0.60.0 all three forges get all five jobs with the same triggers and the same job names. What a job may do, and what it can report, still differs per forge in ways that come from the generators rather than from what the forges support.
This epic is that gap, from chant's side. The consuming half is tracked at INTENTIUS/choudoufu#1018.
Where the three generators stand, for this project's five Ops
Updated as the five original children landed. Rows the execution-found children still move are marked.
| github | forgejo | gitlab | |
|---|---|---|---|
per-Op setup / permissions |
yes | dropped by the dialect | yes, as id_tokens: |
| per-Op variables or secrets | via permissions + OIDC, plus per-Op variables (#2290) |
per-Op variables on the job's own env: (#2290) |
per-Op variables merged into the job's block (#2290) |
comment finding mode |
pull-request comment | pull-request comment, over a full-URL gh api (#2291) |
merge-request note (#2268) |
issue finding mode |
gh issue create, unconditional — opens one per run (#2297) |
generates; create path never exercised against a real instance (#2291 scoped it out) | sticky GitLab issue (#2292) |
| gated-apply notice job | yes | dropped, and its unconsumed outputs: with it (#2294) |
dropped |
| pending gate surface | GITHUB_STEP_SUMMARY |
GITHUB_STEP_SUMMARY |
CHANT_GATE_SUMMARY artifact (#2256) |
| stage / grouping | per-Op workflow file | per-Op workflow file | one file, every job under stage ops (#2293) |
a gated job can start under container: |
no — set -o pipefail under sh (#2299) |
no — same, inherited (#2299) | yes |
PrPlanReport sticky comment off github.com |
works | cannot — bare-path gh api (#2305) |
n/a |
| gate write without a git identity | untested | untested | fails silently (#2301) |
| approve then re-run closes the gate | untested | untested | no — ledger ref never fetched (#2303) |
Sub-issues
- forgejo Op generator: per-Op variables and secrets, so a pull-request job need not hold the apply credential #2290 - per-Op variables and secrets in the forgejo Op generator. Today
ComponentPipelineOptions.variablesbecomes the workflow's top-levelenv:, so a project with no OIDC has one credential set shared by every job. In the consuming project that means the pull-request jobs hold the apply key. - forgejo: comment and issue finding modes against Forgejo's own API, and the refusal that contradicts the serializer test #2291 -
commentandissueagainst Forgejo's own API. The forgejo generator refusescommentby name on the grounds that chant has no Forgejo client, andissuegenerates but fails at Report for the same reason. Forgejo serves a/api/v1surface, andreconcilePralready has a non-ghpath for GitLab (gitlab: pull_request and push triggers on the op-pipeline generator, and a merge-request note activity #2268) to model this on.chant-lexicon-forgejo's own serializer test asserts agh apisticky-comment step passes through "since Forgejo's API accepts the same calls against its GitHub-compatible surface", which contradicts the refusal; settling which is right is part of this item. - gitlab: issue finding mode has no GitLab path, so a cron Op's finding reaches only the run log #2292 -
issuefinding mode for GitLab. A cron Op has no merge request, socommentis correctly refused there, andissueis not refused but shells togh. GitLab has an issues REST API of its own; the consuming project's nightly sweep reports to a log today on two of three forges. - gitlab Op generator: the stage and file are still named scheduled-ops, and now carry merge-request and push jobs #2293 - the
scheduled-opsstage name.STAGEin the gitlab generator is a constant from the cron-only era. Every merge-request and push job now sits under a stage called "scheduled-ops" in the GitLab UI, and the generated file is namedscheduled-ops.gitlab-ci.yml. Both should follow the pipeline's actual contents. - forgejo Op generator: the gated-apply outputs survive the notice job that consumed them #2294 - unconsumed
outputs:on Forgejo. The forgejo generator drops the gated-apply notice job but keeps theoutputs:block the notice job existed to read. Cosmetic, small.
Found by first execution (INTENTIUS/choudoufu#1026, #1027)
The five above were settled by reading generated YAML. These were found once the pipelines actually ran, which is why none of them had a guard: every guard on both sides proved what the YAML says, and nothing had executed a job.
- reconcilePr: the github issue path opens a new issue every run, while gitlab's now edits one in place #2297 -
reconcilePr's githubissuepath opens a new issue every run, while both GitLab paths now edit one in place. A nightly Op with a finding opens 365 issues a year. Same bug inlexicon-upgrade.ts. - github/forgejo Op generators emit
set -o pipefailinto a container job, whose default shell is sh, so live-apply and live-adopt cannot run #2299 - the github and forgejo Op generators emitset -o pipefailinto acontainer:job, whose default shell issh, so live-apply and live-adopt die on line 1 before chant is reached. - a CI checkout has no git identity, so the gate's pending write fails with no error text at all #2301 - a CI checkout has no git identity, so the gate's pending write fails, and the Op dies with no error line and no failing step at all.
- TerraformAdoptOp has no Init phase, so live-adopt fails on every fresh checkout #2302 -
TerraformAdoptOphas no Init phase, so its Ledger step has no provider schema and live-adopt fails on every fresh checkout. - approve then re-run does not close the gate in CI, and
chant approvewithout the ledger ref force-writes the branch, discarding the pending fact #2303 - approve then re-run does not close the gate in CI (the ledger ref is never fetched, so an empty ledger reads as "nothing approved"), andchant approvewithout that ref force-writes the branch, discarding the pending fact. - PrPlanReport's sticky-comment step has the same bare-path gh api bug, so it cannot work off github.com #2305 -
PrPlanReport's sticky-comment step has the same bare-pathgh apibug forgejo: comment and issue finding modes against Forgejo's own API, and the refusal that contradicts the serializer test #2291 fixed for the Op path, so it cannot work off github.com.
The rule
Each item is done when the generated YAML for the consuming project changes and its guards move with it: choudoufu's examples/ci-pipelines regenerates, npm test there stays green, and the property the item is about becomes assertable rather than documented as absent.
Activity
feat(op): a GitLab issues path for reconcilePr's issue mode (#2292) (#…
refactor(gitlab)!: the Op pipeline's stage and file are named "ops", …
lex00 commentedon Sep 9, 2026
Four of the five sub-issues landed on main tonight, in three squash merges, each with the full monorepo suite green and every new assertion tampered red before green.
reconcilePr'sissuemode gets a real GitLab issues path over the same fetch and token resolution gitlab: pull_request and push triggers on the op-pipeline generator, and a merge-request note activity #2268 gave the merge-request note, with a hidden marker so a re-run edits the issue it already owns instead of opening another.ops, notscheduled-ops, both overridable. Breaking for every consumer'sinclude:line.ScheduledOpSpec.variablesputs credentials on the job rather than the workflow, so an Op that needs nothing can hold nothing, and forgejo stops emitting theoutputs:block it kept for a notice job it never generates.#2291 is the one left, and its shape changed. INTENTIUS/choudoufu#1027 ran the generated Forgejo tree against a real Forgejo 12.0.4 and settled the contradiction this epic recorded: the refusal's premise is false.
ghreaches a Forgejo instance when handed a full/api/v1URL, over plain HTTP and over TLS, and inside a jobgithub.api_urlis already the/api/v1base withgithub.tokengood for a 200 on read and a 201 on write. Forgejo's own API takes the GET, POST and PATCH triple a sticky comment needs. So #2291 is a URL prefix plus token resolution, not a client to write. Evidence and the exact calls are in that issue's comment.Two further observations from the same session bear on what a generated Forgejo pipeline can promise, and neither was known before:
concurrency:is inert on Forgejo 12.0.4, so nothing on the forge serialises applies, andGITHUB_STEP_SUMMARYis set by the runner but stored nowhere by the forge, so a gate summary is visible only in the run log.Separately, the consuming project's first real execution found a generator bug that stops two of its five jobs from starting at all, filed as #2299: a container job's default shell is
sh, and the gated-apply step begins withset -o pipefailwith no shell declared. And #2300 asks whether a gate resolution binding nothing about the plan it approved is the intended contract.op(forgejo): lift the comment finding-mode refusal, over a full-URL g…
fix(github,forgejo): declare shell: bash on the gated Op's pipefail s…
fix(github): PrPlanReport's sticky-comment script targets a resolved …
fix(op): a sticky GitHub/GHES/Forgejo issue for reconcilePr and lexic…
fix(terraform): give TerraformAdoptOp the Init phase Apply and Watch …
fix(lifecycle): never read or extend a forked ledger branch (#2301, #…
fix(op): the gate's ledger write survives a CI checkout, and says so …
docs(whats-new): three-forge parity for Op pipelines (#2313)
docs(terraform,github): resync shipped samples with #2299/#2302/#2305 (…
lex00 commentedon Sep 9, 2026
Closing. All eleven children are merged and closed, shipped in chant-v0.62.0.
The two halves
The five original children were settled by reading generated YAML: per-Op
variables(#2290), the Forgejocommentpath over a full-URLgh apicall (#2291), a GitLab path forissuemode (#2292), thescheduled-opstoopsrename (#2293, breaking), and the unconsumedoutputs:block (#2294).The six that followed were found only once
INTENTIUS/choudoufu'sexamples/ci-pipelinesexecuted a job for the first time (#1026, #1027): a gated job that could not start undercontainer:(#2299), an adopt Op with no Init phase (#2302), a gate commit with no committer identity that failed silently (#2301), a ledger branch that was never fetched (#2303), aPrPlanReportcomment that could not work off github.com (#2305), and a GitHub issue path that opened one issue per run (#2297).That split is the finding worth keeping. Every guard on both sides proved what the generated YAML says, so four execution-time failures survived review indefinitely and took one real run to surface.
Two of these were larger than filed
#2301 was not gate-specific. In
runOpLocally's catch,errwas used to build anOpRunFailureand then never referenced again, so any error thrown outside a step's own capture path reached the operator asOp "x" failedand nothing else. The gate is only where someone finally hit it.#2303's fix needed a distinction git does not draw. "Non-fast-forward" covers both a genuinely forked branch and one merely ahead — and "ahead" is the ordinary state after an append whose push has not landed, the state a retry repairs. Refusing it wholesale would have broken that retry, so
fetchLifecycleStatusresolves the remote tip into a scratch ref and asksmerge-base --is-ancestor. The two ledger guards were also collapsed into one, since read and write guards drifting apart is what allowed the bug.Review found what tests did not
#2309 was held back and reviewed adversarially before merge. The review reproduced a critical case end to end:
requireLifecycleLedgerReadableearly-returned whenever a local branch existed, swallowing bothdivergedandunreachable, after which the gate read a forked ledger as authoritative and force-pushed over the remote, destroying approvals. That is the same data-loss class #2303 was filed for, fixed in one path and left reachable in another. It also caught that the identity fix had introduced a regression: what previously died oncommit-treenow fabricated a root ledger branch in CI, which was the exact state the critical bug fed on.A second review of the four already-merged PRs found six further defects, none blocking, filed as #2319, #2320 and #2321.
Follow-ups
#2310, #2319, #2320, #2321, and #2315 (forgejo's
issuemode remains un-refused and unverified against a real instance — deliberately scoped out of #2291 rather than assumed working).Also worth noting: no repo-enforced guard ties the Op docs' YAML samples to generator output, which is why #2322 had to resync them by hand after #2299 and #2302 landed. #2318 covers the general shape of that gap.