Planning to use CodeFloe w/ agentic workflows - tips for keeping load on infra reasonable?

See title. I’ve been using a combination of Codeberg and GitHub so far. I’d like to support small tech & non-US tech, so I’d like to move off of GitHub. But Codeberg disallows AI projects. I’ve found myself embracing AI tools like Claude and agents in general, so I’m planning to use them for future projects. But Codeberg raised a good point in their blog post (Protecting our FLOSS commons from LLMs — Codeberg News). The load on infra can be super high.

So how should we use CodeFloe if we’re going to use AI to keep load on its infra reasonable? Any guidance here?

What exactly is the nature of that overload? One of many things I disliked about that Codeberg article (and one of many reasons I moved from there) is that it is quite nebulous about the nature of overload and it paints like an inevitable result of using AI. If they were more detailed about their issues, it would be quickly visible that their post is just a politically motivated hysteria, because they could just identify problems and put rules around those problems. They choose to make an outrage instead (and on the way offended 90% of all FLOSS maintainers as insignificant).

  1. So far, we haven’t given the rule completely to our AI overlords, those agents just do what you tell them to do. If you say to it that it should make a commit on every press of ENTER and by the way run that complete rebuild of 200M LoC of C++ (or Golang) code with it, it will absolutely do it. And it is not AI fault, it is yours.
  2. If you really really want to do something like that, rent a compute (I have my own build machine with Hetzner) and use ByoB (bring your own build machine) forgejo_runner CI.
1 Like

@mattwelke First, it’s very kind to ask this, not many people care for that!

(First I wanna point out that the following opinions are my own and do not represent CF as a project)

So articles like the CB one (and others which bring these up) always suffer from a few problems:

  • They are unspecific in what “load” really means here and what actions (at scale) really harm them or are considered harmful in general
  • Them being written by people who don’t wanna use AI - or never have - and hence might objectively lack the insights how AI really operates under the hood
  • Them being annoyed by additional infra work on their end to adapt in any kind of way to the LLM area, being it to block something entirely or to “adapt” to the new reality

@mcepl has already raised a few good and important points about the topic.
There are a few shades to the use of AI in general, i.e. whether it’s about active personal use of model for inference (i.e. individuals trying to generate code) or activities being used for model training.

For the former, if one interacts on a repo with AI as a developer, they usually check out the repo once and then use the local checkout for the active work. This is usually concluded by a PR in which the model (usually) puts more information than needed.
In this work, the interaction with the platform is rather low and AI might even use less requests than a human who would develop this feature and needs to browse the codebase or the issue tracker multiple times until the required information is found.

The same goes for replying to comments, doing reviews, etc. Overall, AI only does remote requests if it needs a fresh update of the current state or needs to check anything otherwise (e.g. new releases). In summary, this should be less requests in total than a human who would do the same work. Of course, a human would take much longer, so the requests would be spread across a longer time period.

The point(s) where AI is certainly causing more load are tests and CI. AI is writing much more tests and hence the code base grows a lot over time and there are more tests being run in CI.
The tests might again do interactive checks or queries or downloads within them, leading to additional requests. In former times, those tests simply did not exists as nobody wrote them (humans are lazy) or they were too complicated.

The areas that are affected here are storage and compute. Storing unnecessary details in PR descriptions and/or uploading the plan documents from AI bloats the repo. Once it, the commit exists forever and will be carried forward. Deleting it later will trim the repo a bit but the actions to create and delete still exist.

For CF as a platform, this means the following: CICD, resp. compute time, must be limited and billed, as otherwise it will just explode both in usage and cost.
Tests are important but users should then either run them on hardware of theirs (i.e. own runners) or value the time spent on hosted hardware and pay for the usage. That’s somewhat easy to control on the platform level with limits and the overall available resources.

Storage is the other point. The more commits, the more PRs, the larger the repository size and DB grows. Every action is eventually a DB transaction.
Users can be wary here by

  • using squash merges instead of rebase merging commits (which carries along all indiv commits of a PR).
  • Ensuring that no plan documents or other unneeded one-time assets are committed to the main branch (or even PR branch)
  • Ensuring that dependency updates via renovate & friends don’t bump every individual dependency daily but only every few weeks (critical CVEs are usually raised anyhow out of schedule)

These bring down both the commit count and the amount and size of stored files. This really makes a difference for a platform, especially if many people adhere to these basic approaches.

Overall though, platforms like CF do exist to help with building! That means, they exist for that and try to optimize the handling of user interactions and the storage of a lot (and frequent) code contributions. CF wants to help building new tools and serve as the main interaction layer for devs.
If the underlying hardware and the configuration of the platform is “good”, there is a lot of headroom and users shouldn’t need to worry about their individual usage, at least not until they’ve reached the free limits.
And even beyond that, higher usage can be handled by compensating for it financially, which means nothing else that the platform can afford more resources (=hardware) for the required load.

At this point I haven’t commented on the first point of AI, i.e. the training. This is what actually matters a load more in terms of “load” if one does not restrict it. And this is what CF actually does. Without it, the site wouldn’t be snappy but drowning under multiple hundreds of requests per second from bots scanning repos for every individual commit.
CF does not do this to prevent AI but we also don’t allow “unlimited” or “ungraceful” use of it. Neither do we use any kind of existing data for internal training or similar. AFAIK GH does do both and hence also has a lot higher load therefore (aside from the “normal” Git operations load they have).

To give some insights for the load we currently have: CF as a platform has around 50 requests per second. HAProxy can easily take 100k+ per second.
The problem is not the proxy here but how much the underlying Git server can then take in terms of Git requests - and adjacent DB requests (not every request is directly a Git request). Also it differs whether such one can be answered from existing cache or needs a full query deep down in the cold archive).

So all in all, there’s a lot to say about this topic and it’s not so “easy” to state that AI is causing a lot of “bad” load on a platform no matter what. I would even go so far to say that normal websites or other non-optimized public web content is way more “harmed” than developer platforms (as these ideally have limits in place, use caching and filter for authenticated/unauthenticated traffic).

2 Likes

Thank you for these details. I too, was concerned with exactly what @mattwelke raised so this is helpful to know.

I don’t disagree, just to emphasise: I absolutely do not say that it is easy, and we really need to have this discussion and CF people should absolutely put up some rules about how much people can use for free (because that’s basically it, right? If every second of CI compute and every byte of storage was paid by users, we wouldn’t have this discussion), but such discussion is doable.

Also, I understand the relationship between AI and hammering CF servers by scrapping robots, but it is technically not part of this discussion right? It is not done by CF users (or if they do it, they could be immediately terminated as users), and even if CF didn’t have one user (but still data stored on servers), then all those bots would be as relentless as they are now.

Sorry, it took me a while to come back to this.

I want to add some context to help folks understand where I’m coming from.

In the past, my development flow would be to set up CI/CD workflows that, in response to a pull request being opened, or a commit being pushed to a branch with an open pull request, would build a candidate build of my app and deploy it to a testing environment. This was usually something I would set up when I reached a team size of 2+. Before that, it made more sense to just do things on my computer and merge things into main and prepare a versioned build when I reached a certain milestone. And that usually happened once every few days.

But with AI workflows, at least the way I’ve used them, two things seem to have changed:

  1. I’m reaching these milestones much quicker. Usually multiple times each day.
  2. I’m using the CI/CD workflows that I would traditionally use to help me work with team members to help me work across my devices.

Here’s a concrete example of #2. This is something I’ve been doing for the past few weeks.

I’m building an Android app. When I finish having AI make a commit, I need to test it. That’s because I have very little Android dev experience. I’m mostly “vibe coding” it I guess. So I only feel comfortable shipping a milestone when I have tested it myself, on my Samsung phone, while I’m out and about (it uses geolocation features).

So my workflow involved building an Android APK from some computer, when the agent had finished making a change, and serving it from that computer via HTTP for me to download onto my phone and install.

If I were doing this using the CodeFloe equivalent of a GitHub Actions workflow and GitHub Packages, I think that would end up putting some stress on CodeFloe’s infra. Producing an Android build uses a lot of CPU etc.

Luckily, I think I’ve developed a workflow now where this won’t become an issue though. I have a cloud VPS that I have my agent harnesses and agent orchestrator installed on (I use Claude Code, OpenCode, and T3 Code). And it was that computer producing these builds. And the VPS didn’t even have to commit and push to the Git remote in order for me to iterate with it. It just built and served APKs til I reached a milestone. So it’s not like I was making frequent requests to CodeFloe for Git operations either.

My plan going forward is to think like this. I can have my own compute infra do the heavy lifting.