<?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: Allfridho Saragi</title>
    <description>The latest articles on DEV Community by Allfridho Saragi (@allfridho_saragi_34662165).</description>
    <link>https://dev.to/allfridho_saragi_34662165</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%2F4209456%2F4c857814-2f19-4ddd-a34a-ad175c0362a1.jpg</url>
      <title>DEV Community: Allfridho Saragi</title>
      <link>https://dev.to/allfridho_saragi_34662165</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/allfridho_saragi_34662165"/>
    <language>en</language>
    <item>
      <title>What TestSprite Taught Me About Testing Concurrency Bugs in FlowGuard AI</title>
      <dc:creator>Allfridho Saragi</dc:creator>
      <pubDate>Mon, 26 Oct 2026 20:11:02 +0000</pubDate>
      <link>https://dev.to/allfridho_saragi_34662165/what-testsprite-taught-me-about-testing-concurrency-bugs-in-flowguard-ai-5gj3</link>
      <guid>https://dev.to/allfridho_saragi_34662165/what-testsprite-taught-me-about-testing-concurrency-bugs-in-flowguard-ai-5gj3</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdo3uf5su79b7bhbob4hc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdo3uf5su79b7bhbob4hc.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F634dg698qojosto78s26.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F634dg698qojosto78s26.png" alt=" " width="800" height="551"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  A Passing API Response Doesn't Always Mean Correct Behavior
&lt;/h2&gt;

&lt;p&gt;Imagine two refund requests arriving at almost the same time.&lt;/p&gt;

&lt;p&gt;Both requests read the same state. Both believe the refund hasn't been processed yet. Both proceed.&lt;/p&gt;

&lt;p&gt;Without proper concurrency protection, one logical refund operation could produce two committed side effects.&lt;/p&gt;

&lt;p&gt;This is one of the engineering problems that inspired me to build &lt;strong&gt;FlowGuard AI&lt;/strong&gt;, my project for &lt;strong&gt;TestSprite Hackathon Season 4&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I wanted to explore an important question:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What if our code works, but the business rule it is supposed to protect fails?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;FlowGuard AI was built to help developers investigate these risks through business-rule analysis and controlled verification.&lt;/p&gt;

&lt;p&gt;But building the application also taught me another lesson: &lt;strong&gt;a reliability-focused product needs a reliable development and testing workflow.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That's where TestSprite became an important part of my journey.&lt;/p&gt;

&lt;h2&gt;
  
  
  How FlowGuard AI Works
&lt;/h2&gt;

&lt;p&gt;FlowGuard AI is a browser-based behavioral-risk analysis and verification playground.&lt;/p&gt;

&lt;p&gt;The application helps developers investigate code snippets and public GitHub pull requests against business requirements.&lt;/p&gt;

&lt;p&gt;It uses three analysis stages:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Requirement Analyst&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Extracts important business invariants and expected behavior from the requirements provided by developers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Risk Hunter&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Examines the available code and highlights potential paths where those invariants might be violated.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Verification Planner&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Proposes test assertions and verification scenarios that developers can use to investigate the potential problems.&lt;/p&gt;

&lt;p&gt;One of the most important principles behind FlowGuard AI is:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A potential risk is not the same as a verified bug.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That's why external code analysis findings are explicitly labeled &lt;strong&gt;POTENTIAL&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The application does not execute arbitrary third-party GitHub code. Its Verification Lab uses controlled, first-party synthetic fixtures.&lt;/p&gt;

&lt;h3&gt;
  
  
  Demonstrating a Concurrency Problem
&lt;/h3&gt;

&lt;p&gt;The Verification Lab includes two refund implementations.&lt;/p&gt;

&lt;p&gt;In the deliberately vulnerable simulation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Concurrent refund attempts: &lt;strong&gt;2&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Committed side effects: &lt;strong&gt;2&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Expected maximum: &lt;strong&gt;1&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Result: &lt;strong&gt;VERIFIED_FAIL&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In the corrected simulation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Concurrent refund attempts: &lt;strong&gt;2&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Committed side effects: &lt;strong&gt;1&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Expected maximum: &lt;strong&gt;1&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Result: &lt;strong&gt;VERIFIED_PASS&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These demonstrations use synthetic, in-memory fixtures rather than real banking transactions.&lt;/p&gt;

&lt;p&gt;They illustrate why testing business invariants matters, especially when concurrency and asynchronous operations are involved.&lt;/p&gt;

&lt;h2&gt;
  
  
  How TestSprite Helped Improve My Development Workflow
&lt;/h2&gt;

&lt;p&gt;One of the most valuable experiences during this hackathon was integrating &lt;strong&gt;TestSprite with GitHub pull requests&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;What I really appreciated was the ability to connect automated testing with actual code changes.&lt;/p&gt;

&lt;p&gt;Instead of treating testing as something to perform only at the end of development, I could use TestSprite's automated feedback as part of the development workflow.&lt;/p&gt;

&lt;p&gt;For me, this made testing feel more structured and meaningful.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Automated Testing Connected to GitHub
&lt;/h3&gt;

&lt;p&gt;TestSprite's GitHub integration was one of the features I appreciated most.&lt;/p&gt;

&lt;p&gt;Having automated test results associated with a pull request made it easier to connect development changes with verification.&lt;/p&gt;

&lt;p&gt;It encouraged me to pay closer attention to how the application behaved after each iteration.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I think this is particularly valuable for developers who want automated quality checks to become part of their everyday workflow.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Feedback That Encouraged Real Improvements
&lt;/h3&gt;

&lt;p&gt;During an intermediate execution on FlowGuard AI's pull request #14, TestSprite reported:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;96 Passed — 0 Failed — 1 Blocked&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The blocked case concerned keyboard navigation and user feedback.&lt;/p&gt;

&lt;p&gt;Instead of treating the result as a complete success, I investigated the application's accessibility and interaction behavior.&lt;/p&gt;

&lt;p&gt;This led to improvements involving keyboard focus management, form interactions, and feedback for users navigating the application.&lt;/p&gt;

&lt;p&gt;What I appreciated most was that TestSprite's feedback encouraged further investigation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Testing wasn't just about collecting passing results. It became part of improving the actual product.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Quality Gates That Encourage Better Engineering
&lt;/h3&gt;

&lt;p&gt;Another TestSprite capability I appreciated was its integration with GitHub's required checks.&lt;/p&gt;

&lt;p&gt;A blocked test shouldn't automatically be considered a successful test.&lt;/p&gt;

&lt;p&gt;Connecting automated testing with pull request merge requirements helps encourage developers to investigate unresolved results before merging.&lt;/p&gt;

&lt;p&gt;For my project, this supported a more disciplined approach to software verification.&lt;/p&gt;

&lt;p&gt;After further development and testing, the final head of PR #14 achieved:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;97 PASSED ✅&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;0 FAILED ✅&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;0 BLOCKED ✅&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Seeing all 97 TestSprite tests pass on the final pull request commit was one of the most rewarding moments of the hackathon.&lt;/p&gt;

&lt;p&gt;The successful official TestSprite V3 execution was associated with the final PR head before merging.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Official TestSprite Result:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.testsprite.com/dashboard-v3/o/28a6d5ec-2a40-54eb-9bf6-0c87db224fde/projects/570eab99-607a-49fa-96b2-fe5ef724f2d9/execution/901e7027-1c4a-477f-adc9-ca0d17b16635" rel="noopener noreferrer"&gt;https://www.testsprite.com/dashboard-v3/o/28a6d5ec-2a40-54eb-9bf6-0c87db224fde/projects/570eab99-607a-49fa-96b2-fe5ef724f2d9/execution/901e7027-1c4a-477f-adc9-ca0d17b16635&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Verified GitHub Pull Request:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/allfridhosaragii/FlowGuard-AI/pull/14" rel="noopener noreferrer"&gt;https://github.com/allfridhosaragii/FlowGuard-AI/pull/14&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Independent Testing Made the Project Stronger
&lt;/h2&gt;

&lt;p&gt;Alongside TestSprite, I used GitHub Actions to run independent automated tests.&lt;/p&gt;

&lt;p&gt;After the final pull request was merged, the project successfully completed:&lt;/p&gt;

&lt;p&gt;✅ &lt;strong&gt;118/118 Vitest tests passed&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;✅ &lt;strong&gt;70/70 Playwright Chromium tests passed&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;These results provided additional evidence for the tested application.&lt;/p&gt;

&lt;p&gt;Of course, passing automated tests does not guarantee that software is completely free of bugs.&lt;/p&gt;

&lt;p&gt;But having multiple verification methods helps developers better understand which behaviors have been tested.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Post-merge GitHub Actions evidence:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/allfridhosaragii/FlowGuard-AI/actions/runs/40273469302" rel="noopener noreferrer"&gt;https://github.com/allfridhosaragii/FlowGuard-AI/actions/runs/40273469302&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Loved Most About TestSprite
&lt;/h2&gt;

&lt;p&gt;After using TestSprite during Hackathon Season 4, several features stood out to me.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Automated Pull Request Testing&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I appreciated how TestSprite brought automated verification into the GitHub development workflow.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Clear Test Results&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The distinction between Passed, Failed, and Blocked encouraged me to interpret testing results more carefully.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Quality-Focused Development&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The earlier blocked case encouraged investigation and improvements to keyboard accessibility.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GitHub Integration&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Connecting automated testing with pull request checks made quality verification part of the development process.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Verifiable Evidence&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Being able to connect test results with a specific pull request and tested commit made it easier to explain what had actually been verified.&lt;/p&gt;

&lt;p&gt;For someone developing a reliability-focused project like FlowGuard AI, these capabilities were especially meaningful.&lt;/p&gt;

&lt;h2&gt;
  
  
  My Feedback: Making TestSprite Even Better
&lt;/h2&gt;

&lt;p&gt;My experience with TestSprite throughout this hackathon was positive.&lt;/p&gt;

&lt;p&gt;I genuinely appreciated how its automated testing workflow helped me pay more attention to verification, accessibility, and software quality.&lt;/p&gt;

&lt;p&gt;If I could suggest one improvement, it would be &lt;strong&gt;even richer diagnostics for blocked browser tests&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Additional execution traces, screenshots, environment information, and clearer explanations of where a scenario stopped could make debugging easier.&lt;/p&gt;

&lt;p&gt;When a browser test becomes blocked, developers sometimes need to investigate whether the issue is related to application behavior, test configuration, or the testing environment.&lt;/p&gt;

&lt;p&gt;More detailed diagnostic information would help developers investigate those possibilities more efficiently.&lt;/p&gt;

&lt;p&gt;I believe this would make an already valuable testing workflow even more useful.&lt;/p&gt;

&lt;h2&gt;
  
  
  More Than Just 97 Passing Tests
&lt;/h2&gt;

&lt;p&gt;Looking back on this journey, I realized that the most valuable result wasn't simply achieving a green testing dashboard.&lt;/p&gt;

&lt;p&gt;It was the development process behind it.&lt;/p&gt;

&lt;p&gt;I built an application.&lt;/p&gt;

&lt;p&gt;I integrated automated testing.&lt;/p&gt;

&lt;p&gt;I encountered a blocked test.&lt;/p&gt;

&lt;p&gt;I investigated the application.&lt;/p&gt;

&lt;p&gt;I made improvements.&lt;/p&gt;

&lt;p&gt;And I continued verifying the results.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This is what made TestSprite valuable to me: it helped make verification a meaningful part of the development process.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The experience reinforced something I want to carry into future projects:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Good software engineering isn't only about writing code that works. It's about understanding what the code must guarantee and collecting evidence that those guarantees hold.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Thank You, TestSprite!
&lt;/h2&gt;

&lt;p&gt;I want to express my appreciation to the TestSprite team for organizing Hackathon Season 4.&lt;/p&gt;

&lt;p&gt;This hackathon gave me an opportunity to build a real project, explore software reliability problems, improve my engineering workflow, and learn more about automated testing.&lt;/p&gt;

&lt;p&gt;I'm grateful for the tools, the challenge, and the opportunity to improve.&lt;/p&gt;

&lt;p&gt;Achieving &lt;strong&gt;97/97 passing TestSprite tests&lt;/strong&gt; on FlowGuard AI's final pull request was an exciting milestone.&lt;/p&gt;

&lt;p&gt;But more importantly, the experience helped reinforce a testing mindset that I want to continue developing.&lt;/p&gt;

&lt;p&gt;Thank you, TestSprite, for being part of this journey!&lt;/p&gt;

&lt;h2&gt;
  
  
  Explore FlowGuard AI
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Live Application&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://flowguard-ai-smoky.vercel.app/" rel="noopener noreferrer"&gt;https://flowguard-ai-smoky.vercel.app/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GitHub Repository&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/allfridhosaragii/FlowGuard-AI" rel="noopener noreferrer"&gt;https://github.com/allfridhosaragii/FlowGuard-AI&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Verification Lab&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://flowguard-ai-smoky.vercel.app/lab" rel="noopener noreferrer"&gt;https://flowguard-ai-smoky.vercel.app/lab&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Final TestSprite-Verified Pull Request&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/allfridhosaragii/FlowGuard-AI/pull/14" rel="noopener noreferrer"&gt;https://github.com/allfridhosaragii/FlowGuard-AI/pull/14&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;My Full TestSprite Experience on Medium&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://medium.com/@pedoprimasaragi/how-testsprite-helped-me-build-a-better-flowguard-ai-from-blocked-tests-to-97-97-passed-77aec2fb0828" rel="noopener noreferrer"&gt;https://medium.com/@pedoprimasaragi/how-testsprite-helped-me-build-a-better-flowguard-ai-from-blocked-tests-to-97-97-passed-77aec2fb0828&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;FlowGuard AI — Evidence Before Verdicts.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Built for TestSprite Hackathon Season 4.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>testing</category>
      <category>webdev</category>
      <category>github</category>
      <category>hackathon</category>
    </item>
  </channel>
</rss>
