<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/scale-ci-for-agent-prs-test-slicing-impact-analysis-in-actions-mqiygoijk" -->

---
title: Scale CI for Agent PRs: Test Slicing & Impact Analysis...
description: A detailed technical guide addresses CI saturation caused by high-frequency pull requests from coding agents like Copilot Workspace, Devin, and SWE-Agent. It...
canonical: https://daily.dev/posts/scale-ci-for-agent-prs-test-slicing-impact-analysis-in-actions-mqiygoijk
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Scale CI for Agent PRs: Test Slicing & Impact Analysis in Actions | daily.dev
og:description: A detailed technical guide addresses CI saturation caused by high-frequency pull requests from coding agents like Copilot Workspace, Devin, and SWE-Agent. It...
og:url: https://daily.dev/posts/scale-ci-for-agent-prs-test-slicing-impact-analysis-in-actions-mqiygoijk
og:image: https://api.daily.dev/og/posts/MQIYGoiJk.png
og:image:alt: Scale CI for Agent PRs: Test Slicing & Impact Analysis in Actions
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Scale CI for Agent PRs: Test Slicing & Impact Analysis in Actions

**[SitePoint](https://daily.dev/sources/sitepoint)** · 21 min read · 1 upvotes · 0 comments

## Summary

A detailed technical guide addresses CI saturation caused by high-frequency pull requests from coding agents like Copilot Workspace, Devin, and SWE-Agent. It presents a two-part solution: a TypeScript CLI using ts-morph to perform AST-level change-impact analysis, and a speculative test-slicing GitHub Actions workflow that runs only the predicted minimal test set as a blocking check while a full-suite verification runs asynchronously. Includes full code for the CLI, workflow YAML, caching strategy, and benchmark results showing an 81% reduction in CI duration and runner cost on a 500-file monorepo.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.sitepoint.com/optimize-github-actions-agent-prs-test-slicing>

## Questions this post answers

### How can I reduce GitHub Actions CI costs when coding agents like Devin or Copilot Workspace open dozens of PRs a day?

Use AST-based change-impact analysis to run only the tests affected by a diff instead of the full suite. A TypeScript CLI built with ts-morph extracts changed exported symbols, resolves the reverse dependency graph via findReferencesAsNodes, and maps impacted files to their tests, while a full-suite job runs non-blocking in the background as verification.

_daily.dev surfaces practical CI cost-cutting techniques for teams scaling agent-driven pull request workflows._

### What false-negative rate should I target when using speculative test slicing instead of running the full test suite?

Aim for a false-negative rate below 2%, meaning fewer than 2 in 100 agent pull requests should show a speculative test pass followed by a full-suite failure. Validate this by comparing the speculative slice's pass/fail outcome against the deferred full-suite result over a two-week observation window before relying on the slice as the sole merge gate.

_engineers tuning CI safety margins can track validation approaches like this on daily.dev._

### Why is ts-morph preferred over Babel's parser for TypeScript AST change-impact analysis?

ts-morph wraps the TypeScript compiler API with type-checker integration, enabling cross-file resolution of type aliases, interface hierarchies, and const enum values transitively. Babel's parser handles TypeScript syntax but performs no cross-file type resolution, reducing reference-resolution depth, making it a weaker fit for accurate reverse dependency graphs in TypeScript-heavy codebases.

_daily.dev helps developers comparing AST tooling choices for TypeScript-heavy CI pipelines stay informed._

## Similar posts on daily.dev

- [AI coding has made CI a bottleneck, so we reworked ours to keep up](https://daily.dev/posts/ai-coding-has-made-ci-a-bottleneck-so-we-reworked-ours-to-keep-up-xaq5plq9r) · Linear · 13 upvotes · 4 comments
- [Build Automated PR Verification Gates for AI Code](https://daily.dev/posts/build-automated-pr-verification-gates-for-ai-code-lrynfep5j) · SitePoint · 0 upvotes · 0 comments
- [Frontend CI/CD in the age of AI -- Part 1](https://daily.dev/posts/frontend-ci-cd-in-the-age-of-ai----part-1-fjsyj336m) · Neciu Dan · 16 upvotes · 0 comments
- [How we used Agentic Pipelines to turn test coverage into a daily habit](https://daily.dev/posts/how-we-used-agentic-pipelines-to-turn-test-coverage-into-a-daily-habit-sigbxqcmx) · Atlassian · 0 upvotes · 0 comments

---

Tags: [#testing](https://daily.dev/tags/testing), [#typescript](https://daily.dev/tags/typescript), [#cicd](https://daily.dev/tags/cicd), [#github-actions](https://daily.dev/tags/github-actions)

[View this post on daily.dev](https://daily.dev/posts/scale-ci-for-agent-prs-test-slicing-impact-analysis-in-actions-mqiygoijk)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Scale CI for Agent PRs: Test Slicing \u0026 Impact Analysis in Actions","url":"https://daily.dev/posts/scale-ci-for-agent-prs-test-slicing-impact-analysis-in-actions-mqiygoijk","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/scale-ci-for-agent-prs-test-slicing-impact-analysis-in-actions-mqiygoijk"},"datePublished":"2026-09-22T15:39:31.250Z","dateModified":"2026-09-22T15:39:55.869Z","description":"A detailed technical guide addresses CI saturation caused by high-frequency pull requests from coding agents like Copilot Workspace, Devin, and SWE-Agent. It...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/9c09642d680263c285be39be7841e728?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/9c09642d680263c285be39be7841e728?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"SitePoint","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"SitePoint","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/sitepoint","url":"https://daily.dev/sources/sitepoint"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/scale-ci-for-agent-prs-test-slicing-impact-analysis-in-actions-mqiygoijk","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"testing,typescript,cicd,github-actions","timeRequired":"PT21M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"SitePoint","item":"https://daily.dev/sources/sitepoint"},{"@type":"ListItem","position":3,"name":"Scale CI for Agent PRs: Test Slicing \u0026 Impact Analysis in Actions"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/scale-ci-for-agent-prs-test-slicing-impact-analysis-in-actions-mqiygoijk#faq","mainEntity":[{"@type":"Question","name":"How can I reduce GitHub Actions CI costs when coding agents like Devin or Copilot Workspace open dozens of PRs a day?","acceptedAnswer":{"@type":"Answer","text":"Use AST-based change-impact analysis to run only the tests affected by a diff instead of the full suite. A TypeScript CLI built with ts-morph extracts changed exported symbols, resolves the reverse dependency graph via findReferencesAsNodes, and maps impacted files to their tests, while a full-suite job runs non-blocking in the background as verification. daily.dev surfaces practical CI cost-cutting techniques for teams scaling agent-driven pull request workflows."}},{"@type":"Question","name":"What false-negative rate should I target when using speculative test slicing instead of running the full test suite?","acceptedAnswer":{"@type":"Answer","text":"Aim for a false-negative rate below 2%, meaning fewer than 2 in 100 agent pull requests should show a speculative test pass followed by a full-suite failure. Validate this by comparing the speculative slice's pass/fail outcome against the deferred full-suite result over a two-week observation window before relying on the slice as the sole merge gate. engineers tuning CI safety margins can track validation approaches like this on daily.dev."}},{"@type":"Question","name":"Why is ts-morph preferred over Babel's parser for TypeScript AST change-impact analysis?","acceptedAnswer":{"@type":"Answer","text":"ts-morph wraps the TypeScript compiler API with type-checker integration, enabling cross-file resolution of type aliases, interface hierarchies, and const enum values transitively. Babel's parser handles TypeScript syntax but performs no cross-file type resolution, reducing reference-resolution depth, making it a weaker fit for accurate reverse dependency graphs in TypeScript-heavy codebases. daily.dev helps developers comparing AST tooling choices for TypeScript-heavy CI pipelines stay informed."}}]}
```

