Status: Accepted · 2026-09-08 · updated 2026-10-25
Most teams run marginal in GitHub Actions, on every pull request. Something has
to install marginal, pass it the GitHub token and the model key, and run
marginal review --comment. That's exactml/marginal-action. GitHub supports
three kinds of action: composite (a list of steps), Docker, and JavaScript.
exactml/marginal-action is a composite action (runs.using: composite):
it sets up Python, runs pip install marginal-review, and calls the CLI.
| Option | Pros | Cons |
|---|---|---|
| Composite action (chosen) | Starts fast: no image to build or pull on each run. Works on any GitHub-hosted runner OS, not only Linux. Nothing extra to build, publish, or version beyond the action's own tags. | Less reproducible: the runner's Python and pip aren't pinned the way an image would pin them. |
| Docker action | Fully pinned environment, the same on every run. | Slower start on every PR. Linux runners only. A separate image to build, publish and version. Isolates nothing that marginal needs, since it's pure Python with no system dependencies. |
| JavaScript action | Fastest start, native to Actions. | marginal is Python, so it would still need to install Python and the package, just with extra wrapper code. |
- The action's tags (
v1,v1.1.2, …) version the wiring.marginal-reviewis versioned separately on PyPI, and the action installs the latest by default. - Revisit this if marginal ever needs a system dependency that
pipcan't install. - The test repo deliberately doesn't use this action. It installs from git instead, so unreleased branches can be tested (see ADR 0007).