<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Signadot</title>
    <description>The latest articles on DEV Community by Signadot (@signadot).</description>
    <link>https://dev.to/signadot</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F467077%2Fb24943f8-8c14-4c75-841c-7017b22507ee.png</url>
      <title>DEV Community: Signadot</title>
      <link>https://dev.to/signadot</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/signadot"/>
    <language>en</language>
    <item>
      <title>Independent Deployability Has Two Halves. Most Teams Built One.</title>
      <dc:creator>Signadot</dc:creator>
      <pubDate>Thu, 19 Nov 2026 17:02:50 +0000</pubDate>
      <link>https://dev.to/signadot/independent-deployability-has-two-halves-most-teams-built-one-16bc</link>
      <guid>https://dev.to/signadot/independent-deployability-has-two-halves-most-teams-built-one-16bc</guid>
      <description>&lt;p&gt;&lt;strong&gt;Teams with mature deploy tooling still ship microservices in batches, because nothing lets them trust one change on its own. Coding agents are widening that gap.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Read this article on &lt;a href="https://www.signadot.com/blog/independent-deployability-validation-gap/?utm_source=dev.to&amp;amp;utm_medium=blog&amp;amp;utm_campaign=blog+repost"&gt;Signadot&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Try this audit on any service in your organization. Could the team that owns it put one change into production today, fully verified, without bundling it with other teams’ work or waiting for a release date?&lt;/p&gt;

&lt;p&gt;Most platform teams would have to say no, which is odd given their tooling. Canary rollouts move traffic in small steps. Flags let them ship code dark. A bad release reverts in under a minute. Still, merged work piles up on main, rides a scheduled train and goes out with everything else that week.&lt;/p&gt;

&lt;p&gt;The capability to push any change at any moment is sitting unused. That points away from deployment as the blocker. The blocker is knowing whether a single change is safe, and with agents writing more of those changes, it is the same problem as &lt;a href="https://www.signadot.com/validate-ai-generated-code-kubernetes/" rel="noopener noreferrer"&gt;verifying AI-generated code on Kubernetes&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Deploying one change and trusting one change
&lt;/h3&gt;

&lt;p&gt;Microservices promised that each service could release on its own schedule. Delivering that takes two separate capabilities, and the industry invested in only one of them.&lt;/p&gt;

&lt;p&gt;The mechanical capability moves a single service’s change to production in isolation: per-service pipelines, rollouts that stay compatible with older callers, and a quick revert. Vendors have packaged all of it, and your cluster almost certainly runs it today.&lt;/p&gt;

&lt;p&gt;The confidence capability is different. It answers whether this one change, by itself, works against the current versions of the services it calls and the services that call it. And it answers before release, without retesting the whole system as a unit.&lt;/p&gt;

&lt;p&gt;Few organizations have the second capability, and it decides how they ship. If you can only gain confidence in changes as a group, you release them as a group, no matter how good the deploy tooling is. A release train is what a shortage of confidence looks like on a calendar.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4hn0m15qca0dkyfpp65s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4hn0m15qca0dkyfpp65s.png" alt=" " width="800" height="274"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Why batching made economic sense
&lt;/h3&gt;

&lt;p&gt;Release trains get blamed on habit. They were a reasonable response to cost.&lt;/p&gt;

&lt;p&gt;Gaining confidence in a change used to mean a complete environment, with every service up, test data loaded and dependencies healthy. A typical organization had one or two of these, fought over them, and watched them drift away from production. When each verification run costs time in a scarce, fragile environment, running it once for fifty changes beats running it fifty times.&lt;/p&gt;

&lt;p&gt;The bill came due elsewhere. A one-line fix waited as long as the train schedule, however small it was. A red suite meant sorting through dozens of commits from different teams to find the one at fault.&lt;/p&gt;

&lt;p&gt;Batching also undid the decoupling microservices were supposed to deliver. A shared train means shared failures, and a revert for one team’s bug drags out another team’s feature. We covered those costs in &lt;a href="https://www.signadot.com/blog/why-90-of-microservices-still-ship-like-monoliths/" rel="noopener noreferrer"&gt;why most microservices still ship like monoliths&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Coding agents push batch sizes up
&lt;/h3&gt;

&lt;p&gt;The train model stayed workable while each team merged at a steady human rate. Batches stayed small enough to debug.&lt;/p&gt;

&lt;p&gt;Agents change the input rate without changing headcount, and code hosts already show it. In its &lt;a href="https://github.blog/news-insights/company-news/the-august-17-outage-and-the-work-ahead/" rel="noopener noreferrer"&gt;write-up of the August 2026 outage&lt;/a&gt;, GitHub said monthly commits on the platform had grown from 1.4 billion to 2.9 billion. Hold the train schedule constant while merges double or triple, and each train carries two or three times as many changes. Bisecting a failure across that many commits, many written by agent sessions that no longer exist, stops being practical.&lt;/p&gt;

&lt;p&gt;Agent output also looks more trustworthy than it is. An agent keeps iterating until the checks in front of it pass, so its diffs show up tidy with green tests. What those checks never include is how the change behaves among the live services it will meet. &lt;a href="https://www.signadot.com/blog/what-a-green-check-should-promise/" rel="noopener noreferrer"&gt;A green check on the pull request&lt;/a&gt; rarely covers that part.&lt;/p&gt;

&lt;p&gt;The usual signs of a safe change now cost almost nothing to produce. Google’s &lt;a href="https://cloud.google.com/blog/products/ai-machine-learning/announcing-the-2025-dora-report" rel="noopener noreferrer"&gt;2025 DORA report&lt;/a&gt; found that AI adoption now correlates with higher throughput but still correlates with lower delivery stability. Teams get more changes per day, each backed by weaker evidence about how it behaves in the real system.&lt;/p&gt;

&lt;h3&gt;
  
  
  Per-change verification at the cost of a deploy
&lt;/h3&gt;

&lt;p&gt;Fixing this means each pull request gets its own verification against real dependencies, isolated from other work, before merge, with no queue for an environment and no train to wait for. That only works if one verification run costs about what one deploy costs.&lt;/p&gt;

&lt;p&gt;The way to get there is to stop copying the system for every change. One set of stable services runs in the Kubernetes cluster, and the regular delivery pipeline keeps it current. A pull request adds only the services it touched, running alongside that set.&lt;/p&gt;

&lt;p&gt;Routing does the isolating. A pull request’s test traffic carries a routing key in its headers, and the routing layer sends any request with that key to the PR’s version of a changed service. Every other request goes to the shared stable version. The PR sees a full, realistic system where its own change is the only thing different, and the lightweight ephemeral environment that provides it starts in seconds because so little is new.&lt;/p&gt;

&lt;p&gt;With verification that cheap, there is nothing left to amortize. Each change produces its own evidence against the real system, and it does so while the person or agent who wrote it is still working on it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffhnp0vt5qb9ik9511tig.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffhnp0vt5qb9ik9511tig.png" alt=" " width="799" height="284"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Verification that keeps pace with agents
&lt;/h3&gt;

&lt;p&gt;The whole flow can run without a person. A pull request opens, an environment comes up, traffic is routed, integration and end-to-end suites run, and the environment is removed. That matters more as &lt;a href="https://www.signadot.com/blog/async-coding-agents-need-a-verifier/" rel="noopener noreferrer"&gt;agents start work with no person in the loop&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;So verification can grow at the same rate as code generation. One hundred open pull requests mean one hundred isolated runs in parallel on the same cluster, rather than one hundred changes lined up for a single shared staging environment.&lt;/p&gt;

&lt;p&gt;Per-change verification also makes authorship irrelevant to review. If every change has to prove its behavior against the real system before it merges, a passing check carries the same weight for agent code and human code.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.signadot.com/case-studies/how-bitso-scaled-delivery-with-coding-agents/" rel="noopener noreferrer"&gt;Bitso shows what this looks like in practice&lt;/a&gt;. Once each pull request was verified in its own environment, weekly deployments went from 664 to 1,400 and the change failure rate dropped from 5.2% to 0.9%. The team shipped more than twice as often and broke things less.&lt;/p&gt;

&lt;h3&gt;
  
  
  Where the next investment goes
&lt;/h3&gt;

&lt;p&gt;Go back to the audit. A team that can release one verified change today without coordinating with anyone has real independent deployability. A team that cannot will usually find its deploy tooling and pipeline are fine, and what is missing is an inexpensive way to establish that one change works.&lt;/p&gt;

&lt;p&gt;That shortfall was survivable when people wrote every line and releases went out every other week. With agents multiplying output, it is the constraint that sets delivery speed. Deployment tooling got ten years of attention. Signadot puts the same attention on verification, with lightweight ephemeral environments and Jobs that test each pull request against the real system on your existing Kubernetes cluster. &lt;a href="https://www.signadot.com/solutions/agentic-development/" rel="noopener noreferrer"&gt;Signadot for agentic development&lt;/a&gt; shows how agent-authored changes fit in.&lt;/p&gt;

</description>
      <category>cicd</category>
      <category>platformengineering</category>
      <category>kubernetes</category>
      <category>testing</category>
    </item>
    <item>
      <title>Run ZAP DAST Scans on Every Change Before Merge</title>
      <dc:creator>Signadot</dc:creator>
      <pubDate>Wed, 18 Nov 2026 14:36:48 +0000</pubDate>
      <link>https://dev.to/signadot/run-zap-dast-scans-on-every-change-before-merge-3ep8</link>
      <guid>https://dev.to/signadot/run-zap-dast-scans-on-every-change-before-merge-3ep8</guid>
      <description>&lt;p&gt;&lt;em&gt;Read this tutorial on &lt;a href="https://www.signadot.com/docs/tutorials/zap-security-testing?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=zap-tutorial" rel="noopener noreferrer"&gt;Signadot docs&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Static scanners read code. Some security bugs only show up when the code runs: a query that turns injectable once real input reaches it, or an error page that leaks database details. Catching those takes a running target, and in a microservices system that usually means a shared staging environment, after the change is merged, where a finding could come from any of the changes deployed together.&lt;/p&gt;

&lt;p&gt;This tutorial runs &lt;a href="https://www.zaproxy.org/" rel="noopener noreferrer"&gt;ZAP&lt;/a&gt;, the most widely used open source dynamic application security testing (DAST) scanner, against a single change before merge. The changed service runs in a &lt;a href="https://www.signadot.com/docs/concepts/sandbox?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=zap-tutorial" rel="noopener noreferrer"&gt;Signadot sandbox&lt;/a&gt;, and everything else it talks to comes from the cluster's baseline. ZAP runs in the cluster as a &lt;a href="https://www.signadot.com/docs/guides/use-cases/run-automated-tests?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=zap-tutorial" rel="noopener noreferrer"&gt;Signadot Job&lt;/a&gt;, which adds the sandbox's routing key to every request ZAP sends, so its attacks reach your change and nothing else.&lt;/p&gt;

&lt;p&gt;You'll make a change to &lt;a href="https://github.com/signadot/hotrod" rel="noopener noreferrer"&gt;HotROD&lt;/a&gt;'s &lt;code&gt;location&lt;/code&gt; service that adds search by name, and introduces a SQL injection along with it. ZAP catches it. You fix it and scan again.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhbmi2vi01mhh6yqwu4id.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhbmi2vi01mhh6yqwu4id.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;ZAP's requests carry the sandbox's routing key, so they reach the &lt;code&gt;location&lt;/code&gt; service with your change, running on your machine. Requests without the key, like the frontend's, reach the baseline &lt;code&gt;location&lt;/code&gt; service. Both versions use the cluster's MySQL.&lt;/p&gt;

&lt;p&gt;The changed service runs on your machine, so you don't build or push an image, and a fix is one restart away from its next scan. The same Job also scans a change &lt;a href="https://www.signadot.com/docs/tutorials/zap-security-testing?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=zap-tutorial#scan-a-change-deployed-in-the-cluster" rel="noopener noreferrer"&gt;deployed in the cluster&lt;/a&gt;, which is how it runs as a pull request check.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Estimated time:&lt;/strong&gt; 20 minutes.&lt;/p&gt;

&lt;h2&gt;
  
  
  What ZAP detects
&lt;/h2&gt;

&lt;p&gt;ZAP's rules come in two kinds. Passive rules only inspect the responses to ordinary requests, so they're safe to run against any sandbox. Active rules send attack payloads and watch how the application reacts.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Category&lt;/th&gt;
&lt;th&gt;Examples&lt;/th&gt;
&lt;th&gt;Rules&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Injection&lt;/td&gt;
&lt;td&gt;SQL injection, OS command injection, server-side template injection, XML external entities, CRLF injection&lt;/td&gt;
&lt;td&gt;Active&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cross-site scripting&lt;/td&gt;
&lt;td&gt;Reflected and stored XSS&lt;/td&gt;
&lt;td&gt;Active&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;File access&lt;/td&gt;
&lt;td&gt;Path traversal, remote file inclusion&lt;/td&gt;
&lt;td&gt;Active&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Information disclosure&lt;/td&gt;
&lt;td&gt;Database errors, stack traces and debug messages in responses, server version numbers in headers&lt;/td&gt;
&lt;td&gt;Passive&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Missing security headers&lt;/td&gt;
&lt;td&gt;Content Security Policy, anti-clickjacking, &lt;code&gt;X-Content-Type-Options&lt;/code&gt;, &lt;code&gt;Strict-Transport-Security&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Passive&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Weak cookie settings&lt;/td&gt;
&lt;td&gt;Cookies without the &lt;code&gt;HttpOnly&lt;/code&gt;, &lt;code&gt;Secure&lt;/code&gt; or &lt;code&gt;SameSite&lt;/code&gt; attributes&lt;/td&gt;
&lt;td&gt;Passive&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cross-origin misconfiguration&lt;/td&gt;
&lt;td&gt;Overly permissive CORS headers&lt;/td&gt;
&lt;td&gt;Passive&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Each finding has a risk level (High, Medium, Low or Informational), the request that triggered it, and a suggested fix. ZAP's Docker image ships three packaged scans built on these rules:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Scan&lt;/th&gt;
&lt;th&gt;What it does&lt;/th&gt;
&lt;th&gt;Use it for&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Baseline (&lt;code&gt;zap-baseline.py&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;Crawls the target and runs passive rules only&lt;/td&gt;
&lt;td&gt;Web UIs, and any sandbox whose data isn't isolated&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;API (&lt;code&gt;zap-api-scan.py&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;Imports an OpenAPI, SOAP or GraphQL definition and runs active rules against each operation&lt;/td&gt;
&lt;td&gt;APIs. It skips browser-only checks such as XSS&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Full (&lt;code&gt;zap-full-scan.py&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;Crawls the target and runs all active rules&lt;/td&gt;
&lt;td&gt;Web apps, when the sandbox's data is isolated&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;This tutorial uses the API scan.&lt;/p&gt;

&lt;h2&gt;
  
  
  Before you begin
&lt;/h2&gt;

&lt;p&gt;You need:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A Kubernetes cluster with the &lt;a href="https://www.signadot.com/docs/installation/signadot-operator?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=zap-tutorial" rel="noopener noreferrer"&gt;Signadot Operator&lt;/a&gt; installed.&lt;/li&gt;
&lt;li&gt;The &lt;a href="https://www.signadot.com/docs/getting-started/installation/signadot-cli?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=zap-tutorial" rel="noopener noreferrer"&gt;Signadot CLI&lt;/a&gt;, logged in with &lt;code&gt;signadot auth login&lt;/code&gt;. Creating a job runner group requires a Signadot admin.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;kubectl&lt;/code&gt; pointed at that cluster, plus &lt;code&gt;git&lt;/code&gt;, &lt;code&gt;jq&lt;/code&gt; and Go 1.21 or later. Go downloads the toolchain version HotROD asks for.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  1. Install HotROD
&lt;/h2&gt;

&lt;p&gt;Skip this step if HotROD already runs in the &lt;code&gt;hotrod&lt;/code&gt; namespace. The files in this tutorial assume that namespace.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl create namespace hotrod
kubectl -n hotrod apply -k &lt;span class="s1"&gt;'https://github.com/signadot/hotrod/k8s/overlays/prod/devmesh'&lt;/span&gt;
kubectl -n hotrod &lt;span class="nb"&gt;wait&lt;/span&gt; --for=condition=available deployment --all --timeout=5m
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  2. Get the change
&lt;/h2&gt;

&lt;p&gt;The change is on HotROD's &lt;code&gt;zap-location-search&lt;/code&gt; branch. Clone that branch and the &lt;a href="https://github.com/signadot/examples/tree/main/zap-security-tutorial" rel="noopener noreferrer"&gt;examples repository&lt;/a&gt; side by side, then copy the Signadot files into HotROD:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/signadot/examples.git signadot-examples
git clone -b zap-location-search https://github.com/signadot/hotrod.git
&lt;span class="nb"&gt;cd&lt;/span&gt; hotrod
cp -R ../signadot-examples/zap-security-tutorial/security .signadot/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The change adds an optional &lt;code&gt;name&lt;/code&gt; filter to &lt;code&gt;GET /locations&lt;/code&gt;. Here's the core of &lt;a href="https://github.com/signadot/hotrod/commit/07b84b03713ffec110f925ae35a9ef441cc8a1b4" rel="noopener noreferrer"&gt;the commit&lt;/a&gt;, in &lt;code&gt;services/location/database.go&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="n"&gt;query&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="s2"&gt;"SELECT id, name, coordinates FROM locations"&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;query&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="n"&gt;fmt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Sprintf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;" WHERE name LIKE '%%%s%%'"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="n"&gt;rows&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;db&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Query&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It returns the right rows for normal input, so it could pass a quick review.&lt;/p&gt;

&lt;p&gt;The files you copied into &lt;code&gt;.signadot/security/&lt;/code&gt;:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;File&lt;/th&gt;
&lt;th&gt;What it does&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;sandbox.yaml&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;A sandbox that routes requests for the &lt;code&gt;location&lt;/code&gt; service to port 8081 on your machine&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;zap-runner.yaml&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;A job runner group that runs Jobs in ZAP's official image&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;zap-api-scan.yaml&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The scan: a ZAP API scan of &lt;code&gt;GET /locations&lt;/code&gt;, sent with the sandbox's routing key&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  3. Run the change in a sandbox
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;sandbox.yaml&lt;/code&gt; is a &lt;a href="https://www.signadot.com/docs/guides/use-cases/set-up-local-testing?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=zap-tutorial" rel="noopener noreferrer"&gt;local sandbox&lt;/a&gt;: requests that carry its routing key and are bound for the &lt;code&gt;location&lt;/code&gt; service go to port 8081 on your machine.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;location-search&lt;/span&gt;
&lt;span class="na"&gt;spec&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;cluster&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"@{cluster}"&lt;/span&gt;
  &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;location service with name search, running on my machine&lt;/span&gt;
  &lt;span class="na"&gt;local&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;location&lt;/span&gt;
      &lt;span class="na"&gt;from&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Deployment&lt;/span&gt;
        &lt;span class="na"&gt;namespace&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;hotrod&lt;/span&gt;
        &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;location&lt;/span&gt;
      &lt;span class="na"&gt;mappings&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;port&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;8081&lt;/span&gt;
          &lt;span class="na"&gt;toLocal&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;localhost:8081&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Connect your machine to the cluster. &lt;code&gt;signadot local connect&lt;/code&gt; asks for your password, because it updates &lt;code&gt;/etc/hosts&lt;/code&gt; and local networking:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;signadot &lt;span class="kd"&gt;local&lt;/span&gt; connect
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create the sandbox. Set &lt;code&gt;CLUSTER&lt;/code&gt; to your cluster's name from &lt;code&gt;signadot cluster list&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="kd"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;CLUSTER&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;my-cluster
signadot sandbox apply -f .signadot/security/sandbox.yaml --set &lt;span class="nv"&gt;cluster&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$CLUSTER&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In a &lt;strong&gt;second terminal&lt;/strong&gt;, in the &lt;code&gt;hotrod&lt;/code&gt; directory, start the &lt;code&gt;location&lt;/code&gt; service with your change. &lt;code&gt;get-env&lt;/code&gt; loads the baseline's environment, so the service connects to the cluster's MySQL and Redis:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;eval&lt;/span&gt; &lt;span class="s2"&gt;"$(signadot sandbox get-env location-search)"&lt;/span&gt;
go run ./cmd/hotrod location
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Leave it running. Back in the first terminal, send the same request twice: once as a normal request, and once with the sandbox's routing key:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;ROUTING_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$(&lt;/span&gt;signadot sandbox get location-search -o json &lt;span class="o"&gt;|&lt;/span&gt; jq -r .routingKey&lt;span class="o"&gt;)&lt;/span&gt;
curl &lt;span class="s2"&gt;"http://location.hotrod:8081/locations?name=Coffee"&lt;/span&gt;
curl -H &lt;span class="s2"&gt;"baggage: sd-routing-key=$ROUTING_KEY"&lt;/span&gt; &lt;span class="s2"&gt;"http://location.hotrod:8081/locations?name=Coffee"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The first request reaches the baseline, which ignores &lt;code&gt;name&lt;/code&gt; and returns all five locations. The second reaches the code on your machine and returns only &lt;code&gt;Amazing Coffee Roasters&lt;/code&gt;. Both requests go to the same address. The routing key decides which version handles them.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Create the ZAP job runner group
&lt;/h2&gt;

&lt;p&gt;A job runner group keeps a pod running ZAP's image in your cluster, ready to run scan Jobs. &lt;code&gt;zap-runner.yaml&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;zap&lt;/span&gt;
&lt;span class="na"&gt;spec&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;cluster&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"@{cluster}"&lt;/span&gt;
  &lt;span class="na"&gt;namespace&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;signadot-tests&lt;/span&gt;
  &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ghcr.io/zaproxy/zaproxy:stable&lt;/span&gt;
  &lt;span class="na"&gt;jobTimeout&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;15m&lt;/span&gt;
  &lt;span class="na"&gt;scaling&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;manual&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;desiredPods&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create its namespace, then the runner group:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl create namespace signadot-tests
signadot jobrunnergroup apply -f .signadot/security/zap-runner.yaml --set &lt;span class="nv"&gt;cluster&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$CLUSTER&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The first time, the pod pulls ZAP's image, which takes a minute or two. Run &lt;code&gt;signadot jobrunnergroup get zap&lt;/code&gt; until it shows &lt;code&gt;Status: 1/1 pods ready&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Scan the sandbox
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;zap-api-scan.yaml&lt;/code&gt; is the scan Job:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;spec&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;namePrefix&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;zap-api-scan&lt;/span&gt;
  &lt;span class="na"&gt;runnerGroup&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;zap&lt;/span&gt;
  &lt;span class="c1"&gt;# Ties the Job to the sandbox, and re-queues it if the sandbox isn't ready.
&lt;/span&gt;  &lt;span class="na"&gt;routingContext&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;sandbox&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"@{sandbox}"&lt;/span&gt;
  &lt;span class="c1"&gt;# Adds the sandbox's routing key to every plain HTTP request the Job sends.
&lt;/span&gt;  &lt;span class="c1"&gt;# ZAP targets the baseline service address, and Signadot routes its requests
&lt;/span&gt;  &lt;span class="c1"&gt;# to the sandboxed workload.
&lt;/span&gt;  &lt;span class="na"&gt;trafficManager&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;injectRoutingKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;auto&lt;/span&gt;
  &lt;span class="na"&gt;script&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt;
    &lt;span class="c1"&gt;#!/bin/bash
&lt;/span&gt;    &lt;span class="s"&gt;set -euo pipefail&lt;/span&gt;
    &lt;span class="s"&gt;mkdir -p /zap/wrk &amp;amp;&amp;amp; cd /zap/wrk&lt;/span&gt;

    &lt;span class="c1"&gt;# Scan only what the change touches: GET /locations and its new
&lt;/span&gt;    &lt;span class="c1"&gt;# `name` parameter. ZAP sends attack payloads to every operation listed
&lt;/span&gt;    &lt;span class="c1"&gt;# here, so write operations are left out.
&lt;/span&gt;    &lt;span class="s"&gt;cat &amp;gt; openapi.yaml &amp;lt;&amp;lt;'EOF'&lt;/span&gt;
    &lt;span class="na"&gt;openapi&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;3.0.3&lt;/span&gt;
    &lt;span class="na"&gt;info&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;HotROD location service&lt;/span&gt;
      &lt;span class="na"&gt;version&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"1.0"&lt;/span&gt;
    &lt;span class="na"&gt;servers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;@{target}&lt;/span&gt;
    &lt;span class="na"&gt;paths&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;/locations&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;get&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;summary&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;List locations, optionally filtered by name&lt;/span&gt;
          &lt;span class="na"&gt;parameters&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;name&lt;/span&gt;
              &lt;span class="na"&gt;in&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;query&lt;/span&gt;
              &lt;span class="na"&gt;schema&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;string&lt;/span&gt;
                &lt;span class="na"&gt;example&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Coffee&lt;/span&gt;
          &lt;span class="na"&gt;responses&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="na"&gt;"200"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
              &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Matching locations&lt;/span&gt;
    &lt;span class="s"&gt;EOF&lt;/span&gt;

    &lt;span class="c1"&gt;# -I: low-risk warnings (like missing headers) don't fail the scan.
&lt;/span&gt;    &lt;span class="s"&gt;zap-api-scan.py -t /zap/wrk/openapi.yaml -f openapi -I \&lt;/span&gt;
      &lt;span class="s"&gt;-r zap-report.html -J zap-report.json&lt;/span&gt;

    &lt;span class="c1"&gt;# Fail the Job if ZAP found anything High risk.
&lt;/span&gt;    &lt;span class="s"&gt;HIGH=$(jq '[.site[].alerts[] | select(.riskcode == "3")] | length' zap-report.json)&lt;/span&gt;
    &lt;span class="s"&gt;if [ "$HIGH" -gt 0 ]; then&lt;/span&gt;
      &lt;span class="s"&gt;echo&lt;/span&gt;
      &lt;span class="s"&gt;echo "ZAP found $HIGH High-risk issue(s):"&lt;/span&gt;
      &lt;span class="s"&gt;jq -r '.site[].alerts[] | select(.riskcode == "3")&lt;/span&gt;
        &lt;span class="na"&gt;| "  \(.name) [\(.pluginid)]&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;param \(.instances[0].param), attack \(.instances[0].attack)"' zap-report.json&lt;/span&gt;
      &lt;span class="s"&gt;exit 1&lt;/span&gt;
    &lt;span class="s"&gt;fi&lt;/span&gt;
    &lt;span class="s"&gt;echo "No High-risk issues found."&lt;/span&gt;
  &lt;span class="na"&gt;uploadArtifact&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;/zap/wrk/zap-report.html&lt;/span&gt;
    &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;/zap/wrk/zap-report.json&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It does three things:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;It scans only what changed.&lt;/strong&gt; The OpenAPI definition lists only &lt;code&gt;GET /locations&lt;/code&gt; and its &lt;code&gt;name&lt;/code&gt; parameter. ZAP's API scan sends attack payloads to each operation in the definition, so the scan covers exactly what changed and leaves out operations that write data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It reaches the change through the routing key.&lt;/strong&gt; &lt;code&gt;routingContext&lt;/code&gt; ties the Job to the sandbox, and with &lt;code&gt;injectRoutingKey: auto&lt;/code&gt; a proxy next to the Job adds the routing headers to its outbound plain HTTP traffic. ZAP needs no extra configuration, and its own header settings stay free for your app's credentials if the scan needs to log in.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It fails on High-risk findings only.&lt;/strong&gt; Low-risk findings, like missing security headers, show up in the report but don't fail the Job.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Run the scan:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;signadot job submit -f .signadot/security/zap-api-scan.yaml \
  --set &lt;span class="nv"&gt;sandbox&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;location-search \
  --set &lt;span class="nv"&gt;target&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;http://location.hotrod:8081 \
  --attach
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;target&lt;/code&gt; is the baseline service's address. ZAP never needs to know where your change runs. After about 30 seconds, the Job fails:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;WARN-NEW: SQL Injection [40018] x 1
    http://location.hotrod:8081/locations?name=%27 (500 Internal Server Error)
...
FAIL-NEW: 0 FAIL-INPROG: 0  WARN-NEW: 4 WARN-INPROG: 0  INFO: 0 IGNORE: 0   PASS: 116

ZAP found 1 High-risk issue(s):
  SQL Injection [40018]: param name, attack '
Error: exit status 1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;ZAP sent a single quote as &lt;code&gt;name&lt;/code&gt;, and the service answered with a server error. A harmless value didn't cause one. Send the same request yourself to see why:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -H &lt;span class="s2"&gt;"baggage: sd-routing-key=$ROUTING_KEY"&lt;/span&gt; &lt;span class="s2"&gt;"http://location.hotrod:8081/locations?name='"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''' at line 1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The quote ended the SQL string early. Whatever follows it in &lt;code&gt;name&lt;/code&gt; runs as SQL, and the error message gives away the database. The full report has a description and a fix for each finding. Download it with the Job name from the output above:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;signadot artifact download --job &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;job-name&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; /zap/wrk/zap-report.html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also open both reports from the Job's page in the Signadot dashboard.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Fix it and scan again
&lt;/h2&gt;

&lt;p&gt;The fix passes &lt;code&gt;name&lt;/code&gt; to the database as a query parameter instead of pasting it into the SQL. It's &lt;a href="https://github.com/signadot/hotrod/commit/6a5c918c436260d0b3baa775cdd9f835788a65b2" rel="noopener noreferrer"&gt;one commit&lt;/a&gt; on the &lt;code&gt;zap-location-search-fix&lt;/code&gt; branch:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="n"&gt;query&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="s2"&gt;"SELECT id, name, coordinates FROM locations"&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="n"&gt;args&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="kt"&gt;any&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;query&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="s2"&gt;" WHERE name LIKE ?"&lt;/span&gt;
    &lt;span class="n"&gt;args&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"%"&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="s2"&gt;"%"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="n"&gt;rows&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;db&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Query&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Switch to that branch:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git checkout zap-location-search-fix
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the second terminal, stop the service with Ctrl+C and start it again:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;go run ./cmd/hotrod location
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Scan again:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;signadot job submit -f .signadot/security/zap-api-scan.yaml \
  --set &lt;span class="nv"&gt;sandbox&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;location-search \
  --set &lt;span class="nv"&gt;target&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;http://location.hotrod:8081 \
  --attach
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This time the Job passes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;FAIL-NEW: 0 FAIL-INPROG: 0  WARN-NEW: 2 WARN-INPROG: 0  INFO: 0 IGNORE: 0   PASS: 117
No High-risk issues found.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The single quote is now just a character to search for. It finds &lt;code&gt;Rachel's Floral Designs&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -H &lt;span class="s2"&gt;"baggage: sd-routing-key=$ROUTING_KEY"&lt;/span&gt; &lt;span class="s2"&gt;"http://location.hotrod:8081/locations?name='"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The change is ready for review, and the passing scan is evidence that it's safe to merge.&lt;/p&gt;

&lt;h2&gt;
  
  
  Scan a change deployed in the cluster
&lt;/h2&gt;

&lt;p&gt;The sandbox decides where the change runs, so the Job works the same way when the change is deployed in the cluster. Build an image from your branch, then create a sandbox that forks the &lt;code&gt;location&lt;/code&gt; Deployment with that image in place of &lt;code&gt;local&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;location-search&lt;/span&gt;
&lt;span class="na"&gt;spec&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;cluster&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"@{cluster}"&lt;/span&gt;
  &lt;span class="na"&gt;forks&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;forkOf&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Deployment&lt;/span&gt;
        &lt;span class="na"&gt;namespace&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;hotrod&lt;/span&gt;
        &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;location&lt;/span&gt;
      &lt;span class="na"&gt;customizations&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;images&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"@{image}"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then run the same &lt;code&gt;signadot job submit&lt;/code&gt; command.&lt;/p&gt;

&lt;h3&gt;
  
  
  Run the scan as a pull request check
&lt;/h3&gt;

&lt;p&gt;In CI, the pipeline builds an image from the pull request and creates a &lt;a href="https://www.signadot.com/docs/guides/set-up-pr-sandboxes?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=zap-tutorial" rel="noopener noreferrer"&gt;sandbox that forks the service's Deployment&lt;/a&gt; with that image, like the one above. Then it submits the same Job with &lt;code&gt;--attach&lt;/code&gt;. If the scan finds a High-risk issue, the Job fails and so does the PR check, and both reports stay attached to the Job for the reviewer. See &lt;a href="https://www.signadot.com/docs/guides/integrate-ci?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=zap-tutorial" rel="noopener noreferrer"&gt;CI/CD integrations&lt;/a&gt; for running Signadot Jobs from GitHub Actions, GitLab, Bitbucket and Jenkins.&lt;/p&gt;

&lt;p&gt;A coding agent can run the same loop on its own changes before it opens a pull request. See &lt;a href="https://www.signadot.com/docs/integrations/security-testing?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=zap-tutorial#run-it-in-the-agent-loop-and-in-ci" rel="noopener noreferrer"&gt;Run it in the agent loop and in CI&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keep active scans contained
&lt;/h2&gt;

&lt;p&gt;An API scan sends real attack payloads. The sandboxed service processes them, and its calls to shared services and databases are real. This tutorial keeps that safe by listing only a read-only operation in the OpenAPI definition. For your own services:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;List only the operations the change touches in the scan's OpenAPI definition.&lt;/li&gt;
&lt;li&gt;Before scanning operations that write data, give the sandbox its own database with a &lt;a href="https://www.signadot.com/docs/reference/resource-plugins?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=zap-tutorial" rel="noopener noreferrer"&gt;resource plugin&lt;/a&gt;, so injected rows never land in shared data.&lt;/li&gt;
&lt;li&gt;To check a web UI without sending attacks, use ZAP's passive baseline scan, &lt;code&gt;zap-baseline.py&lt;/code&gt;, in the same Job.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;See &lt;a href="https://www.signadot.com/docs/integrations/security-testing?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=zap-tutorial#keep-active-scans-contained" rel="noopener noreferrer"&gt;Keep active scans contained&lt;/a&gt; for more.&lt;/p&gt;

&lt;h2&gt;
  
  
  Clean up
&lt;/h2&gt;

&lt;p&gt;Stop the &lt;code&gt;location&lt;/code&gt; service in the second terminal with Ctrl+C. Then run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;signadot sandbox delete location-search
signadot jobrunnergroup delete zap
signadot &lt;span class="kd"&gt;local&lt;/span&gt; disconnect
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To remove HotROD, run &lt;code&gt;kubectl delete namespace hotrod&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Troubleshooting
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;What you see&lt;/th&gt;
&lt;th&gt;What to check&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;namespace "signadot-tests" does not exist&lt;/code&gt; when creating the runner group&lt;/td&gt;
&lt;td&gt;Run &lt;code&gt;kubectl create namespace signadot-tests&lt;/code&gt; first.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;The Job stays queued&lt;/td&gt;
&lt;td&gt;The runner pod is still pulling ZAP's image. Check &lt;code&gt;kubectl -n signadot-tests get pods&lt;/code&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;curl: Could not resolve host: location.hotrod&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Run &lt;code&gt;signadot local status&lt;/code&gt;, and &lt;code&gt;signadot local connect&lt;/code&gt; if it isn't connected.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;The scan passes before the fix, or the routed &lt;code&gt;curl&lt;/code&gt; returns all five locations&lt;/td&gt;
&lt;td&gt;Requests aren't reaching your machine. Check that &lt;code&gt;go run ./cmd/hotrod location&lt;/code&gt; is running and that &lt;code&gt;signadot sandbox get location-search&lt;/code&gt; shows the sandbox as ready.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Frequently asked questions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  How do I run a ZAP scan against a single microservice change in Kubernetes?
&lt;/h3&gt;

&lt;p&gt;Run the changed service in a Signadot sandbox and run ZAP as a Signadot Job in the cluster. The Job's &lt;code&gt;routingContext&lt;/code&gt; ties it to the sandbox, and &lt;code&gt;trafficManager.injectRoutingKey: auto&lt;/code&gt; adds the sandbox's routing key to every plain HTTP request ZAP sends. ZAP targets the baseline service's address, and Signadot routes its requests to the changed workload, so every finding belongs to that change.&lt;/p&gt;

&lt;h3&gt;
  
  
  Which ZAP scan should I run against a sandbox?
&lt;/h3&gt;

&lt;p&gt;Use the API scan (&lt;code&gt;zap-api-scan.py&lt;/code&gt;) for APIs, with an OpenAPI definition that lists only the operations the change touches. Use the baseline scan (&lt;code&gt;zap-baseline.py&lt;/code&gt;), which runs passive rules only, for web UIs or any sandbox whose data isn't isolated. Use the full scan (&lt;code&gt;zap-full-scan.py&lt;/code&gt;) for web apps when the sandbox has its own data.&lt;/p&gt;

&lt;h3&gt;
  
  
  Is it safe to run an active ZAP scan against a sandbox?
&lt;/h3&gt;

&lt;p&gt;An active scan sends real attack payloads, and the sandboxed service's calls to shared services and databases are real. Keep it contained: list only the changed operations in the scan's OpenAPI definition, leave out operations that write data, and give the sandbox its own database with a resource plugin before scanning operations that do.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can the ZAP scan run as a pull request check?
&lt;/h3&gt;

&lt;p&gt;Yes. In CI, create a sandbox that forks the service Deployment with the image built from the pull request, then submit the same Job with &lt;code&gt;signadot job submit --attach&lt;/code&gt;. The Job fails when ZAP reports a High-risk finding, which fails the PR check, and the HTML and JSON reports stay attached to the Job for reviewers.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can ZAP scan code running on my laptop?
&lt;/h3&gt;

&lt;p&gt;Yes. With a local sandbox and &lt;code&gt;signadot local connect&lt;/code&gt;, requests that carry the sandbox routing key reach the service running on your machine. ZAP still runs in the cluster and targets the baseline address, so you fix the code, restart the service and scan again without building or pushing an image.&lt;/p&gt;

&lt;h2&gt;
  
  
  See also
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.signadot.com/docs/integrations/security-testing?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=zap-tutorial" rel="noopener noreferrer"&gt;Runtime security testing&lt;/a&gt;: how security tools reach a sandbox, and other open source tools&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.signadot.com/docs/tutorials/falco-runtime-security?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=zap-tutorial" rel="noopener noreferrer"&gt;Falco runtime security&lt;/a&gt;: catch risky runtime behavior in a sandbox with Falco&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.signadot.com/docs/guides/use-cases/run-automated-tests?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=zap-tutorial" rel="noopener noreferrer"&gt;Run automated tests with Jobs&lt;/a&gt;: Signadot Jobs and job runner groups&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.signadot.com/docs/reference/jobs/spec?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=zap-tutorial" rel="noopener noreferrer"&gt;Job spec reference&lt;/a&gt;: &lt;code&gt;routingContext&lt;/code&gt;, &lt;code&gt;trafficManager&lt;/code&gt; and &lt;code&gt;uploadArtifact&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/signadot/examples/tree/main/zap-security-tutorial" rel="noopener noreferrer"&gt;Example repository&lt;/a&gt;: the sandbox, runner group and Job specs&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>security</category>
      <category>owasp</category>
      <category>kubernetes</category>
      <category>testing</category>
    </item>
    <item>
      <title>Test Debezium CDC Pipelines with Sandboxes</title>
      <dc:creator>Signadot</dc:creator>
      <pubDate>Tue, 17 Nov 2026 15:42:28 +0000</pubDate>
      <link>https://dev.to/signadot/test-debezium-cdc-pipelines-with-sandboxes-54og</link>
      <guid>https://dev.to/signadot/test-debezium-cdc-pipelines-with-sandboxes-54og</guid>
      <description>&lt;p&gt;&lt;em&gt;Read this tutorial on &lt;a href="https://www.signadot.com/docs/tutorials/testing-debezium-cdc?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=debezium-cdc-tutorial" rel="noopener noreferrer"&gt;Signadot docs&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.signadot.com/docs/concepts/sandbox?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=debezium-cdc-tutorial" rel="noopener noreferrer"&gt;Sandboxes&lt;/a&gt; route a request to the right version of a service by its &lt;a href="https://www.signadot.com/docs/glossary?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=debezium-cdc-tutorial" rel="noopener noreferrer"&gt;routing key&lt;/a&gt;, which travels in request headers. Change data capture breaks that chain twice. The service that handles the request only writes a row, and &lt;a href="https://debezium.io/" rel="noopener noreferrer"&gt;Debezium&lt;/a&gt; publishes the event later from the database's write-ahead log, without ever seeing the request.&lt;/p&gt;

&lt;p&gt;This tutorial shows how to get the routing key through anyway. An &lt;code&gt;orders&lt;/code&gt; service writes orders to Postgres, Debezium publishes each change to Kafka, and a &lt;code&gt;fulfillment&lt;/code&gt; consumer reads the changes and calls a &lt;code&gt;notifier&lt;/code&gt;. You fork each service into a sandbox and watch every change reach the right version of each service. Postgres, Debezium and Kafka stay shared: you never fork them.&lt;/p&gt;

&lt;p&gt;Full source: &lt;a href="https://github.com/signadot/examples/tree/main/debezium-cdc-tutorial" rel="noopener noreferrer"&gt;signadot/examples/debezium-cdc-tutorial&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How the routing key gets through the database
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkwiy2oxh0gjfxgoi4nfl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkwiy2oxh0gjfxgoi4nfl.png" alt=" " width="797" height="111"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The request reaches &lt;code&gt;orders&lt;/code&gt; with the routing key in its &lt;code&gt;baggage&lt;/code&gt; header. The key is stored on the row, comes out of Postgres with the change, and reaches the consumers as Kafka headers. It makes three hops:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Into the database.&lt;/strong&gt; The &lt;code&gt;orders&lt;/code&gt; service sets the request's OpenTelemetry context (&lt;code&gt;traceparent&lt;/code&gt; and &lt;code&gt;baggage&lt;/code&gt;) as transaction-local Postgres settings. A trigger copies them into two columns, &lt;code&gt;otel_traceparent&lt;/code&gt; and &lt;code&gt;otel_baggage&lt;/code&gt;, on every insert and update.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Out of the database.&lt;/strong&gt; Debezium captures the two columns with the rest of the row, and a built-in Kafka Connect transform moves them into the Kafka headers &lt;code&gt;traceparent&lt;/code&gt; and &lt;code&gt;baggage&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Out of Kafka.&lt;/strong&gt; The baseline consumer reads through the consumer group &lt;code&gt;fulfillment&lt;/code&gt;, and a sandbox reads through its own group, &lt;code&gt;fulfillment-&amp;lt;routing key&amp;gt;&lt;/code&gt;. Each one asks the &lt;a href="https://github.com/signadot/routesapi" rel="noopener noreferrer"&gt;Signadot Routes API&lt;/a&gt; which keys belong to sandboxes. The baseline skips those keys, and a sandbox processes only its own.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;All of this lives in &lt;a href="https://github.com/signadot/examples/tree/main/debezium-cdc-tutorial/platform_cdc" rel="noopener noreferrer"&gt;&lt;code&gt;platform_cdc/&lt;/code&gt;&lt;/a&gt;, a small library of the kind a platform team would ship. The app code is plain SQLAlchemy, Flask and &lt;code&gt;requests&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Before you begin
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Prerequisites&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A Kubernetes cluster with the &lt;a href="https://www.signadot.com/docs/installation/signadot-operator?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=debezium-cdc-tutorial" rel="noopener noreferrer"&gt;Signadot Operator&lt;/a&gt; installed.&lt;/li&gt;
&lt;li&gt;The &lt;a href="https://www.signadot.com/docs/getting-started/installation/signadot-cli?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=debezium-cdc-tutorial" rel="noopener noreferrer"&gt;Signadot CLI&lt;/a&gt;, logged in with &lt;code&gt;signadot auth login&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;kubectl&lt;/code&gt; pointed at that cluster, and &lt;code&gt;jq&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Docker, and a container registry your cluster can pull from.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  1. Build the image
&lt;/h2&gt;

&lt;p&gt;The three services run from one image. Build it and push it to your registry:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/signadot/examples.git
&lt;span class="nb"&gt;cd&lt;/span&gt; examples/debezium-cdc-tutorial

&lt;span class="kd"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;IMAGE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;docker.io/your-user/debezium-cdc-demo:latest  &lt;span class="c"&gt;# your registry&lt;/span&gt;
docker build -t &lt;span class="nv"&gt;$IMAGE&lt;/span&gt; .
docker push &lt;span class="nv"&gt;$IMAGE&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note: Any registry your cluster can pull from works&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;docker.io/your-user/...&lt;/code&gt; is a placeholder. When you build images of your own services this way, push them to a private repository and give the cluster pull access to it, for example with an &lt;a href="https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/" rel="noopener noreferrer"&gt;image pull secret&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If your cluster's nodes have a different CPU architecture than your machine (for example an Apple silicon Mac and an x86 cluster), add &lt;code&gt;--platform linux/amd64&lt;/code&gt; to &lt;code&gt;docker build&lt;/code&gt;. On a local cluster that runs images straight from your Docker daemon, you can skip the push.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Deploy the demo
&lt;/h2&gt;

&lt;p&gt;Point the manifests at your image, then deploy Postgres, Kafka, Debezium (Kafka Connect) and the three services into the &lt;code&gt;debezium-demo&lt;/code&gt; namespace. The &lt;code&gt;migrate&lt;/code&gt; Job creates the schema:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sed -i.orig &lt;span class="s2"&gt;"s|image: debezium-cdc-demo:latest|image: $IMAGE|"&lt;/span&gt; k8s/*.yaml

kubectl create namespace debezium-demo
kubectl apply -f k8s/
kubectl -n debezium-demo &lt;span class="nb"&gt;wait&lt;/span&gt; --for=condition=complete job/migrate --timeout=300s
kubectl -n debezium-demo &lt;span class="nb"&gt;wait&lt;/span&gt; --for=condition=available deploy --all --timeout=300s
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Connect your machine to the cluster, so that cluster service names resolve locally (this asks for your password):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="kd"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;CLUSTER&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;my-cluster  &lt;span class="c"&gt;# your cluster's name, from: signadot cluster list&lt;/span&gt;
signadot &lt;span class="kd"&gt;local&lt;/span&gt; connect --cluster=&lt;span class="nv"&gt;$CLUSTER&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Register the Debezium connector for the &lt;code&gt;orders&lt;/code&gt; table through the Kafka Connect REST API:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -X PUT http://debezium.debezium-demo.svc:8083/connectors/orders/config \
  -H &lt;span class="s1"&gt;'Content-Type: application/json'&lt;/span&gt; -d @debezium/orders-connector.json
curl -s http://debezium.debezium-demo.svc:8083/connectors/orders/status &lt;span class="o"&gt;|&lt;/span&gt; jq .tasks
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The task's &lt;code&gt;state&lt;/code&gt; is &lt;code&gt;RUNNING&lt;/code&gt; after a few seconds.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Look at the code
&lt;/h2&gt;

&lt;p&gt;Three small pieces carry the routing key. The &lt;code&gt;orders&lt;/code&gt; service creates its engine with &lt;code&gt;platform_cdc.create_engine&lt;/code&gt;, a drop-in &lt;code&gt;sqlalchemy.create_engine&lt;/code&gt;, and writes rows as usual (&lt;a href="https://github.com/signadot/examples/blob/main/debezium-cdc-tutorial/platform_cdc/db.py" rel="noopener noreferrer"&gt;&lt;code&gt;platform_cdc/db.py&lt;/code&gt;&lt;/a&gt; has the engine and the trigger):&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;app/orders.py&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;engine&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;platform_cdc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create_engine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;DATABASE_URL&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="n"&gt;engine&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;begin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;conn&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;conn&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;execute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"INSERT INTO orders (id, item, status) VALUES (:id, :item, 'new')"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                 &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;order&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"item"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;order&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"item"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The migration tracks each captured table once. That adds the two context columns and the trigger that fills them:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;app/migrate.py&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;platform_cdc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;track_table&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;conn&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"orders"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The connector (&lt;a href="https://github.com/signadot/examples/blob/main/debezium-cdc-tutorial/debezium/orders-connector.json" rel="noopener noreferrer"&gt;&lt;code&gt;debezium/orders-connector.json&lt;/code&gt;&lt;/a&gt;) moves the columns into Kafka headers, the same headers a service that published the event itself would have set:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;debezium/orders-connector.json&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"transforms"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"unwrap,context"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="nl"&gt;"transforms.unwrap.type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"io.debezium.transforms.ExtractNewRecordState"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="nl"&gt;"transforms.context.type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"org.apache.kafka.connect.transforms.HeaderFrom$Value"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="nl"&gt;"transforms.context.fields"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"otel_traceparent,otel_baggage"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="nl"&gt;"transforms.context.headers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"traceparent,baggage"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="nl"&gt;"transforms.context.operation"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"move"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;fulfillment&lt;/code&gt; service hands a handler to &lt;a href="https://github.com/signadot/examples/blob/main/debezium-cdc-tutorial/platform_cdc/consumer.py" rel="noopener noreferrer"&gt;&lt;code&gt;platform_cdc.ChangeConsumer&lt;/code&gt;&lt;/a&gt;, which picks the consumer group, checks each event's routing key, and makes the event's context current while the handler runs, so the call to the notifier carries the key:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;app/fulfillment.py&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;consumer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;platform_cdc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;ChangeConsumer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="no"&gt;KAFKA_BROKERS&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;topic&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="no"&gt;ORDERS_TOPIC&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;group&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="no"&gt;CONSUMER_GROUP&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;on_ready&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="k"&gt;lambda&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;pathlib&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"/tmp/ready"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;touch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;consumer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;handle&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  4. Create an order without a routing key
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;ORDERS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;http://orders.debezium-demo.svc:4000
curl -X POST &lt;span class="nv"&gt;$ORDERS&lt;/span&gt;/api/orders -H &lt;span class="s1"&gt;'Content-Type: application/json'&lt;/span&gt; \
  -d &lt;span class="s1"&gt;'{"id": "o1", "item": "book"}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every service writes what it did to an event log that the &lt;code&gt;orders&lt;/code&gt; service serves. Define a helper that shows which workload handled each step of an order. The first change event takes a few seconds, while Debezium creates the topic:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;trail&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
  curl -s &lt;span class="nv"&gt;$ORDERS&lt;/span&gt;/api/events &lt;span class="o"&gt;|&lt;/span&gt; jq -r --arg id &lt;span class="s2"&gt;"$1"&lt;/span&gt; &lt;span class="s1"&gt;'.events[]
    | select(.context.orderID == $id)
    | "\(.context.baselineWorkload) (\(.context.sandboxName | if . == "" then "baseline" else . end)): \(.logEntry)"'&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
trail o1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;orders (baseline): Inserted order into Postgres
fulfillment (baseline): Consumed change event (op c) with fulfillment v1: "order o1 (book) is new"
notifier (baseline): Sent notification: "order o1 (book) is new"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  5. Create the sandboxes
&lt;/h2&gt;

&lt;p&gt;Each sandbox forks one service. The fulfillment sandbox also sets &lt;code&gt;FULFILLMENT_VERSION=v2&lt;/code&gt;, the "change" under test, which uppercases item names:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;signadot/sandboxes/fulfillment.yaml&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;debezium-fulfillment&lt;/span&gt;
&lt;span class="na"&gt;spec&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"fulfillment sandbox for the Debezium CDC demo (fulfillment v2)"&lt;/span&gt;
  &lt;span class="na"&gt;cluster&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"@{cluster}"&lt;/span&gt;
  &lt;span class="na"&gt;labels&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;demo&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;debezium-cdc&lt;/span&gt;
  &lt;span class="na"&gt;forks&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;forkOf&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Deployment&lt;/span&gt;
        &lt;span class="na"&gt;namespace&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;debezium-demo&lt;/span&gt;
        &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;fulfillment&lt;/span&gt;
      &lt;span class="na"&gt;customizations&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="c1"&gt;# The change under test: v2 uppercases item names.
&lt;/span&gt;          &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;FULFILLMENT_VERSION&lt;/span&gt;
            &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;v2&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Apply the three sandboxes and a &lt;a href="https://www.signadot.com/docs/reference/route-groups?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=debezium-cdc-tutorial" rel="noopener noreferrer"&gt;route group&lt;/a&gt; that bundles them under one routing key:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;signadot sandbox apply -f signadot/sandboxes/fulfillment.yaml --set &lt;span class="nv"&gt;cluster&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$CLUSTER&lt;/span&gt;
signadot sandbox apply -f signadot/sandboxes/notifier.yaml --set &lt;span class="nv"&gt;cluster&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$CLUSTER&lt;/span&gt;
signadot sandbox apply -f signadot/sandboxes/orders.yaml --set &lt;span class="nv"&gt;cluster&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$CLUSTER&lt;/span&gt;
signadot routegroup apply -f signadot/routegroups/debezium-demo.yaml --set &lt;span class="nv"&gt;cluster&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$CLUSTER&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Save the routing keys:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;FULFILLMENT_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$(&lt;/span&gt;signadot sandbox get debezium-fulfillment -o json &lt;span class="o"&gt;|&lt;/span&gt; jq -r .routingKey&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="nv"&gt;NOTIFIER_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$(&lt;/span&gt;signadot sandbox get debezium-notifier -o json &lt;span class="o"&gt;|&lt;/span&gt; jq -r .routingKey&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="nv"&gt;ORDERS_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$(&lt;/span&gt;signadot sandbox get debezium-orders -o json &lt;span class="o"&gt;|&lt;/span&gt; jq -r .routingKey&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="nv"&gt;GROUP_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$(&lt;/span&gt;signadot routegroup get debezium-demo -o json &lt;span class="o"&gt;|&lt;/span&gt; jq -r .routingKey&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  6. Create orders with routing keys
&lt;/h2&gt;

&lt;p&gt;Define a helper that creates an order with a routing key in the &lt;code&gt;baggage&lt;/code&gt; header, as a preview URL or the Signadot browser extension would:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;order&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
  curl -s -o /dev/null -X POST &lt;span class="nv"&gt;$ORDERS&lt;/span&gt;/api/orders -H &lt;span class="s1"&gt;'Content-Type: application/json'&lt;/span&gt; \
    -H &lt;span class="s2"&gt;"baggage: sd-routing-key=$2"&lt;/span&gt; -d &lt;span class="s2"&gt;"{\"id\": \"$1\", \"item\": \"book\"}"&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create one order per routing key:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;order o2 &lt;span class="nv"&gt;$FULFILLMENT_KEY&lt;/span&gt;
order o3 &lt;span class="nv"&gt;$NOTIFIER_KEY&lt;/span&gt;
order o4 &lt;span class="nv"&gt;$ORDERS_KEY&lt;/span&gt;
order o5 &lt;span class="nv"&gt;$GROUP_KEY&lt;/span&gt;
sleep 2&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; id &lt;span class="k"&gt;in&lt;/span&gt; o2 o3 o4 o5&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt; trail &lt;span class="nv"&gt;$id&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="k"&gt;done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;orders (baseline): Inserted order into Postgres
fulfillment (debezium-fulfillment): Consumed change event (op c) with fulfillment v2: "order o2 (BOOK) is new"
notifier (baseline): Sent notification: "order o2 (BOOK) is new"

orders (baseline): Inserted order into Postgres
fulfillment (baseline): Consumed change event (op c) with fulfillment v1: "order o3 (book) is new"
notifier (debezium-notifier): Sent notification: "order o3 (book) is new"

orders (debezium-orders): Inserted order into Postgres
fulfillment (baseline): Consumed change event (op c) with fulfillment v1: "order o4 (book) is new"
notifier (baseline): Sent notification: "order o4 (book) is new"

orders (debezium-orders): Inserted order into Postgres
fulfillment (debezium-fulfillment): Consumed change event (op c) with fulfillment v2: "order o5 (BOOK) is new"
notifier (debezium-notifier): Sent notification: "order o5 (BOOK) is new"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each change reached exactly the services its routing key selects:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Routing key&lt;/th&gt;
&lt;th&gt;orders&lt;/th&gt;
&lt;th&gt;fulfillment&lt;/th&gt;
&lt;th&gt;notifier&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;none (o1)&lt;/td&gt;
&lt;td&gt;baseline&lt;/td&gt;
&lt;td&gt;baseline (v1)&lt;/td&gt;
&lt;td&gt;baseline&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;fulfillment sandbox (o2)&lt;/td&gt;
&lt;td&gt;baseline&lt;/td&gt;
&lt;td&gt;sandbox (v2)&lt;/td&gt;
&lt;td&gt;baseline&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;notifier sandbox (o3)&lt;/td&gt;
&lt;td&gt;baseline&lt;/td&gt;
&lt;td&gt;baseline (v1)&lt;/td&gt;
&lt;td&gt;sandbox&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;orders sandbox (o4)&lt;/td&gt;
&lt;td&gt;sandbox&lt;/td&gt;
&lt;td&gt;baseline (v1)&lt;/td&gt;
&lt;td&gt;baseline&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;route group (o5)&lt;/td&gt;
&lt;td&gt;sandbox&lt;/td&gt;
&lt;td&gt;sandbox (v2)&lt;/td&gt;
&lt;td&gt;sandbox&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The notifier sandbox (o3) is the clearest proof: the baseline consumer's call landed on the sandbox, so the routing key made it through Postgres, Debezium and Kafka.&lt;/p&gt;

&lt;h3&gt;
  
  
  The key belongs to the write, not the row
&lt;/h3&gt;

&lt;p&gt;Order &lt;code&gt;o2&lt;/code&gt; was created through the fulfillment sandbox. Ship it with a request that has no routing key. The trigger clears the stored key, and the baseline handles this change:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -s -o /dev/null -X POST &lt;span class="nv"&gt;$ORDERS&lt;/span&gt;/api/orders/o2/ship&lt;span class="o"&gt;;&lt;/span&gt; sleep 2&lt;span class="o"&gt;;&lt;/span&gt; trail o2 &lt;span class="o"&gt;|&lt;/span&gt; tail -3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;orders (baseline): Updated order in Postgres
fulfillment (baseline): Consumed change event (op u) with fulfillment v1: "order o2 (book) is shipped"
notifier (baseline): Sent notification: "order o2 (book) is shipped"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  7. See the key at each hop
&lt;/h2&gt;

&lt;p&gt;The rows hold the context of the request that last wrote them:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl -n debezium-demo &lt;span class="nb"&gt;exec&lt;/span&gt; deploy/postgres -- \
  psql -U postgres -d demo -c &lt;span class="s2"&gt;"SELECT id, status, otel_baggage FROM orders ORDER BY id"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; id | status  |         otel_baggage
----+---------+------------------------------
 o1 | new     |
 o2 | shipped |
 o3 | new     | sd-routing-key=u5h40ssk4ykjd
 o4 | new     | sd-routing-key=77nkpp3435chn
 o5 | new     | sd-routing-key=mlgky8fm7lb1n
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In Kafka, the context is in the headers and no longer in the event's value:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl -n debezium-demo &lt;span class="nb"&gt;exec&lt;/span&gt; deploy/kafka -- /opt/kafka/bin/kafka-console-consumer.sh \
  --bootstrap-server localhost:9092 --topic demo.public.orders --from-beginning \
  --timeout-ms 5000 --property print.headers=true 2&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;/dev/null &lt;span class="o"&gt;|&lt;/span&gt; sed &lt;span class="s1"&gt;'s/__debezium[^,]*,//g'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;...
traceparent:00-de9f...,baggage:sd-routing-key=mlgky8fm7lb1n {"id":"o5","item":"book","status":"new","__deleted":"false","__op":"c"}
traceparent:00-c9f7...,baggage:null {"id":"o2","item":"book","status":"shipped","__deleted":"false","__op":"u"}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The baseline consumer's log shows each decision:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl -n debezium-demo logs deploy/fulfillment &lt;span class="o"&gt;|&lt;/span&gt; grep -E &lt;span class="s2"&gt;"processing|skipped"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;... processing demo.public.orders[0]@0 (routing key None)
... skipped demo.public.orders[0]@1 (routing key 22gurfl1k6v6s)
... processing demo.public.orders[0]@2 (routing key u5h40ssk4ykjd)
... processing demo.public.orders[0]@3 (routing key 77nkpp3435chn)
... skipped demo.public.orders[0]@4 (routing key mlgky8fm7lb1n)
... processing demo.public.orders[0]@5 (routing key None)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your routing keys will differ.&lt;/p&gt;

&lt;h2&gt;
  
  
  8. Clean up
&lt;/h2&gt;

&lt;p&gt;Delete the route group and the sandboxes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;signadot routegroup delete debezium-demo
signadot sandbox delete debezium-fulfillment
signadot sandbox delete debezium-notifier
signadot sandbox delete debezium-orders
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Kafka keeps a consumer group's offsets after its consumer goes away, so the fulfillment sandbox's group is still there. With a Kafka you keep, delete it yourself:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl -n debezium-demo &lt;span class="nb"&gt;exec&lt;/span&gt; deploy/kafka -- /opt/kafka/bin/kafka-consumer-groups.sh \
  --bootstrap-server localhost:9092 --delete --group fulfillment-&lt;span class="nv"&gt;$FULFILLMENT_KEY&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then remove the demo and disconnect:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl delete namespace debezium-demo
signadot &lt;span class="kd"&gt;local&lt;/span&gt; disconnect
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Things to know
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Writes without a context go to the baseline.&lt;/strong&gt; A write that doesn't come from a request, or comes from a client that doesn't use the platform engine (a &lt;code&gt;psql&lt;/code&gt; session, a batch job), clears the two columns, so its change event has no routing key.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deletes go to the baseline.&lt;/strong&gt; A deleted row has nowhere to store the context of the request that deleted it. If sandboxes need to see deletes, use a soft delete (an update), or write the event to an outbox table that is tracked the same way.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sandboxes share the database.&lt;/strong&gt; A sandboxed &lt;code&gt;orders&lt;/code&gt; service writes to the baseline's table. The stored routing key tells you which rows came from which sandbox. To give a sandbox its own database instead, see &lt;a href="https://www.signadot.com/docs/guides/set-up-data-isolation?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=debezium-cdc-tutorial" rel="noopener noreferrer"&gt;Using sandboxes with databases&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Frequently asked questions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  How do you test a Debezium CDC pipeline without a separate database and Kafka per environment?
&lt;/h3&gt;

&lt;p&gt;Store the routing key with each row, let Debezium move it into Kafka headers, and have consumers filter on it. A Postgres trigger stamps the OpenTelemetry baggage of the writing request on the row, a Kafka Connect transform turns those columns into the baggage and traceparent headers, and each consumer checks the key against the Signadot Routes API. Sandboxes then share one Postgres, one Debezium connector and one Kafka topic with the baseline.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why does change data capture need more than header propagation?
&lt;/h3&gt;

&lt;p&gt;Because the service that handles the request never publishes the event. It only writes a row. Debezium publishes the event later from the write-ahead log, and it has never seen the request or its headers. The routing key has to be written into the database with the row to reach the change event.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does the application code have to change?
&lt;/h3&gt;

&lt;p&gt;Very little. The service creates its SQLAlchemy engine with &lt;code&gt;platform_cdc.create_engine&lt;/code&gt;, a migration calls &lt;code&gt;platform_cdc.track_table&lt;/code&gt; once per captured table, and consumers pass a handler to &lt;code&gt;platform_cdc.ChangeConsumer&lt;/code&gt;. The SQL the app runs never mentions the routing key, and the Debezium connector needs six lines of transform configuration.&lt;/p&gt;

&lt;h3&gt;
  
  
  What happens to deletes and to writes made outside a request?
&lt;/h3&gt;

&lt;p&gt;Both go to the baseline. A deleted row has nowhere to store the context of the request that deleted it, and a write from psql or a batch job has no context, so the trigger clears the columns. If sandboxes need to see deletes, use a soft delete or an outbox table that is tracked the same way.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does this work with the outbox pattern?
&lt;/h3&gt;

&lt;p&gt;Yes. Track the outbox table with &lt;code&gt;platform_cdc.track_table&lt;/code&gt; instead of the business table. Each outbox row then carries the routing key of the request that wrote it, and Debezium moves it into the Kafka headers in the same way.&lt;/p&gt;

&lt;h2&gt;
  
  
  See also
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.signadot.com/docs/tutorials/testing-kafka-microservices?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=debezium-cdc-tutorial" rel="noopener noreferrer"&gt;Testing Kafka microservices&lt;/a&gt;: selective consumption when services publish to Kafka themselves&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.signadot.com/docs/guides/set-up-message-queue-isolation/kafka?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=debezium-cdc-tutorial" rel="noopener noreferrer"&gt;Kafka integration guide&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.signadot.com/docs/guides/set-up-message-queue-isolation?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=debezium-cdc-tutorial" rel="noopener noreferrer"&gt;Message Queue Isolation&lt;/a&gt;: the other brokers&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.signadot.com/docs/guides/set-up-context-propagation?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=debezium-cdc-tutorial" rel="noopener noreferrer"&gt;Header-Based Routing&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.signadot.com/docs/reference/sandboxes/spec?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=debezium-cdc-tutorial" rel="noopener noreferrer"&gt;Sandbox specification&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>debezium</category>
      <category>kafka</category>
      <category>kubernetes</category>
      <category>testing</category>
    </item>
    <item>
      <title>Test Coding Agent Pull Requests with Argo CD and Signadot</title>
      <dc:creator>Signadot</dc:creator>
      <pubDate>Mon, 16 Nov 2026 18:41:43 +0000</pubDate>
      <link>https://dev.to/signadot/test-coding-agent-pull-requests-with-argo-cd-and-signadot-12nk</link>
      <guid>https://dev.to/signadot/test-coding-agent-pull-requests-with-argo-cd-and-signadot-12nk</guid>
      <description>&lt;p&gt;&lt;em&gt;Read this tutorial on &lt;a href="https://www.signadot.com/docs/tutorials/argocd-coding-agent-pull-requests?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=argocd-tutorial" rel="noopener noreferrer"&gt;Signadot docs&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Coding agents open pull requests faster than anyone can test them by hand. If you already run Argo CD, it can give each of those pull requests a preview of its own, and the &lt;a href="https://www.signadot.com/articles/argocd-preview-environments?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=argocd-tutorial" rel="noopener noreferrer"&gt;Argo CD preview environments&lt;/a&gt; article explains why a Signadot &lt;a href="https://www.signadot.com/docs/concepts/sandbox?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=argocd-tutorial" rel="noopener noreferrer"&gt;sandbox&lt;/a&gt; beats a full copy of the app for that.&lt;/p&gt;

&lt;p&gt;This tutorial builds the whole loop. A coding agent changes &lt;a href="https://github.com/signadot/hotrod" rel="noopener noreferrer"&gt;HotROD&lt;/a&gt;, a demo ride-sharing app, and opens a pull request. An Argo CD ApplicationSet turns the pull request into an Application whose hooks create a sandbox for the changed &lt;code&gt;route&lt;/code&gt; service, run the pull request's Playwright suite against it, and delete the sandbox when the pull request closes. Argo CD Notifications reports the result as an &lt;code&gt;argocd/preview&lt;/code&gt; check. When the check fails, the agent reads why through the read-only &lt;a href="https://github.com/argoproj-labs/mcp-for-argocd" rel="noopener noreferrer"&gt;Argo CD MCP server&lt;/a&gt;, pushes a fix and waits for the next result.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Time:&lt;/strong&gt; about 40 minutes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example files:&lt;/strong&gt; &lt;a href="https://github.com/signadot/examples/tree/main/argocd-tutorial" rel="noopener noreferrer"&gt;signadot/examples/argocd-tutorial&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Tip: What the agent can and can't do&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The agent pushes commits and reads Argo CD. It needs no kubeconfig and no Signadot API key, and the repository's Claude Code settings block &lt;code&gt;kubectl&lt;/code&gt;, &lt;code&gt;argocd&lt;/code&gt; and &lt;code&gt;signadot&lt;/code&gt;. It can't sync or change anything in Argo CD, and its Argo CD account sees only preview Applications. The preview is its only way to test end to end.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  How it works
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F08g1fi5ktp19k0ymepkp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F08g1fi5ktp19k0ymepkp.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Each piece does one job:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Piece&lt;/th&gt;
&lt;th&gt;Job&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;GitHub Actions&lt;/td&gt;
&lt;td&gt;Builds &lt;code&gt;ghcr.io/&amp;lt;owner&amp;gt;/hotrod:&amp;lt;head sha&amp;gt;&lt;/code&gt; for every commit on a pull request labeled &lt;code&gt;preview&lt;/code&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ApplicationSet&lt;/td&gt;
&lt;td&gt;Creates one Application, &lt;code&gt;hotrod-pr-&amp;lt;number&amp;gt;&lt;/code&gt;, for every open pull request with the &lt;code&gt;preview&lt;/code&gt; label, and deletes it when the pull request closes.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Preview chart&lt;/td&gt;
&lt;td&gt;A ConfigMap with the sandbox specification and three hook Jobs: Sync creates or updates the sandbox, PostSync runs the tests, PostDelete deletes the sandbox.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Signadot&lt;/td&gt;
&lt;td&gt;The sandbox runs the pull request's image in place of &lt;code&gt;route&lt;/code&gt; for requests that carry its routing key. Everything else comes from the baseline.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Argo CD Notifications&lt;/td&gt;
&lt;td&gt;Sets the &lt;code&gt;argocd/preview&lt;/code&gt; commit status: pending when a sync starts, then success or failure.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Argo CD MCP server&lt;/td&gt;
&lt;td&gt;Lets the agent read the Application's status, events and hook logs, and nothing else.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Argo CD doesn't build anything here. It does what it already does for the baseline, reconciling what Git says should exist, plus one post-deploy test. The &lt;a href="https://www.signadot.com/docs/guides/integrate-ci/argocd?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=argocd-tutorial" rel="noopener noreferrer"&gt;Argo CD integration guide&lt;/a&gt; compares this with letting CI run the tests.&lt;/p&gt;

&lt;p&gt;The preview chart lives in the examples repository, not in HotROD, so an agent's pull request can't change how its own preview is created or tested. It controls only its code and its Playwright tests.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;A Kubernetes cluster with the &lt;a href="https://www.signadot.com/docs/installation/signadot-operator?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=argocd-tutorial" rel="noopener noreferrer"&gt;Signadot Operator&lt;/a&gt; installed. Docker Desktop, kind or minikube works.&lt;/li&gt;
&lt;li&gt;The &lt;a href="https://www.signadot.com/docs/getting-started/installation/signadot-cli?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=argocd-tutorial" rel="noopener noreferrer"&gt;Signadot CLI&lt;/a&gt;, logged in, with a local connection for the cluster in &lt;code&gt;~/.signadot/config.yaml&lt;/code&gt;:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;  &lt;span class="na"&gt;local&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;connections&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;cluster&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;&amp;lt;your-signadot-cluster&amp;gt;&lt;/span&gt;
        &lt;span class="na"&gt;kubeContext&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;&amp;lt;your-kube-context&amp;gt;&lt;/span&gt;
        &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;PortForward&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;A Signadot API key for the preview hooks, from a &lt;a href="https://www.signadot.com/docs/guides/admin/service-accounts?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=argocd-tutorial" rel="noopener noreferrer"&gt;service account&lt;/a&gt; under &lt;strong&gt;Admin → Service Accounts&lt;/strong&gt; in the dashboard. See &lt;a href="https://www.signadot.com/docs/guides/admin/api-keys?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=argocd-tutorial" rel="noopener noreferrer"&gt;API Keys&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;argocd&lt;/code&gt;, &lt;code&gt;gh&lt;/code&gt; and &lt;code&gt;kubectl&lt;/code&gt; CLIs, and Node.js for &lt;code&gt;npx&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://code.claude.com" rel="noopener noreferrer"&gt;Claude Code&lt;/a&gt;, or another coding agent that supports MCP.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The steps below pin Argo CD v3.5.6 and argocd-mcp 0.9.0.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Fork HotROD and add the preview files
&lt;/h2&gt;

&lt;p&gt;The agent works in your fork of HotROD, so its pull requests and images are yours. Clone the examples repository next to it and copy the preview files into the fork:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="kd"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;OWNER&lt;/span&gt;&lt;span class="o"&gt;=&amp;lt;&lt;/span&gt;your-github-user&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;   &lt;span class="c"&gt;# lowercase&lt;/span&gt;
git clone https://github.com/signadot/examples.git
gh repo fork signadot/hotrod --clone
&lt;span class="nb"&gt;cd&lt;/span&gt; hotrod
gh repo set-default &lt;span class="nv"&gt;$OWNER&lt;/span&gt;/hotrod
cp -R ../examples/argocd-tutorial/hotrod/. .
git rm -q .github/workflows/build.yml
git add -A &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; git commit -m &lt;span class="s2"&gt;"Add Argo CD previews"&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; git push origin main
gh label create preview
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;gh repo fork --clone&lt;/code&gt; makes the upstream repository the default for &lt;code&gt;gh&lt;/code&gt;. Without &lt;code&gt;gh repo set-default&lt;/code&gt;, the agent's &lt;code&gt;gh pr create&lt;/code&gt; would open its pull request on &lt;code&gt;signadot/hotrod&lt;/code&gt;, where your ApplicationSet never sees it. HotROD's own &lt;code&gt;build.yml&lt;/code&gt; needs Signadot's secrets, so the fork drops it.&lt;/p&gt;

&lt;p&gt;The copied files:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;File&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;.github/workflows/preview-image.yaml&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Builds and pushes the image for each commit on a &lt;code&gt;preview&lt;/code&gt; pull request.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;AGENTS.md&lt;/code&gt; and &lt;code&gt;CLAUDE.md&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Tell the agent how previews work and which MCP tools to call when one fails. &lt;code&gt;CLAUDE.md&lt;/code&gt; imports &lt;code&gt;AGENTS.md&lt;/code&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;.mcp.json&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Starts the Argo CD MCP server with &lt;code&gt;MCP_READ_ONLY=true&lt;/code&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;.claude/settings.json&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Denies Claude Code &lt;code&gt;kubectl&lt;/code&gt;, &lt;code&gt;argocd&lt;/code&gt; and &lt;code&gt;signadot&lt;/code&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The workflow triggers on &lt;code&gt;labeled&lt;/code&gt;, &lt;code&gt;synchronize&lt;/code&gt; and &lt;code&gt;reopened&lt;/code&gt;. GitHub sends a &lt;code&gt;labeled&lt;/code&gt; event for labels set when a pull request is opened, so each commit is built once:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;hotrod/.github/workflows/preview-image.yaml (excerpt)&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;on&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;pull_request&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;types&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;labeled&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;synchronize&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;reopened&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="na"&gt;jobs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;build&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;if&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="s"&gt;-&lt;/span&gt;
      &lt;span class="s"&gt;github.event.action == 'labeled' &amp;amp;&amp;amp; github.event.label.name == 'preview' ||&lt;/span&gt;
      &lt;span class="s"&gt;github.event.action != 'labeled' &amp;amp;&amp;amp; contains(github.event.pull_request.labels.*.name, 'preview')&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open your fork's &lt;strong&gt;Actions&lt;/strong&gt; tab and enable workflows. GitHub disables them on new forks.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Install Argo CD and add two secrets
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl create namespace argocd
kubectl apply -n argocd --server-side --force-conflicts \
  -f https://raw.githubusercontent.com/argoproj/argo-cd/v3.5.6/manifests/install.yaml

kubectl create namespace hotrod-previews
kubectl -n hotrod-previews create secret generic signadot \
  --from-literal=SIGNADOT_ORG=&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;your-org&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; --from-literal=SIGNADOT_API_KEY=&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;your-api-key&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
kubectl -n argocd patch secret argocd-notifications-secret \
  -p &lt;span class="s1"&gt;'{"stringData": {"github-token": "&amp;lt;your-github-token&amp;gt;"}}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The preview's hook Jobs run in &lt;code&gt;hotrod-previews&lt;/code&gt; and read the Signadot key from the &lt;code&gt;signadot&lt;/code&gt; secret. The GitHub token lets the ApplicationSet list your pull requests and Argo CD Notifications set commit statuses. Create a fine-grained token for your fork with &lt;strong&gt;Commit statuses: Read and write&lt;/strong&gt; and &lt;strong&gt;Pull requests: Read&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Deploy the baseline and the ApplicationSet
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="kd"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;CLUSTER&lt;/span&gt;&lt;span class="o"&gt;=&amp;lt;&lt;/span&gt;your-signadot-cluster&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nb"&gt;cd&lt;/span&gt; ../examples/argocd-tutorial
sed -i.orig -e &lt;span class="s2"&gt;"s/&amp;lt;owner&amp;gt;/$OWNER/g"&lt;/span&gt; -e &lt;span class="s2"&gt;"s/&amp;lt;cluster&amp;gt;/$CLUSTER/g"&lt;/span&gt; argocd/*.yaml
kubectl apply --server-side --field-manager=argocd-tutorial -f argocd/
kubectl -n argocd get applications
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;NAME     SYNC STATUS   HEALTH STATUS
hotrod   Synced        Healthy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This applies three files:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;hotrod.yaml&lt;/code&gt; deploys HotROD from your fork's &lt;code&gt;main&lt;/code&gt; branch, with the Signadot DevMesh sidecar, into the &lt;code&gt;hotrod&lt;/code&gt; namespace. If HotROD already runs there, Argo CD adopts it.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;previews.yaml&lt;/code&gt; holds the &lt;code&gt;previews&lt;/code&gt; AppProject and the ApplicationSet.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;config.yaml&lt;/code&gt; adds the agent's account and the notification settings. The separate field manager keeps the defaults the Argo CD install put in &lt;code&gt;argocd-cm&lt;/code&gt;; with the default &lt;code&gt;kubectl&lt;/code&gt; manager, this apply would remove them.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The ApplicationSet polls GitHub every minute, because no webhook can reach a local cluster. Each Application renders the preview chart with the pull request's number and head commit:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;argocd/previews.yaml (excerpt)&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;  &lt;span class="na"&gt;generators&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;pullRequest&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;github&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;owner&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;&amp;lt;owner&amp;gt;&lt;/span&gt;
          &lt;span class="na"&gt;repo&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;hotrod&lt;/span&gt;
          &lt;span class="na"&gt;labels&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;preview&lt;/span&gt;
          &lt;span class="na"&gt;tokenRef&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="na"&gt;secretName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;argocd-notifications-secret&lt;/span&gt;
            &lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;github-token&lt;/span&gt;
        &lt;span class="na"&gt;requeueAfterSeconds&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;60&lt;/span&gt;
  &lt;span class="na"&gt;template&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;metadata&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;hotrod-pr-{{ .number }}&lt;/span&gt;
    &lt;span class="na"&gt;spec&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;project&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;previews&lt;/span&gt;
      &lt;span class="na"&gt;source&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;repoURL&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;https://github.com/signadot/examples.git&lt;/span&gt;
        &lt;span class="na"&gt;targetRevision&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;main&lt;/span&gt;
        &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;argocd-tutorial/preview&lt;/span&gt;
        &lt;span class="na"&gt;helm&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;valuesObject&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="na"&gt;pr&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"{{ .number }}"&lt;/span&gt;
            &lt;span class="na"&gt;headSha&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"{{ .head_sha }}"&lt;/span&gt;
            &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ghcr.io/&amp;lt;owner&amp;gt;/hotrod:{{ .head_sha }}&lt;/span&gt;
            &lt;span class="c1"&gt;# ...
&lt;/span&gt;      &lt;span class="na"&gt;syncPolicy&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;automated&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;prune&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
        &lt;span class="na"&gt;retry&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;limit&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Two settings matter for agent feedback:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;retry.limit: 0&lt;/code&gt;.&lt;/strong&gt; Argo CD 3.5 retries a failed automated sync five times by default, which delays a failing result by several minutes. Here a failed preview reports at once, and the agent's next push is the retry.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The sandbox specification is a ConfigMap.&lt;/strong&gt; Argo CD doesn't count hooks when it compares an Application with Git. The ConfigMap changes with every commit, so each push makes the Application OutOfSync, and the automated sync reruns the hooks.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The sandbox specification forks only &lt;code&gt;route&lt;/code&gt; and runs the pull request's image:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;preview/templates/sandbox.yaml (rendered)&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;hotrod-pr-323&lt;/span&gt;
&lt;span class="na"&gt;spec&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;cluster&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;&amp;lt;your-signadot-cluster&amp;gt;&lt;/span&gt;
  &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;HotROD pull request 323&lt;/span&gt;
  &lt;span class="na"&gt;ttl&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;duration&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;3d&lt;/span&gt;
    &lt;span class="na"&gt;offsetFrom&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;updatedAt&lt;/span&gt;
  &lt;span class="na"&gt;forks&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;forkOf&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Deployment&lt;/span&gt;
      &lt;span class="na"&gt;namespace&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;hotrod&lt;/span&gt;
      &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;route&lt;/span&gt;
    &lt;span class="na"&gt;customizations&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;images&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ghcr.io/&amp;lt;owner&amp;gt;/hotrod:&amp;lt;head sha&amp;gt;&lt;/span&gt;
  &lt;span class="na"&gt;defaultRouteGroup&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;endpoints&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;frontend&lt;/span&gt;
      &lt;span class="na"&gt;target&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;http://frontend.hotrod.svc:8080&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Keep the description the same for every commit: Signadot rejects updates that change it. The TTL is a backstop in case the PostDelete hook never runs.&lt;/p&gt;

&lt;p&gt;The hooks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Sync&lt;/strong&gt; (&lt;code&gt;hotrod-pr-&amp;lt;number&amp;gt;-sandbox&lt;/code&gt;). Container &lt;code&gt;wait-for-image&lt;/code&gt; uses &lt;code&gt;crane&lt;/code&gt; to wait until CI has pushed the image. Container &lt;code&gt;signadot&lt;/code&gt; then runs &lt;code&gt;signadot sandbox apply&lt;/code&gt; and waits for the sandbox to be ready.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PostSync&lt;/strong&gt; (&lt;code&gt;hotrod-pr-&amp;lt;number&amp;gt;-e2e&lt;/code&gt;). Init container &lt;code&gt;routing-key&lt;/code&gt; looks up the sandbox's routing key. It is the only container in this Job that holds the Signadot API key, and it fails the Job if no key comes back, so the tests never run against the baseline by mistake. Container &lt;code&gt;e2e&lt;/code&gt; fetches the pull request's head commit and runs &lt;code&gt;npm run e2e:playwright&lt;/code&gt; with &lt;code&gt;SIGNADOT_ROUTING_KEY&lt;/code&gt; set.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PostDelete&lt;/strong&gt; (&lt;code&gt;hotrod-pr-&amp;lt;number&amp;gt;-cleanup&lt;/code&gt;). Runs &lt;code&gt;signadot sandbox delete&lt;/code&gt; after the ApplicationSet deletes the Application.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The &lt;code&gt;previews&lt;/code&gt; AppProject allows only ConfigMaps, Jobs and Pods, and only in &lt;code&gt;hotrod-previews&lt;/code&gt;. Pods are listed so that Argo CD shows the hook Jobs' Pods, which is where it reads their logs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4: Give the agent read-only access
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;signadot &lt;span class="kd"&gt;local&lt;/span&gt; connect
argocd login argocd-server.argocd.svc --insecure --username admin \
  --password &lt;span class="s2"&gt;"$(argocd admin initial-password -n argocd | head -1)"&lt;/span&gt;
&lt;span class="kd"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;ARGOCD_API_TOKEN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$(&lt;/span&gt;argocd account generate-token --account agent --expires-in 24h&lt;span class="o"&gt;)&lt;/span&gt;
argocd &lt;span class="nb"&gt;logout&lt;/span&gt; argocd-server.argocd.svc --insecure
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;signadot local connect&lt;/code&gt; makes in-cluster addresses such as &lt;code&gt;argocd-server.argocd.svc&lt;/code&gt; resolve on your machine. The Argo CD UI is at &lt;code&gt;https://argocd-server.argocd.svc&lt;/code&gt;. Logging out keeps your admin session out of the shell the agent runs in.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;agent&lt;/code&gt; account comes from &lt;code&gt;config.yaml&lt;/code&gt;. It has an API key and no login, and its RBAC allows reading preview Applications and their logs:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;argocd/config.yaml (excerpt)&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;  &lt;span class="na"&gt;accounts.agent&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;apiKey&lt;/span&gt;
&lt;span class="nn"&gt;---
&lt;/span&gt;  &lt;span class="na"&gt;policy.csv&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt;
    &lt;span class="s"&gt;p, agent, applications, get, previews/*, allow&lt;/span&gt;
    &lt;span class="s"&gt;p, agent, logs, get, previews/*, allow&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;.mcp.json&lt;/code&gt; passes the token to the MCP server and turns on read-only mode, which removes the create, update, delete, sync and resource-action tools:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;hotrod/.mcp.json&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;"argocd"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"npx"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"-y"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"argocd-mcp@0.9.0"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"stdio"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nl"&gt;"env"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nl"&gt;"ARGOCD_BASE_URL"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"${ARGOCD_BASE_URL:-https://argocd-server.argocd.svc}"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nl"&gt;"ARGOCD_API_TOKEN"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"${ARGOCD_API_TOKEN}"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nl"&gt;"MCP_READ_ONLY"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"true"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nl"&gt;"NODE_TLS_REJECT_UNAUTHORIZED"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"0"&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This Argo CD uses a self-signed certificate, so &lt;code&gt;--insecure&lt;/code&gt; and &lt;code&gt;NODE_TLS_REJECT_UNAUTHORIZED=0&lt;/code&gt; skip verification. Drop both once Argo CD has a trusted certificate.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 5: Hand the agent the task
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; ../../hotrod
claude
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Approve the &lt;code&gt;argocd&lt;/code&gt; MCP server from &lt;code&gt;.mcp.json&lt;/code&gt;, then give it the task from &lt;a href="https://github.com/signadot/examples/blob/main/argocd-tutorial/prompt.md" rel="noopener noreferrer"&gt;&lt;code&gt;prompt.md&lt;/code&gt;&lt;/a&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;In the route service, make the "Resolving routes" notification show the ETA that route computed,
for example "Resolving routes (ETA 12m30s)". Open a pull request for it and don't stop until its
preview passes. Then tell me the PR URL, the preview URL and what you checked.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In our run, Claude Code found the notification in &lt;code&gt;services/route/server.go&lt;/code&gt; and the Playwright test that asserts its text, and changed both:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight diff"&gt;&lt;code&gt;&lt;span class="gd"&gt;-           Body:      "Resolving routes",&lt;/span&gt;
&lt;span class="gi"&gt;+           Body:      fmt.Sprintf("Resolving routes (ETA %s)", eta),&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight diff"&gt;&lt;code&gt;&lt;span class="gd"&gt;-       ).toHaveText("Resolving routes")&lt;/span&gt;
&lt;span class="gi"&gt;+       ).toHaveText(/^Resolving routes \(ETA (\d+h)?(\d+m)?\d+s\)$/);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It opened the pull request with &lt;code&gt;gh pr create --label preview&lt;/code&gt; and waited with &lt;code&gt;gh pr checks --watch&lt;/code&gt;. Within a minute, the ApplicationSet created &lt;code&gt;hotrod-pr-323&lt;/code&gt; and the check turned pending. The Sync hook waited for the image:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;waiting for CI to push ghcr.io/&amp;lt;owner&amp;gt;/hotrod:&amp;lt;head sha&amp;gt;: Error: GET https://ghcr.io/v2/&amp;lt;owner&amp;gt;/hotrod/manifests/&amp;lt;head sha&amp;gt;: MANIFEST_UNKNOWN: manifest unknown
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The image build took under two minutes. Then the Sync hook created the sandbox and the PostSync hook ran the pull request's tests against it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Testing 6651b6c22905f7543e15ef683033570a444ff956 in sandbox hotrod-pr-323 (routing key ttdg1bpt6cgcj)

Running 2 tests using 1 worker

  ✓  1 [chromium] › basic.spec.ts:4:6 › Request a ride › check route resolve routes (2.7s)
  ✓  2 [chromium] › basic.spec.ts:17:6 › Request a ride › check driver series (2.5s)

  2 passed (6.7s)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;About two and a half minutes after the push, &lt;code&gt;argocd/preview&lt;/code&gt; passed. The agent then called &lt;code&gt;get_application_workload_logs&lt;/code&gt; on the e2e Job to confirm the run tested its own commit, and put the preview URL in the pull request description.&lt;/p&gt;

&lt;p&gt;The first image build creates the package &lt;code&gt;ghcr.io/&amp;lt;owner&amp;gt;/hotrod&lt;/code&gt;. If GitHub makes it private, the Sync hook keeps logging &lt;code&gt;DENIED&lt;/code&gt; after the build succeeds. HotROD is open source, so make the package public in its &lt;strong&gt;Package settings&lt;/strong&gt;, and the preview continues on its own. Keep images of your own services private; see &lt;a href="https://www.signadot.com/docs/tutorials/argocd-coding-agent-pull-requests?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=argocd-tutorial#use-it-with-your-own-services" rel="noopener noreferrer"&gt;Use it with your own services&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 6: Watch the agent fix a failing preview
&lt;/h2&gt;

&lt;p&gt;A passing first try doesn't show the loop's real value, so break the preview the way a teammate might. &lt;code&gt;driver&lt;/code&gt; gives each &lt;code&gt;route&lt;/code&gt; call a one-second deadline (&lt;code&gt;services/route/client.go&lt;/code&gt;). Once the agent is done, in a second terminal in &lt;code&gt;hotrod&lt;/code&gt;, with the agent's branch checked out, push a commit that makes &lt;code&gt;route&lt;/code&gt; slower than that:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;perl -pi -e &lt;span class="s1"&gt;'s/50 \* time\.Millisecond/1500 * time.Millisecond/'&lt;/span&gt; pkg/config/route.go
git commit -am &lt;span class="s2"&gt;"route: simulate a slower routing engine"&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; git push
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The change builds and passes unit tests. In the preview, &lt;code&gt;driver&lt;/code&gt; gives up on every route lookup, no ride gets a driver, and both Playwright tests fail:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    Error: Timed out 5000ms waiting for expect(locator).toHaveText(expected)

    Locator: locator('//div[p[2][contains(text(), 'driver')]]/p[4]').last()
    Expected pattern: /.*T7\d{5}C.*/
    Received string:  "Finding an available driver"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Tell the agent:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;The argocd/preview check on &amp;lt;PR URL&amp;gt; has been failing since a teammate pushed a commit to your
branch. Find out why, fix it, and don't stop until the preview passes.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In our run, the agent checked the pull request with &lt;code&gt;gh pr checks&lt;/code&gt;, then called &lt;code&gt;get_application&lt;/code&gt; for &lt;code&gt;hotrod-pr-323&lt;/code&gt; and &lt;code&gt;get_application_workload_logs&lt;/code&gt; for its e2e Job. It read the teammate's commit and the &lt;code&gt;route&lt;/code&gt; client code, found the one-second deadline, and pushed a revert:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Revert "route: simulate a realistic routing engine (1.5s per calculation)"

This reverts commit 31cdf11. The driver service calls FindRoute with a
1s deadline (services/route/client.go), so a 1.5s calculation makes every
route lookup fail: dispatch never completes and no route notification is
stored. A slower routing engine needs the client deadline raised first,
in a change that also redeploys driver.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The check passed less than two minutes after its push. The agent also explained why raising the timeout in the pull request wouldn't help: the timeout runs in &lt;code&gt;driver&lt;/code&gt;, and the preview forks only &lt;code&gt;route&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 7: Review and merge
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;argocd/preview&lt;/code&gt; check links to the preview URL, &lt;code&gt;https://frontend--hotrod-pr-&amp;lt;number&amp;gt;.preview.signadot.com&lt;/code&gt;. Open it while signed in to Signadot and request a ride. The &lt;code&gt;route&lt;/code&gt; notification shows the ETA, because the preview URL adds the sandbox's routing key to your requests. Dispatching one ride with the routing key and one without shows the difference in the &lt;code&gt;route&lt;/code&gt; notification:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;hotrod-pr-323 | Resolving routes (ETA 21m27s)
baseline      | Resolving routes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Merge or close the pull request. On its next poll, the ApplicationSet deletes &lt;code&gt;hotrod-pr-&amp;lt;number&amp;gt;&lt;/code&gt;, the PostDelete hook deletes the sandbox, and &lt;code&gt;signadot sandbox list&lt;/code&gt; no longer shows it. In our runs this took about a minute.&lt;/p&gt;

&lt;h2&gt;
  
  
  Clean up
&lt;/h2&gt;

&lt;p&gt;Close any open &lt;code&gt;preview&lt;/code&gt; pull requests first, so their hooks can delete their sandboxes. Then, from &lt;code&gt;examples/argocd-tutorial&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl delete -f argocd/
kubectl delete namespace hotrod-previews argocd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;HotROD keeps running in &lt;code&gt;hotrod&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Use it with your own services
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Keep the chart where the agent can't change it.&lt;/strong&gt; The agent pushes with your GitHub credentials, so it can push to your app repository's &lt;code&gt;main&lt;/code&gt; branch. Keep the preview chart in a repository your platform team controls, and pin &lt;code&gt;targetRevision&lt;/code&gt; to a commit or tag.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Treat the label as the gate.&lt;/strong&gt; Anyone who can add &lt;code&gt;preview&lt;/code&gt; to a pull request gets that pull request's code and tests run in your cluster.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fork more services.&lt;/strong&gt; The chart's &lt;code&gt;services&lt;/code&gt; value lists the Deployments the sandbox forks. All of HotROD's services share one image; for your services, give each fork its own image.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keep your images private.&lt;/strong&gt; &lt;code&gt;ghcr.io/&amp;lt;owner&amp;gt;/hotrod&lt;/code&gt; is public only because HotROD is open source. Push your own services' images to a private registry the cluster can pull from. If pulling needs credentials, add an &lt;code&gt;imagePullSecrets&lt;/code&gt; &lt;a href="https://www.signadot.com/docs/reference/sandboxes/advanced/custom-patches?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=argocd-tutorial" rel="noopener noreferrer"&gt;custom patch&lt;/a&gt; to each fork, and give the &lt;code&gt;wait-for-image&lt;/code&gt; container the same credentials, for example a Docker config secret mounted in the container with &lt;code&gt;DOCKER_CONFIG&lt;/code&gt; pointing at it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use webhooks instead of polling.&lt;/strong&gt; Point a GitHub webhook at the ApplicationSet controller instead of polling every minute. See &lt;a href="https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Pull-Request/#webhook-configuration" rel="noopener noreferrer"&gt;Webhook Configuration&lt;/a&gt; in the Argo CD docs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rotate the agent's token.&lt;/strong&gt; The token in step 4 expires after 24 hours. Generate a new one when it does.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Troubleshooting
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Sync hook keeps logging &lt;code&gt;waiting for CI to push ...&lt;/code&gt;.&lt;/strong&gt; With &lt;code&gt;MANIFEST_UNKNOWN&lt;/code&gt;, the image isn't there yet: check that Actions is enabled in your fork and that the &lt;code&gt;Preview image&lt;/code&gt; run succeeded. With &lt;code&gt;DENIED&lt;/code&gt; after a successful run, the package is private: make it public for HotROD, or give &lt;code&gt;wait-for-image&lt;/code&gt; registry credentials for a private image.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The pull request gets no &lt;code&gt;argocd/preview&lt;/code&gt; check.&lt;/strong&gt; The pull request needs the &lt;code&gt;preview&lt;/code&gt; label, and the GitHub token needs commit status access to your fork. &lt;code&gt;kubectl -n argocd logs deploy/argocd-notifications-controller&lt;/code&gt; shows GitHub's answer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;get_application_workload_logs&lt;/code&gt; returns &lt;code&gt;[]&lt;/code&gt;.&lt;/strong&gt; Argo CD only reads logs from Pods it shows under the Job, and it hides kinds the AppProject doesn't allow. Keep &lt;code&gt;Pod&lt;/code&gt; in the &lt;code&gt;previews&lt;/code&gt; project.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The sandbox Job fails with &lt;code&gt;cannot update description&lt;/code&gt;.&lt;/strong&gt; The sandbox's description changed between commits. Signadot doesn't allow that; keep it constant.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The agent's pull request doesn't get a preview.&lt;/strong&gt; Check that it opened the pull request on your fork, not on &lt;code&gt;signadot/hotrod&lt;/code&gt;: run &lt;code&gt;gh repo set-default $OWNER/hotrod&lt;/code&gt; in the clone.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The agent's MCP calls fail with 401.&lt;/strong&gt; The token from step 4 has expired. Generate a new one and restart the agent.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Frequently asked questions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Does the coding agent need cluster or Signadot credentials?
&lt;/h3&gt;

&lt;p&gt;No. The agent pushes commits to Git and reads Argo CD through the read-only Argo CD MCP server, as a local account that can only get Applications in the previews project and their logs. The Signadot API key stays in a Kubernetes secret that only the preview's hook Jobs use, and the containers that run the pull request's own code never see it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Is Argo CD acting as the CI system?
&lt;/h3&gt;

&lt;p&gt;Only partly. GitHub Actions still builds the image for each commit. Argo CD manages the preview's lifecycle and runs the end-to-end tests as a PostSync hook, next to the sandbox in the cluster, so CI needs no network path to the cluster and the agent reads the result where it already looks. If your tests already live in CI, Argo CD can manage only the sandbox and CI can run the tests; the Argo CD integration guide compares the options.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why fork one service instead of deploying the whole app for each pull request?
&lt;/h3&gt;

&lt;p&gt;A Signadot sandbox runs only the services a pull request changes, here route, and routes requests that carry its routing key to them. Everything else, including Kafka, MySQL and Redis, comes from the baseline Argo CD already manages. Each preview adds one pod instead of a copy of the app, which keeps previews cheap enough to give to every agent pull request.&lt;/p&gt;

&lt;h3&gt;
  
  
  Will Argo CD prune the sandbox forks or mark the baseline OutOfSync?
&lt;/h3&gt;

&lt;p&gt;No. Forked workloads carry no Argo CD tracking annotation, and they are owned by Signadot objects rather than being top-level resources, so Argo CD neither tracks, prunes nor reports them as orphaned. In this tutorial the baseline hotrod Application stayed Synced and Healthy while previews ran.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does this work with coding agents other than Claude Code?
&lt;/h3&gt;

&lt;p&gt;Yes. Any agent that can push to Git and call an MCP server can follow the same loop. &lt;code&gt;AGENTS.md&lt;/code&gt; in the repository holds the instructions, and the Argo CD MCP server runs over stdio with npx. The &lt;code&gt;.claude/settings.json&lt;/code&gt; deny rules are specific to Claude Code; give other agents an equivalent restriction.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does this work on Akuity Platform?
&lt;/h3&gt;

&lt;p&gt;The ApplicationSet, chart and notifications are standard Argo CD, but this tutorial was tested on open source Argo CD. On Akuity Platform, TokenRef strict mode is on by default, so point the generator's tokenRef at the platform-managed application-set-secret, and agents can use the Akuity MCP Server, which is read-only by default. See the Argo CD integration guide.&lt;/p&gt;

&lt;h2&gt;
  
  
  See also
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.signadot.com/docs/guides/integrate-ci/argocd?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=argocd-tutorial" rel="noopener noreferrer"&gt;Argo CD integration guide&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.signadot.com/validate-ai-generated-code-kubernetes/?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=argocd-tutorial" rel="noopener noreferrer"&gt;Validate AI-generated code on Kubernetes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.signadot.com/docs/integrations/mcp?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=argocd-tutorial" rel="noopener noreferrer"&gt;Signadot MCP server&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.signadot.com/docs/integrations/coding-agents/agent-skills?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=argocd-tutorial" rel="noopener noreferrer"&gt;Signadot agent skills&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.signadot.com/docs/tutorials/devin-signadot-sandboxes?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=argocd-tutorial" rel="noopener noreferrer"&gt;Validate Devin's changes end to end&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/signadot/examples/tree/main/argocd-tutorial" rel="noopener noreferrer"&gt;signadot/examples/argocd-tutorial&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>argocd</category>
      <category>kubernetes</category>
      <category>ai</category>
      <category>testing</category>
    </item>
    <item>
      <title>From Jira ticket to tested pull request with Signadot</title>
      <dc:creator>Signadot</dc:creator>
      <pubDate>Thu, 12 Nov 2026 16:08:04 +0000</pubDate>
      <link>https://dev.to/signadot/from-jira-ticket-to-tested-pull-request-with-signadot-1328</link>
      <guid>https://dev.to/signadot/from-jira-ticket-to-tested-pull-request-with-signadot-1328</guid>
      <description>&lt;p&gt;&lt;em&gt;Read this tutorial on &lt;a href="https://www.signadot.com/docs/tutorials/jira-coding-agent-signadot-sandboxes?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=jira-coding-agent-tutorial" rel="noopener noreferrer"&gt;Signadot docs&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;A friendlier driver message can break a ride-sharing app if its frontend still expects the old wording. Signadot lets you catch that kind of cross-service bug in an agent's pull request before you merge it, by testing the changed services alongside the rest of your application.&lt;/p&gt;

&lt;p&gt;You'll use the &lt;a href="https://support.atlassian.com/jira-software-cloud/docs/work-with-ai-agents-in-jira/" rel="noopener noreferrer"&gt;Jira Coding Agent&lt;/a&gt; to implement this feature in &lt;a href="https://github.com/signadot/hotrod" rel="noopener noreferrer"&gt;HotROD&lt;/a&gt;, a small ride-sharing app. Bitbucket Pipelines builds the change, and Signadot runs only the affected services in a &lt;a href="https://www.signadot.com/docs/concepts/sandbox?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=jira-coding-agent-tutorial" rel="noopener noreferrer"&gt;sandbox&lt;/a&gt;, sharing the remaining services from the &lt;a href="https://www.signadot.com/docs/concepts/baseline-environment?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=jira-coding-agent-tutorial" rel="noopener noreferrer"&gt;baseline&lt;/a&gt;. Playwright checks the ride flow, and the test result and a live preview link appear on the pull request.&lt;/p&gt;

&lt;p&gt;You'll configure the repository, test runner and Jira connection once, then follow a work item through the resulting workflow.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Estimated time:&lt;/strong&gt; about an hour once the prerequisites are in place, much of it spent waiting for the agent and the pipeline.&lt;/p&gt;

&lt;p&gt;Pipeline configuration and test files: &lt;a href="https://github.com/signadot/examples/tree/main/jira-coding-agent-tutorial" rel="noopener noreferrer"&gt;signadot/examples/jira-coding-agent-tutorial&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What you will build
&lt;/h2&gt;

&lt;p&gt;The workflow takes a Jira work item through implementation, testing and review. If a test fails, you paste the failure into the agent's Jira session and ask it to fix the same pull request.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F27ccphnm9zomshwaeop8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F27ccphnm9zomshwaeop8.png" alt=" " width="800" height="215"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;A Kubernetes cluster connected to Signadot with HotROD installed. See the &lt;a href="https://www.signadot.com/docs/tutorials/quickstart/first-sandbox?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=jira-coding-agent-tutorial#option-1-set-up-on-your-own-kubernetes-cluster" rel="noopener noreferrer"&gt;quickstart&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Jira Standard or Premium with the Jira Coding Agent available and Rovo credits for a few sessions.&lt;/li&gt;
&lt;li&gt;A Bitbucket Cloud workspace in the same Atlassian organization, where you can create repositories and run Pipelines.&lt;/li&gt;
&lt;li&gt;A Docker Hub account.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;git&lt;/code&gt; with SSH access to Bitbucket (&lt;a href="https://support.atlassian.com/bitbucket-cloud/docs/configure-ssh-and-two-step-verification/" rel="noopener noreferrer"&gt;set up an SSH key&lt;/a&gt;), &lt;code&gt;kubectl&lt;/code&gt;, and the &lt;a href="https://www.signadot.com/docs/getting-started/installation/signadot-cli?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=jira-coding-agent-tutorial" rel="noopener noreferrer"&gt;Signadot CLI&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Check your setup
&lt;/h2&gt;

&lt;p&gt;Check that your CLIs point at the right cluster and organization:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;signadot auth status
signadot cluster list
kubectl config current-context
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note your Signadot organization from &lt;code&gt;signadot auth status&lt;/code&gt; and your cluster name from &lt;code&gt;signadot cluster list&lt;/code&gt;. You need both below.&lt;/p&gt;

&lt;p&gt;Open HotROD using the quickstart's &lt;a href="https://www.signadot.com/docs/tutorials/quickstart/first-sandbox?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=jira-coding-agent-tutorial#accessing-the-apps-frontend" rel="noopener noreferrer"&gt;frontend access instructions&lt;/a&gt; and request a ride to confirm the baseline works.&lt;/p&gt;

&lt;h2&gt;
  
  
  Set up the Bitbucket repository
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Create the repository
&lt;/h3&gt;

&lt;p&gt;In Bitbucket, select &lt;strong&gt;Create &amp;gt; Repository&lt;/strong&gt;. Pick a project, name the repository &lt;code&gt;hotrod&lt;/code&gt; and keep it private. Set both &lt;strong&gt;Include a README?&lt;/strong&gt; and &lt;strong&gt;Include .gitignore?&lt;/strong&gt; to &lt;strong&gt;No&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The commands below clone HotROD and copy in the pipeline configuration and test files from &lt;code&gt;signadot/examples&lt;/code&gt;. Replace &lt;code&gt;YOUR_WORKSPACE&lt;/code&gt; with your Bitbucket workspace ID before pushing:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/signadot/examples.git signadot-examples
git clone https://github.com/signadot/hotrod.git hotrod
&lt;span class="nb"&gt;cd&lt;/span&gt; hotrod
git checkout -B main 36525ff00bb760fd44df64ec277da94d63522ac1
cp -R ../signadot-examples/jira-coding-agent-tutorial/files/. .
git add -A
git commit -m &lt;span class="s2"&gt;"Test pull requests in Signadot sandboxes"&lt;/span&gt;
git remote set-url origin git@bitbucket.org:YOUR_WORKSPACE/hotrod.git
git push -u origin main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The copied files replace &lt;code&gt;bitbucket-pipelines.yml&lt;/code&gt; and add &lt;code&gt;.signadot/jira-agent/&lt;/code&gt; and a Playwright test for the ride banner. &lt;a href="https://www.signadot.com/docs/tutorials/jira-coding-agent-signadot-sandboxes?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=jira-coding-agent-tutorial#how-the-pipeline-works" rel="noopener noreferrer"&gt;How the pipeline works&lt;/a&gt; explains the configuration.&lt;/p&gt;

&lt;h3&gt;
  
  
  Turn on Pipelines
&lt;/h3&gt;

&lt;p&gt;In Bitbucket's left sidebar, open the three-dot menu next to &lt;code&gt;hotrod&lt;/code&gt; and select &lt;strong&gt;Settings&lt;/strong&gt;. This opens &lt;strong&gt;Repository settings&lt;/strong&gt;. Under &lt;strong&gt;Pipelines &amp;gt; Settings&lt;/strong&gt;, turn on &lt;strong&gt;Enable Pipelines&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Check your workspace's &lt;a href="https://support.atlassian.com/bitbucket-cloud/docs/manage-your-plan-and-billing/" rel="noopener noreferrer"&gt;available build minutes&lt;/a&gt;. Free includes Pipelines; Standard provides more build minutes for repeated runs.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Tip:&lt;/strong&gt; In a brand new workspace, the toggle can stay greyed out until your Bitbucket account has two-step verification. Turn it on under &lt;strong&gt;Personal Bitbucket settings &amp;gt; Two-step verification&lt;/strong&gt;, then reload the page.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Add the pipeline's credentials
&lt;/h3&gt;

&lt;p&gt;The pipeline signs in to Signadot with an API key from a &lt;a href="https://www.signadot.com/docs/guides/admin/service-accounts?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=jira-coding-agent-tutorial" rel="noopener noreferrer"&gt;service account&lt;/a&gt;. A Signadot admin must create this account and the Job Runner Group used below. In the &lt;a href="https://app.signadot.com" rel="noopener noreferrer"&gt;Signadot Dashboard&lt;/a&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open &lt;strong&gt;Admin &amp;gt; Service Accounts&lt;/strong&gt;, then create a service account, such as &lt;code&gt;hotrod-jira-ci&lt;/code&gt;, with the &lt;code&gt;member&lt;/code&gt; role.&lt;/li&gt;
&lt;li&gt;On the account's &lt;strong&gt;Keys&lt;/strong&gt; tab, create an API key and copy it. You only see it once.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In Docker Hub, open &lt;strong&gt;Account settings &amp;gt; Personal access tokens&lt;/strong&gt; and generate a token with &lt;strong&gt;Read &amp;amp; Write&lt;/strong&gt; access.&lt;/p&gt;

&lt;p&gt;Then, in Bitbucket, open &lt;strong&gt;Repository settings &amp;gt; Pipelines &amp;gt; Repository variables&lt;/strong&gt; and add these five variables. &lt;strong&gt;Secured&lt;/strong&gt; starts ticked. Keep it for the two keys and untick it for the other three:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;th&gt;Secured&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;SIGNADOT_ORG&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Your Signadot organization&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;SIGNADOT_API_KEY&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The service account's API key&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;SIGNADOT_CLUSTER&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Your cluster name&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;DOCKERHUB_USERNAME&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Your Docker Hub username&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;DOCKERHUB_TOKEN&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The Docker Hub token&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;In Docker Hub, &lt;a href="https://docs.docker.com/docker-hub/repos/create/" rel="noopener noreferrer"&gt;create a repository&lt;/a&gt; named &lt;code&gt;hotrod&lt;/code&gt; under the username you set as &lt;code&gt;DOCKERHUB_USERNAME&lt;/code&gt;, with &lt;strong&gt;Public&lt;/strong&gt; visibility so your cluster can pull the image. The pipeline will push to &lt;code&gt;docker.io/&amp;lt;DOCKERHUB_USERNAME&amp;gt;/hotrod&lt;/code&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Caution:&lt;/strong&gt; Public visibility is a convenience for this HotROD demo. For a private application, use a private registry and configure an &lt;a href="https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/" rel="noopener noreferrer"&gt;image pull secret&lt;/a&gt; on the baseline workloads before creating sandboxes.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Prepare the cluster
&lt;/h2&gt;

&lt;p&gt;Your &lt;code&gt;kubectl&lt;/code&gt; access must allow creating namespaces and Secrets for the test runner.&lt;/p&gt;

&lt;h3&gt;
  
  
  Let the test runner read the repository
&lt;/h3&gt;

&lt;p&gt;The Playwright Job checks out the pull request's commit from inside your cluster. For that, it needs read access to your private repository. In Bitbucket, open &lt;strong&gt;Repository settings &amp;gt; Security &amp;gt; Access tokens&lt;/strong&gt;, select &lt;strong&gt;Create access token&lt;/strong&gt;, name it &lt;code&gt;signadot-test-runner&lt;/code&gt; and give it only the &lt;strong&gt;Repositories: Read&lt;/strong&gt; scope. Choose an expiry that covers your tutorial session, then select &lt;strong&gt;Create&lt;/strong&gt; and copy the token.&lt;/p&gt;

&lt;p&gt;Create the runner's namespace. The command also works if it already exists:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl create namespace signadot-tests --dry-run=client -o yaml &lt;span class="o"&gt;|&lt;/span&gt; kubectl apply -f -
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Paste the token at the prompt below. The prompt hides your input and avoids putting the token in shell history:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;bash -c &lt;span class="s1"&gt;'printf "Repository access token: "; read -rs T; echo
kubectl -n signadot-tests create secret generic hotrod-repo-read --from-literal=token="$T" \
  --dry-run=client -o yaml | kubectl -n signadot-tests apply -f -'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Caution:&lt;/strong&gt; Any code that runs in a Job on this runner can read the token. Use the runner only for this repository.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Create the Job Runner Group
&lt;/h3&gt;

&lt;p&gt;The Job Runner Group supplies the pod that runs Playwright. It uses an image matching HotROD's lockfile and mounts the repository Secret. From &lt;code&gt;hotrod&lt;/code&gt;, create it with your admin CLI login, replacing &lt;code&gt;YOUR_CLUSTER&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;signadot jrg apply -f .signadot/jira-agent/runner.yaml --set &lt;span class="nv"&gt;cluster&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;YOUR_CLUSTER
signadot jrg get hotrod-playwright
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Re-run &lt;code&gt;signadot jrg get&lt;/code&gt; until it reports &lt;code&gt;1/1 pods ready&lt;/code&gt;. The first pod takes a few minutes to pull the image.&lt;/p&gt;

&lt;h2&gt;
  
  
  Connect Jira to Bitbucket
&lt;/h2&gt;

&lt;p&gt;Open your Jira space and select &lt;strong&gt;Development &amp;gt; Connections&lt;/strong&gt;. Under &lt;strong&gt;Source code management&lt;/strong&gt;, connect Bitbucket and approve access for your workspace. &lt;strong&gt;Coding agents&lt;/strong&gt; then lists the Jira Coding Agent as &lt;strong&gt;Pre-connected&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdbs32hwapzxojhz6q6jo.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdbs32hwapzxojhz6q6jo.jpg" alt="The Jira space's Development page with Bitbucket connected and the Jira Coding Agent pre-connected" width="740" height="490"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Hand a work item to the Jira Coding Agent
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Describe the feature
&lt;/h3&gt;

&lt;p&gt;In Jira, select &lt;strong&gt;Create&lt;/strong&gt;, choose your space and set the work type to &lt;strong&gt;Story&lt;/strong&gt;. Fill in the &lt;strong&gt;Summary&lt;/strong&gt; and &lt;strong&gt;Description&lt;/strong&gt;, then select &lt;strong&gt;Create&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Summary&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Make the driver arrival message friendlier
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Description&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Riders find the driver notification
"Driver T757183C arriving in 2m54s" terse.

Acceptance criteria
- The arrival message reads "Your driver &amp;lt;driver ID&amp;gt; is on the way
  to &amp;lt;pickup location name&amp;gt; and will be there in &amp;lt;ETA&amp;gt;", for example
  "Your driver T757183C is on the way to My Home and will be there
  in 2m54s".
- The Playwright tests in playwright-tests/ check the new wording
  for a ride from My Home.
- The existing Playwright tests still pass.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Foeg43xd6bpowwwk9pg9c.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Foeg43xd6bpowwwk9pg9c.jpg" alt="A Jira story with the feature description and three acceptance criteria" width="687" height="355"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Start the agent
&lt;/h3&gt;

&lt;p&gt;On the work item, select &lt;strong&gt;Start work&lt;/strong&gt; under &lt;strong&gt;Agent sessions&lt;/strong&gt;, then &lt;strong&gt;Jira Coding Agent&lt;/strong&gt;. If your layout shows an &lt;strong&gt;Agents&lt;/strong&gt; menu instead, select &lt;strong&gt;Jira Coding Agent&lt;/strong&gt; there. When the session asks for a code repository, choose &lt;strong&gt;Select repository&lt;/strong&gt; and pick &lt;code&gt;hotrod&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Select the gear next to the repository to open &lt;strong&gt;Code Settings&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Turn on &lt;strong&gt;Push code to branch autonomously&lt;/strong&gt;. Without it, the agent's code stays in its session.&lt;/li&gt;
&lt;li&gt;Turn on &lt;strong&gt;Create draft pull request&lt;/strong&gt; and choose &lt;strong&gt;Always&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;Save&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbkn4vvtbpn5zoccassnd.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbkn4vvtbpn5zoccassnd.jpg" alt="Code Settings with autonomous push and draft pull requests turned on" width="412" height="604"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Leave the prompt empty (the work item drives the change) and make sure &lt;strong&gt;Generate code in draft pull request&lt;/strong&gt; is ticked. Then select &lt;strong&gt;Generate code&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Select &lt;strong&gt;Open session&lt;/strong&gt; under the work item's &lt;strong&gt;Agents&lt;/strong&gt; section to follow its progress. When it finishes, it summarizes its changes and checks, pushes a branch and opens a draft pull request.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F397bzp0cu0udizbu20of.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F397bzp0cu0udizbu20of.jpg" alt="The Jira Coding Agent's summary of its driver, frontend and test changes" width="800" height="376"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Follow the pull request
&lt;/h2&gt;

&lt;p&gt;Open the pull request linked in the agent session to continue in Bitbucket.&lt;/p&gt;

&lt;p&gt;The pipeline starts as soon as the draft pull request opens. It has four steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Build the frontend&lt;/strong&gt; installs dependencies from the lockfile and builds HotROD's React app.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Compile HotROD&lt;/strong&gt; builds the Go binary, with the app embedded, for &lt;code&gt;amd64&lt;/code&gt; and &lt;code&gt;arm64&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Build and push the image&lt;/strong&gt; builds HotROD's Dockerfile for both platforms and pushes it to Docker Hub, tagged with the commit.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test in a Signadot sandbox&lt;/strong&gt; creates the sandbox, posts a &lt;strong&gt;Signadot sandbox&lt;/strong&gt; report on the pull request, runs the Playwright Job and updates the report with the result.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Allow about six minutes for the pipeline. The first run can take longer while dependencies and images are downloaded. In the pull request's sidebar, expand &lt;strong&gt;Reports&lt;/strong&gt; and select &lt;strong&gt;Signadot sandbox&lt;/strong&gt;. The report has two links: &lt;strong&gt;Open the preview&lt;/strong&gt; opens HotROD as the sandbox serves it, and &lt;strong&gt;Open the Signadot Job&lt;/strong&gt; shows the test run and its logs. Under the Job's &lt;strong&gt;Artifacts&lt;/strong&gt;, you can download &lt;code&gt;playwright-report.tgz&lt;/code&gt;, which contains the HTML report and failure traces and videos.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Flahbnklok660itpivnp8.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Flahbnklok660itpivnp8.jpg" alt="A passed Signadot sandbox report on the pull request, with links to the preview and test Job" width="800" height="228"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The agent may update both the driver message and its frontend parser in its first change. If all tests pass, continue to &lt;a href="https://www.signadot.com/docs/tutorials/jira-coding-agent-signadot-sandboxes?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=jira-coding-agent-tutorial#review-the-running-change" rel="noopener noreferrer"&gt;review the running change&lt;/a&gt;. If a test fails, use the steps below to get the agent to fix the same pull request.&lt;/p&gt;

&lt;p&gt;If the pipeline stops before Playwright runs, open the failed step's log first. For credential, image-pull or runner problems, use the &lt;a href="https://github.com/signadot/examples/tree/main/jira-coding-agent-tutorial#troubleshooting" rel="noopener noreferrer"&gt;example's troubleshooting guide&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  When the tests fail
&lt;/h2&gt;

&lt;p&gt;HotROD's frontend reads the driver ID out of the driver's message to build the ride banner. If the agent changes only the message, that change can compile and pass its own checks while breaking the banner. The following screenshots show an example of this failure. Your sandbox name and work item number will differ.&lt;/p&gt;

&lt;p&gt;Open the preview, request a ride from &lt;strong&gt;My Home&lt;/strong&gt; to &lt;strong&gt;Rachel's Floral Designs&lt;/strong&gt; and select &lt;strong&gt;Show Logs&lt;/strong&gt;. The logs show the sandbox driver sending the new message while the frontend, location and route services come from the baseline:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fb7u5tpe9gm6ic4pjyhbx.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fb7u5tpe9gm6ic4pjyhbx.jpg" alt="The driver-only sandbox sends the new message while the other services use the baseline" width="700" height="328"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Because the baseline frontend cannot read the driver ID from that message, the ride banner shows &lt;code&gt;Unknown&lt;/code&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftohu39pmn9fzos1omjho.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftohu39pmn9fzos1omjho.jpg" alt="The ride banner shows Unknown instead of the driver ID" width="604" height="64"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;ride-banner.spec.ts&lt;/code&gt; test catches this. Select &lt;strong&gt;Open the Signadot Job&lt;/strong&gt; in the pull request's report and open &lt;strong&gt;Logs&lt;/strong&gt; to see the failing test and its error:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F08o852jyj07uopjxn9lv.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F08o852jyj07uopjxn9lv.jpg" alt="The Signadot Job's logs, with the ride banner test failing and the other two tests passing" width="799" height="417"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Give the failure to the agent:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;In the Job's &lt;strong&gt;Logs&lt;/strong&gt;, copy the failing test's name and error.&lt;/li&gt;
&lt;li&gt;On the Jira work item, find the agent's card under &lt;strong&gt;Agents&lt;/strong&gt;. Expand the card if it is collapsed, then select &lt;strong&gt;Review code&lt;/strong&gt; to open its session.&lt;/li&gt;
&lt;li&gt;In the session's chat, paste the failure and ask the agent to fix it and commit the fix to this pull request. For example:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   The Signadot sandbox test run on this pull request failed:
   &amp;lt;paste the failing test's name and error here&amp;gt;
   Please find the cause, fix it so all Playwright tests pass,
   and commit the fix to this pull request.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvwzige9usdycn2c78lkv.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvwzige9usdycn2c78lkv.jpg" alt="An example agent session receiving the Signadot test failure and identifying the frontend parser fix" width="798" height="522"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For this failure, the agent needs to update the frontend parser to read the new message and push to the same branch. The pipeline runs again, rebuilds the frontend and updates the same sandbox. Because the pull request now changes both services, Signadot forks both &lt;code&gt;frontend&lt;/code&gt; and &lt;code&gt;driver&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;If a run still fails, send the agent the new result and what the preview shows, and ask it to update the same pull request. Continue when the report is marked passed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Review the running change
&lt;/h2&gt;

&lt;p&gt;Open the preview from the passed report. Request a ride from &lt;strong&gt;My Home&lt;/strong&gt; to &lt;strong&gt;Rachel's Floral Designs&lt;/strong&gt; and select &lt;strong&gt;Show Logs&lt;/strong&gt;. In this passing example, &lt;code&gt;frontend&lt;/code&gt; and &lt;code&gt;driver&lt;/code&gt; run from the sandbox while &lt;code&gt;location&lt;/code&gt; and &lt;code&gt;route&lt;/code&gt; use the shared baseline:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1p3pb1vmirbxnirvbqhf.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1p3pb1vmirbxnirvbqhf.jpg" alt="A passing preview with frontend and driver in the PR sandbox and location and route in the baseline" width="700" height="328"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Check that the driver sends the requested wording in the logs and that the banner displays the same driver ID:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffob7nvk7qeu15fpe6w2l.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffob7nvk7qeu15fpe6w2l.jpg" alt="The working ride banner displays the driver ID from the new message" width="604" height="64"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Back on the Jira work item, expand the agent's card under &lt;strong&gt;Agents&lt;/strong&gt;. Its pull request shows a passing build:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fg2b3zq0mzzs9ntlghqi3.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fg2b3zq0mzzs9ntlghqi3.jpg" alt="The Jira work item's expanded agent card with a passing build and Review code button" width="673" height="266"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Merge and clean up the sandbox
&lt;/h2&gt;

&lt;p&gt;Review the code and test results in Bitbucket. When you are ready to merge, select &lt;strong&gt;Mark as ready&lt;/strong&gt;, then &lt;strong&gt;Merge&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Merging into &lt;code&gt;main&lt;/code&gt; starts the pipeline's &lt;code&gt;delete-pr-sandbox&lt;/code&gt; run, which deletes the pull request's sandbox. Declining a pull request does the same. Sandboxes also expire three days after their last update.&lt;/p&gt;

&lt;p&gt;Open the repository's &lt;strong&gt;Pipelines&lt;/strong&gt; page to check that &lt;code&gt;delete-pr-sandbox&lt;/code&gt; succeeded. Here it appears above the passing pull request run:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fd8ezs64m8rquat8rhpm0.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fd8ezs64m8rquat8rhpm0.jpg" alt="Bitbucket Pipelines showing a passing PR run followed by successful sandbox cleanup on merge" width="800" height="206"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Cleanup
&lt;/h2&gt;

&lt;p&gt;After the merge or decline cleanup pipeline succeeds, check that no tutorial sandboxes remain:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;signadot sandbox list
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If one remains, run &lt;code&gt;signadot sandbox delete NAME&lt;/code&gt;, replacing &lt;code&gt;NAME&lt;/code&gt; with that tutorial sandbox's name from the list. Then delete the Job Runner Group and its repository credential:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;signadot jrg delete hotrod-playwright
kubectl -n signadot-tests delete secret hotrod-repo-read
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you created &lt;code&gt;signadot-tests&lt;/code&gt; exclusively for this tutorial, you can also run &lt;code&gt;kubectl delete namespace signadot-tests&lt;/code&gt;. Keep it if other workloads use it.&lt;/p&gt;

&lt;p&gt;Revoke the repository access token, the Docker Hub token and the Signadot API key you created for this tutorial. Delete the service account only if nothing else uses it.&lt;/p&gt;

&lt;h2&gt;
  
  
  How the pipeline works
&lt;/h2&gt;

&lt;p&gt;This section explains the files you already copied into HotROD. No additional setup is needed.&lt;/p&gt;

&lt;h3&gt;
  
  
  The pull request pipeline
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;bitbucket-pipelines.yml&lt;/code&gt; runs four steps on every pull request. It uses Bitbucket's &lt;a href="https://support.atlassian.com/bitbucket-cloud/docs/enable-and-use-runtime-v3/" rel="noopener noreferrer"&gt;runtime v3&lt;/a&gt;, which supports multi-platform builds with Docker Buildx. The image runs on &lt;code&gt;amd64&lt;/code&gt; and &lt;code&gt;arm64&lt;/code&gt; nodes alike.&lt;/p&gt;

&lt;p&gt;HotROD's binary embeds its React app, so the frontend must be rebuilt before compiling Go. The frontend build uses &lt;code&gt;--base=/web_assets/&lt;/code&gt;, the path where HotROD serves the assets. The next two steps compile the binary and push its image. The final step creates the sandbox and runs the tests.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;changed-services.sh&lt;/code&gt; compares the pull request with its target branch and prints each HotROD service under &lt;code&gt;services/&lt;/code&gt; that differs. A change to code that every service shares, in &lt;code&gt;cmd/&lt;/code&gt;, &lt;code&gt;pkg/&lt;/code&gt;, &lt;code&gt;internal/&lt;/code&gt;, &lt;code&gt;go.mod&lt;/code&gt;, &lt;code&gt;go.sum&lt;/code&gt; or the &lt;code&gt;Dockerfile&lt;/code&gt;, forks all four services. A pull request that changes neither skips the sandbox and test Job. This includes changes only to documentation, tests or test configuration, including &lt;code&gt;bitbucket-pipelines.yml&lt;/code&gt; and &lt;code&gt;.signadot/&lt;/code&gt;. Include a service-code change when testing pipeline changes.&lt;/p&gt;

&lt;p&gt;The sandbox name comes from the pull request. Each new commit updates the same sandbox instead of creating another one. That keeps the preview link stable while the agent iterates. A &lt;a href="https://support.atlassian.com/bitbucket-cloud/docs/step-options/#Concurrency-group" rel="noopener noreferrer"&gt;concurrency group&lt;/a&gt; serializes the sandbox test and cleanup steps for each pull request. Before updating the sandbox, the test step skips a commit if a newer one is already on the branch.&lt;/p&gt;

&lt;h3&gt;
  
  
  The sandbox spec
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;sandbox.sh&lt;/code&gt; prints a sandbox spec with one fork per changed service. Each fork uses the image built for the pull request commit. The frontend endpoint makes the running change available for review:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;defaultRouteGroup&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;endpoints&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;frontend&lt;/span&gt;
      &lt;span class="na"&gt;target&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;http://frontend.hotrod.svc:8080&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;defaultRouteGroup&lt;/code&gt; endpoint gives the sandbox its preview URL. It points at &lt;code&gt;frontend&lt;/code&gt; even when only &lt;code&gt;driver&lt;/code&gt; is forked, so you can check a backend change through the app. Each sandbox update resets the three-day expiry.&lt;/p&gt;

&lt;p&gt;The pipeline applies the spec and waits for the sandbox to become ready:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;signadot sandbox apply -f sandbox.yaml --wait-timeout 5m&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  The test run
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;run-tests.sh&lt;/code&gt; submits &lt;code&gt;playwright-job.yaml&lt;/code&gt; with the repository, branch, commit and sandbox name. It waits up to 20 minutes for completion and reads the Job name and result from JSON output. Open the Job link in the pipeline log or pull request report to see the Playwright logs and artifacts.&lt;/p&gt;

&lt;p&gt;The Job runs on the &lt;code&gt;hotrod-playwright&lt;/code&gt; runner. It clones the pull request's commit with the token from the &lt;code&gt;hotrod-repo-read&lt;/code&gt; Secret, installs the test dependencies and runs the whole suite. Its &lt;code&gt;routingContext&lt;/code&gt; names the sandbox. Signadot sets &lt;code&gt;SIGNADOT_ROUTING_KEY&lt;/code&gt; in the Job, and HotROD's &lt;code&gt;playwright.config.ts&lt;/code&gt; sends that key with every request. That is how the tests reach the pull request's services:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;routingContext&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;sandbox&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"@{sandbox}"&lt;/span&gt;
&lt;span class="na"&gt;uploadArtifact&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;hotrod/playwright-report.tgz&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After the Job ends, the script checks the newest attempt and passes only when it is &lt;code&gt;succeeded&lt;/code&gt; and the CLI command completed successfully. A canceled or timed-out Job fails the step as well.&lt;/p&gt;

&lt;h3&gt;
  
  
  The report on the pull request
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;report.sh&lt;/code&gt; posts the result as a Bitbucket &lt;a href="https://support.atlassian.com/bitbucket-cloud/docs/code-insights/" rel="noopener noreferrer"&gt;Code Insights report&lt;/a&gt;. It runs twice: once as &lt;strong&gt;Pending&lt;/strong&gt; with the preview link, before the tests start, and once with the result and the Job link. Pipelines' local proxy authenticates the call, and the script needs no extra token.&lt;/p&gt;

&lt;h3&gt;
  
  
  Cleanup on merge
&lt;/h3&gt;

&lt;p&gt;Bitbucket &lt;a href="https://support.atlassian.com/bitbucket-cloud/docs/pipeline-start-conditions/" rel="noopener noreferrer"&gt;pipeline triggers&lt;/a&gt; run the &lt;code&gt;delete-pr-sandbox&lt;/code&gt; custom pipeline when a pull request into &lt;code&gt;main&lt;/code&gt; is merged or declined.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;delete-sandbox.sh&lt;/code&gt; deletes the sandbox if it exists. It also removes the old sandbox if a pull request no longer changes service code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;You used Signadot to test an agent's service changes with the rest of HotROD before merging. Each sandbox ran only the changed services alongside the shared baseline. The Playwright result and preview link gave you a way to check the running change and send any failures back to the agent.&lt;/p&gt;

&lt;p&gt;To adapt this pattern to your application, update the pipeline's build and image commands, list your services in &lt;code&gt;changed-services.sh&lt;/code&gt;, and set the workloads and preview endpoint in &lt;code&gt;sandbox.sh&lt;/code&gt;. Configure your test image in &lt;code&gt;runner.yaml&lt;/code&gt; and your test dependencies and command in &lt;code&gt;playwright-job.yaml&lt;/code&gt;. Your tests and services must propagate the &lt;a href="https://www.signadot.com/docs/concepts/sandbox?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=jira-coding-agent-tutorial" rel="noopener noreferrer"&gt;Signadot routing context&lt;/a&gt; so requests reach the changed services.&lt;/p&gt;

&lt;h2&gt;
  
  
  See also
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://support.atlassian.com/jira-software-cloud/docs/work-with-ai-agents-in-jira/" rel="noopener noreferrer"&gt;Work with AI agents in Jira&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://support.atlassian.com/jira-software-cloud/docs/configure-a-jira-coding-agent-session/" rel="noopener noreferrer"&gt;Configure a Jira Coding Agent session&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.signadot.com/docs/concepts/sandbox?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=jira-coding-agent-tutorial" rel="noopener noreferrer"&gt;Sandboxes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.signadot.com/docs/guides/use-cases/run-automated-tests?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=jira-coding-agent-tutorial" rel="noopener noreferrer"&gt;Set up tests using Jobs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.signadot.com/docs/tutorials/testing/e2e-with-playwright?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=jira-coding-agent-tutorial" rel="noopener noreferrer"&gt;Running Playwright tests on pull requests&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.signadot.com/docs/tutorials/coderabbit-signadot-failing-tests?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=jira-coding-agent-tutorial" rel="noopener noreferrer"&gt;Diagnose failing tests with Signadot and CodeRabbit&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>jira</category>
      <category>ai</category>
      <category>testing</category>
      <category>cicd</category>
    </item>
    <item>
      <title>Coding Agents Run Their Own Code Now. How Much of the System Does That Reach?</title>
      <dc:creator>Signadot</dc:creator>
      <pubDate>Thu, 12 Nov 2026 12:39:07 +0000</pubDate>
      <link>https://dev.to/signadot/coding-agents-run-their-own-code-now-how-much-of-the-system-does-that-reach-1dp5</link>
      <guid>https://dev.to/signadot/coding-agents-run-their-own-code-now-how-much-of-the-system-does-that-reach-1dp5</guid>
      <description>&lt;p&gt;&lt;strong&gt;Greptile, Cursor, Codex and Devin now execute the code an agent writes. In a microservices system, a private runtime with mocks still misses the bugs that live between services.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Read this &lt;a href="https://www.signadot.com/blog/runtime-verification-coding-agents-reach/?utm_source=dev.to&amp;amp;utm_medium=blog&amp;amp;utm_campaign=blog+repost"&gt;article&lt;/a&gt; on Signadot.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Agent tools no longer stop at the diff. &lt;a href="https://www.greptile.com/blog/trex" rel="noopener noreferrer"&gt;Greptile’s TREX&lt;/a&gt; spins up a sandbox to run the code under review and attaches logs, screenshots and API traces to its comments. &lt;a href="https://cursor.com/docs/cloud-agent" rel="noopener noreferrer"&gt;Cursor’s cloud agents&lt;/a&gt; clone the repository into an isolated VM where they can build, test and interact with the changed software. &lt;a href="https://openai.com/index/introducing-codex/" rel="noopener noreferrer"&gt;OpenAI’s Codex&lt;/a&gt; runs each task in its own cloud environment preloaded with the repository, and &lt;a href="https://docs.devin.ai/work-with-devin/devin-session-tools" rel="noopener noreferrer"&gt;Devin&lt;/a&gt; works with its own shell, VS Code editor and browser.&lt;/p&gt;

&lt;p&gt;Different products, one decision: before a person reviews an agent’s change, the agent should run it and look at what happened. That is the right call. The question for teams on microservices is how much of the system that run includes, which is the core of &lt;a href="https://www.signadot.com/validate-ai-generated-code-kubernetes/" rel="noopener noreferrer"&gt;verifying AI-generated code on Kubernetes&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why runtime verification became table stakes
&lt;/h3&gt;

&lt;p&gt;Review is where agent output piles up. At Stripe, &lt;a href="https://stripe.dev/blog/minions-stripes-one-shot-end-to-end-coding-agents-part-2" rel="noopener noreferrer"&gt;more than 1,300 pull requests merged each week&lt;/a&gt; are produced entirely by its internal coding agents and reviewed by people. Few teams have the senior reviewers to read that volume line by line.&lt;/p&gt;

&lt;p&gt;Static analysis has a ceiling. It can read intent from source but cannot observe execution. A race that needs a real request, a regression that appears only after a page renders, a timeout that depends on load: none of it shows up in the text of a diff.&lt;/p&gt;

&lt;p&gt;An agent that runs its own code, reads the failure and fixes it before handoff takes that load off reviewers. The open question is fidelity: how real does the runtime have to be before a passing run means the change works?&lt;/p&gt;

&lt;h3&gt;
  
  
  Four levels of runtime verification
&lt;/h3&gt;

&lt;p&gt;Verification for agent changes falls into four levels, and each one proves something different.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0e2aqvnq3624nrmgn2n0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0e2aqvnq3624nrmgn2n0.png" alt=" " width="800" height="424"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Most agent tools have moved from level 1 to level 2, and that move matters. For a self-contained application, level 2 is close to complete.&lt;/p&gt;

&lt;p&gt;For a cloud-native application built from dozens of services, level 2 covers the smaller part of the risk. The part it misses is how the change behaves next to everything else, which is the &lt;a href="https://www.signadot.com/blog/coding-agents-runtime-feedback-gap/" rel="noopener noreferrer"&gt;runtime feedback a coding agent needs to check its work&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5cshstbxvsizowfh0jm6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5cshstbxvsizowfh0jm6.png" alt=" " width="800" height="338"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What a private runtime cannot see&lt;br&gt;
A mock hands back whatever response its author predicted. That makes it good at confirming a belief and useless at exposing a mistaken one, and in a private runtime most of those beliefs came from the agent.&lt;/p&gt;

&lt;p&gt;The costly bugs in distributed systems sit at the seams between services, where one side’s expectation meets the other side’s behavior:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A producer and consumer that disagree about a contract&lt;/li&gt;
&lt;li&gt;A payload whose encoding differs from what the receiving service parses&lt;/li&gt;
&lt;li&gt;A retry or timeout setting that causes trouble a couple of services downstream&lt;/li&gt;
&lt;li&gt;A schema migration that breaks a query in a service the agent never opened&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;None of these fail a unit test or a mocked call. They surface in integration and end-to-end tests that mean something only when the change runs against real services, real data and real traffic. Performance regressions, resource contention and runtime security issues follow the same rule.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why cloning the system does not get you to level 3
&lt;/h3&gt;

&lt;p&gt;The obvious fix is a full copy of the system for every agent. The numbers rule it out. Recreating dozens of stateful services, each with its data and configuration, for every agent on every iteration is too slow and too expensive at the pace agents produce changes.&lt;/p&gt;

&lt;p&gt;A copy also goes stale. It is a snapshot of the system at creation time, not the system your change will meet when it merges.&lt;/p&gt;

&lt;h3&gt;
  
  
  How level 3 works in practice
&lt;/h3&gt;

&lt;p&gt;Level 3 comes from sharing rather than copying: every agent verifies against one production-like system, with each change isolated from the others.&lt;/p&gt;

&lt;p&gt;A shared Kubernetes cluster runs the stable version of every service, kept current by the normal deployment pipeline. To verify a change, the agent deploys only the service it modified. Requests tagged with that change’s routing key reach the modified service and then continue through the shared stable services. Untagged traffic and every other agent’s traffic never touch the change.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frbqhbu8jyv7b77licy1o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frbqhbu8jyv7b77licy1o.png" alt=" " width="800" height="321"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The change now executes alongside the real services, datasets and mesh policies it will meet after merge. You can observe integration behavior because nothing in the path is simulated.&lt;/p&gt;

&lt;p&gt;It also matches agent workloads. A change adds one or two services to a system that is already running, not a private replica of all of it, so dozens of agents can verify in parallel at low cost and stay out of each other’s way. The &lt;a href="https://www.signadot.com/guide-to-ephemeral-environments-kubernetes/" rel="noopener noreferrer"&gt;lightweight ephemeral environment&lt;/a&gt; is short-lived and runs on infrastructure the team already operates.&lt;/p&gt;

&lt;p&gt;The agent’s loop does not change: write, run, inspect the failure, retry, with all of it finished before a PR exists. The difference is what counts as a pass. A pass means the change worked against the real system its assumptions describe, not that it agreed with mocks written to match those assumptions. It is the same bar &lt;a href="https://www.signadot.com/blog/what-a-green-check-should-promise/" rel="noopener noreferrer"&gt;a green check on a pull request should promise.&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Where does your verification stop?
&lt;/h3&gt;

&lt;p&gt;Runtime verification is becoming a standard part of how agent changes ship, and the teams furthest along treat the agent’s job as write, prove, debug, repeat. For many changes, a private runtime is enough proof.&lt;/p&gt;

&lt;p&gt;For a change that has to work alongside everything around it, the proof needs level 3. Signadot provides it with lightweight ephemeral environments on your Kubernetes cluster, which agents create and drive through the CLI or MCP server. &lt;a href="https://www.signadot.com/solutions/agentic-development/" rel="noopener noreferrer"&gt;Signadot for agentic development&lt;/a&gt; covers the full workflow. The teams that get the most from background agents will be the ones whose verification reaches the whole system, not only the service in front of the agent.&lt;/p&gt;

</description>
      <category>microservices</category>
      <category>kubernetes</category>
      <category>testing</category>
      <category>ai</category>
    </item>
    <item>
      <title>Test Devin's Changes End to End with Signadot</title>
      <dc:creator>Signadot</dc:creator>
      <pubDate>Tue, 10 Nov 2026 17:33:04 +0000</pubDate>
      <link>https://dev.to/signadot/test-devins-changes-end-to-end-with-signadot-a0</link>
      <guid>https://dev.to/signadot/test-devins-changes-end-to-end-with-signadot-a0</guid>
      <description>&lt;p&gt;&lt;em&gt;Read this tutorial on &lt;a href="https://www.signadot.com/docs/tutorials/devin-signadot-sandboxes?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=devin-tutorial" rel="noopener noreferrer"&gt;Signadot docs&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://devin.ai" rel="noopener noreferrer"&gt;Devin&lt;/a&gt; writes code and runs unit tests in its own cloud VM. What it can't easily check there is whether a change to one microservice still works with the services it talks to. That usually waits for a staging deploy, after the pull request is open.&lt;/p&gt;

&lt;p&gt;With the &lt;a href="https://www.signadot.com/docs/getting-started/installation/signadot-cli?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=devin-tutorial" rel="noopener noreferrer"&gt;Signadot CLI&lt;/a&gt; and the &lt;a href="https://www.signadot.com/docs/integrations/mcp?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=devin-tutorial" rel="noopener noreferrer"&gt;Signadot MCP server&lt;/a&gt; in its environment, Devin closes that loop itself. It runs the changed service in its VM, creates a &lt;a href="https://www.signadot.com/docs/concepts/sandbox?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=devin-tutorial" rel="noopener noreferrer"&gt;sandbox&lt;/a&gt; that routes tagged cluster traffic to that process, runs your end-to-end tests in the cluster as a &lt;a href="https://www.signadot.com/docs/guides/use-cases/run-automated-tests?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=devin-tutorial" rel="noopener noreferrer"&gt;Signadot Job&lt;/a&gt;, and reports back only after they pass.&lt;/p&gt;

&lt;p&gt;In this tutorial, Devin changes the &lt;code&gt;route&lt;/code&gt; service of &lt;a href="https://github.com/signadot/hotrod" rel="noopener noreferrer"&gt;HotROD&lt;/a&gt;, a demo ride-sharing app, and validates it with HotROD's Playwright suite.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Time:&lt;/strong&gt; about 30 minutes, including about 8 minutes for Devin's session.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example files:&lt;/strong&gt; &lt;a href="https://github.com/signadot/examples/tree/main/devin-tutorial" rel="noopener noreferrer"&gt;signadot/examples/devin-tutorial&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How it works
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkhlj61zdgzzlru0chrt3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkhlj61zdgzzlru0chrt3.png" alt=" " width="800" height="248"&gt;&lt;/a&gt;&lt;br&gt;
Two things make this work from a cloud VM:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;No cluster credentials.&lt;/strong&gt; The CLI's &lt;code&gt;ControlPlaneProxy&lt;/code&gt; connection tunnels through the Signadot control plane. Devin needs only an API key, so the cluster can even run on your laptop.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A full VM.&lt;/strong&gt; Devin has passwordless &lt;code&gt;sudo&lt;/code&gt;, so &lt;code&gt;signadot local connect&lt;/code&gt; runs in its default privileged mode. In-cluster names such as &lt;code&gt;redis.hotrod.svc&lt;/code&gt; resolve from the VM, and the local service can call its real dependencies.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;A Kubernetes cluster with the &lt;a href="https://www.signadot.com/docs/installation/signadot-operator?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=devin-tutorial" rel="noopener noreferrer"&gt;Signadot Operator&lt;/a&gt; installed. A local cluster such as minikube, kind, k3d or Docker Desktop works.&lt;/li&gt;
&lt;li&gt;The &lt;a href="https://www.signadot.com/docs/getting-started/installation/signadot-cli?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=devin-tutorial" rel="noopener noreferrer"&gt;Signadot CLI&lt;/a&gt; logged in with &lt;code&gt;signadot auth login&lt;/code&gt;, and &lt;code&gt;kubectl&lt;/code&gt; pointed at the cluster.&lt;/li&gt;
&lt;li&gt;A &lt;a href="https://app.devin.ai" rel="noopener noreferrer"&gt;Devin&lt;/a&gt; organization where you can edit the environment blueprint and add MCP servers (the &lt;strong&gt;Manage MCP Servers&lt;/strong&gt; permission).&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Step 1: Install HotROD and a Playwright runner
&lt;/h2&gt;

&lt;p&gt;Skip this block if HotROD already runs in the &lt;code&gt;hotrod&lt;/code&gt; namespace:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl create namespace hotrod
kubectl -n hotrod apply -k &lt;span class="s1"&gt;'https://github.com/signadot/hotrod/k8s/overlays/prod/devmesh'&lt;/span&gt;
kubectl -n hotrod &lt;span class="nb"&gt;wait&lt;/span&gt; --for=condition=available deployment --all --timeout=5m
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create the &lt;a href="https://www.signadot.com/docs/reference/job-runner-groups/spec?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=devin-tutorial" rel="noopener noreferrer"&gt;job runner group&lt;/a&gt; that runs HotROD's Playwright suite inside the cluster. Replace &lt;code&gt;&amp;lt;your-cluster&amp;gt;&lt;/code&gt; with your Signadot cluster name:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/signadot/hotrod.git
&lt;span class="nb"&gt;cd&lt;/span&gt; hotrod
kubectl create namespace signadot-tests
signadot jobrunnergroup apply -f .signadot/testing/playwright-runner.yaml \
  --set &lt;span class="nv"&gt;cluster&lt;/span&gt;&lt;span class="o"&gt;=&amp;lt;&lt;/span&gt;your-cluster&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; --set &lt;span class="nv"&gt;env&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 2: Create an API key for Devin
&lt;/h2&gt;

&lt;p&gt;In the &lt;a href="https://app.signadot.com" rel="noopener noreferrer"&gt;Signadot dashboard&lt;/a&gt;, go to &lt;strong&gt;Admin → Service Accounts&lt;/strong&gt;, create a &lt;a href="https://www.signadot.com/docs/guides/admin/service-accounts?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=devin-tutorial" rel="noopener noreferrer"&gt;service account&lt;/a&gt; named &lt;code&gt;devin-tutorial&lt;/code&gt;, and create an API key for it. Copy the key; you'll paste it into Devin twice.&lt;/p&gt;

&lt;p&gt;The service account keeps Devin's sandboxes and devboxes separate from yours. Revoking its key cuts Devin off without touching your own login.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Store the key as a Devin secret
&lt;/h2&gt;

&lt;p&gt;In Devin, go to &lt;strong&gt;Settings → Secrets → Add secret&lt;/strong&gt;. Create a &lt;strong&gt;Raw&lt;/strong&gt; secret named &lt;code&gt;SIGNADOT_API_KEY&lt;/code&gt; with the key as its value. Choose &lt;strong&gt;Organization&lt;/strong&gt; scope to share it with your team, or &lt;strong&gt;Personal&lt;/strong&gt; to keep it to your own sessions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4: Add the Signadot CLI to Devin's blueprint
&lt;/h2&gt;

&lt;p&gt;A Devin &lt;em&gt;blueprint&lt;/em&gt; describes what goes into the snapshot every session's VM starts from. Go to &lt;strong&gt;Settings → Environment → Blueprints → Organization blueprint → Edit&lt;/strong&gt; and paste &lt;a href="https://github.com/signadot/examples/blob/main/devin-tutorial/devin/blueprint.yaml" rel="noopener noreferrer"&gt;&lt;code&gt;devin/blueprint.yaml&lt;/code&gt;&lt;/a&gt;. Before you save, set your Signadot org and cluster names at the top of the &lt;strong&gt;Configure Signadot CLI&lt;/strong&gt; step:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;      &lt;span class="s"&gt;SIGNADOT_ORG_NAME=my-org&lt;/span&gt;
      &lt;span class="s"&gt;SIGNADOT_CLUSTER=my-cluster&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The blueprint has three parts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;initialize&lt;/code&gt;&lt;/strong&gt; installs Go and a pinned version of the Signadot CLI, then writes &lt;code&gt;~/.signadot/config.yaml&lt;/code&gt; with a &lt;code&gt;ControlPlaneProxy&lt;/code&gt; connection to your cluster.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;maintenance&lt;/code&gt;&lt;/strong&gt; clones HotROD into &lt;code&gt;~/repos/hotrod&lt;/code&gt; and downloads its Go modules.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;knowledge&lt;/code&gt;&lt;/strong&gt; is never executed. It tells Devin how to connect, create the sandbox and run the tests. Copy this section into your own blueprints when you adapt the tutorial.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Full &lt;code&gt;blueprint.yaml&lt;/code&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;initialize&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Install Go&lt;/span&gt;
    &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;github.com/actions/setup-go@v5&lt;/span&gt;
    &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;go-version&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"1.27.1"&lt;/span&gt;

  &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Install Signadot CLI&lt;/span&gt;
    &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt;
      &lt;span class="c1"&gt;# Pin the version: without it the installer asks the GitHub API for the
&lt;/span&gt;      &lt;span class="c1"&gt;# latest release, which is rate limited from Devin's shared build IPs.
&lt;/span&gt;      &lt;span class="s"&gt;curl -sSLf https://raw.githubusercontent.com/signadot/cli/main/scripts/install.sh \&lt;/span&gt;
        &lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="s"&gt;SIGNADOT_CLI_VERSION=v1.9.0 sh&lt;/span&gt;
      &lt;span class="s"&gt;signadot --version&lt;/span&gt;

  &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Configure Signadot CLI&lt;/span&gt;
    &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt;
      &lt;span class="c1"&gt;# Edit these two values to match your Signadot org and cluster name.
&lt;/span&gt;      &lt;span class="s"&gt;SIGNADOT_ORG_NAME=my-org&lt;/span&gt;
      &lt;span class="s"&gt;SIGNADOT_CLUSTER=my-cluster&lt;/span&gt;
      &lt;span class="s"&gt;mkdir -p ~/.signadot&lt;/span&gt;
      &lt;span class="s"&gt;cat &amp;gt; ~/.signadot/config.yaml &amp;lt;&amp;lt;EOF&lt;/span&gt;
      &lt;span class="na"&gt;org&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${SIGNADOT_ORG_NAME}&lt;/span&gt;
      &lt;span class="na"&gt;local&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;connections&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;cluster&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${SIGNADOT_CLUSTER}&lt;/span&gt;
          &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ControlPlaneProxy&lt;/span&gt;
      &lt;span class="s"&gt;EOF&lt;/span&gt;

&lt;span class="na"&gt;maintenance&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Clone or update HotROD&lt;/span&gt;
    &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt;
      &lt;span class="s"&gt;if [ ! -d ~/repos/hotrod ]; then&lt;/span&gt;
        &lt;span class="s"&gt;mkdir -p ~/repos&lt;/span&gt;
        &lt;span class="s"&gt;git clone https://github.com/signadot/hotrod ~/repos/hotrod&lt;/span&gt;
      &lt;span class="s"&gt;fi&lt;/span&gt;
      &lt;span class="s"&gt;cd ~/repos/hotrod&lt;/span&gt;
      &lt;span class="s"&gt;git pull --ff-only&lt;/span&gt;
      &lt;span class="s"&gt;go mod download&lt;/span&gt;

&lt;span class="na"&gt;knowledge&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;signadot&lt;/span&gt;
    &lt;span class="na"&gt;contents&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt;
      &lt;span class="s"&gt;This VM can test code changes end to end against a shared Kubernetes&lt;/span&gt;
      &lt;span class="s"&gt;cluster with Signadot. The HotROD baseline runs in namespace `hotrod`&lt;/span&gt;
      &lt;span class="s"&gt;of the Signadot cluster named in ~/.signadot/config.yaml. HotROD&lt;/span&gt;
      &lt;span class="na"&gt;source&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;~/repos/hotrod (Go; one binary, `go run ./cmd/hotrod &amp;lt;service&amp;gt;`;&lt;/span&gt;
      &lt;span class="na"&gt;services&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;frontend, location, driver, route).&lt;/span&gt;

      &lt;span class="na"&gt;Credentials&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;the `signadot` CLI reads SIGNADOT_API_KEY from the&lt;/span&gt;
      &lt;span class="s"&gt;environment (Devin secret SIGNADOT_API_KEY). Bind it to every&lt;/span&gt;
      &lt;span class="s"&gt;`signadot` command.&lt;/span&gt;

      &lt;span class="s"&gt;1. Connect this VM to the cluster (once per session, before creating&lt;/span&gt;
         &lt;span class="s"&gt;sandboxes). This also makes in-cluster service names such as&lt;/span&gt;
         &lt;span class="s"&gt;redis.hotrod.svc resolvable from this VM. Every Devin VM boots with&lt;/span&gt;
         &lt;span class="s"&gt;the same /etc/machine-id, which Signadot uses to pick the devbox, so&lt;/span&gt;
         &lt;span class="s"&gt;give this session its own ID first; otherwise a second concurrent&lt;/span&gt;
         &lt;span class="na"&gt;session fails with "409 Conflict&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;devbox ... is already claimed":&lt;/span&gt;
           &lt;span class="p"&gt;[&lt;/span&gt; &lt;span class="s"&gt;-s&lt;/span&gt; &lt;span class="s"&gt;~/.signadot/machine-id&lt;/span&gt; &lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="s"&gt;tr -d - &amp;lt; /proc/sys/kernel/random/uuid &amp;gt; ~/.signadot/machine-id&lt;/span&gt;
           &lt;span class="s"&gt;export MACHINE_ID_FILE=~/.signadot/machine-id&lt;/span&gt;
           &lt;span class="s"&gt;signadot local connect --wait connect --wait-timeout 120s&lt;/span&gt;
           &lt;span class="s"&gt;signadot local status&lt;/span&gt;
      &lt;span class="na"&gt;2. Run the changed service locally. For route (gRPC, port 8083)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
           &lt;span class="s"&gt;cd ~/repos/hotrod&lt;/span&gt;
           &lt;span class="s"&gt;go run ./cmd/hotrod route &amp;gt; ~/route.log 2&amp;gt;&amp;amp;1 &amp;amp;&lt;/span&gt;
      &lt;span class="na"&gt;3. Create a sandbox with the Signadot MCP `create_sandbox` tool&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;a&lt;/span&gt;
         &lt;span class="s"&gt;`local` workload mapping Deployment `route` (namespace hotrod) port&lt;/span&gt;
         &lt;span class="s"&gt;8083 to localhost:8083, `connection.devboxId` from `list_devboxes`&lt;/span&gt;
         &lt;span class="s"&gt;(this VM's devbox, the one `signadot local status` reports), plus a&lt;/span&gt;
         &lt;span class="s"&gt;defaultRouteGroup endpoint for http://frontend.hotrod.svc:8080.&lt;/span&gt;
      &lt;span class="s"&gt;4. Run HotROD's Playwright e2e suite against the sandbox as a Signadot&lt;/span&gt;
         &lt;span class="na"&gt;Job (runs in the cluster on runner group `playwright`)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
           &lt;span class="s"&gt;cd ~/repos/hotrod&lt;/span&gt;
           &lt;span class="s"&gt;signadot job submit -f .signadot/testing/demo-playwright-job.yaml \&lt;/span&gt;
             &lt;span class="s"&gt;--set branch=main --set namespace=hotrod \&lt;/span&gt;
             &lt;span class="s"&gt;--set sandbox=&amp;lt;sandbox-name&amp;gt; --wait --timeout 15m&lt;/span&gt;
         &lt;span class="s"&gt;Inspect a run with `signadot job get &amp;lt;job-name&amp;gt;`,&lt;/span&gt;
         &lt;span class="s"&gt;`signadot logs --job &amp;lt;job-name&amp;gt;`, and&lt;/span&gt;
         &lt;span class="s"&gt;`signadot artifact download --job &amp;lt;job-name&amp;gt; hotrod/playwright-report.tar.gz`.&lt;/span&gt;

      &lt;span class="s"&gt;Never print the value of SIGNADOT_API_KEY. Do not kill processes with&lt;/span&gt;
      &lt;span class="s"&gt;broad patterns like `pkill -f hotrod` (that matches signadot processes&lt;/span&gt;
      &lt;span class="na"&gt;too); kill by port&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;`kill $(lsof -t -i :8083)`.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Click &lt;strong&gt;Save blueprint&lt;/strong&gt;. Devin builds a new snapshot in about two minutes; the page shows &lt;strong&gt;Last built&lt;/strong&gt; when it's ready.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 5: Add the Signadot MCP server
&lt;/h2&gt;

&lt;p&gt;The MCP server is a subcommand of the CLI you just installed, so it runs inside Devin's VM over STDIO. In Devin, go to &lt;strong&gt;Customize → MCPs&lt;/strong&gt;, select &lt;strong&gt;Organization&lt;/strong&gt;, and choose &lt;strong&gt;Add MCP → Add custom MCP&lt;/strong&gt;:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Field&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Server name&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Signadot&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Transport type&lt;/td&gt;
&lt;td&gt;&lt;code&gt;STDIO&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Command&lt;/td&gt;
&lt;td&gt;&lt;code&gt;signadot&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Arguments&lt;/td&gt;
&lt;td&gt;&lt;code&gt;mcp&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Environment variables&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;SIGNADOT_API_KEY&lt;/code&gt; = &lt;code&gt;$SIGNADOT_API_KEY&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Click &lt;strong&gt;Add&lt;/strong&gt; and confirm the security notice. The server shows &lt;strong&gt;Needs connection&lt;/strong&gt; because Devin doesn't share &lt;strong&gt;Settings → Secrets&lt;/strong&gt; with MCP servers. Open the server, paste the API key into its &lt;strong&gt;Secrets&lt;/strong&gt; field, and save. The status changes to &lt;strong&gt;Connected&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 6: Give Devin the task
&lt;/h2&gt;

&lt;p&gt;Start a new Devin session and paste this prompt (&lt;a href="https://github.com/signadot/examples/blob/main/devin-tutorial/prompt.md" rel="noopener noreferrer"&gt;&lt;code&gt;prompt.md&lt;/code&gt;&lt;/a&gt;), with &lt;code&gt;my-cluster&lt;/code&gt; changed to your cluster name:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;In ~/repos/hotrod, change the route service so that every computed ETA is
exactly 2 minutes (services/route/server.go). Keep the FAST_ROUTE override
and the rounding logic intact. Smallest possible diff.

Before you report back, validate the change end to end against the shared
cluster with Signadot (see the `signadot` knowledge for commands):

1. Connect this VM to the cluster with `signadot local connect`.
2. Run your modified route service locally on port 8083.
3. Use the Signadot MCP to create a sandbox named `devin-route-eta` in
   cluster `my-cluster` that maps Deployment `route` in namespace `hotrod` to
   localhost:8083 on this VM's devbox. I approve that spec; no need to ask.
4. Run HotROD's Playwright e2e suite against the sandbox as a Signadot Job
   and wait for it to finish. If it fails, find out why, fix it, and rerun.
5. Prove the behavior change: dispatch one ride with the sandbox routing key
   and one without (baseline), then compare the driver notifications.

Report the diff, the sandbox routing key, the job name and result, and the
two notifications. Leave the sandbox and the route service running.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Baseline ETAs are random, between 3 and 45 minutes, so an ETA of exactly &lt;code&gt;2m0s&lt;/code&gt; can only come from Devin's change. Keep the approval in step 3: the &lt;code&gt;create_sandbox&lt;/code&gt; tool tells agents to confirm the spec with the user first, and without it Devin stops to ask.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Devin does
&lt;/h2&gt;

&lt;p&gt;1.) &lt;strong&gt;Makes the change.&lt;/strong&gt; Devin edits &lt;code&gt;services/route/server.go&lt;/code&gt;, then builds and vets the package:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight diff"&gt;&lt;code&gt;   -    // Generate a random number between 3 and 45 with decimals
   -    eta := time.Duration((rand.Float64()*(45-3) + 3) * float64(time.Minute))
   +    eta := 2 * time.Minute
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;2.) &lt;strong&gt;Connects its VM to the cluster&lt;/strong&gt; with &lt;code&gt;signadot local connect&lt;/code&gt;, then starts the changed &lt;code&gt;route&lt;/code&gt; service on port 8083.&lt;/p&gt;

&lt;p&gt;3.) &lt;strong&gt;Creates the sandbox through the MCP server.&lt;/strong&gt; Devin calls &lt;code&gt;list_clusters&lt;/code&gt;, &lt;code&gt;resolve_workload&lt;/code&gt;, &lt;code&gt;resolve_workload_port&lt;/code&gt; and &lt;code&gt;list_devboxes&lt;/code&gt;, then &lt;code&gt;create_sandbox&lt;/code&gt; with a spec like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;   &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;devin-route-eta&lt;/span&gt;
   &lt;span class="na"&gt;spec&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
     &lt;span class="na"&gt;cluster&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;my-cluster&lt;/span&gt;
     &lt;span class="na"&gt;connection&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
       &lt;span class="na"&gt;devboxId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;&amp;lt;this VM's devbox ID&amp;gt;&lt;/span&gt;
     &lt;span class="na"&gt;local&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
     &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;local-route&lt;/span&gt;
       &lt;span class="na"&gt;from&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
         &lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Deployment&lt;/span&gt;
         &lt;span class="na"&gt;namespace&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;hotrod&lt;/span&gt;
         &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;route&lt;/span&gt;
       &lt;span class="na"&gt;mappings&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
       &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;port&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;8083&lt;/span&gt;
         &lt;span class="na"&gt;toLocal&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;localhost:8083&lt;/span&gt;
     &lt;span class="na"&gt;defaultRouteGroup&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
       &lt;span class="na"&gt;endpoints&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
       &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;frontend&lt;/span&gt;
         &lt;span class="na"&gt;target&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;http://frontend.hotrod.svc:8080&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Requests in the cluster that carry the sandbox's routing key now reach &lt;code&gt;route&lt;/code&gt; in Devin's VM. Everything else still reaches the baseline.&lt;/p&gt;

&lt;p&gt;4.) &lt;strong&gt;Runs the Playwright suite as a Job, and fixes what fails.&lt;/strong&gt; In our test run, the first Job failed on "Resolving routes": &lt;code&gt;route&lt;/code&gt; defaults to &lt;code&gt;REDIS_ADDR=redis:6379&lt;/code&gt;, a short name that resolves only inside the cluster. Devin read the Job's logs with &lt;code&gt;signadot logs&lt;/code&gt;, downloaded the Playwright report, and restarted &lt;code&gt;route&lt;/code&gt; with &lt;code&gt;REDIS_ADDR=redis.hotrod.svc:6379&lt;/code&gt;. No code change was needed, and the second Job passed.&lt;/p&gt;

&lt;p&gt;5.) &lt;strong&gt;Proves the behavior change&lt;/strong&gt; by dispatching one ride with the routing key and one without. Its report includes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   Job: hotrod-playwright-e2e-zihjipq succeeded, 2 of 2 tests passed.

   With the sandbox key: Driver T792260C arriving in 2m0s
   Baseline: Driver T775730C arriving in 8m36s
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The whole session took Devin about eight minutes. You can open each Job, with its logs and the uploaded Playwright report, in the Signadot dashboard under &lt;strong&gt;Validations → Jobs&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Clean up
&lt;/h2&gt;

&lt;p&gt;Ask Devin to delete the sandbox and stop &lt;code&gt;route&lt;/code&gt; before you end the session, or delete the sandbox from your machine:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;signadot sandbox delete devin-route-eta
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once the Devin VM shuts down, its devbox claim lapses within about a minute.&lt;/p&gt;

&lt;h2&gt;
  
  
  Use it with your own services
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Your repository.&lt;/strong&gt; Connect Devin to GitHub, add your repository under &lt;strong&gt;Settings → Environment → Repositories&lt;/strong&gt;, and commit the blueprint as &lt;code&gt;.devin/blueprint.yaml&lt;/code&gt;. In its &lt;code&gt;knowledge&lt;/code&gt; section, write down how each service runs outside the cluster: environment variables, ports and dependencies.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pull requests with evidence.&lt;/strong&gt; Add "open a pull request and link the passing Signadot Job" to the prompt, so reviewers see the end-to-end result next to the diff.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automation.&lt;/strong&gt; The &lt;a href="https://docs.devin.ai/api-reference/v3/sessions/post-organizations-sessions" rel="noopener noreferrer"&gt;Devin API&lt;/a&gt; starts a session from a prompt, so a ticket or alert can kick off the same write, sandbox and test loop.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Agent skills.&lt;/strong&gt; The &lt;a href="https://www.signadot.com/docs/integrations/coding-agents/agent-skills?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=devin-tutorial" rel="noopener noreferrer"&gt;&lt;code&gt;signadot-validate&lt;/code&gt; skill&lt;/a&gt; packages this validation loop. Devin loads skills from &lt;code&gt;.agents/skills/&lt;/code&gt; in your repository.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Troubleshooting
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Blueprint build fails with &lt;code&gt;signadot: command not found&lt;/code&gt;.&lt;/strong&gt; The CLI installer couldn't resolve the latest release. Pin it with &lt;code&gt;SIGNADOT_CLI_VERSION&lt;/code&gt;, as the blueprint does.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;409 Conflict: devbox ... is already claimed&lt;/code&gt;.&lt;/strong&gt; Another Devin session with the same API key holds the devbox. Make sure Devin sets a per-session &lt;code&gt;MACHINE_ID_FILE&lt;/code&gt; (step 1 of the blueprint's knowledge), or end the other session.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The MCP server shows "Needs connection".&lt;/strong&gt; Paste the API key into the MCP server's own &lt;strong&gt;Secrets&lt;/strong&gt; field.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;list_clusters&lt;/code&gt; asks which cluster to use.&lt;/strong&gt; Your org has more than one cluster. Name it in the prompt.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The driver logs &lt;code&gt;DeadlineExceeded&lt;/code&gt;.&lt;/strong&gt; The driver gives each &lt;code&gt;route&lt;/code&gt; call one second, and traffic to Devin's VM goes through the control plane. Run &lt;code&gt;route&lt;/code&gt; with &lt;code&gt;ROUTE_CALC_DELAY=1ms&lt;/code&gt; to remove its simulated 50 ms of work.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Frequently asked questions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  How does Devin reach my Kubernetes cluster?
&lt;/h3&gt;

&lt;p&gt;Through the Signadot control plane. The blueprint configures the Signadot CLI with a ControlPlaneProxy connection, so Devin's VM needs only a Signadot API key: no kubeconfig and no network path to your cluster's API server. This also works for a local cluster such as minikube, kind, k3d or Docker Desktop.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does Devin's sandbox affect other people using the cluster?
&lt;/h3&gt;

&lt;p&gt;No. A Signadot sandbox only receives requests that carry its routing key. Every other request, including your teammates' traffic and other sandboxes, keeps reaching the baseline services.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can several Devin sessions use Signadot at the same time?
&lt;/h3&gt;

&lt;p&gt;Yes. Every Devin VM boots with the same &lt;code&gt;/etc/machine-id&lt;/code&gt;, which Signadot uses to pick a devbox. The blueprint tells Devin to write a fresh machine ID for each session and point &lt;code&gt;MACHINE_ID_FILE&lt;/code&gt; at it, so each session gets its own devbox and sandbox under one service account.&lt;/p&gt;

&lt;h3&gt;
  
  
  Which Signadot MCP tools does Devin use?
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;list_clusters&lt;/code&gt;, &lt;code&gt;resolve_workload&lt;/code&gt;, &lt;code&gt;resolve_workload_port&lt;/code&gt;, &lt;code&gt;list_devboxes&lt;/code&gt; and &lt;code&gt;create_sandbox&lt;/code&gt;, plus &lt;code&gt;get_workload_object&lt;/code&gt; while debugging. The MCP server has no Job tools yet, so Devin runs the end-to-end suite with signadot job submit.&lt;/p&gt;

&lt;h3&gt;
  
  
  What does my application need for this to work?
&lt;/h3&gt;

&lt;p&gt;Your services must propagate the routing key from incoming to outgoing requests, for example as OpenTelemetry baggage, so that requests tagged for the sandbox reach Devin's copy of the service. HotROD already does this with OpenTelemetry. The Signadot docs on context propagation show how to set it up in your own services.&lt;/p&gt;

&lt;h2&gt;
  
  
  See also
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.signadot.com/docs/integrations/mcp?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=devin-tutorial" rel="noopener noreferrer"&gt;Signadot MCP server&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.signadot.com/docs/integrations/coding-agents/agent-skills?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=devin-tutorial" rel="noopener noreferrer"&gt;Agent Skills&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.signadot.com/docs/guides/local-development?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=devin-tutorial" rel="noopener noreferrer"&gt;Local development with Signadot&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.signadot.com/docs/guides/use-cases/run-automated-tests?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=devin-tutorial" rel="noopener noreferrer"&gt;Set up tests using Jobs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.signadot.com/docs/guides/set-up-context-propagation?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=devin-tutorial" rel="noopener noreferrer"&gt;Context propagation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.signadot.com/docs/tutorials/closed-loop-microservices-validation-claude-code?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=devin-tutorial" rel="noopener noreferrer"&gt;Closed-loop microservices validation with Claude Code&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.signadot.com/docs/tutorials/autonomous-closed-loop-codex?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=devin-tutorial" rel="noopener noreferrer"&gt;Autonomous closed-loop workflows with Codex&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.signadot.com/docs/tutorials/modal-sandboxes-signadot?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=devin-tutorial" rel="noopener noreferrer"&gt;End-to-end testing from Modal Sandboxes&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>devin</category>
      <category>ai</category>
      <category>testing</category>
      <category>kubernetes</category>
    </item>
    <item>
      <title>Test Redis Streams Producers and Consumers with Signadot Sandboxes</title>
      <dc:creator>Signadot</dc:creator>
      <pubDate>Fri, 06 Nov 2026 17:33:49 +0000</pubDate>
      <link>https://dev.to/signadot/test-redis-streams-producers-and-consumers-with-signadot-sandboxes-53hi</link>
      <guid>https://dev.to/signadot/test-redis-streams-producers-and-consumers-with-signadot-sandboxes-53hi</guid>
      <description>&lt;p&gt;&lt;em&gt;Read this tutorial on &lt;a href="https://www.signadot.com/docs/tutorials/testing-redis-streams?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=redis-streams-tutorial" rel="noopener noreferrer"&gt;Signadot docs&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.signadot.com/docs/concepts/sandbox?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=redis-streams-tutorial" rel="noopener noreferrer"&gt;Sandboxes&lt;/a&gt; route a request to the right version of a service by its &lt;a href="https://www.signadot.com/docs/glossary?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=redis-streams-tutorial" rel="noopener noreferrer"&gt;routing key&lt;/a&gt;, which travels in request headers. A Redis stream breaks that chain: nobody calls a consumer, it reads entries on its own. So the routing key has to travel inside each stream entry, and every consumer, baseline and sandboxed alike, has to decide whether an entry is meant for it.&lt;/p&gt;

&lt;p&gt;This tutorial deploys a small Python app to your Kubernetes cluster. A producer appends messages to the Redis stream &lt;code&gt;demo:messages&lt;/code&gt;, and a consumer reads the stream and calls a notifier. You fork each of the three services into a sandbox, bundle them in a route group, and watch each message reach exactly the right version of each service, on one shared Redis and one shared stream.&lt;/p&gt;

&lt;p&gt;Full source: &lt;a href="https://github.com/signadot/examples/tree/main/selective-consumption-with-redis-streams/python" rel="noopener noreferrer"&gt;signadot/examples/selective-consumption-with-redis-streams/python&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How Redis Streams changes the isolation problem
&lt;/h2&gt;

&lt;p&gt;Deploy a changed consumer next to the baseline and leave everything else alone, and the two end up in the same consumer group. Within a group, Redis hands each entry to whichever consumer calls &lt;code&gt;XREADGROUP&lt;/code&gt; next, without looking at the routing key, so the sandbox silently takes a share of everyone's work and acknowledges it. The example avoids that in four steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;A consumer group per sandbox.&lt;/strong&gt; The baseline reads through &lt;code&gt;demo-consumers&lt;/code&gt;; a sandbox reads through &lt;code&gt;demo-consumers-&amp;lt;routing key&amp;gt;&lt;/code&gt;, created at &lt;code&gt;$&lt;/code&gt; so it sees new entries only. Every group receives every entry.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The routing key inside the entry.&lt;/strong&gt; Stream entries have no headers, so the producer adds the OpenTelemetry context (&lt;code&gt;traceparent&lt;/code&gt; and &lt;code&gt;baggage&lt;/code&gt;) to each entry as extra fields, and the consumer reads it back out.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A check per entry, on both sides.&lt;/strong&gt; Each consumer asks the &lt;a href="https://github.com/signadot/routesapi" rel="noopener noreferrer"&gt;Signadot Routes API&lt;/a&gt; which routing keys belong to sandboxes of the &lt;code&gt;consumer&lt;/code&gt; Deployment. The baseline skips those keys; a sandbox processes only its own key and the keys of route groups it is in.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;An acknowledgement for every entry.&lt;/strong&gt; Processed or skipped, every entry gets an &lt;code&gt;XACK&lt;/code&gt;, so nothing stays pending.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The &lt;a href="https://www.signadot.com/docs/guides/set-up-message-queue-isolation/redis-streams?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=redis-streams-tutorial" rel="noopener noreferrer"&gt;Redis Streams integration guide&lt;/a&gt; covers the reasoning in depth, along with the alternative of a stream per sandbox and the operational details.&lt;/p&gt;

&lt;h2&gt;
  
  
  What you will deploy
&lt;/h2&gt;

&lt;p&gt;Everything runs in the &lt;code&gt;redis-streams-demo&lt;/code&gt; namespace:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;producer&lt;/strong&gt; (port 4000): &lt;code&gt;POST /api/publish&lt;/code&gt; appends a message to the stream &lt;code&gt;demo:messages&lt;/code&gt;. It also serves the demo UI and an event log, &lt;code&gt;GET /api/events&lt;/code&gt;, that shows which workload handled each step of a message.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;consumer&lt;/strong&gt;: reads &lt;code&gt;demo:messages&lt;/code&gt; through a consumer group and calls the notifier for each message it processes. It has no Service, because nothing calls it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;notifier&lt;/strong&gt; (port 4001): &lt;code&gt;POST /api/notify&lt;/code&gt; records a notification.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;redis&lt;/strong&gt;: Redis 7.4, holding the stream and the demo's event log.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqg41u6gtltqt9qs1dzrd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqg41u6gtltqt9qs1dzrd.png" alt=" " width="800" height="127"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The three services run from one image, and the first argument picks which one starts (&lt;code&gt;python main.py producer&lt;/code&gt;, &lt;code&gt;consumer&lt;/code&gt; or &lt;code&gt;notifier&lt;/code&gt;). The producer and notifier Deployments carry the &lt;code&gt;sidecar.signadot.com/inject: "true"&lt;/code&gt; annotation, so &lt;a href="https://www.signadot.com/docs/guides/request-routing/devmesh?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=redis-streams-tutorial" rel="noopener noreferrer"&gt;DevMesh&lt;/a&gt; can route the requests they receive to a sandbox. The consumer does not need it: no request ever reaches the consumer, and which copy handles an entry is decided by consumer groups and the per-entry check instead.&lt;/p&gt;

&lt;p&gt;The files that matter:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;selective-consumption-with-redis-streams/python/
├── app/                  # the three services: plain redis-py, Flask and requests
├── platform_redis/       # everything Signadot-specific
│   ├── client.py         # Redis: XADD with the OpenTelemetry context
│   ├── consumer.py       # StreamConsumer: groups, per-entry check, XACK, recovery
│   └── routes.py         # Routes API client
├── k8s/                  # Redis and the three Deployments
├── signadot/
│   ├── sandboxes/        # consumer.yaml, notifier.yaml, producer.yaml
│   └── routegroups/      # redis-streams-demo.yaml
├── Dockerfile
└── main.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Before you begin
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Info: Prerequisites&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A Kubernetes cluster with the &lt;a href="https://www.signadot.com/docs/installation/signadot-operator?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=redis-streams-tutorial" rel="noopener noreferrer"&gt;Signadot Operator&lt;/a&gt; installed.&lt;/li&gt;
&lt;li&gt;The &lt;a href="https://www.signadot.com/docs/getting-started/installation/signadot-cli?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=redis-streams-tutorial" rel="noopener noreferrer"&gt;Signadot CLI&lt;/a&gt;, logged in with &lt;code&gt;signadot auth login&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;kubectl&lt;/code&gt; pointed at that cluster, and &lt;code&gt;jq&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Docker, and a container registry your cluster can pull from.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  1. Build the image
&lt;/h2&gt;

&lt;p&gt;The three services run from one image. Build it and push it to your registry:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/signadot/examples.git
&lt;span class="nb"&gt;cd&lt;/span&gt; examples/selective-consumption-with-redis-streams/python

&lt;span class="kd"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;IMAGE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;docker.io/your-user/redis-streams-demo-python:latest  &lt;span class="c"&gt;# your registry&lt;/span&gt;
docker build -t &lt;span class="nv"&gt;$IMAGE&lt;/span&gt; .
docker push &lt;span class="nv"&gt;$IMAGE&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note: Any registry your cluster can pull from works&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;docker.io/your-user/...&lt;/code&gt; is a placeholder. When you build images of your own services this way, push them to a private repository and give the cluster pull access to it, for example with an &lt;a href="https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/" rel="noopener noreferrer"&gt;image pull secret&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If your cluster's nodes have a different CPU architecture than your machine (for example an Apple silicon Mac and an x86 cluster), add &lt;code&gt;--platform linux/amd64&lt;/code&gt; to &lt;code&gt;docker build&lt;/code&gt;. On a local cluster that runs images straight from your Docker daemon, you can skip the push.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Deploy the demo
&lt;/h2&gt;

&lt;p&gt;Point the manifests at your image, then deploy Redis and the three services:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sed -i.orig &lt;span class="s2"&gt;"s|image: redis-streams-demo-python:latest|image: $IMAGE|"&lt;/span&gt; k8s/*.yaml

kubectl create namespace redis-streams-demo
kubectl apply -f k8s/
kubectl -n redis-streams-demo &lt;span class="nb"&gt;wait&lt;/span&gt; --for=condition=available deploy --all --timeout=180s
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;sed&lt;/code&gt; command keeps the original manifests as &lt;code&gt;k8s/*.yaml.orig&lt;/code&gt;, which &lt;code&gt;kubectl apply&lt;/code&gt; ignores.&lt;/p&gt;

&lt;p&gt;The consumer's Deployment tells the Routes API which baseline workload it is, and only reports ready once it can actually route (&lt;a href="https://github.com/signadot/examples/blob/main/selective-consumption-with-redis-streams/python/k8s/consumer.yaml" rel="noopener noreferrer"&gt;&lt;code&gt;k8s/consumer.yaml&lt;/code&gt;&lt;/a&gt;):&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;k8s/consumer.yaml&lt;/code&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;          &lt;span class="na"&gt;env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="c1"&gt;# Which baseline workload this is, for the Signadot Routes API.
&lt;/span&gt;            &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;SIGNADOT_BASELINE_KIND&lt;/span&gt;
              &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Deployment&lt;/span&gt;
            &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;SIGNADOT_BASELINE_NAME&lt;/span&gt;
              &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;consumer&lt;/span&gt;
            &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;SIGNADOT_BASELINE_NAMESPACE&lt;/span&gt;
              &lt;span class="na"&gt;valueFrom&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                &lt;span class="na"&gt;fieldRef&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                  &lt;span class="na"&gt;fieldPath&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;metadata.namespace&lt;/span&gt;
          &lt;span class="c1"&gt;# Ready once the consumer group exists and routing rules are loaded.
&lt;/span&gt;          &lt;span class="na"&gt;readinessProbe&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="na"&gt;exec&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
              &lt;span class="na"&gt;command&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"cat"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"/tmp/ready"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
            &lt;span class="na"&gt;periodSeconds&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So when &lt;code&gt;kubectl wait&lt;/code&gt; returns, the consumer group &lt;code&gt;demo-consumers&lt;/code&gt; exists and the consumer has its first answer from the Routes API. A sandbox forked from this Deployment inherits the same variables, and the Signadot Operator adds &lt;code&gt;SIGNADOT_SANDBOX_NAME&lt;/code&gt; and &lt;code&gt;SIGNADOT_SANDBOX_ROUTING_KEY&lt;/code&gt; through the &lt;a href="https://www.signadot.com/docs/reference/sandboxes/downward-api?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=redis-streams-tutorial" rel="noopener noreferrer"&gt;sandbox downward API&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. How the code carries the routing key
&lt;/h2&gt;

&lt;p&gt;The app code is plain redis-py, Flask and &lt;code&gt;requests&lt;/code&gt;. Everything Signadot-specific lives in &lt;a href="https://github.com/signadot/examples/tree/main/selective-consumption-with-redis-streams/python/platform_redis" rel="noopener noreferrer"&gt;&lt;code&gt;platform_redis/&lt;/code&gt;&lt;/a&gt;, a thin wrapper over redis-py of the kind a platform team would ship, so app developers don't have to think about sandboxes.&lt;/p&gt;

&lt;h3&gt;
  
  
  The application code
&lt;/h3&gt;

&lt;p&gt;The producer uses &lt;code&gt;platform_redis.Redis&lt;/code&gt;, a drop-in &lt;code&gt;redis.Redis&lt;/code&gt; (&lt;a href="https://github.com/signadot/examples/blob/main/selective-consumption-with-redis-streams/python/app/producer.py" rel="noopener noreferrer"&gt;&lt;code&gt;app/producer.py&lt;/code&gt;&lt;/a&gt;):&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;app/producer.py&lt;/code&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;redis_client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;platform_redis&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Redis&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;from_url&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;REDIS_URL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;decode_responses&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;span class="n"&gt;entry_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;redis_client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;xadd&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;STREAM&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;maxlen&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;10_000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;approximate&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The consumer hands a handler to &lt;code&gt;platform_redis.StreamConsumer&lt;/code&gt; (&lt;a href="https://github.com/signadot/examples/blob/main/selective-consumption-with-redis-streams/python/app/consumer.py" rel="noopener noreferrer"&gt;&lt;code&gt;app/consumer.py&lt;/code&gt;&lt;/a&gt;). The handler receives the entry's application fields and calls the notifier with plain &lt;code&gt;requests&lt;/code&gt;:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;app/consumer.py&lt;/code&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;handle&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;entry_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;fields&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;message&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;fields&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"body"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;fields&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"body"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="no"&gt;PROCESSOR_VERSION&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s2"&gt;"v2"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"body"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"body"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;upper&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;events&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;record&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;"Consumed message from {STREAM} with processor {PROCESSOR_VERSION}: "&lt;/span&gt;
                  &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;"\"{message['body']}\""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="c1"&gt;# The requests instrumentation adds the entry's baggage (and routing key)&lt;/span&gt;
    &lt;span class="c1"&gt;# to this call.&lt;/span&gt;
    &lt;span class="n"&gt;requests&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;"{NOTIFIER_URL}/api/notify"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;timeout&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;raise_for_status&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;


&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;redis_client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;platform_redis&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Redis&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;from_url&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;REDIS_URL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;decode_responses&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;consumer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;platform_redis&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;StreamConsumer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;redis_client&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;stream&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="no"&gt;STREAM&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;group&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="no"&gt;CONSUMER_GROUP&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;socket&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;gethostname&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;on_ready&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="k"&gt;lambda&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;pathlib&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"/tmp/ready"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;touch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;consumer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;handle&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;PROCESSOR_VERSION&lt;/code&gt; is the "change" this tutorial tests: v1 keeps the message body as is, and v2 uppercases it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Carrying the key on every hop
&lt;/h3&gt;

&lt;p&gt;Underneath, OpenTelemetry carries the routing key on every hop. No tracing backend is involved: the instrumentation alone propagates the W3C trace context and baggage.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;HTTP&lt;/strong&gt;: the Flask and &lt;code&gt;requests&lt;/code&gt; instrumentation read and forward the &lt;code&gt;baggage&lt;/code&gt; header, which holds &lt;code&gt;sd-routing-key&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Into Redis&lt;/strong&gt;: stream entries have no headers, so &lt;code&gt;platform_redis.Redis.xadd&lt;/code&gt; adds the OpenTelemetry context (&lt;code&gt;traceparent&lt;/code&gt; and &lt;code&gt;baggage&lt;/code&gt;) to the entry as extra fields.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Out of Redis&lt;/strong&gt;: &lt;code&gt;StreamConsumer&lt;/code&gt; reads the context back from those fields and makes it current while the handler runs, so the handler's call to the notifier carries the key too.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Selective consumption
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;StreamConsumer&lt;/code&gt; also decides which consumer processes each entry:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The baseline reads through the group &lt;code&gt;demo-consumers&lt;/code&gt;. A sandbox reads through its own group, &lt;code&gt;demo-consumers-&amp;lt;routing key&amp;gt;&lt;/code&gt;, created at &lt;code&gt;$&lt;/code&gt; so it sees new entries only. Every group gets every entry.&lt;/li&gt;
&lt;li&gt;It asks the &lt;a href="https://github.com/signadot/routesapi" rel="noopener noreferrer"&gt;Signadot Routes API&lt;/a&gt; which routing keys belong to sandboxes of the &lt;code&gt;consumer&lt;/code&gt; Deployment. The baseline skips those keys; a sandbox processes only its own key and the keys of route groups it is in.&lt;/li&gt;
&lt;li&gt;It acknowledges (&lt;code&gt;XACK&lt;/code&gt;) every entry, processed or skipped, so nothing stays pending.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://www.signadot.com/docs/tutorials/testing-redis-streams?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=redis-streams-tutorial#how-platform_redis-works" rel="noopener noreferrer"&gt;How platform_redis works&lt;/a&gt;, after the walkthrough, goes through the code that does this.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Send a message without a routing key
&lt;/h2&gt;

&lt;p&gt;Connect your machine to the cluster, so that cluster service names resolve locally (this asks for your password):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="kd"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;CLUSTER&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;my-cluster  &lt;span class="c"&gt;# your cluster's name, from: signadot cluster list&lt;/span&gt;
signadot &lt;span class="kd"&gt;local&lt;/span&gt; connect --cluster=&lt;span class="nv"&gt;$CLUSTER&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note: Use signadot local connect, not kubectl port-forward&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Port-forwarding sends traffic straight to a pod and bypasses DevMesh, so a request carrying the producer sandbox's routing key would stay on the baseline producer. &lt;a href="https://www.signadot.com/docs/reference/cli/local?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=redis-streams-tutorial" rel="noopener noreferrer"&gt;&lt;code&gt;signadot local connect&lt;/code&gt;&lt;/a&gt; sends your requests through the cluster's services, where DevMesh routes them.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Publish a message:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;PRODUCER&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;http://producer.redis-streams-demo.svc:4000
curl -X POST &lt;span class="nv"&gt;$PRODUCER&lt;/span&gt;/api/publish -H &lt;span class="s1"&gt;'Content-Type: application/json'&lt;/span&gt; \
  -d &lt;span class="s1"&gt;'{"messageID": "m1", "messageBody": "hello m1"}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every service writes what it did to an event log that the producer serves. Define a helper that shows which workload handled each step of a message:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;trail&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
  curl -s &lt;span class="nv"&gt;$PRODUCER&lt;/span&gt;/api/events &lt;span class="o"&gt;|&lt;/span&gt; jq -r --arg id &lt;span class="s2"&gt;"$1"&lt;/span&gt; &lt;span class="s1"&gt;'.events[]
    | select(.context.message.id == $id)
    | "\(.context.baselineWorkload.name) (\(.context.sandboxName | if . == "" then "baseline" else . end)): \(.logEntry)"'&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
trail m1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;producer (baseline): Publishing message to Redis stream demo:messages
consumer (baseline): Consumed message from demo:messages with processor v1: "hello m1"
notifier (baseline): Sent notification: "hello m1"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The event log is a second stream, &lt;code&gt;demo:event-log&lt;/code&gt;, that exists only for this helper and the demo UI. Each event records the workload's baseline name and, in a sandbox, the sandbox name.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Create the sandboxes
&lt;/h2&gt;

&lt;p&gt;Each sandbox forks one service. The consumer sandbox also sets &lt;code&gt;PROCESSOR_VERSION=v2&lt;/code&gt;, the "change" under test, which uppercases message bodies (&lt;a href="https://github.com/signadot/examples/blob/main/selective-consumption-with-redis-streams/python/signadot/sandboxes/consumer.yaml" rel="noopener noreferrer"&gt;&lt;code&gt;signadot/sandboxes/consumer.yaml&lt;/code&gt;&lt;/a&gt;):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;redis-streams-consumer&lt;/span&gt;
&lt;span class="na"&gt;spec&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"consumer sandbox for the Redis Streams demo (processor v2)"&lt;/span&gt;
  &lt;span class="na"&gt;cluster&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"@{cluster}"&lt;/span&gt;
  &lt;span class="na"&gt;labels&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;demo&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;redis-streams&lt;/span&gt;
  &lt;span class="na"&gt;forks&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;forkOf&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Deployment&lt;/span&gt;
        &lt;span class="na"&gt;namespace&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;redis-streams-demo&lt;/span&gt;
        &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;consumer&lt;/span&gt;
      &lt;span class="na"&gt;customizations&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="c1"&gt;# The change under test: v2 uppercases message bodies.
&lt;/span&gt;          &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;PROCESSOR_VERSION&lt;/span&gt;
            &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;v2&lt;/span&gt;
  &lt;span class="na"&gt;defaultRouteGroup&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;endpoints&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;producer&lt;/span&gt;
        &lt;span class="na"&gt;target&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;http://producer.redis-streams-demo.svc:4000&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The fork runs the same image as the baseline. In a real change it would run your branch's image instead. Every sandbox exposes the producer as an endpoint, so each one gets a preview URL for the demo UI. The route group bundles all three sandboxes under one routing key, by matching their &lt;code&gt;demo: redis-streams&lt;/code&gt; label.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;signadot sandbox apply -f signadot/sandboxes/consumer.yaml --set &lt;span class="nv"&gt;cluster&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$CLUSTER&lt;/span&gt;
signadot sandbox apply -f signadot/sandboxes/notifier.yaml --set &lt;span class="nv"&gt;cluster&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$CLUSTER&lt;/span&gt;
signadot sandbox apply -f signadot/sandboxes/producer.yaml --set &lt;span class="nv"&gt;cluster&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$CLUSTER&lt;/span&gt;
signadot routegroup apply -f signadot/routegroups/redis-streams-demo.yaml --set &lt;span class="nv"&gt;cluster&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$CLUSTER&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Save the routing keys:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;CONSUMER_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$(&lt;/span&gt;signadot sandbox get redis-streams-consumer -o json &lt;span class="o"&gt;|&lt;/span&gt; jq -r .routingKey&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="nv"&gt;NOTIFIER_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$(&lt;/span&gt;signadot sandbox get redis-streams-notifier -o json &lt;span class="o"&gt;|&lt;/span&gt; jq -r .routingKey&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="nv"&gt;PRODUCER_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$(&lt;/span&gt;signadot sandbox get redis-streams-producer -o json &lt;span class="o"&gt;|&lt;/span&gt; jq -r .routingKey&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="nv"&gt;GROUP_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$(&lt;/span&gt;signadot routegroup get redis-streams-demo -o json &lt;span class="o"&gt;|&lt;/span&gt; jq -r .routingKey&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  6. Send messages with routing keys
&lt;/h2&gt;

&lt;p&gt;Define a helper that publishes with a routing key in the &lt;code&gt;baggage&lt;/code&gt; header, as a preview URL or the Signadot browser extension would:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;publish&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
  curl -s -o /dev/null -X POST &lt;span class="nv"&gt;$PRODUCER&lt;/span&gt;/api/publish -H &lt;span class="s1"&gt;'Content-Type: application/json'&lt;/span&gt; \
    -H &lt;span class="s2"&gt;"baggage: sd-routing-key=$2"&lt;/span&gt; -d &lt;span class="s2"&gt;"{\"messageID\": \"$1\", \"messageBody\": \"hello $1\"}"&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  The consumer sandbox
&lt;/h3&gt;

&lt;p&gt;The sandboxed consumer takes the message and runs v2. The baseline consumer skips it, and the notifier call goes back to the baseline notifier:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;publish m2 &lt;span class="nv"&gt;$CONSUMER_KEY&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; sleep 1&lt;span class="o"&gt;;&lt;/span&gt; trail m2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;producer (baseline): Publishing message to Redis stream demo:messages
consumer (redis-streams-consumer): Consumed message from demo:messages with processor v2: "HELLO M2"
notifier (baseline): Sent notification: "HELLO M2"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  The notifier sandbox
&lt;/h3&gt;

&lt;p&gt;The baseline consumer processes the message, and its call to the notifier lands on the sandbox: the routing key made it through Redis.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;publish m3 &lt;span class="nv"&gt;$NOTIFIER_KEY&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; sleep 1&lt;span class="o"&gt;;&lt;/span&gt; trail m3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;producer (baseline): Publishing message to Redis stream demo:messages
consumer (baseline): Consumed message from demo:messages with processor v1: "hello m3"
notifier (redis-streams-notifier): Sent notification: "hello m3"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  The producer sandbox
&lt;/h3&gt;

&lt;p&gt;The request goes to the sandboxed producer, which publishes to the same stream as the baseline, and the baseline consumer handles the entry:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;publish m4 &lt;span class="nv"&gt;$PRODUCER_KEY&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; sleep 1&lt;span class="o"&gt;;&lt;/span&gt; trail m4
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;producer (redis-streams-producer): Publishing message to Redis stream demo:messages
consumer (baseline): Consumed message from demo:messages with processor v1: "hello m4"
notifier (baseline): Sent notification: "hello m4"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  The route group
&lt;/h3&gt;

&lt;p&gt;All three sandboxes handle the message:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;publish m5 &lt;span class="nv"&gt;$GROUP_KEY&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; sleep 1&lt;span class="o"&gt;;&lt;/span&gt; trail m5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;producer (redis-streams-producer): Publishing message to Redis stream demo:messages
consumer (redis-streams-consumer): Consumed message from demo:messages with processor v2: "HELLO M5"
notifier (redis-streams-notifier): Sent notification: "HELLO M5"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  What each message did
&lt;/h3&gt;

&lt;p&gt;Together, the five messages cover every combination:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Routing key&lt;/th&gt;
&lt;th&gt;producer&lt;/th&gt;
&lt;th&gt;consumer&lt;/th&gt;
&lt;th&gt;notifier&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;none (m1)&lt;/td&gt;
&lt;td&gt;baseline&lt;/td&gt;
&lt;td&gt;baseline (v1)&lt;/td&gt;
&lt;td&gt;baseline&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;consumer sandbox (m2)&lt;/td&gt;
&lt;td&gt;baseline&lt;/td&gt;
&lt;td&gt;sandbox (v2)&lt;/td&gt;
&lt;td&gt;baseline&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;notifier sandbox (m3)&lt;/td&gt;
&lt;td&gt;baseline&lt;/td&gt;
&lt;td&gt;baseline (v1)&lt;/td&gt;
&lt;td&gt;sandbox&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;producer sandbox (m4)&lt;/td&gt;
&lt;td&gt;sandbox&lt;/td&gt;
&lt;td&gt;baseline (v1)&lt;/td&gt;
&lt;td&gt;baseline&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;route group (m5)&lt;/td&gt;
&lt;td&gt;sandbox&lt;/td&gt;
&lt;td&gt;sandbox (v2)&lt;/td&gt;
&lt;td&gt;sandbox&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  The consumer groups and logs
&lt;/h3&gt;

&lt;p&gt;Look at the stream's consumer groups:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl -n redis-streams-demo &lt;span class="nb"&gt;exec&lt;/span&gt; deploy/redis -- redis-cli XINFO GROUPS demo:messages
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There are two groups, &lt;code&gt;demo-consumers&lt;/code&gt; and &lt;code&gt;demo-consumers-&amp;lt;consumer key&amp;gt;&lt;/code&gt;, and both show &lt;code&gt;pending&lt;/code&gt; &lt;code&gt;0&lt;/code&gt;: each group received every entry and acknowledged the ones it skipped. The baseline consumer's log shows each decision:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl -n redis-streams-demo logs deploy/consumer &lt;span class="o"&gt;|&lt;/span&gt; grep -E &lt;span class="s2"&gt;"processing|skipped"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;... processing 1792725846853-0 (routing key None)
... skipped 1792725891917-0 (routing key fv51lmqum5pts)
... processing 1792725892981-0 (routing key x8nxnyx7xcndj)
... processing 1792725894049-0 (routing key cv8sn8btqsjmw)
... skipped 1792725895106-0 (routing key srud7xvwuckny)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your entry IDs and routing keys will differ. In order, these are m1 through m5: the baseline processes the message with no key, skips the consumer sandbox's key, processes the notifier and producer sandboxes' keys (neither of those sandboxes forks the consumer), and skips the route group's key, because the route group includes the consumer sandbox.&lt;/p&gt;

&lt;p&gt;The sandboxed consumer's log is the mirror image:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl -n redis-streams-demo logs -l signadot.com/sandbox-routing-key=&lt;span class="nv"&gt;$CONSUMER_KEY&lt;/span&gt; --tail=-1 &lt;span class="o"&gt;|&lt;/span&gt; grep -E &lt;span class="s2"&gt;"processing|skipped"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  7. Try it in the UI
&lt;/h2&gt;

&lt;p&gt;The producer serves a UI that shows each message's trail as it happens. Open &lt;a href="http://producer.redis-streams-demo.svc:4000" rel="noopener noreferrer"&gt;http://producer.redis-streams-demo.svc:4000&lt;/a&gt; (it resolves while &lt;code&gt;signadot local connect&lt;/code&gt; is running) and use the &lt;a href="https://www.signadot.com/docs/guides/developer-environments/access-sandboxes?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=redis-streams-tutorial#1-chrome-extension-for-web-applications" rel="noopener noreferrer"&gt;Signadot browser extension&lt;/a&gt; to pick a sandbox or the route group. You can also open the preview URL that &lt;code&gt;signadot sandbox apply&lt;/code&gt; printed for each sandbox.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fnt2q1pi0fs34ua2l80x1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fnt2q1pi0fs34ua2l80x1.png" alt="The Redis Streams demo UI through the consumer sandbox: the sandboxed consumer processed the message with processor v2, and the baseline producer and notifier handled the other steps" width="800" height="396"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  8. Clean up
&lt;/h2&gt;

&lt;p&gt;Delete the route group and the sandboxes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;signadot routegroup delete redis-streams-demo
signadot sandbox delete redis-streams-consumer
signadot sandbox delete redis-streams-notifier
signadot sandbox delete redis-streams-producer
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Redis doesn't remove a consumer group when its consumer goes away, so the consumer sandbox's group is still on the stream. With a Redis you keep, delete it yourself:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl -n redis-streams-demo &lt;span class="nb"&gt;exec&lt;/span&gt; deploy/redis -- \
  redis-cli XGROUP DESTROY demo:messages demo-consumers-&lt;span class="nv"&gt;$CONSUMER_KEY&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then remove the demo and disconnect:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl delete namespace redis-streams-demo
signadot &lt;span class="kd"&gt;local&lt;/span&gt; disconnect
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  How platform_redis works
&lt;/h2&gt;

&lt;p&gt;Everything Signadot-specific is in three small files in &lt;a href="https://github.com/signadot/examples/tree/main/selective-consumption-with-redis-streams/python/platform_redis" rel="noopener noreferrer"&gt;&lt;code&gt;platform_redis/&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Context in and out of entries
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;platform_redis.Redis&lt;/code&gt; overrides a single method. This is the whole of &lt;a href="https://github.com/signadot/examples/blob/main/selective-consumption-with-redis-streams/python/platform_redis/client.py" rel="noopener noreferrer"&gt;&lt;code&gt;platform_redis/client.py&lt;/code&gt;&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;platform_redis/client.py&lt;/code&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Redis&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;redis&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Redis&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;xadd&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;fields&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;**&lt;/span&gt;&lt;span class="n"&gt;kwargs&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="c1"&gt;# Stream entries have no headers, so the W3C trace context and baggage&lt;/span&gt;
        &lt;span class="c1"&gt;# (which holds the Signadot routing key) travel as extra fields.&lt;/span&gt;
        &lt;span class="n"&gt;carrier&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="n"&gt;propagate&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;inject&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;carrier&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nb"&gt;super&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;xadd&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="o"&gt;**&lt;/span&gt;&lt;span class="n"&gt;fields&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;**&lt;/span&gt;&lt;span class="n"&gt;carrier&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;**&lt;/span&gt;&lt;span class="n"&gt;kwargs&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The OpenTelemetry Redis instrumentation does neither half of this: it only creates spans for Redis commands. That is why the wrapper exists. &lt;code&gt;StreamConsumer&lt;/code&gt; reads the context back out, as shown below.&lt;/p&gt;

&lt;h3&gt;
  
  
  The consumer group
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/signadot/examples/blob/main/selective-consumption-with-redis-streams/python/platform_redis/consumer.py" rel="noopener noreferrer"&gt;&lt;code&gt;platform_redis/consumer.py&lt;/code&gt;&lt;/a&gt; picks the consumer group. A sandbox never joins the baseline's group:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;platform_redis/consumer.py&lt;/code&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;        &lt;span class="c1"&gt;# Never join the baseline's group from a sandbox: within a group each&lt;/span&gt;
        &lt;span class="c1"&gt;# entry goes to only one consumer, regardless of routing key.&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;in_sandbox&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;group&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;"{group}-{self.rules.sandbox_routing_key}"&lt;/span&gt;
        &lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;group&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;group&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and creates it at the right place in the stream:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;platform_redis/consumer.py&lt;/code&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;        &lt;span class="c1"&gt;# A sandbox starts at "$" (new entries only) instead of replaying the&lt;/span&gt;
        &lt;span class="c1"&gt;# stream; the baseline starts at "0" so nothing published before its&lt;/span&gt;
        &lt;span class="c1"&gt;# first start is missed.&lt;/span&gt;
        &lt;span class="n"&gt;start&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"$"&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;in_sandbox&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="s2"&gt;"0"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Each entry
&lt;/h3&gt;

&lt;p&gt;For each entry it reads, it extracts the context, decides whether the entry is meant for this workload, runs the handler with the entry's context current, and acknowledges the entry either way:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;platform_redis/consumer.py&lt;/code&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;            &lt;span class="n"&gt;ctx&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;propagate&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;extract&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fields&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="n"&gt;routing_key&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;baggage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get_baggage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;ROUTING_KEY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="n"&gt;app_fields&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;k&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;v&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;k&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;v&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;fields&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;items&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
                          &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;k&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;propagate&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get_global_textmap&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;fields&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
            &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;_should_process&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;routing_key&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                &lt;span class="n"&gt;log&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;info&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"skipped %s (routing key %s)"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;entry_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;routing_key&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
                &lt;span class="k"&gt;return&lt;/span&gt;
            &lt;span class="n"&gt;log&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;info&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"processing %s (routing key %s)"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;entry_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;routing_key&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="c1"&gt;# Make the entry's context current, so the handler's outbound&lt;/span&gt;
            &lt;span class="c1"&gt;# calls carry the routing key.&lt;/span&gt;
            &lt;span class="n"&gt;token&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;attach&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
        &lt;span class="k"&gt;finally&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="c1"&gt;# Acknowledge processed and skipped entries alike, or they stay in&lt;/span&gt;
            &lt;span class="c1"&gt;# this group's pending entries list forever.&lt;/span&gt;
            &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;xack&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;stream&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;group&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;entry_id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  The routing decision
&lt;/h3&gt;

&lt;p&gt;The decision itself is in &lt;a href="https://github.com/signadot/examples/blob/main/selective-consumption-with-redis-streams/python/platform_redis/routes.py" rel="noopener noreferrer"&gt;&lt;code&gt;platform_redis/routes.py&lt;/code&gt;&lt;/a&gt;. A background thread polls the Routes API every 5 seconds for the routing rules of the &lt;code&gt;consumer&lt;/code&gt; Deployment, and keeps two sets: the keys that route to any sandbox of it, and the keys that route to this sandbox (its own key and the keys of route groups it belongs to). The same check runs in the baseline and in a sandbox:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;platform_redis/routes.py&lt;/code&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;should_process&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;routing_key&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;in_sandbox&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="c1"&gt;# Process only what is routed to this sandbox.&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;routing_key&lt;/span&gt; &lt;span class="k"&gt;is&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="kc"&gt;None&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
                &lt;span class="n"&gt;routing_key&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sandbox_routing_key&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="n"&gt;routing_key&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;_own_keys&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="c1"&gt;# Baseline: process everything except what a sandbox has claimed.&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;routing_key&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;_sandbox_keys&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;An entry with no routing key, or with a key that belongs to a sandbox of some other service, stays with the baseline consumer.&lt;/p&gt;

&lt;h3&gt;
  
  
  Pending entries
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;StreamConsumer&lt;/code&gt; also recovers entries left pending. At startup it reads its own pending entries (&lt;code&gt;XREADGROUP&lt;/code&gt; with ID &lt;code&gt;0&lt;/code&gt;), and once a minute it uses &lt;code&gt;XAUTOCLAIM&lt;/code&gt; to take over entries that another consumer, such as a pod that was replaced, read but never acknowledged.&lt;/p&gt;

&lt;h2&gt;
  
  
  Behavior and tradeoffs
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Every group reads every entry.&lt;/strong&gt; The data is stored once, but each sandboxed consumer reads the whole stream and skips most of it, so read load on Redis grows with the number of sandboxed consumers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A failed handler drops its entry.&lt;/strong&gt; &lt;code&gt;StreamConsumer&lt;/code&gt; acknowledges every entry, including one whose handler raised an exception, so the failure is logged and the entry is not retried.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Routing changes reach the baseline within one poll.&lt;/strong&gt; A sandbox knows its own routing key from the moment it starts, but the baseline learns about it on its next Routes API poll, up to 5 seconds later. In that window an entry with the new key can be processed by both.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A consumer needs the Routes API to start.&lt;/strong&gt; It reads nothing, and stays not ready, until its first Routes API answer. After that it keeps the last rules it fetched if a refresh fails.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sandbox consumer groups outlive their sandboxes.&lt;/strong&gt; Destroy them with &lt;code&gt;XGROUP DESTROY&lt;/code&gt;, as in &lt;a href="https://www.signadot.com/docs/tutorials/testing-redis-streams?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=redis-streams-tutorial#8-clean-up" rel="noopener noreferrer"&gt;Clean up&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;decode_responses=True&lt;/code&gt; is required.&lt;/strong&gt; &lt;code&gt;StreamConsumer&lt;/code&gt; refuses a redis-py client created without it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pipelined &lt;code&gt;XADD&lt;/code&gt; carries no context.&lt;/strong&gt; Only &lt;code&gt;platform_redis.Redis.xadd&lt;/code&gt; adds the context fields, so entries appended with &lt;code&gt;pipeline().xadd(...)&lt;/code&gt; have no routing key and go to the baseline.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The &lt;a href="https://www.signadot.com/docs/guides/set-up-message-queue-isolation/redis-streams?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=redis-streams-tutorial#known-limits-of-the-reference-implementation" rel="noopener noreferrer"&gt;integration guide&lt;/a&gt; covers these in more detail, along with leftover consumers, trimming, and how Redis Pub/Sub differs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Adapt this to your stack
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Ship the wrapper in your shared code.&lt;/strong&gt; Copy &lt;code&gt;platform_redis/&lt;/code&gt; into your platform library, or port its three pieces to your language: an &lt;code&gt;XADD&lt;/code&gt; that adds the OpenTelemetry context, a Routes API client with a polling cache, and a stream consumer that picks the group, checks and acknowledges every entry, and recovers pending ones.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use it in your services.&lt;/strong&gt; Producers create their client with &lt;code&gt;platform_redis.Redis&lt;/code&gt; instead of &lt;code&gt;redis.Redis&lt;/code&gt;. Consumers replace their &lt;code&gt;XREADGROUP&lt;/code&gt; loop with &lt;code&gt;StreamConsumer(...).run(handler)&lt;/code&gt;; the handler receives the entry ID and the application fields.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Instrument HTTP.&lt;/strong&gt; Use the OpenTelemetry instrumentation for your HTTP server and client libraries, as &lt;code&gt;app/otel.py&lt;/code&gt; does for Flask and &lt;code&gt;requests&lt;/code&gt;, so the routing key reaches the producer and leaves the consumer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Set the baseline identity&lt;/strong&gt; (&lt;code&gt;SIGNADOT_BASELINE_KIND&lt;/code&gt;, &lt;code&gt;SIGNADOT_BASELINE_NAME&lt;/code&gt;, &lt;code&gt;SIGNADOT_BASELINE_NAMESPACE&lt;/code&gt;) on every consumer Deployment. Without it, &lt;code&gt;StreamConsumer&lt;/code&gt; processes every entry, which is what you want in a cluster without Signadot.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enable DevMesh&lt;/strong&gt; on the services that receive requests, as the producer and notifier Deployments do.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Destroy a consumer sandbox's group&lt;/strong&gt; in whatever deletes the sandbox.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Frequently asked questions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  How do you test a Redis Streams consumer without a separate Redis?
&lt;/h3&gt;

&lt;p&gt;Fork the consumer into a sandbox that reads the shared stream through a consumer group of its own. Every group receives every entry, the routing key travels inside each entry as OpenTelemetry baggage, and both the baseline and the sandboxed consumer check each entry against the Signadot Routes API, so exactly one of them processes it. Nothing about Redis or the stream is duplicated.&lt;/p&gt;

&lt;h3&gt;
  
  
  Which services does this tutorial run in sandboxes?
&lt;/h3&gt;

&lt;p&gt;All three, one sandbox each: the producer, the consumer, and the notifier the consumer calls. The consumer sandbox sets PROCESSOR_VERSION=v2, which uppercases message bodies, as the change under test, and a route group bundles the three sandboxes under one routing key. Redis and the stream demo:messages stay shared with the baseline throughout.&lt;/p&gt;

&lt;h3&gt;
  
  
  How can I tell which version of a service handled a message?
&lt;/h3&gt;

&lt;p&gt;Every service records each step in the demo's event log, and the tutorial's trail helper prints, per message, which workload handled each step: baseline or the sandbox's name. Each consumer also logs a processing or skipped line for every entry, with its routing key, and XINFO GROUPS shows one consumer group for the baseline and one for the consumer sandbox, each with nothing pending.&lt;/p&gt;

&lt;h3&gt;
  
  
  Do I need a container registry to follow this tutorial?
&lt;/h3&gt;

&lt;p&gt;You need an image your cluster can pull. The tutorial builds one image for all three services and pushes it to your registry; the Docker Hub name in the commands is a placeholder. If the registry is private, the cluster needs pull access to it, for example through an image pull secret. On a local cluster that runs images straight from your Docker daemon, you can skip the push. If you build on an Apple silicon Mac for an x86 cluster, add --platform linux/amd64 to docker build.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do I apply this to my own Redis Streams services?
&lt;/h3&gt;

&lt;p&gt;Ship the platform_redis wrapper, or a port of it, in your shared code. Producers create their client with platform_redis.Redis instead of redis.Redis, consumers replace their XREADGROUP loop with StreamConsumer(...).run(handler), and consumer Deployments set SIGNADOT_BASELINE_KIND, SIGNADOT_BASELINE_NAME and SIGNADOT_BASELINE_NAMESPACE. Add OpenTelemetry instrumentation for your HTTP server and client so the routing key reaches the producer and leaves the consumer.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can I use kubectl port-forward instead of signadot local connect?
&lt;/h3&gt;

&lt;p&gt;Not for this tutorial. kubectl port-forward sends traffic straight to a pod and bypasses DevMesh, so a request carrying the producer sandbox's routing key would stay on the baseline producer. signadot local connect sends requests through the cluster's normal service routing, where DevMesh can route them.&lt;/p&gt;

&lt;h2&gt;
  
  
  See also
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.signadot.com/docs/guides/set-up-message-queue-isolation/redis-streams?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=redis-streams-tutorial" rel="noopener noreferrer"&gt;Redis Streams integration guide&lt;/a&gt;: the problem and both isolation patterns, in depth&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.signadot.com/docs/guides/set-up-message-queue-isolation?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=redis-streams-tutorial" rel="noopener noreferrer"&gt;Message Queue Isolation&lt;/a&gt;: the other brokers&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.signadot.com/docs/guides/set-up-message-queue-isolation/kafka?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=redis-streams-tutorial" rel="noopener noreferrer"&gt;Kafka&lt;/a&gt;: the same patterns on Kafka&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.signadot.com/docs/tutorials/testing-rabbitmq-microservices?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=redis-streams-tutorial" rel="noopener noreferrer"&gt;Testing Microservices with RabbitMQ&lt;/a&gt;: selective consumption on a different broker&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.signadot.com/docs/guides/set-up-context-propagation?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=redis-streams-tutorial" rel="noopener noreferrer"&gt;Header-Based Routing&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.signadot.com/docs/reference/sandboxes/spec?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=redis-streams-tutorial" rel="noopener noreferrer"&gt;Sandbox specification&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>devops</category>
      <category>kubernetes</category>
      <category>redis</category>
      <category>testing</category>
    </item>
    <item>
      <title>What a Green Check on a Pull Request Should Promise</title>
      <dc:creator>Signadot</dc:creator>
      <pubDate>Wed, 04 Nov 2026 17:34:50 +0000</pubDate>
      <link>https://dev.to/signadot/what-a-green-check-on-a-pull-request-should-promise-3m5o</link>
      <guid>https://dev.to/signadot/what-a-green-check-on-a-pull-request-should-promise-3m5o</guid>
      <description>&lt;p&gt;&lt;em&gt;Read this article on &lt;a href="https://www.signadot.com/blog/what-a-green-check-should-promise/" rel="noopener noreferrer"&gt;Signadot&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Most merge gates stop at build, unit tests and contracts. Coding agents clear those easily, so the check that matters most, behavior against the real system, has to run before merge.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Pick a merged pull request with a green check and ask the team what the check guarantees. You will hear which jobs ran. You will rarely hear what anyone downstream can now assume.&lt;/p&gt;

&lt;p&gt;That matters because main is shared ground. Other teams cut branches from it, ship their own services against it and, when something breaks, start from the belief that what was already merged is correct. Every merge makes that promise to them, usually without anyone stating its terms.&lt;/p&gt;

&lt;p&gt;Leaving the terms vague was cheap while people wrote each change and stuck around to support it. Coding agents undo both. They raise the number of PRs, and a growing share comes from sessions that keep no memory once the work is handed off. For teams &lt;a href="https://www.signadot.com/validate-ai-generated-code-kubernetes/" rel="noopener noreferrer"&gt;verifying AI-generated code on Kubernetes&lt;/a&gt;, the merge gate is where that missing context shows up first.&lt;/p&gt;

&lt;h3&gt;
  
  
  The four questions a merge answers
&lt;/h3&gt;

&lt;p&gt;Remove the tool names and a change has four questions to clear before others should depend on it.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Does it build?&lt;/strong&gt; The code compiles, clears linting and static analysis, and yields an artifact you can deploy.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Does its logic hold?&lt;/strong&gt; Unit tests show the code behaves as written, on its own, with its dependencies replaced by stubs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Does it keep its promises at the boundaries?&lt;/strong&gt; The API shapes its callers rely on and the message formats it publishes stay compatible.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Does it behave correctly in the running system?&lt;/strong&gt; Through the real call paths, it returns correct results and stays within acceptable latency, error rate and resource use next to live versions of its neighbors.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Questions one through three are inexpensive. No environment is needed, they parallelize freely and they finish in minutes.&lt;/p&gt;

&lt;p&gt;Question four needs a live system, and it alone catches the failure that does the most damage in microservices: code that is right in isolation and wrong in context. One consumer still reads a field that was renamed. A new retry loop triples traffic to a service two hops downstream. A query passes its test and then times out on data shaped like production’s.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fccpkepo44luhorh8b5e4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fccpkepo44luhorh8b5e4.png" alt=" " width="800" height="145"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Three questions run anywhere in minutes. The fourth needs a live system.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Why most gates stop at question three
&lt;/h3&gt;

&lt;p&gt;Until recently, question four could not be answered before merge. It required an environment with every service up, and such environments were rare, slow to build and costly to run. A typical organization had one or two shared staging copies, always in demand and often broken.&lt;/p&gt;

&lt;p&gt;The industry adapted. Changes merged once they cleared the first three questions, and system behavior got checked later, in a shared environment where untested work from every team accumulated. Release management, code freezes and on-call for pre-production grew up largely to handle that accumulation.&lt;/p&gt;

&lt;p&gt;Nobody decided on principle that system behavior should be tested after merge. The gate was sized to the infrastructure. Because pre-merge environments were out of reach, the check that needed one moved to the other side of the merge.&lt;/p&gt;

&lt;p&gt;The arrangement worked while people set the pace. Ten changes a day in staging could be untangled by reading the log and messaging a few authors, who still remembered their code and could ship a patch.&lt;/p&gt;

&lt;h3&gt;
  
  
  What coding agents do to a three-question gate
&lt;/h3&gt;

&lt;p&gt;Agents increase the flow of changes. In &lt;a href="https://about.gitlab.com/press/releases/2026-06-23-gitlab-research-reveals-organizations-are-generating-ai-code-faster-than-they-can-control-it/" rel="noopener noreferrer"&gt;GitLab’s 2026 research with the Harris Poll&lt;/a&gt;, 85% of respondents agreed that AI has shifted the bottleneck from writing code to reviewing and validating it. Nearly all of that extra output clears questions one through three, since those are the checks an agent can run and retry until they pass.&lt;/p&gt;

&lt;p&gt;The agent has no view of the consumer three services away, because that consumer is not part of &lt;a href="https://www.signadot.com/blog/coding-agents-runtime-feedback-gap/" rel="noopener noreferrer"&gt;the feedback its loop receives&lt;/a&gt;. The cost of that blind spot is measurable. &lt;a href="https://www.coderabbit.ai/blog/state-of-ai-vs-human-code-generation-report" rel="noopener noreferrer"&gt;CodeRabbit’s analysis of 470 open-source pull requests&lt;/a&gt; found AI-generated PRs contained about 1.7 times as many issues as human-only ones, and logic and correctness issues were 75% more common. A three-question gate now waves through exactly the changes most likely to fail the fourth.&lt;/p&gt;

&lt;p&gt;Catching those failures after merge gets harder with every additional change. Tracing a break across ten merged changes is an afternoon. Tracing it across fifty, many from agent sessions that have already ended, turns into a cross-team investigation, and each extra change in the window makes every failure slower to pin down. Release trains feel the same pressure, since &lt;a href="https://www.signadot.com/blog/independent-deployability-validation-gap/" rel="noopener noreferrer"&gt;batches grow as agents raise the merge rate&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;So the old arrangement fails on both sides. More risky changes get through the gate, and the after-merge safety net is too overloaded to catch them.&lt;/p&gt;

&lt;h3&gt;
  
  
  Answering question four costs seconds now
&lt;/h3&gt;

&lt;p&gt;The infrastructure limit behind that arrangement no longer applies. Giving a single change a realistic system no longer requires cloning the stack.&lt;/p&gt;

&lt;p&gt;Here is the approach that replaced cloning. One set of stable services runs in the cluster, kept current by your existing deployment pipeline. For each pull request, only the service or two it modified get deployed beside that set.&lt;/p&gt;

&lt;p&gt;The routing layer keeps changes apart. Test requests for a pull request carry a routing key in a header, passed from service to service by standard context propagation such as &lt;a href="https://opentelemetry.io/docs/concepts/signals/baggage/" rel="noopener noreferrer"&gt;OpenTelemetry baggage&lt;/a&gt;. When a request with that key reaches a service the PR changed, it goes to the PR’s version. Everywhere else it goes to the shared stable version.&lt;/p&gt;

&lt;p&gt;So each pull request gets a full, production-like system in which its own code is the only change, and dozens can run side by side on one cluster. Since only the modified services start, the &lt;a href="https://www.signadot.com/guide-to-ephemeral-environments-kubernetes/" rel="noopener noreferrer"&gt;lightweight ephemeral environment&lt;/a&gt; is up in seconds, and answering question four costs roughly what a unit test run does.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmmlhnsehvcn46c6npxs7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmmlhnsehvcn46c6npxs7.png" alt=" " width="799" height="247"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Question four moves to the left of the merge.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Writing the contract down
&lt;/h3&gt;

&lt;p&gt;Without that limit, the pipeline can split its work cleanly.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fm8eql1ib2szx7w4arotg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fm8eql1ib2szx7w4arotg.png" alt=" " width="800" height="325"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;CI speeds up once it drops every job that depends on a live system. The pull request takes on integration and end-to-end testing, whether a person or an agent wrote the code. The slow integration stage after merge becomes a quick smoke test or disappears.&lt;/p&gt;

&lt;p&gt;What each stage is for changes too. After merge, the pipeline confirms there are no problems instead of hunting for them. The hunting is done before the promise to other teams is made.&lt;/p&gt;

&lt;p&gt;Now the contract can be written in full, because each line is checked. The change builds. The logic passes its tests. The interfaces are compatible. The change ran correctly among the real services. A green check means proven, not likely.&lt;/p&gt;

&lt;h3&gt;
  
  
  The gate is a decision now
&lt;/h3&gt;

&lt;p&gt;For a long time, a merge gated whatever the available environments allowed. That excuse is gone. Testing each change in a realistic system is no longer the costly step, and writing code is no longer what limits delivery. Verifying it is.&lt;/p&gt;

&lt;p&gt;The teams getting the most from coding agents are not the ones with the highest output. They are the ones that test system behavior before merge, so extra output turns into shipped features rather than a backlog of unproven changes. &lt;a href="https://www.signadot.com/blog/merging-to-test-is-killing-your-microservices-velocity/" rel="noopener noreferrer"&gt;Merging to test&lt;/a&gt; is the habit that change retires.&lt;/p&gt;

&lt;p&gt;Signadot supplies the pull request stage in the table above: lightweight ephemeral environments on the Kubernetes cluster you already run, plus Jobs that execute integration and end-to-end suites inside them for every PR. &lt;a href="https://www.signadot.com/solutions/agentic-development/" rel="noopener noreferrer"&gt;Signadot for agentic development&lt;/a&gt; shows how that stage fits an agent-heavy pipeline. What stays with your team is deciding what a green check should guarantee, and writing that down.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>testing</category>
      <category>cicd</category>
      <category>microservices</category>
    </item>
    <item>
      <title>Coding Agents Need a Runtime to Check Their Work Against</title>
      <dc:creator>Signadot</dc:creator>
      <pubDate>Wed, 28 Oct 2026 15:53:40 +0000</pubDate>
      <link>https://dev.to/signadot/coding-agents-need-a-runtime-to-check-their-work-against-3la4</link>
      <guid>https://dev.to/signadot/coding-agents-need-a-runtime-to-check-their-work-against-3la4</guid>
      <description>&lt;p&gt;&lt;strong&gt;Coding agents self-correct only when something tells them whether a change worked. In a cloud-native system, that signal comes from a running environment, not from local checks.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Every coding agent reaches the same moment. The code compiles, the unit tests pass, and the agent declares the task done. Whether it is done depends on something the agent rarely sees: how the change behaves inside the running system. That question is the hard part of &lt;a href="https://www.signadot.com/validate-ai-generated-code-kubernetes/" rel="noopener noreferrer"&gt;verifying AI-generated code on Kubernetes&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://addyosmani.com/blog/agent-harness-engineering/" rel="noopener noreferrer"&gt;Addy Osmani’s writing on agent harness engineering&lt;/a&gt; makes an argument worth taking seriously. An agent is a model plus the scaffolding around it: prompts, tools, context policies, execution sandboxes, subagents, hooks and feedback loops. That scaffolding often moves results more than a model upgrade does. Addy points to Viv Trivedy’s team, which moved a coding agent from the top 30 to the top 5 on Terminal Bench by changing only the harness.&lt;/p&gt;

&lt;p&gt;The argument holds. What it leaves open is what happens when the agent is changing code in a cloud-native system, because one piece of that scaffolding stops working there.&lt;/p&gt;

&lt;h3&gt;
  
  
  Feedback is the piece that decides the outcome
&lt;/h3&gt;

&lt;p&gt;The parts around an agent do different jobs. Prompts shape what it attempts. Tools like MCP servers and CLIs define what it can act on. Skills guide how it approaches a change. Policies and execution sandboxes fence in its actions.&lt;/p&gt;

&lt;p&gt;Each of those influences behavior. None of them answers the question that ends the task: did the change work? That answer comes from feedback, and feedback is what turns an agent from an open-loop code generator into something that can &lt;a href="https://www.signadot.com/blog/coding-agents-are-only-as-good-as-the-signals-you-feed-them/" rel="noopener noreferrer"&gt;check its own output, fix it and finish without a person in the middle&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  The pattern that works on local software
&lt;/h3&gt;

&lt;p&gt;For software that runs on one machine, the feedback recipe is well understood. Keep success quiet and make failure loud. A passing typecheck says nothing, while a failing one drops the error straight into the agent’s context so it can fix and retry.&lt;/p&gt;

&lt;p&gt;Tests and linters follow the same shape. Hooks at lifecycle points like pre-commit and post-edit turn “the agent was asked to do X” into “the system enforces X.”&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.anthropic.com/research/harness-design-long-running-apps" rel="noopener noreferrer"&gt;Anthropic’s work on long-running harnesses&lt;/a&gt; shows how far the pattern goes. A planner, a generator and an evaluator worked together, and the evaluator used &lt;a href="https://playwright.dev/" rel="noopener noreferrer"&gt;Playwright&lt;/a&gt; to click through the running application the way a user would and grade it against criteria. Over multi-hour runs, the setup produced working full-stack applications, and the evaluator’s feedback carried the result.&lt;/p&gt;

&lt;p&gt;Look at what made that possible. The whole application ran locally, so the question of whether it worked could be answered by starting the dev server and exercising it. Most production software does not offer that.&lt;/p&gt;

&lt;h3&gt;
  
  
  Distributed systems cut the feedback wire
&lt;/h3&gt;

&lt;p&gt;A change to one microservice takes effect inside a web of real dependencies. It touches the databases it queries, the queues it publishes to, the auth and routing layers in front of it, and the services on either side. The signal that says the change works is the system’s behavior at runtime, and nothing on the agent’s machine contains that system.&lt;/p&gt;

&lt;p&gt;A green unit test run &lt;a href="https://www.signadot.com/blog/validating-ai-generated-code/" rel="noopener noreferrer"&gt;covers a small slice of the verification surface&lt;/a&gt;. Integration, async flows, auth and tenancy, contracts and performance all sit outside it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpk6hz591y0bq2yz2i1ms.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpk6hz591y0bq2yz2i1ms.png" alt=" " width="800" height="287"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;When an agent works alone, only the local checks run.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Teams reach for three workarounds, and each one cuts the loop in a different place.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Mocks and stubs keep&lt;/strong&gt; the loop fast, but they return whatever the developer or the agent wrote into them. The failures that matter in distributed systems come from real services interacting with real state, which a mock cannot reproduce.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CI after the PR opens&lt;/strong&gt; catches real failures, but the verdict arrives after the agent has finished. The working context is gone, a person is back in the loop, and a cycle of seconds has become hours. It also leaves the merge gate to catch what the agent missed, and &lt;a href="https://www.signadot.com/blog/what-a-green-check-should-promise/" rel="noopener noreferrer"&gt;most merge gates stop short of the running system&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Full per-branch preview environments&lt;/strong&gt; produce real signal at a price that stops scaling. Previews for human PR volume already strain budgets, and &lt;a href="https://www.signadot.com/blog/scaling-coding-agents-enterprise-kubernetes/" rel="noopener noreferrer"&gt;agent branch volume multiplies that&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So the standard setup walks the agent to “I believe this works” and leaves it there. A person takes over verification, which was the job the automation was meant to remove. That handoff gets harder to staff as &lt;a href="https://www.signadot.com/blog/async-coding-agents-need-a-verifier/" rel="noopener noreferrer"&gt;agents start work without anyone watching&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  What an environment needs to serve an agent
&lt;/h3&gt;

&lt;p&gt;The feedback has to come from a running instance of the system that the agent can reach from inside its loop. A mock of that system does not count, and neither does a pipeline that reports back after the session ends. Four properties decide whether an environment can be an agent’s feedback source rather than a person’s manual test bed.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Fast and cheap.&lt;/strong&gt; A full staging clone fails on both counts. The workable shape is a lightweight ephemeral environment that shares stable infrastructure and deploys only what the change touches. It should be ready in seconds, with a marginal cost tied to the services changed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Real.&lt;/strong&gt; Requests route through the actual services, data stores and queues, with the agent’s build swapped in for the service it changed. The agent debugs the conditions production runs under.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Programmable.&lt;/strong&gt; The agent creates the environment, exercises it, reads the results and tears it down through a CLI, API or MCP server. Any step that needs a person breaks the loop before it starts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Isolated without duplication.&lt;/strong&gt; Hundreds of agents verify at once on one shared cluster without stepping on each other. That takes &lt;a href="https://www.signadot.com/articles/isolation-models-for-ephemeral-environments-infra-level-vs-request-level/" rel="noopener noreferrer"&gt;an isolation model that forks only the changed services&lt;/a&gt; instead of copying infrastructure.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;None of this is exotic. Platform teams have assembled these properties for human developers for years. The change for agentic development is wiring them into the loop the agent drives, instead of parking them beside it for people to consult at PR time.&lt;/p&gt;

&lt;h3&gt;
  
  
  What changes when the loop closes
&lt;/h3&gt;

&lt;p&gt;With runtime feedback inside the loop, the agent can verify past its own process boundary. It can run integration paths across the real call graph. It can check contract behavior against live consumers and producers instead of generated stubs, and run against the actual database to catch the migration that breaks an unrelated query.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fger4047njobk3110grpm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fger4047njobk3110grpm.png" alt=" " width="800" height="364"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;A running environment in the loop moves most of the surface ahead of the PR.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Engineers run those checks by hand today, after the agent finishes. Moving them inside the loop changes what a PR is. The diff arrives with evidence: traces showing the new code ran, integration results showing the calls between services still succeed, and metrics showing nothing else regressed.&lt;/p&gt;

&lt;p&gt;Review then shifts from “does this work” to “should this ship,” which is a better use of a senior engineer’s attention. &lt;a href="https://www.signadot.com/blog/closing-the-loop-coding-agents-cloud-native/" rel="noopener noreferrer"&gt;Closing the loop for coding agents in cloud-native systems&lt;/a&gt; walks through that shift with a demo.&lt;/p&gt;

&lt;h3&gt;
  
  
  The missing piece of the scaffold
&lt;/h3&gt;

&lt;p&gt;The scaffolding argument is right, and feedback is the part that decides whether the rest of it pays off. The pieces that shape an agent’s first attempt have matured fast, and local feedback through types, tests and hooks is a solved problem. What teams building distributed systems still lack is feedback from a real running system, at the speed and concurrency agents work at.&lt;/p&gt;

&lt;p&gt;That gap is what Signadot closes. Its lightweight ephemeral environments run on a shared Kubernetes cluster, deploy only the changed services and route the rest of each request to the shared stable versions. Agents get a programmable runtime to verify against inside the loop rather than after it. &lt;a href="https://www.signadot.com/solutions/agentic-development/" rel="noopener noreferrer"&gt;Signadot for agentic development&lt;/a&gt; shows how teams set that loop up.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>kubernetes</category>
      <category>microservices</category>
      <category>devex</category>
    </item>
    <item>
      <title>Agent Loops Don't Have a Token Problem. They Have a Feedback Problem.</title>
      <dc:creator>Signadot</dc:creator>
      <pubDate>Wed, 16 Sep 2026 18:17:33 +0000</pubDate>
      <link>https://dev.to/signadot/agent-loops-dont-have-a-token-problem-they-have-a-feedback-problem-8p1</link>
      <guid>https://dev.to/signadot/agent-loops-dont-have-a-token-problem-they-have-a-feedback-problem-8p1</guid>
      <description>&lt;p&gt;&lt;em&gt;Read this article on &lt;a href="https://www.signadot.com/blog/agent-loops-feedback-problem/?utm_source=devto&amp;amp;utm_medium=blog&amp;amp;utm_campaign=blog+repost" rel="noopener noreferrer"&gt;Signadot&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Loop-based development means agents run longer, in parallel, and without anyone watching each attempt. What that costs is decided by the verification surface under the agent, not the token price.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The slogan making the rounds in AI coding is “write loops, not prompts.” In loop-based development, the agent doesn’t wait for a person between attempts. A small program hands it a goal, runs whatever it produces against a set of checks, feeds the failures back, and repeats until the checks pass or a limit stops it. The loop runs for as long as it takes, many loops run at once, and nobody reads the intermediate attempts. That’s the point of the pattern, and it’s what makes it faster than a person steering an agent turn by turn.&lt;/p&gt;

&lt;p&gt;It’s also exactly the shape of a spend problem. The past year has already brought the first retrenchment on agent token spend: flat-rate seats giving way to metered pricing, usage caps on agent products, engineering leaders asked to explain what a merged PR actually costs. Those bills came from interactive sessions, where a person was in the room and could close the laptop. A loop removes that person by design. Whatever an agent can spend in an hour with someone watching, a loop can spend all night, across a dozen parallel runs, with no one watching at all.&lt;/p&gt;

&lt;p&gt;Two loops running identical code against the same repo can still produce very different bills. What separates them isn’t the loop. It’s what the loop can observe about the system it’s changing. For teams running distributed services on Kubernetes, that gap is the entire cost structure, and most of it is decided before the loop ever runs.&lt;/p&gt;

&lt;h3&gt;
  
  
  Loops take the person away from the meter
&lt;/h3&gt;

&lt;p&gt;Each step in agentic development has moved the human one step further from the per-attempt decision. Prompt-driven work kept the developer inside every iteration, reading output and typing corrections, so spend was capped by one person’s attention and patience. Spec-driven work, the wave that Spec Kit, Kiro, and OpenSpec belong to, moved the developer’s investment up front into specifications and repo conventions, and the human came back to review finished tasks. Loop-driven work makes the loop itself the artifact the developer writes. They no longer write the code, and increasingly, they no longer write the individual task. They write the thing that generates work, checks it, and retries.&lt;/p&gt;

&lt;p&gt;The three properties that make a loop worth writing are the same three that make it expensive. It’s unattended, so a loop that’s thrashing on the wrong fix has nobody to notice. It’s long-running, so the spend clock doesn’t stop on its own. It’s parallel, so whatever one loop costs, you’re paying for many at once. None of that is an argument against loops. It’s an argument that the engineering has moved out of the prompt and into the wrapper: which checks the loop runs, what it gets back when one fails, and the condition under which it stops.&lt;/p&gt;

&lt;h3&gt;
  
  
  Loop cost is a product, not a sum
&lt;/h3&gt;

&lt;p&gt;The easy assumption is that cheap generation settles the cost question. It doesn’t. Generation is fast and cheaper per unit than developer hours, but tokens are a real and growing line item, and a loop is an agent left running on purpose. Budgets that survived interactive sessions don’t survive loops by default.&lt;/p&gt;

&lt;p&gt;The first response most teams reach for is guardrails: iteration caps, no-progress detection, spend ceilings. Those are necessary, and they aren’t sufficient. A cap bounds how much a wasteful loop can waste. It does nothing to make the loop less wasteful.&lt;/p&gt;

&lt;p&gt;What actually sets the bill is two numbers multiplied together: how many iterations a loop needs before it reaches a verified result, and what each of those iterations costs. Because they multiply, halving both doesn’t halve the bill, it quarters it. And a floor under either term is a floor under the total that no guardrail can lift.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwagtvlvr9hb6xiwbhzy6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwagtvlvr9hb6xiwbhzy6.png" alt=" " width="799" height="382"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Total loop cost is the product, not the sum. Pulling high-fidelity feedback into the inner loop shrinks both terms at once.&lt;/em&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Feedback quality sets the iteration count
&lt;/h4&gt;

&lt;p&gt;A loop that receives a bare failure signal has to guess at the cause. It changes something plausible and runs again, and the next bare failure says almost nothing about whether the guess was close. A loop that receives the actual error, produced by the actual system, with enough context to localize the fault, fixes the real problem and moves on.&lt;/p&gt;

&lt;p&gt;Feedback quality also caps how good the finished change can be, which matters more than the iteration count does. &lt;a href="https://www.signadot.com/blog/coding-agents-are-only-as-good-as-the-signals-you-feed-them/" rel="noopener noreferrer"&gt;A loop can only fix what its feedback can see&lt;/a&gt;. Give it unit tests and mocks, and it will stop when the unit tests and mocks pass, which is a different thing from a working change.&lt;/p&gt;

&lt;h4&gt;
  
  
  Where the loop closes sets the price per iteration
&lt;/h4&gt;

&lt;p&gt;Token price and context size are part of what an iteration costs, and they’re the loop author’s to tune. The part the platform decides is how long each iteration waits for an answer and what the environment behind it costs.&lt;/p&gt;

&lt;p&gt;Close the loop in CI, after the code has already left the agent’s session, and every cycle buys a pipeline run plus a place in someone else’s queue. Cadence lands in minutes to hours. Close it inside the session, against a runtime the agent can call directly, and cadence lands in seconds.&lt;/p&gt;

&lt;p&gt;The two terms aren’t independent, either. Pushing high-fidelity feedback out to CI doesn’t just make each cycle expensive, it leaves the agent iterating on partial signals in between, which inflates the iteration count too. Pulling high-fidelity feedback into the inner loop compresses both terms at once. It’s the only move available that does.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Total loop cost is the number of iterations multiplied by the cost of each one. Guardrails cap the damage. Only better feedback, reachable faster, changes the product.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Distributed systems push both numbers the wrong way
&lt;/h3&gt;

&lt;p&gt;For a self-contained program, both numbers come close to free. The test suite runs on a laptop in seconds, and what it reports is the complete answer, because the complete system is on the laptop. It’s also why the most convincing loop demos tend to be single-repo projects.&lt;/p&gt;

&lt;p&gt;A microservice change can’t be judged that way. Whether it’s correct depends on what its callees return, how the queues and data stores it writes to behave, and what the routing and policy layers in front of it do to its traffic. The feedback an agent can reach in seconds, local tests and mocks, is low fidelity: it covers only the code inside the service boundary. &lt;a href="https://www.signadot.com/articles/integration-tests-pass-but-staging-breaks/" rel="noopener noreferrer"&gt;Integration tests pass while staging breaks&lt;/a&gt; for precisely this reason. The feedback that would have caught it has production fidelity, and it has traditionally lived in CI and on &lt;a href="https://www.signadot.com/deep-dives/why-shared-staging-is-expensive/" rel="noopener noreferrer"&gt;shared staging, where every run waits behind someone else’s&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;So the two options cloud-native teams have had trade directly against each other: fast and low fidelity, or high fidelity and slow. A loop pays for both terms, so neither end of that tradeoff is good enough. The conventional environment options &lt;a href="https://www.signadot.com/blog/closing-the-loop-coding-agents-cloud-native/" rel="noopener noreferrer"&gt;run out of room at agent concurrency&lt;/a&gt; for structural reasons, not tuning. What the loop needs is the option that doesn’t trade: an environment with production fidelity that the loop can reach from inside the session.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fw8uwd9cjhghy6slmfv1h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fw8uwd9cjhghy6slmfv1h.png" alt=" " width="800" height="600"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Local tests and CI trade fidelity for speed or speed for fidelity. A production-fidelity environment the loop can reach from inside the session is the option that doesn't trade.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What you build is the verification surface
&lt;/h3&gt;

&lt;p&gt;Whether a loop finishes with a change that actually works, and what it costs to get there, are decided by four things the platform team builds. The loop passes through all four on every iteration.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqqv39gtsg8vk2a3z7ds8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqqv39gtsg8vk2a3z7ds8.png" alt=" " width="800" height="325"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Every iteration passes through the four layers. The runtime sets how long each one takes, the feedback sets how many it takes, the definition of done says when to stop, and the controls cap the total.&lt;/em&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  A runtime the loop can reach in seconds
&lt;/h4&gt;

&lt;p&gt;Every iteration needs an environment that behaves like production without costing like production. &lt;a href="https://www.signadot.com/guide-to-ephemeral-environments-kubernetes/" rel="noopener noreferrer"&gt;Lightweight ephemeral environments&lt;/a&gt; on a shared cluster get there: deploy only the services the change touches, then use request routing to steer the loop’s traffic through those services and through a stable shared deployment of everything else. Environments come up in seconds, and marginal cost tracks the pods you changed rather than the full stack. This is the platform team’s lever on cost per iteration, and it’s where the fidelity comes from.&lt;/p&gt;

&lt;h4&gt;
  
  
  A definition of done the platform team owns
&lt;/h4&gt;

&lt;p&gt;Agents don’t click through dashboards, and they shouldn’t be inventing their own passing criteria. The checks a change must satisfy belong in &lt;a href="https://www.signadot.com/blog/introducing-plans-microservices-validation-superpowers-for-coding-agents/" rel="noopener noreferrer"&gt;declarative validation workflows&lt;/a&gt; that platform teams write, version, and hand to agents as the sanctioned way to prove a change. The organization decides what passing means, and reviewers get a record of which checks ran rather than the agent’s word that it finished. This is what tells the loop when it’s allowed to stop.&lt;/p&gt;

&lt;h4&gt;
  
  
  Feedback detailed enough to localize a fault
&lt;/h4&gt;

&lt;p&gt;This is the lever on iteration count. A simple pass or fail tells a loop to try again without telling it what to change. The runtime should return structured results: which check failed, logs and traces scoped to the requests this loop itself issued, and the behavior change at the boundary that broke. Every increment of precision removes a guess, and every guess removed is spend that never happens.&lt;/p&gt;

&lt;h4&gt;
  
  
  Controls that make the spend forecastable
&lt;/h4&gt;

&lt;p&gt;Budgets, iteration ceilings, stall detection, and a durable record of every check a loop ran and every result it got. These don’t shrink either term. They put a hard ceiling on the product, which is what lets you run hundreds of loops and put a number in a plan instead of supervising one loop nervously.&lt;/p&gt;

&lt;h3&gt;
  
  
  This is now a platform team’s problem
&lt;/h3&gt;

&lt;p&gt;The role split follows from the cost structure. Application developers decide what to build and state the goal in a form a loop can check itself against. Platform engineers own everything the loop passes through: which checks run, where they run, what a loop is allowed to spend, and what evidence gets attached to the output. Those have to hold across every loop in the organization rather than being reinvented inside each one.&lt;/p&gt;

&lt;p&gt;Platform teams have run this play before. CI/CD went from something every team wired up itself to a shared system with an owner and a contract. The verification layer for loops is the same transition with one new requirement: it has to work during authoring, before a PR exists, at whatever concurrency the loops generate.&lt;/p&gt;

&lt;p&gt;Start with the runtime, because the other three stand on it. Validation workflows inherit the fidelity of wherever they execute, and feedback inherits the accuracy of whatever produced it. That layer is what we build at Signadot: a &lt;a href="https://www.signadot.com/product/platform/" rel="noopener noreferrer"&gt;Kubernetes-native validation platform&lt;/a&gt; with lightweight ephemeral environments and governed validation workflows, so agent loops can prove changes against the live system in seconds. The &lt;a href="https://www.signadot.com/docs/overview" rel="noopener noreferrer"&gt;docs&lt;/a&gt; walk through how the pieces fit together. If your agents already produce changes faster than your team can verify them, the size of your next bill was decided by the feedback surface, not the token price.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>testing</category>
      <category>cicd</category>
      <category>kubernetes</category>
    </item>
    <item>
      <title>CI wasn’t built for coding agents. Here’s what comes next.</title>
      <dc:creator>Signadot</dc:creator>
      <pubDate>Fri, 14 Aug 2026 19:29:21 +0000</pubDate>
      <link>https://dev.to/signadot/ci-wasnt-built-for-coding-agents-heres-what-comes-next-1pjn</link>
      <guid>https://dev.to/signadot/ci-wasnt-built-for-coding-agents-heres-what-comes-next-1pjn</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://thenewstack.io/ci-for-coding-agents/" rel="noopener noreferrer"&gt;The New Stack&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CI pipelines are too slow for AI coding agents. Learn how "plans" bring fast integration testing directly into the developer inner loop.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For years, integration tests have lived inside CI pipelines, triggered on push and answered ten, twenty, or thirty minutes later. That worked when humans pushed code. It doesn’t work now: developers are driving coding agents that iterate in seconds, and the round trip to a remote pipeline is too slow to fit inside the loop where the work is happening.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Developers are driving coding agents that iterate in seconds, and the round trip to a remote pipeline is too slow to fit inside the loop where the work is happening.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Recently, we’ve been rethinking what integration testing should look like in this new world. What we landed on is something we’re calling plans: small, agent-pickable, end-to-end checks that run inside the agent’s session against a real integration environment.&lt;/p&gt;

&lt;h3&gt;
  
  
  The two-loop tax
&lt;/h3&gt;

&lt;p&gt;Validation has traditionally been split into two loops:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Inner loop:&lt;/strong&gt; local dev, unit tests, docker-compose. Fast feedback, partially synthetic.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Outer loop:&lt;/strong&gt; CI pipelines, on push, against staging. Higher fidelity, ten minutes at least for a verdict.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For agents, that round trip is too long to be useful. An agent writes a change in seconds and can’t wait fifteen minutes for a remote verdict, so it ships from the inner loop. The only validation it runs is whatever the inner loop can provide, which, in most cases, is partial and mocked. The burden of verifying the code works against the full system is handed off to a developer, leaving the loop open.&lt;/p&gt;

&lt;p&gt;A natural reach is to put the agent inside CI itself. Let it author pipelines, generate test stubs, and react to failures. That direction is right, and that’s where this is going. But the primitive that makes agent-in-CI work is the same one the inner loop needs first: a unit of validation small enough for an agent to author, select, and run against a real environment in seconds.&lt;/p&gt;

&lt;p&gt;Build that primitive, and the inner loop can call it directly during authoring. The outer loop can call the same thing on push. The developer’s agent can reach into CI as a verification library instead of waiting on a remote pipeline. We start at the inner loop because that’s where the time-to-verdict bottleneck binds hardest today, but the same primitive is what lets the loops collapse into one.&lt;/p&gt;

&lt;h3&gt;
  
  
  Environments are no longer the hard part
&lt;/h3&gt;

&lt;p&gt;The first piece of the answer is something people are already doing in the inner loop today: ephemeral, on-demand environments that are isolated, scoped per run, and provide access to real downstream services and dependencies in a way that can scale to meet agent demand. I’ve written about how to build these on The New Stack before, and the pattern is broadly applicable.&lt;/p&gt;

&lt;p&gt;What matters here is the property it gives you: &lt;strong&gt;an integration environment with production-grade fidelity, available on demand, scoped to the work being done.&lt;/strong&gt; An agent can summon one in seconds, validate against it, and tear it down when it’s no longer needed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F02k9j7kxispuawrvrmmk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F02k9j7kxispuawrvrmmk.png" alt=" " width="800" height="378"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Workflow matters too
&lt;/h3&gt;

&lt;p&gt;Environments are necessary, but not sufficient. The other half of integration testing, the question of how validation gets &lt;em&gt;defined&lt;/em&gt;, selected, run, and reacted to, is where the pre-agent assumptions are most deeply baked in. Integration testing today runs in pipelines: heavyweight artifacts designed to run far away with elaborate bootstrapping, on push triggers, against a fixed set of steps. None of that is reachable from inside an agent’s session.&lt;/p&gt;

&lt;p&gt;So the question becomes: what should the right primitive look like? It would need to be small enough to live inside an agent’s working session, but real enough to catch integration bugs against the live cluster. Something the agent can author in seconds, a human can review, and the team can keep around and reuse. Closer to a function the agent calls when it needs to than a pipeline that runs on its own schedule.&lt;/p&gt;

&lt;p&gt;We call that primitive a &lt;strong&gt;plan&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Actions &amp;amp; plans
&lt;/h3&gt;

&lt;p&gt;A plan is a small two-layer system. It’s easier to explain by drawing the layers.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fuik0z032umzpkzqmk6xe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fuik0z032umzpkzqmk6xe.png" alt=" " width="800" height="368"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Actions
&lt;/h4&gt;

&lt;p&gt;Typed, deterministic building blocks. This should be a familiar shape if you’ve used GitHub Actions or any other workflow runner. Two things worth flagging:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;They run against real infrastructure inside an integration environment&lt;/strong&gt;, not against mocks. &lt;code&gt;request-http&lt;/code&gt; hits a live endpoint, &lt;code&gt;playwright&lt;/code&gt; drives a real browser, k6 loads a real service.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;They’re described in markdown&lt;/strong&gt;. Each action’s interface, inputs, and usage are documented inline, so a planning agent can read the action like a developer reading docs and compose unfamiliar ones correctly on the first try.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Plans
&lt;/h4&gt;

&lt;p&gt;A plan is a DAG (directed acyclic graph) compiled from actions, stitched together to validate one user-visible behavior end-to-end. These are intended to be authored by agents. The bits worth pointing out:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Authored in natural language.&lt;/strong&gt; A developer or agent describes the behavior they want validated (“walk the ride-request flow and assert that the itinerary shows both location names”), and a planning agent produces the DAG.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Selection hint.&lt;/strong&gt; Every plan carries a prose description of what it validates. When a change comes in, an agent reads the hints across the catalog and selects the right plan for the diff.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;spec&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;selectionHint&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;End-to-end&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;ride-request&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;check&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;for&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;HotROD:&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;pick&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;pickup&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;+&lt;/span&gt;
    &lt;span class="s"&gt;dropoff&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;in&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;the&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;React&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;app,&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;request&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;a&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;ride,&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;assert&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;the&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;resulting&lt;/span&gt;
    &lt;span class="s"&gt;itinerary&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;shows&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;both&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;location&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;names."&lt;/span&gt;
  &lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;e2e_ride&lt;/span&gt;
    &lt;span class="na"&gt;action&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;{&lt;/span&gt; &lt;span class="nv"&gt;actionID&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="nl"&gt;&amp;amp;lt&lt;/span&gt;&lt;span class="nv"&gt;;playwright-action-id&amp;gt;&lt;/span&gt; &lt;span class="pi"&gt;}&lt;/span&gt;
    &lt;span class="na"&gt;args&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;values&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;script&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;|&lt;/span&gt;
          &lt;span class="s"&gt;test('itinerary shows pickup and dropoff', async ({ page }) =&amp;gt; {&lt;/span&gt;
            &lt;span class="s"&gt;await page.goto(process.env.BASE_URL + '/');&lt;/span&gt;
            &lt;span class="s"&gt;await page.getByRole('button', { name: 'Request Ride' }).click();&lt;/span&gt;
            &lt;span class="s"&gt;await expect(page.locator('.itinerary')).toContainText("Rachel's Floral Designs");&lt;/span&gt;
          &lt;span class="s"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Why plans work for the inner loop
&lt;/h4&gt;

&lt;p&gt;Each plan covers one user-visible behavior end-to-end, not a pipeline or a full test suite. That makes it small enough to fit inside an agent’s session, and easy for the agent to pick the right one via &lt;code&gt;selectionHint&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;A diff touching the ride-request path runs the one or two plans that cover it, not anything about billing or auth. The environment underneath is real, so the answer that comes back is useful, in seconds, before the PR is ever opened.&lt;/p&gt;

&lt;h3&gt;
  
  
  How this works in practice
&lt;/h3&gt;

&lt;p&gt;This example uses the &lt;a href="https://github.com/signadot/hotrod?utm_source=the+new+stack&amp;amp;utm_medium=referral&amp;amp;utm_content=inline-mention&amp;amp;utm_campaign=tns+platform" rel="noopener noreferrer"&gt;HotROD rideshare demo app&lt;/a&gt;, a modified version of the one created by Jaeger. It simulates a ride-hailing backend on Kubernetes with four Go services. The frontend orchestrates calls to the location, driver, and route services, backed by Redis, MySQL, and Kafka.&lt;/p&gt;

&lt;p&gt;An agent renames a Go struct field on the location service: &lt;code&gt;Name&lt;/code&gt; becomes &lt;code&gt;LocationName&lt;/code&gt;. The kind of refactor that compiles, passes unit tests, and looks done.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkxr1a48iq0izb9b99dns.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkxr1a48iq0izb9b99dns.png" alt=" " width="800" height="368"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;The change as the agent sees it. The integration break is invisible from here.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Before opening a PR, the agent picks the existing ride-request plan from the catalog via its selection hint and runs it. The plan is a Playwright check that walks through the booking flow in a real browser against an ephemeral environment that contains the modified service.&lt;/p&gt;

&lt;p&gt;It fails. The frontend still reads Name from the JSON. The field is gone, the itinerary renders empty, and the assertion fails.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7hzdf8kcrjrsutbzblr1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7hzdf8kcrjrsutbzblr1.png" alt=" " width="799" height="330"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;The failure as the agent sees it: a structured report of which assertion failed and what was captured along the way.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The agent reads the failure, traces it to the contract, finds the frontend as the affected consumer, edits four files there, and re-runs the plan.&lt;/p&gt;

&lt;p&gt;It passes. The PR that opens is already validated against the real cluster.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fal85oblov6yzra61lp1n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fal85oblov6yzra61lp1n.png" alt=" " width="799" height="473"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Final report. The fix has propagated to the consumer, and the diff lands on the reviewer already passing.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What this changes about the SDLC
&lt;/h3&gt;

&lt;p&gt;Validation moves up. Integration tests that used to run when CI got around to them now run in the agent’s session, against a real cluster, before the PR is ever opened. Bugs that used to surface in staging (locally correct, systemically broken) get caught and fixed within a single-agent loop. Staging goes back to being a final sanity check rather than the primary test bed.&lt;/p&gt;

&lt;p&gt;The engineer driving the agent feels the shift first. Validation that used to mean waiting on CI now arrives inside the authoring session, so integration failures surface while the engineer and the agent are still working on the code together, not after the loop has closed. A downstream review, either by the engineer themselves or by a teammate, becomes a review of behavior rather than a stand-in for validation. What lands in front of human eyes is a diff already passing against the real cluster, with an environment URL and a plan run anyone can audit.&lt;/p&gt;

&lt;p&gt;Over time, the team builds up a versioned library of plans. Each plan is a small description of what “correct” means for one behavior. The library ends up doubling as a reference that agents validate against, and humans can read to understand the system.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“As agents compress code generation into seconds at one end of the pipeline, leaving integration validation pinned to the outer loop turns CI into a growing backlog rather than a feedback mechanism.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;We feel that this is a necessary shift. As agents compress code generation into seconds at one end of the pipeline, leaving integration validation pinned to the outer loop turns CI into a growing backlog rather than a feedback mechanism. The verdict has to arrive while the agent is still in the loop, or the gap between code generated and code shipped will keep widening for cloud-native teams.&lt;/p&gt;

&lt;h3&gt;
  
  
  How we shipped this: agent skills
&lt;/h3&gt;

&lt;p&gt;The primitives above describe what validation needs to look like for agents. The question is how an agent reaches for them. Agent skills are the right form factor: scoped, loadable instructions that Claude Code, Cursor, Codex, and other modern harnesses already pick up as first-class extensions.&lt;/p&gt;

&lt;p&gt;Skills made sense for a few reasons. They live where the agent already works, so Claude Code, Cursor, Codex, and most modern harnesses load them as a first-class extension. They’re narrow on purpose: authoring a plan and running one are different kinds of work, and splitting them keeps each skill small enough that the agent can pick the right tool without ambiguity.&lt;/p&gt;

&lt;p&gt;The plan workflow ships as two skills, split by the shape of the work:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;signadot-plan&lt;/code&gt; handles authorship. A developer or agent describes the behavior they want validated, and the skill produces a draft plan, composed from the action catalog, ready to review and commit alongside the code.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;signadot-validate&lt;/code&gt; is the runner. It reads the diff, picks the right plan via selection hints, spins an ephemeral environment, runs the plan against the real cluster, and surfaces failures the agent can act on.&lt;/p&gt;

&lt;p&gt;Splitting them keeps each skill small enough that the agent picks the right one without ambiguity. The &lt;a href="https://www.signadot.com/docs/tutorials/quickstart/plan-based-validation?utm_source=tns&amp;amp;utm_medium=sponsorship&amp;amp;utm_campaign=q2_26_sponsored_content&amp;amp;utm_content=inline-mention" rel="noopener noreferrer"&gt;plan-based validation quickstart&lt;/a&gt; walks the example above end-to-end.&lt;/p&gt;

&lt;p&gt;The skills run inside the agent’s session today, which is where the bottleneck has been. The same primitive extends the other way: the same plans can run in CI on push, against the same ephemeral environments, as a backstop for anything the inner-loop check missed. More on that another time.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>ai</category>
      <category>automation</category>
      <category>testing</category>
    </item>
  </channel>
</rss>
