Skip to content

epic: three-forge parity for Op pipelines - per-Op credentials, posting modes, and the stage name #2289

Closed

Description

@lex00

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

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.

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.

Refs INTENTIUS/choudoufu#807, INTENTIUS/choudoufu#1018.

Activity

  1. lex00 commented on Sep 9, 2026

    @lex00
    ContributorAuthor

    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.

    #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. gh reaches a Forgejo instance when handed a full /api/v1 URL, over plain HTTP and over TLS, and inside a job github.api_url is already the /api/v1 base with github.token good 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, and GITHUB_STEP_SUMMARY is 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 with set -o pipefail with no shell declared. And #2300 asks whether a gate resolution binding nothing about the plan it approved is the intended contract.

  2. lex00 commented on Sep 9, 2026

    @lex00
    ContributorAuthor

    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 Forgejo comment path over a full-URL gh api call (#2291), a GitLab path for issue mode (#2292), the scheduled-ops to ops rename (#2293, breaking), and the unconsumed outputs: block (#2294).

    The six that followed were found only once INTENTIUS/choudoufu's examples/ci-pipelines executed a job for the first time (#1026, #1027): a gated job that could not start under container: (#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), a PrPlanReport comment 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, err was used to build an OpRunFailure and then never referenced again, so any error thrown outside a step's own capture path reached the operator as Op "x" failed and 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 fetchLifecycleStatus resolves the remote tip into a scratch ref and asks merge-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: requireLifecycleLedgerReadable early-returned whenever a local branch existed, swallowing both diverged and unreachable, 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 on commit-tree now 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 issue mode 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions