Building a CI harness with Mastra
StarSling's CI Harness v2 reworked the agent loop and the surrounding orchestration to turn a bottlenecked pipeline into a high-throughput system that cut end-to-end time by 5.4×. This workshop breaks down the concrete design and instrumentation choices that delivered that improvement so you can apply the same principles to your own CI and agent-run systems.
In this workshop, we use StarSling's CI Harness v2 as a case study. You'll see the agent-loop redesign, the profiling and metrics that revealed the real bottlenecks, and the practical changes—batching, scheduling, caching, and backpressure—that produced the 5.4× speedup. We'll walk through the code and the benchmark scripts so you can reproduce the results.
We'll cover:
-
Agent-loop architecture and control flow: how work is fetched, scheduled, and acknowledged.
-
Parallelism and batching strategies that raise throughput without increasing flakiness.
-
Instrumentation and profiling: the metrics that identified where to invest effort.
-
Caching, state management, and avoiding redundant computation.
-
Backpressure and failure handling for predictable scaling.
-
Reproducing and measuring the 5.4× speedup: benchmarks, test harnesses, and pitfalls to watch for.
Join us for a live walkthrough of the implementation, the performance data, and a short demo of the benchmark harness. Bring questions—you'll be able to ask the engineers who built the system about tradeoffs and how to adapt the approach to your pipeline.
