<?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: Dong Pang</title>
    <description>The latest articles on DEV Community by Dong Pang (@dong_pang_346bad3245f8343).</description>
    <link>https://dev.to/dong_pang_346bad3245f8343</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%2F4035984%2Fe6a8ebae-8836-48fc-8df4-d17404b03a14.jpg</url>
      <title>DEV Community: Dong Pang</title>
      <link>https://dev.to/dong_pang_346bad3245f8343</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dong_pang_346bad3245f8343"/>
    <language>en</language>
    <item>
      <title>Six failure cases to test before shipping an AI workflow</title>
      <dc:creator>Dong Pang</dc:creator>
      <pubDate>Wed, 22 Jul 2026 03:50:16 +0000</pubDate>
      <link>https://dev.to/dong_pang_346bad3245f8343/six-failure-cases-to-test-before-shipping-an-ai-workflow-1g3e</link>
      <guid>https://dev.to/dong_pang_346bad3245f8343/six-failure-cases-to-test-before-shipping-an-ai-workflow-1g3e</guid>
      <description>&lt;p&gt;An AI workflow is easy to demonstrate and harder to finish. The happy path can look convincing while retries duplicate side effects, approvals are skipped, or completion is reported without evidence.&lt;/p&gt;

&lt;p&gt;This tutorial turns a workflow idea into a small contract and six acceptance tests. The examples are deliberately model-agnostic: they apply to an OCR review flow, a support-ticket agent, an API automation, or a research assistant.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start with an observable contract
&lt;/h2&gt;

&lt;p&gt;Before choosing tools, write five fields:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Workflow name&lt;/strong&gt; — one bounded process, not an entire department.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Desired outcome&lt;/strong&gt; — the state that must be observable when the run succeeds.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Human approval point&lt;/strong&gt; — the exact irreversible or external action a person controls.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Side effect&lt;/strong&gt; — the record, message, payment, or system change the workflow can create.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Evidence reference&lt;/strong&gt; — the artifact that proves what happened.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A useful completion rule is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;complete = outcome observed
        AND evidence reference exists
        AND required approval is granted
        AND duplicate side effects = 0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is stricter than “the model returned an answer.” It makes the surrounding automation testable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Test 1: Happy path
&lt;/h2&gt;

&lt;p&gt;Provide a representative input and assert the intended outcome, evidence reference, approval state, and side-effect count. A natural-language quality claim is not enough; the result needs machine-readable evidence.&lt;/p&gt;

&lt;h2&gt;
  
  
  Test 2: Malformed input
&lt;/h2&gt;

&lt;p&gt;Remove a required field or provide an invalid type. The workflow should reject the input before calling a model or creating a side effect. The failure must be visible to an operator.&lt;/p&gt;

&lt;h2&gt;
  
  
  Test 3: Duplicate event
&lt;/h2&gt;

&lt;p&gt;Deliver the same event twice. The second delivery should return the existing result or perform a safe no-op. If two notifications, tickets, or payments can be created, the workflow is not retry-safe.&lt;/p&gt;

&lt;h2&gt;
  
  
  Test 4: Dependency failure
&lt;/h2&gt;

&lt;p&gt;Simulate a timeout or a downstream 5xx response. The run should record the dependency failure, preserve its evidence, and stop or retry within a fixed policy. Silent fallback is not a pass.&lt;/p&gt;

&lt;h2&gt;
  
  
  Test 5: Missing approval
&lt;/h2&gt;

&lt;p&gt;Remove the required human decision. The workflow must stop before the external or irreversible action. “Approval is recommended” is weaker than an enforced gate.&lt;/p&gt;

&lt;h2&gt;
  
  
  Test 6: Evidence missing
&lt;/h2&gt;

&lt;p&gt;Return a successful status without an artifact or evidence reference. The validator should reject completion. This prevents a green dashboard from becoming the only proof that work happened.&lt;/p&gt;

&lt;h2&gt;
  
  
  A local browser implementation
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://seekiingforhappiness-glitch.github.io/ai-workflow-acceptance-test-starter/?utm_source=dev.to&amp;amp;utm_medium=article&amp;amp;utm_campaign=acceptance_workbench_v1"&gt;Acceptance Workbench&lt;/a&gt; provides an editable contract, deterministic four-file ZIP export, and a JSON/NDJSON run-log validator. It has no login, upload, tracking script, customer data, or model call. The &lt;a href="https://github.com/seekiingforhappiness-glitch/ai-workflow-acceptance-test-starter" rel="noopener noreferrer"&gt;source and verified Starter&lt;/a&gt; are public.&lt;/p&gt;

&lt;p&gt;The browser tool is intentionally small. It does not claim to validate model accuracy, security, or regulatory compliance. Its job is to turn vague workflow language into observable pass/fail conditions before implementation gets expensive.&lt;/p&gt;

&lt;h2&gt;
  
  
  Example run-log shape
&lt;/h2&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="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"runId"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"run_001"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"status"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"success"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"outcomeEvidence"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"ticket_1842 routed to escalation_queue"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"validations"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"malformedInputRejected"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"dependencyFailureRecorded"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"metrics"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"duplicateSideEffects"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"approval"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"required"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"granted"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"artifacts"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"audit_ticket_1842.json"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"evidenceRef"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"evidence/run_001.json"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The important part is not the exact field names. It is that each acceptance test can point to observable evidence rather than an optimistic completion message.&lt;/p&gt;




&lt;p&gt;Disclosure: this draft was created with AI assistance. It is intentionally unpublished and requires account-owner review before any external publication.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>testing</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
