<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by reach2piyushv on Medium]]></title>
        <description><![CDATA[Stories by reach2piyushv on Medium]]></description>
        <link>https://medium.com/@reach2piyushv?source=rss-29548583c09e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*6NCoXFTx-42sINGT</url>
            <title>Stories by reach2piyushv on Medium</title>
            <link>https://medium.com/@reach2piyushv?source=rss-29548583c09e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 03:06:30 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@reach2piyushv/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The Verification Gap: Testing AI-Generated Code at Agent Speed]]></title>
            <link>https://medium.com/@reach2piyushv/the-verification-gap-testing-ai-generated-code-at-agent-speed-e836cf9b7f84?source=rss-29548583c09e------2</link>
            <guid isPermaLink="false">https://medium.com/p/e836cf9b7f84</guid>
            <category><![CDATA[multi-agent-systems]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[reach2piyushv]]></dc:creator>
            <pubDate>Mon, 19 Oct 2026 07:57:41 GMT</pubDate>
            <atom:updated>2026-10-31T00:31:16.185Z</atom:updated>
            <content:encoded><![CDATA[<p>Non-members can read blog <a href="https://medium.com/@reach2piyushv/the-verification-gap-testing-ai-generated-code-at-agent-speed-e836cf9b7f84?source=friends_link&amp;sk=f506d6e6cc71f0e1d201b8dc99e7f62a">here</a></p><p>The Tech Industry has been going through a major transformation on adopting Agentic AI in SDLC and turning ADLC as common nomenclature how do we ship software code in production environment.</p><p>ADLC has spun-up an interesting debate about the sheer volume of code being generated by Agents , resulting as writing code is cheaper than reading it, causing first challenge at hand , how do you trust &amp; review Code PR (pull requests) , though there are some developments where AI-Agents acting as reviewers (LLM as judge approach) with keeping human in loop for final authority.</p><p>This post is about second problem, <strong><em>how do you test and validate ADLC generated code before shipping it to production environments? </em></strong>Unless you&#39;ve similar fleet of Agents for writing test code that can provide sufficient code coverage for integration tests as unit tests.</p><p>From Jack Clark’s <a href="https://jack-clark.net/2026/05/26/import-ai-458-reckoning-with-the-future-and-a-singularity-story/">blog </a>“<em>As a consequence, more effort is going into tools for scaling up the amount of Claude-generated code we can confidently </em><strong><em>ingest and test</em></strong><em>…The more we add AI automation, the more humans move to some “</em><strong><em>verification layer</em></strong><em>” that sits atop it. The verification layer sits atop of a much larger “virtual organization” which consists of increasingly large quantities of AI systems working on behalf of humans.”</em></p><p>Jack Clark is Co-Founder and Head of Policy of Anthropic. I agree what Jack stated eventually focus will shift to verification layer including human and AI Agents validating AI generated code.</p><p>That might sound like a solved problem. Traditionally you write API integration tests, so why not ask Claude, or another agent, to write them? At first glance, the answer is yes. Dig further, though, and a different set of problems appears. The key is to build an Agentic Test Engineering harness around the agents.</p><p>Challenges that I see dealing with current approach of API integration tests for code coverage of AI generated code is 2 fold</p><ol><li><strong><em>Cost &amp; Domain expertise</em></strong>: There is huge cost involved writing manual API integration tests, that requires domain expertise as well time/effort that would be costly how rapid code is being generated by AI agents , along with domain expertise is subjective as Developer who is writing code may have good understanding of <strong>component </strong>being touched versus <strong>integration touch points</strong> and that affects your quality of code getting shipped to production.</li><li><strong><em>Missing context of existing code and test knowledge:</em></strong> AI Agents can write test code given a code snippet or component class files getting modified, though it may miss context around other code repos where integration touch points may affect (e.g upstream/downstream application dependencies )</li></ol><p>With the problem framed, how do we solve it? and answer is by building a <strong>multi-agentic workflow</strong> integrated to CI/CD (GitHub in this case) pipeline to <strong>generate integration test coverage using application code context</strong> (including application <strong>upstream/downstream dependencies context</strong> and <strong>existing integration api test coverage context</strong>).</p><p>Lets understand workflow bit deeper (depicted as in 1.1 diagram below)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4F8Lkx0-ytHyrpz7y0f9gg.png" /><figcaption>1.1 Component work-flow diagram for Agentic Test generation flow</figcaption></figure><ul><li>A <strong>Master / Orchestrator agent</strong> that owns the workflow, spins off the subagents and <strong>orchestrators workflow</strong> among PR Reviewer, Test Knowledge and Test Generator Agent</li><li>A <strong>PR Reviewer agent</strong>, spun off by the master, that reads the diff against <strong>pre-built context for that repository</strong> (and other repo context based of upstream/downstream dependencies) produces a structured understanding of what changed in PR and why it matters</li><li>A <strong>Test Knowledge agent</strong> that holds <strong>context on the existing test suite</strong>, takes the PR Reviewer’s analysis, and works out what is already covered in existing test coverage and what is missing.</li><li>A <strong>Test Generator agent</strong> that receives the master’s brief and complexity tier, then does only the work that tier needs: e.g. <strong>A</strong> add or edit rows in CSV/XLS existing test data, <strong>B</strong> modify an existing Java/TestNG test, or <strong>C</strong> write a new Java test.</li></ul><p>The whole system lives inside automation test repo, which exposes a webhook. A GitHub Action in each service repo calls it when a developer opts in, either with Generate_Integration_Test in a commit message or as a PR comment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pu99OJooR2p45ZRl4yConA.png" /><figcaption>1.2 Agentic Test Generation Workflow sequence diagram</figcaption></figure><h3>End-to-end flow: from PR to generated tests</h3><p>A run starts only when a developer asks for it, and ends with tests a human reviews before merge.</p><ol><li><strong>Developer opts in.</strong> They open or update a PR in a service repo and either include Generate_Integration_Test in a commit message or post it as a PR comment.</li><li><strong>GitHub Action fires.</strong> A lightweight workflow in the service repo, listening on push, pull_request and issue_comment events, checks for the keyword and calls the webhook exposed by the automation test repo with the repo, PR number, requester.</li><li><strong>Webhook validates and queues.</strong> The receiver verifies the request signature, de-duplicates by PR, and hands the job to the Master agent.</li><li><strong>Master agent plans.</strong> It fetches the diff and PR metadata, loads the pre-built context for that repo, and spins off the PR Reviewer agent with a scoped brief.</li><li><strong>PR Reviewer agent analyzes.</strong> It reads the diff against the repo context and returns a structured change summary: affected services and endpoints, changed business rules, contract or schema changes, and risk areas.</li><li><strong>Test Knowledge agent maps coverage.</strong> It takes that summary, searches the existing tests and CSV/XLS data files, and classifies each change as covered, partially covered, or uncovered, naming the tests and data files involved.</li><li><strong>Master agent scores complexity.</strong> It merges both analyses and assigns each gap a tier: A (test data change), B (modify an existing Java/TestNG test) or C (new Java test). It then briefs the Test Generator with the tier, the change summary and the exact files to touch.</li><li><strong>Test Generator agent produces tests.</strong> It does only what the tier allows: data rows for A, an edited test method for B, a new test class or method for C, all in the automation repo’s conventions.</li><li><strong>Master agent validates and publishes.</strong> Changed and new tests are compiled and run; results, the coverage analysis and the tier breakdown go back as a PR comment, and the changes are raised for human review in the automation repo.</li><li><strong>Human gate.</strong> A developer or test engineer reviews and merges. Nothing reaches the suite without a person approving it.</li></ol><h3>Technical Challenges along the way</h3><ul><li><strong>Context window for multi repo codebase</strong>: You can not stuff a microservice repo, plus the test suite into one prompt.</li></ul><p>Solution : Pre-built context for each repo ahead of time.</p><ul><li><strong>Agent-to-agent handoff : </strong>Free-text summaries between agents lost detail and drifted.</li></ul><p>Solution: The Master agent owns the plan and the state; subagents are stateless workers with a narrow brief. That made runs reproducible and easy to debug.</p><ul><li><strong>Trust, security and cost</strong></li></ul><p>Least-privilege tokens: read on service repos, write only to the automation repo.</p><p>Bounded tool permissions in the SDK; agents cannot push to service repos or merge anything.</p><p>Per-run limits on turns and tokens, plus logging of every agent step for audit and tuning.</p><p>A mandatory human review before any generated test is merged.</p><h3><strong>Few Take Aways</strong></h3><ul><li><strong>Context engineering beats prompt engineering.</strong> The pre-built repo and test context did more for generating quality tests than any prompt tweak.</li><li><strong>Split agents by knowledge, not by task.</strong> Each agent owns a body of context, that boundary made the system debuggable.</li><li><strong>Score before you generate.</strong> Classifying each gap as A, B or C kept the suite lean: many changes needed a data row, not new code.</li><li><strong>Keep a human at the merge.</strong> It made the system safe in a regulated environment and made adoption a trust decision teams could make for themselves.</li></ul><p><em>PS: I’ll try to cover in next blog in this series- eval frameworks for Agentic Harness, how do you measure missing test code coverage and fill gaps using Agentic workflows.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e836cf9b7f84" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>