<?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: Raghuram</title>
    <description>The latest articles on DEV Community by Raghuram (@raghubuilds).</description>
    <link>https://dev.to/raghubuilds</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%2F1751361%2F428bf9c6-c855-48e5-bb99-bdadf449a28b.png</url>
      <title>DEV Community: Raghuram</title>
      <link>https://dev.to/raghubuilds</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/raghubuilds"/>
    <language>en</language>
    <item>
      <title>Four products passed their tests. Then I tested them.</title>
      <dc:creator>Raghuram</dc:creator>
      <pubDate>Sun, 23 Aug 2026 13:13:22 +0000</pubDate>
      <link>https://dev.to/raghubuilds/four-products-passed-their-tests-then-i-tested-them-1cp</link>
      <guid>https://dev.to/raghubuilds/four-products-passed-their-tests-then-i-tested-them-1cp</guid>
      <description>&lt;p&gt;Every one of these had a green suite. 161 tests on the portfolio, 77 on the budget proxy, 53 on the&lt;br&gt;
conformance checker, 78 on the retrieval system. All passing. Each had a benchmark, a published&lt;br&gt;
result, and a live deployment.&lt;/p&gt;

&lt;p&gt;Then I wrote scenarios that hit the live URLs instead of the code, and one of them was overrunning&lt;br&gt;
its central guarantee by 303% in production.&lt;/p&gt;

&lt;p&gt;This is what that exercise found, including the four times my own harness accused a product of a&lt;br&gt;
bug it did not have.&lt;/p&gt;
&lt;h2&gt;
  
  
  The rule
&lt;/h2&gt;

&lt;p&gt;A scenario had to be something a person would plausibly do, described in their words. "A runaway&lt;br&gt;
agent loop burns through its budget overnight" is a scenario. "Assert &lt;code&gt;reserve()&lt;/code&gt; returns False" is&lt;br&gt;
a unit test.&lt;/p&gt;

&lt;p&gt;And nothing in the scenario suite may import product source code. It gets what a stranger gets: a&lt;br&gt;
URL over the public internet.&lt;/p&gt;

&lt;p&gt;That second rule is the one that mattered.&lt;/p&gt;
&lt;h2&gt;
  
  
  What it found
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;A spend ceiling that did not hold.&lt;/strong&gt; 25 concurrent workers against a budget with room for two.&lt;br&gt;
Twenty were admitted. Overrun: 303%.&lt;/p&gt;

&lt;p&gt;The cause was 25 serverless instances, each holding its own in-memory ledger, each enforcing the&lt;br&gt;
$0.05 ceiling perfectly against its own slice of traffic. There were 25 ceilings instead of one.&lt;/p&gt;

&lt;p&gt;The uncomfortable part is where the answer already was. The store's own docstring read "correct for&lt;br&gt;
one replica and useless for two — which is precisely measured failure #1". The deployment doc said&lt;br&gt;
not to run it behind a load balancer. The baseline benchmark had measured the single-replica ledger&lt;br&gt;
as the first of four ways budget enforcement fails open.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Three layers said the right thing and the product was still wrong, because none of them ran&lt;br&gt;
against the deployment.&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  The first version of the test passed
&lt;/h2&gt;

&lt;p&gt;Worth dwelling on. My scenario asked the service how much it had spent:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;✓ 12 workers fired concurrently — 4 allowed, 8 refused
✓ spend after the burst $0.008400 — ceiling $0.05
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Both reads landed on an instance that had served one request. The suite was green while the product&lt;br&gt;
overran by 233%.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A test that asks the system under test whether it is behaving cannot detect a system that is&lt;br&gt;
wrong about itself.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Spend is now derived from what a provider would bill — admitted calls times observed cost per call&lt;br&gt;
— which does not depend on the service being right. The ledger's own figure is recorded beside it,&lt;br&gt;
and the disagreement between the two is the finding.&lt;/p&gt;

&lt;p&gt;Twelve workers also was not enough: it fanned across fewer instances and passed on some runs.&lt;br&gt;
Twenty-five made it deterministic. A test that fails intermittently gets rerun until it passes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Four times the harness was wrong
&lt;/h2&gt;

&lt;p&gt;The honest ratio is one real defect to four false accusations, and every false one was mine.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It claimed a portfolio route was broken.&lt;/strong&gt; It assumed &lt;code&gt;/work&lt;/code&gt;, &lt;code&gt;/about&lt;/code&gt; and &lt;code&gt;/writing&lt;/code&gt; existed,&lt;br&gt;
got a 404, and reported the site as broken. There is no &lt;code&gt;/work&lt;/code&gt; index. Routes now come from&lt;br&gt;
&lt;code&gt;sitemap.xml&lt;/code&gt;. A scenario that invents the interface measures its author's assumptions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It claimed the citation mechanism was undeployed.&lt;/strong&gt; It scraped work pages for citation links and&lt;br&gt;
found zero. Citations are not static links — the site ships a build-time allowlist of pre-verified&lt;br&gt;
passages, and the chatbot may only cite from that set. So a model cannot invent a citation even&lt;br&gt;
when it invents a claim. A stronger design than I had assumed, and verifying the allowlist verifies&lt;br&gt;
every citation the site can ever produce.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It claimed 2 of 34 citations were unresolved.&lt;/strong&gt; The passages contained apostrophes rendered as&lt;br&gt;
&lt;code&gt;&amp;amp;#x27;&lt;/code&gt;, and my tag-strip did not decode HTML entities. The text was on the page and would&lt;br&gt;
highlight correctly in a browser.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It claimed a side channel in a project about side channels.&lt;/strong&gt; It asserted that "no token" and&lt;br&gt;
"unknown token" must return byte-identical responses. But an attacker already knows whether they&lt;br&gt;
sent a credential, so telling them carries no information. The property that matters is that two&lt;br&gt;
&lt;em&gt;rejected&lt;/em&gt; credentials are indistinguishable — verified against five plausible guessed principal&lt;br&gt;
names, all returning the same body.&lt;/p&gt;

&lt;p&gt;Each correction is documented in the code rather than quietly amended, because a test that flags&lt;br&gt;
correct behaviour costs more than no test: the next real finding gets ignored alongside it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What passing scenarios are worth
&lt;/h2&gt;

&lt;p&gt;Eighteen now pass. A few are worth more than the rest.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;One tests that a documented weakness is still real.&lt;/strong&gt; The retrieval project publishes a&lt;br&gt;
limitation: padded results share no query terms, so the recipient can spot the filler and recover&lt;br&gt;
what was withheld. The scenario passes when that reproduces against production. A published&lt;br&gt;
weakness that turned out to be overstated would be its own kind of dishonesty.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;One tests that the baseline still leaks.&lt;/strong&gt; The comparison only means something if the unfixed&lt;br&gt;
path is genuinely exploitable. Counts across nine identities come back as 0, 2 and 4, and the&lt;br&gt;
deficit tracks permission — the identity with least access infers the most, the CEO infers nothing.&lt;br&gt;
If the baseline did not leak, the enforced result would be measuring nothing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;One tests that the good work stays findable.&lt;/strong&gt; Three projects were added to the portfolio with&lt;br&gt;
live URLs and reproducible benchmarks. The failure mode that would quietly undo that is not a 404 —&lt;br&gt;
it is the pages existing while being absent from the sitemap, the chat corpus and the MCP tool&lt;br&gt;
list. The site would keep answering, from the generically described employer work, and nobody would&lt;br&gt;
notice the verifiable material had dropped out.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I would tell someone starting this
&lt;/h2&gt;

&lt;p&gt;Write the scenario against the URL, not the module. The import is what makes a test blind to&lt;br&gt;
deployment.&lt;/p&gt;

&lt;p&gt;Compute the thing you care about independently of the system that is supposed to be computing it.&lt;br&gt;
If you are checking a spend ceiling, calculate the bill yourself.&lt;/p&gt;

&lt;p&gt;Turn the concurrency up until the failure is deterministic. An intermittent failure is a failure&lt;br&gt;
you will explain away.&lt;/p&gt;

&lt;p&gt;And expect your harness to be wrong more often than the product. Mine was, four to one. That ratio&lt;br&gt;
is not a reason to skip it — one of the five was a 303% overrun on the exact guarantee the product&lt;br&gt;
existed to provide.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Scenario suite, findings and reproduction: the &lt;code&gt;scenarios/&lt;/code&gt; directory. Every number here traces to&lt;br&gt;
a benchmark or a scenario result; a launch post that states an unmeasured figure fails its own&lt;br&gt;
build gate.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>testing</category>
      <category>python</category>
      <category>devops</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
