<?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: Kacper</title>
    <description>The latest articles on DEV Community by Kacper (@kacper_35e1f61a8f41c3886b).</description>
    <link>https://dev.to/kacper_35e1f61a8f41c3886b</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%2F4088488%2F0d03c7c3-63bd-4ed6-9216-70b926857eca.jpg</url>
      <title>DEV Community: Kacper</title>
      <link>https://dev.to/kacper_35e1f61a8f41c3886b</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kacper_35e1f61a8f41c3886b"/>
    <language>en</language>
    <item>
      <title>My own acceptance tests caught 2 real bugs in my product — before a single customer saw it</title>
      <dc:creator>Kacper</dc:creator>
      <pubDate>Fri, 21 Aug 2026 15:01:25 +0000</pubDate>
      <link>https://dev.to/kacper_35e1f61a8f41c3886b/my-own-acceptance-tests-caught-2-real-bugs-in-my-product-before-a-single-customer-saw-it-598b</link>
      <guid>https://dev.to/kacper_35e1f61a8f41c3886b/my-own-acceptance-tests-caught-2-real-bugs-in-my-product-before-a-single-customer-saw-it-598b</guid>
      <description>&lt;p&gt;I sell a small pack of n8n workflows built around one idea: &lt;strong&gt;automation should ship with its own acceptance tests, and sends should stay disabled until those tests pass.&lt;/strong&gt; Before listing it, I did the only honest thing you can do with a claim like that — I ran my own tests against my own product on a live n8n instance. They failed. Twice. This is the story, because both bugs are ones your workflows probably have too.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bug 1: &lt;code&gt;require('crypto')&lt;/code&gt; doesn't exist where you think it does
&lt;/h2&gt;

&lt;p&gt;My intake workflow deduplicates submissions with a hash key. Locally-authored, looked clean, "obviously worked." On a stock n8n install it died instantly:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Module 'crypto' is disallowed&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;n8n's Code node sandboxes away Node builtins by default. If your dedupe, signing, or ID logic uses &lt;code&gt;require('crypto')&lt;/code&gt;, it works on your tweaked dev instance and breaks on your client's stock one. Fix: a pure-JS hash (I used double FNV-1a — dedupe keys don't need cryptographic strength) or enabling builtin access consciously via env config — as a documented decision, not an accident.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bug 2: your env-var read is a silent crash on stock installs
&lt;/h2&gt;

&lt;p&gt;Every "armed/disarmed" gate in the pack reads an env var: delivery stays OFF until &lt;code&gt;AF_DELIVERY_URL&lt;/code&gt; exists. Except on default installs, &lt;code&gt;N8N_BLOCK_ENV_ACCESS_IN_NODE&lt;/code&gt; makes &lt;code&gt;$env&lt;/code&gt; access THROW — so my fail-safe gate was actually a fail-crash gate. The fix is boring and important:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;$env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;AF_DELIVERY_URL&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="dl"&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;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&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;Fail-safe now means: on any stock install, the workflow imports, runs, and refuses to send — instead of erroring out and teaching the buyer your stuff is broken.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this is a sales pitch (honestly)
&lt;/h2&gt;

&lt;p&gt;Both bugs share a shape: &lt;strong&gt;they're invisible until the workflow runs somewhere you didn't build it.&lt;/strong&gt; A demo can't catch them. A screenshot can't catch them. Only acceptance tests executed on a clean instance can — which is why every workflow I ship has its criteria written on the canvas in a sticky note, and a checklist the buyer runs before trusting anything.&lt;/p&gt;

&lt;p&gt;The tests cost me an evening and two embarrassing bugs. They also mean the thing I sell is the thing I verified — and that discipline is the actual product.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;(The full acceptance-first pack is at &lt;a href="https://niekonieczny.gumroad.com/l/imbsml" rel="noopener noreferrer"&gt;https://niekonieczny.gumroad.com/l/imbsml&lt;/a&gt; — and the error handler alone at &lt;a href="https://niekonieczny.gumroad.com/l/uwxmpx" rel="noopener noreferrer"&gt;https://niekonieczny.gumroad.com/l/uwxmpx&lt;/a&gt;.)&lt;/em&gt;&lt;/p&gt;

</description>
      <category>n8n</category>
      <category>automation</category>
      <category>testing</category>
      <category>buildinpublic</category>
    </item>
  </channel>
</rss>
