Inspiration## Inspiration
AI agents now edit CI pipelines, but nobody asks what a pipeline costs in compute and energy. A "harmless" change that runs a job three times or drops a cache silently makes every future run more expensive. We wanted a pipeline that measures itself and blocks changes that make it worse, the way a failing test blocks a bad merge.
What it does
Axiom for CI/CD wraps each CI step, measures wall time and CPU time, estimates energy and carbon with the Software Carbon Intensity (SCI) formula, and compares every merge request with the default branch. If the estimated footprint grows past a tolerance, a budget gate fails the pipeline. A report is posted on the merge request with the avoidable work it found: jobs that ran although their files did not change, the same command run in several jobs, and missing dependency caches.
Autonomy level: Supervised. The gate blocks, a human approves the fix.
Two GitLab Duo custom flows are included in .gitlab/duo/flows/: an Axiom Reviewer (read-only) that explains the waste, and an Axiom Remediator that edits .gitlab-ci.yml under guardrails in AGENTS.md and CODEOWNERS (it may not loosen the budget, change Axiom's code, or weaken tests). A cheapest-passing-model cascade can also fix failing tests: try the cheapest model first, run the project's own tests, escalate only if they fail.
How we built it
Python standard library only, no dependencies. GitLab CI/CD stages: test, fix, report, gate, deploy. The gate compares against a baseline artifact from the default branch, with a percentage tolerance (15%) and an absolute noise floor. The report is posted to the merge request through the GitLab API. SAST and Secret Detection are enabled, and a report is published on GitLab Pages. 72 automated tests cover the engine.
Challenges we ran into
- Our demo project is tiny, so the first regression (+4.07 mg) fell below the default 5 mg noise floor and the gate passed. We lowered the floor to 2 mg through a CI/CD variable for this small demo, and the gate then failed as intended.
- GitLab Free has no project access tokens, so we used a personal token for the merge request comments.
- Our group had no GitLab Credits during the hackathon, so the Duo flows could not be created or run live.
Accomplishments that we're proud of
A real merge request raised the estimated footprint from 5.33 to 9.40 mgCO2e per pipeline run (+76%). Axiom commented the findings and the gate failed. Restoring the cache and path rules made the gate pass. The pipeline history keeps all three: baseline, failure and fix. The fix pipeline (0.37 mg) is small only because unchanged jobs were skipped, so we do not present it as a savings number.
What we learned
Run time and CPU time are measured. Energy, carbon and savings are estimates, so every report prints its assumptions. A gate for small projects needs a noise floor, and a measuring tool must be honest about what it did not measure.
What's next for Axiom for CI/CD
Run the Duo flows live once credits are available, calibrate energy estimates against real runner power data, and replay the gate on real project histories.
What it does
How I built it
Challenges I ran into
Accomplishments that I'm proud of
What I learned
What's next for Axiom for CI/CD
Built With
- gitlab
- gitlab-ci/cd
- gitlab-duo-agent-platform
- python
- sast
- secret-detection
Log in or sign up for Devpost to join the conversation.