<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[John Adib | Engineering Notes]]></title><description><![CDATA[Practical notes from John Adib on AI-assisted software delivery, React Native quality, test automation, cloud systems and engineering leadership. Case studies a]]></description><link>https://mradib.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Thu, 12 Nov 2026 07:14:34 GMT</lastBuildDate><atom:link href="https://mradib.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[I Trusted the Regression Test After We Broke the Fix]]></title><description><![CDATA[A passing test can miss the defect it was meant to catch. Here is how we checked regression tests against the old bug in our mobile app.]]></description><link>https://mradib.hashnode.dev/i-trusted-the-regression-test-after-we-broke-the-fix</link><guid isPermaLink="true">https://mradib.hashnode.dev/i-trusted-the-regression-test-after-we-broke-the-fix</guid><category><![CDATA[Testing]]></category><category><![CDATA[AI]]></category><category><![CDATA[React Native]]></category><category><![CDATA[engineering-management]]></category><dc:creator><![CDATA[John Adib]]></dc:creator><pubDate>Sun, 01 Nov 2026 15:37:05 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6ae69c6cd036fab1630fb023/41a9d91c-212a-47b4-93dd-69e808ba7faf.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In one review, an automated reviewer found two defects that earlier passes had missed. We corrected them and added tests. Both tests went green.</p>
<p>Then we temporarily reverted the corrections. Both tests failed for the original reasons. That second result was the one I cared about.</p>
<p>As the engineering manager on the consumer team, I was responsible for a wider product surface that included mobile, backend and web work. Mobile QA was a particular bottleneck: after implementation, we still had to assemble enough confidence to release. A new test could help, provided it caught the behaviour we had just fixed.</p>
<h2>What a green test can hide</h2>
<p>The test suite grew quickly as we made tests part of each change. In April 2026, the mobile app had 113 unit-test files. By 8 October, it had 2,257. That is a record of sustained investment, though a file count tells us little about whether a particular assertion would catch a regression.</p>
<p>This mattered more as agents began writing implementation and tests together. The agent could understand the intended behaviour, change the code and produce a passing test in one run. But a test that agrees with the new implementation might also agree with the old defect. It may check the wrong state, mock away the failing condition or assert only that a screen rendered.</p>
<p>I wanted a narrower answer at review: would this test have stopped the bug before the fix existed?</p>
<h2>Run the test against the bug</h2>
<p>For a regression, our request became specific. Write a test for the behaviour the defect violated. Confirm it fails before the correction and passes with the correction. When the history or setup made that hard to see, we sometimes temporarily reverted the fix and ran the new test again.</p>
<p><img src="https://cdn.hashnode.com/uploads/covers/6ae69c6cd036fab1630fb023/277098f1-ab1d-4743-bd7b-85cf44be2bb7.png" alt="A regression test is checked against broken code, corrected code, and a temporary revert: fail, pass, fail." /></p>
<p>The last failure needs inspection. A broken import, a missing mock or an unrelated setup error proves nothing about the regression. We looked for the failure the test was meant to report. In the review with the two missed defects, both new specifications failed for their original reasons when we reverted the fixes. That gave us a stronger reason to keep them than the green checks alone.</p>
<p>This is a small extra step, but it changes the conversation in a pull request. “Tests pass” describes the current branch. “This test fails when the defect returns” describes the protection we are adding for the next branch.</p>
<h2>Keep the evidence close to the change</h2>
<p>The test still has to run in CI, and its result has to belong to the revision under review. If the code changes after a green run, we need fresh results for the affected checks. For a mobile UI change, unit tests are one part of the evidence; the team also captures the interaction on devices so a reviewer can see what happened in the actual screen.</p>
<p>I do not ask every test to go through a manual revert. A new feature test may have no previous bug to restore, and some changes need a different verification method. For a regression, though, the old failure is available as a useful challenge to the test. It is worth taking.</p>
<p>The two defects in that review had already made it through earlier passes. Their tests now had a reason to exist: they could recognise those failures if they returned. That was the standard I wanted as the test inventory grew.</p>
<p>The broader engineering process and the test history are in my <a href="https://mradib.com/beyond-the-qa-bottleneck">Beyond the QA Bottleneck case study</a>.</p>
]]></content:encoded></item></channel></rss>