🌱 GitSustain — Smarter Releases. Greener Software. AI-Powered Governance.

Inspiration

Software development has become faster than ever, especially with the rise of AI-assisted coding. However, while organizations focus heavily on code quality, security, and deployment speed, one important question is often overlooked:

What is the environmental cost of releasing software?

Every unnecessary build, repeated test execution, redundant container rebuild, and poorly timed deployment consumes computing resources.

Traditional CI/CD pipelines prioritize whether software can be released. We wanted to introduce another consideration:

Should this release happen now, and can it be delivered with less computational waste?

This inspired us to build GitSustain, a sustainability-aware, AI-assisted release governance system that integrates environmental considerations into GitLab's DevSecOps lifecycle.

Our objective was not to replace CI/CD pipelines but to make them more intelligent, resource-conscious, and accountable.


What It Does

GitSustain evaluates software changes and recommends the most responsible release strategy by considering:

  • Change intent and release risk
  • Code quality and testing requirements
  • Security and governance policies
  • Estimated computational impact
  • Container rebuild and cache-reuse opportunities
  • Deployment timing and carbon-window conditions
  • Cloud infrastructure resource configurations
  • Human approval requirements

Instead of automatically approving every technically successful release, GitSustain generates recommendations such as:

Decision Meaning
APPROVE Release meets the evaluated policies.
APPROVE_WITH_CONDITIONS Release may proceed after applying recommended conditions.
DEFER Postpone the release because of sustainability constraints or deployment conditions.
BLOCK Release fails a required quality or security policy.
REQUIRE_HUMAN_REVIEW Human authorization is required before proceeding.

GitSustain follows a supervised autonomy model, ensuring that important release decisions remain under human control.


How We Built It

1. Multi-Agent Release Intelligence

We designed GitSustain around four specialized agents.

Planning Agent

Analyzes software changes, identifies release risks, and generates structured release plans.

Quality Agent

Evaluates change impact and recommends an appropriate testing strategy, including targeted or full test execution.

Deployment Agent

Evaluates deployment sustainability, resource requirements, deployment urgency, and carbon-window conditions.

Governance Agent

Enforces quality, security, and sustainability policies and produces the final supervised release recommendation.

Together, these agents coordinate release decisions rather than treating sustainability as an isolated metric.

2. GitLab Duo and DevSecOps Integration

GitSustain integrates its agent-based decision workflow with GitLab's development and release processes.

We implemented a GitLab CI/CD pipeline organized around all nine DevSecOps lifecycle stages:

  1. Plan: Analyze release intent and generate a release plan.
  2. Create: Validate Python source code.
  3. Verify: Execute automated tests and evaluate quality strategy.
  4. Package: Provide a manual packaging stage for the MVP.
  5. Secure: Validate installed dependency consistency and apply security governance inputs.
  6. Release: Prepare release-readiness information.
  7. Configure: Execute baseline configuration validation.
  8. Monitor: Execute baseline monitoring-stage checks.
  9. Govern: Run the complete supervised release-decision flow.

Some stages currently provide baseline checks or decision support rather than full production automation.

This architecture demonstrates how sustainability governance can be incorporated across a broader DevSecOps workflow.

We also validated GitSustain against a real GitLab merge request involving documentation changes.

The system generated an APPROVE_WITH_CONDITIONS recommendation, demonstrating context-aware release decision-making.

3. Sustainability Scoring Engine

A major innovation in GitSustain is its normalized compute-impact scoring model.

Rather than relying on arbitrary approval rules, we developed a transparent scoring framework.

Operation Compute-impact score
Full testing 70
Targeted testing 40
Container rebuild required +20
Safe cache reuse −10
Default sustainability budget 75

The estimated compute-impact score is calculated as:

$$ S = T + R - C $$

Where:

  • (S) = Estimated compute-impact score
  • (T) = Testing strategy score
  • (R) = Additional rebuild impact
  • (C) = Cache-reuse benefit

The final score is bounded below by zero.

If the estimated score exceeds the configured sustainability budget, GitSustain recommends deferring the release.

These values are normalized relative compute-impact estimates, not measurements of electricity consumption or CO₂ emissions.

This distinction allows the prototype to demonstrate sustainability-aware governance without making unsupported claims about actual carbon reductions.

4. Carbon-Aware Deployment Decisions

GitSustain considers deployment urgency and manually supplied carbon-window conditions.

For example, when the current deployment window is environmentally unfavourable and a release is non-urgent, GitSustain can recommend:

DEFER

This encourages teams to consider whether resource-intensive release activities can safely be postponed.

For the MVP, carbon-window conditions are manually configured. Integrating live carbon-intensity data is a planned future enhancement.

5. Google Cloud Run Integration

We deployed GitSustain to Google Cloud Run, providing a hosted environment for the application and its interactive dashboard.

Live application:

https://gitsustain-416665641690.asia-south1.run.app

We also implemented automatic infrastructure resource discovery using the Google Cloud Run API.

The integration successfully retrieved the deployed service's configuration:

Cloud Run resource Detected value
CPU 1 vCPU
Memory 512 MiB
Maximum instances 20
Request concurrency 80
Resource classification SMALL

This information provides infrastructure context for deployment decisions.

If Cloud Run resource discovery is unavailable, GitSustain handles the failure gracefully instead of interrupting its core release-decision workflow.

The API integration has been validated locally; production-side automatic discovery remains a separate verification step.

6. Interactive Dashboard

We developed an interactive GitSustain dashboard to make the release-governance system easier to demonstrate and understand.

The dashboard provides a user-facing interface for exploring release decisions and sustainability information.

Our goal was to make governance recommendations understandable rather than hiding them inside CI/CD logs.


Challenges We Faced

Challenge 1: Balancing Automation With Human Oversight

A fully autonomous deployment system can introduce significant risks, especially when dealing with high-impact changes.

We addressed this through supervised autonomy.

GitSustain can recommend release actions while requiring human review for selected decisions.

Challenge 2: Making Sustainability Measurable Without Misleading Claims

Accurately measuring software-related carbon emissions requires infrastructure telemetry, workload information, energy consumption, and regional electricity data.

We did not want to present arbitrary scores as real emissions measurements.

Instead, we implemented a transparent, normalized compute-impact scoring model that could be evaluated and tested consistently.

Challenge 3: Integrating Google Cloud Resource Discovery

Our initial implementation relied on Google Cloud CLI commands that worked locally on Windows but were unsuitable for a Linux-based cloud deployment.

We replaced this dependency with the Google Cloud Run Python SDK.

We also encountered authentication and permission issues while accessing the deployed Cloud Run service.

After isolating the appropriate Google Cloud credentials, we successfully retrieved its resource configuration programmatically.

Challenge 4: Managing Dependencies Across GitLab CI/CD Jobs

One of our GitLab pipelines initially failed because the Governance stage could not import the Google Cloud SDK.

The application worked locally, but GitLab CI jobs executed in independent Python environments.

We corrected the Governance job to install dependencies from requirements.txt before executing the release-decision workflow.

The updated pipeline completed successfully.

Successful pipeline: #2989897309

Final verified pipeline commit: d9abf630

Challenge 5: Preserving Existing Functionality

As GitSustain evolved, maintaining stable release decisions was important.

We validated multiple scenarios and maintained a regression test suite.

Our latest local verification completed successfully:

25 tests passed.


Accomplishments We're Proud Of

We successfully developed and validated:

  • A working multi-agent release-decision architecture.
  • GitLab Duo-assisted, supervised release-governance workflows.
  • A GitLab CI/CD pipeline structured across nine DevSecOps stages.
  • Sustainability-budget enforcement.
  • Carbon-window-aware deployment recommendations.
  • Context-aware analysis of a real GitLab merge request.
  • Human-in-the-loop release governance.
  • Automatic Google Cloud Run resource discovery.
  • A deployed interactive application.
  • 25 passing automated tests.
  • A successful GitLab CI/CD pipeline demonstrating the release workflow.

Most importantly, we demonstrated that sustainability can be treated as a release-governance constraint rather than merely a dashboard metric.


What We Learned

Building GitSustain reinforced several important lessons.

1. Sustainability should influence decisions early.

Environmental considerations become more useful when they influence testing, packaging, and deployment strategies before resources are consumed.

2. AI agents work best with clearly defined responsibilities.

Separating planning, quality, deployment, and governance concerns made the system easier to understand, test, and extend.

3. Human oversight remains essential.

Not every technically valid release should proceed automatically. Governance systems must account for risk, urgency, and organizational policy.

4. Cloud infrastructure context improves release intelligence.

Knowing actual CPU, memory, and scaling configurations provides useful context when evaluating deployment choices.

5. Reliable CI/CD automation requires environment-independent execution.

A successful local test does not guarantee success in a clean GitLab CI environment. Dependency management, authentication, and graceful failure handling are essential.


What's Next for GitSustain?

GitSustain provides a foundation for more advanced sustainability-aware DevSecOps automation.

Future enhancements could include:

  • Integration with live regional carbon-intensity APIs.
  • Real energy-consumption and emissions measurements.
  • Historical sustainability analytics and reporting.
  • Deeper GitLab security-scanning integration.
  • Automated selection of lower-impact deployment windows.
  • More advanced container build optimization.
  • Resource-aware deployment recommendations based on real workload telemetry.
  • Expanded policy enforcement across the complete delivery lifecycle.

Our long-term vision is to make sustainability a standard dimension of software delivery alongside speed, quality, security, and reliability.


Built With

GitLab, GitLab Duo, GitLab CI/CD, Python, FastAPI, Pytest, Docker, Google Cloud Run, Google Cloud Run API, and Git.


Final Thoughts

GitSustain demonstrates a different way of thinking about software delivery.

Traditional DevSecOps asks:

Can we release this software safely?

GitSustain adds another important question:

Can we release it responsibly, with less unnecessary computational impact?

By combining AI-assisted decision-making, sustainability policies, cloud infrastructure awareness, and supervised governance, GitSustain demonstrates how the future of DevSecOps can become both smarter and more sustainable.

GitSustain — Smarter Releases. Greener Software. AI-Powered Governance.

Built With

  • ai-agents
  • cloud-computing
  • devsecops
  • docker
  • fastapi
  • git
  • gitlab
  • gitlab-ci-cd
  • gitlabduo
  • google-cloud
  • google-cloud-run
  • multi-agent-systems
  • pytest
  • python
  • sustainability
Share this project:

Updates

Submission history