<?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: Aman Kumar Sah</title>
    <description>The latest articles on DEV Community by Aman Kumar Sah (@shahaman098).</description>
    <link>https://dev.to/shahaman098</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%2F3527085%2F953a7ac7-ec9e-4443-9568-4bd324db9320.jpeg</url>
      <title>DEV Community: Aman Kumar Sah</title>
      <link>https://dev.to/shahaman098</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shahaman098"/>
    <language>en</language>
    <item>
      <title>Two agents, one room: how we caught a bug neither repo's tests could see</title>
      <dc:creator>Aman Kumar Sah</dc:creator>
      <pubDate>Sun, 08 Nov 2026 04:52:40 +0000</pubDate>
      <link>https://dev.to/shahaman098/two-agents-one-room-how-we-caught-a-bug-neither-repos-tests-could-see-5il</link>
      <guid>https://dev.to/shahaman098/two-agents-one-room-how-we-caught-a-bug-neither-repos-tests-could-see-5il</guid>
      <description>&lt;p&gt;Two teammates, two coding agents, one &lt;strong&gt;Switch&lt;/strong&gt; room. One agent owns the&lt;br&gt;
backend (a small checkout API). The other checks that the clients (a web page and&lt;br&gt;
an older mobile app, represented in the repo by a pinned fixture,&lt;br&gt;
&lt;code&gt;clients/mobile-client-v1.js&lt;/code&gt;, that stands in for the shipped v1.2 binaries) still&lt;br&gt;
work against it. The room is where their requirements, handoffs and evidence&lt;br&gt;
meet. In the live run one room owner played both teammate roles, so the two&lt;br&gt;
human "teammates" were the same account; the two agents were separate.&lt;/p&gt;

&lt;h2&gt;
  
  
  The 80-second change
&lt;/h2&gt;

&lt;p&gt;At 01:30 (GMT, 8 Nov) the backend owner asked their agent to rename one field in&lt;br&gt;
the checkout response, &lt;code&gt;total&lt;/code&gt; to &lt;code&gt;grandTotal&lt;/code&gt;, and add a tax and shipping&lt;br&gt;
breakdown. 80 seconds later: PR #5, commit &lt;code&gt;fd023c7&lt;/code&gt;, 25 of 25 tests green. We&lt;br&gt;
re-ran the suite at that commit while writing this post: still 25 of 25.&lt;/p&gt;

&lt;h2&gt;
  
  
  The break
&lt;/h2&gt;

&lt;p&gt;The second teammate role asked the checking agent to test it before the mobile&lt;br&gt;
release. Its verdict: &lt;strong&gt;do not ship.&lt;/strong&gt; The old app reads &lt;code&gt;total&lt;/code&gt;; the new&lt;br&gt;
response doesn't have it, so the app gets &lt;code&gt;undefined&lt;/code&gt;. The backend's own suite could not see this.&lt;/p&gt;

&lt;p&gt;The part we find most interesting is why the tests stayed green. The only test&lt;br&gt;
that read &lt;code&gt;total&lt;/code&gt; had been rewritten to read &lt;code&gt;grandTotal&lt;/code&gt; in the same commit. The&lt;br&gt;
change erased the check on the old behaviour while breaking the old behaviour.&lt;br&gt;
The checking agent added a regression test, &lt;code&gt;fe4c9c3&lt;/code&gt;. We ran it against both&lt;br&gt;
versions: it fails on PR #5 (&lt;code&gt;Received: undefined&lt;/code&gt;) and passes on the fix.&lt;/p&gt;

&lt;h2&gt;
  
  
  The fix, and the human in the loop
&lt;/h2&gt;

&lt;p&gt;The backend owner replied in the room: "my suite was 25/25 and I still broke your&lt;br&gt;
clients." The backend agent put &lt;code&gt;total&lt;/code&gt; back next to &lt;code&gt;grandTotal&lt;/code&gt; and added a&lt;br&gt;
version header: nothing removed, 28 of 28 tests (commit &lt;code&gt;b13234f&lt;/code&gt;, merged as&lt;br&gt;
&lt;code&gt;405f440&lt;/code&gt;). The checking agent re-ran everything against those exact commits and&lt;br&gt;
reported all clear. A human typed &lt;code&gt;/approve&lt;/code&gt;. From the check request (01:33) to&lt;br&gt;
approval (01:45): 12 minutes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this needed Switch
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The requirement lived in chat.&lt;/strong&gt; "Older mobile clients MUST keep working" was a
sentence from a person. The checking agent turned it into a test.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Evidence moved like teammate messages.&lt;/strong&gt; Verdicts named exact commits, so a
human could read them at a glance.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Roles were written down.&lt;/strong&gt; The room's Instructions say the verifier never merges
anything, the fixer never approves its own fix, and only the human merges.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;Clone the repo and run &lt;code&gt;./run-demo.sh&lt;/code&gt;. The page has a panel that calls the real&lt;br&gt;
backend; tick "Replay PR #5" to watch the old app break.&lt;/p&gt;

&lt;p&gt;Repo: &lt;a href="https://github.com/shahaman098/proofroom" rel="noopener noreferrer"&gt;https://github.com/shahaman098/proofroom&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Built for the &lt;a href="https://www.wemakedevs.org/hackathons/switch" rel="noopener noreferrer"&gt;Flip the Switch hackathon&lt;/a&gt;, Best Business Workflow track with &lt;a href="https://github.com/sandbox-quantum/switch" rel="noopener noreferrer"&gt;Switch&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>agents</category>
      <category>api</category>
      <category>backend</category>
      <category>testing</category>
    </item>
  </channel>
</rss>
