{"id":409,"date":"2026-07-26T02:18:47","date_gmt":"2026-07-26T02:18:47","guid":{"rendered":"http:\/\/www.sugata.in\/?p=409"},"modified":"2026-07-26T02:18:47","modified_gmt":"2026-07-26T02:18:47","slug":"ai-coding-assistants-wafs-and-the-critical-need-for-quality-control","status":"publish","type":"post","link":"http:\/\/www.sugata.in\/index.php\/2026\/07\/26\/ai-coding-assistants-wafs-and-the-critical-need-for-quality-control\/","title":{"rendered":"AI Coding Assistants, WAFs, and the Critical Need for Quality Control"},"content":{"rendered":"<p>My first attempt at programmatically drafting a modern wordcloud analysis on this site was a valuable exercise in pairing AI agents with real-world deployments. While the initial draft showcased the power of autonomous AI development, it also revealed a series of unexpected hurdles\u2014highlighting the critical importance of <strong>Quality Control (QC)<\/strong> and iterative human-in-the-loop review.<\/p>\n<h3>The Deployment Hiccups<\/h3>\n<p>Deploying code in isolation is easy, but placing it into a live environment with firewalls and active configurations rarely goes perfectly on the first try. Here is what we ran into:<\/p>\n<ol>\n<li><strong>Firewall (WAF) Interception:<\/strong> When attempting to save the post HTML containing the Python script via Gutenberg&#8217;s REST API, the server&#8217;s LiteSpeed Web Application Firewall (WAF) threw a <code>403 Forbidden<\/code> error. By running a bisection script, we discovered that the firewall flagged the keyword <code>time.sleep<\/code> in the python code block as a signature for a potential SQL injection or DOS exploit. Removing this single line allowed the content to save natively.<\/li>\n<li><strong>Broken Image Paths:<\/strong> The uploaded assets were originally linked using absolute URLs. Because the site resolves assets differently depending on whether it is viewed with or without the <code>www.<\/code> prefix, the browser blocked the image rendering. Switching to root-relative paths (e.g. starting with <code>\/wp\/wp-content\/uploads\/...<\/code>) resolved the rendering across all domain configurations.<\/li>\n<\/ol>\n<h3>The Stale Data Problem: Blindly Trusting Feeds<\/h3>\n<p>Perhaps the most significant lesson came from the generated CNN wordcloud itself. In the initial draft, the wordcloud prominently displayed terms like &#8220;Biden&#8221; and &#8220;President Joe.&#8221; For a post created in July 2026, this immediately raised suspicion of outdated sources.<\/p>\n<p>Upon investigating, we realized that the official, legacy CNN RSS feed URLs (such as <code>rss.cnn.com\/rss\/cnn_topstories.rss<\/code>) are no longer actively maintained. Rather than failing with a 404, CNN&#8217;s servers serve a frozen XML file from <strong>April 2023<\/strong>. The AI agent, when instructed to fetch the feed, parsed it successfully and generated a wordcloud based on news from three years ago, completely unaware that the data was stale.<\/p>\n<h3>QC and Iterative Refinement<\/h3>\n<p>This discrepancy underscores why AI-generated outputs must undergo quality control. Without human review, a blog post presenting &#8220;today&#8217;s wordclouds&#8221; would have published obsolete data. To correct this, we iterated on the process:<\/p>\n<ol>\n<li><strong>Live Feed Correction:<\/strong> We updated the CNN data source to fetch live news search feeds from Google News (targeting <code>site:cnn.com<\/code>), which indexes real-time articles from today (July 2026).<\/li>\n<li><strong>Stopword Filtering:<\/strong> The first set of wordclouds was cluttered with common filler words like &#8220;will,&#8221; &#8220;say,&#8221; &#8220;said,&#8221; and others. We implemented a much more restrictive stopwords dictionary to filter out these auxiliaries, leaving only the key thematic news terms.<\/li>\n<\/ol>\n<h3>The Refined Wordclouds (Today)<\/h3>\n<p>Here are the corrected, live wordclouds generated using the updated crawler and restrictive filtering:<\/p>\n<div style=\"display: flex; flex-wrap: wrap; justify-content: space-around; gap: 20px; margin: 20px 0;\">\n<div style=\"flex: 1; min-width: 300px; text-align: center;\">\n<h4>Live CNN Wordcloud (Today&#8217;s Real-time News)<\/h4>\n<p><img src=\"\/wp\/wp-content\/uploads\/2026\/07\/cnn_wordcloud_v2-2.png\" alt=\"Refined CNN Wordcloud\" class=\"wp-image\" style=\"max-width: 100%; height: auto; border: 1px solid #ddd; border-radius: 4px;\"><\/p>\n<\/div>\n<div style=\"flex: 1; min-width: 300px; text-align: center;\">\n<h4>Live BBC Wordcloud (Today&#8217;s Real-time News)<\/h4>\n<p><img src=\"\/wp\/wp-content\/uploads\/2026\/07\/bbc_wordcloud_v2-2.png\" alt=\"Refined BBC Wordcloud\" class=\"wp-image\" style=\"max-width: 100%; height: auto; border: 1px solid #ddd; border-radius: 4px;\"><\/p>\n<\/div>\n<\/div>\n<p>As seen above, the new wordclouds now capture the actual stories dominating the news cycle today, free of generic verbal noise.<\/p>\n<div style=\"text-align: center; margin: 30px 0;\">\n<h4>Prompt used to create this post<\/h4>\n<p><img src=\"\/wp\/wp-content\/uploads\/2026\/07\/prompt_screenshot-1.png\" alt=\"Prompt used to create this post.\" class=\"wp-image\" style=\"max-width: 100%; height: auto; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.1);\"><\/p>\n<p style=\"font-style: italic; font-size: 0.9em; color: #555; margin-top: 5px;\">Prompt used to create this post.<\/p>\n<\/div>\n<hr>\n<p style=\"font-size: 0.9em; color: #555; font-style: italic;\">Note: This post documenting the iteration and quality control process was automatically drafted and published by the <strong>Antigravity Coding Assistant<\/strong>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>My first attempt at programmatically drafting a modern wordcloud analysis on this site was a valuable exercise in pairing AI agents with real-world deployments. While the initial draft showcased the power of autonomous AI development, it also revealed a series of unexpected hurdles\u2014highlighting the critical importance of Quality Control (QC) and iterative human-in-the-loop review. The [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"http:\/\/www.sugata.in\/index.php\/wp-json\/wp\/v2\/posts\/409"}],"collection":[{"href":"http:\/\/www.sugata.in\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.sugata.in\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.sugata.in\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.sugata.in\/index.php\/wp-json\/wp\/v2\/comments?post=409"}],"version-history":[{"count":3,"href":"http:\/\/www.sugata.in\/index.php\/wp-json\/wp\/v2\/posts\/409\/revisions"}],"predecessor-version":[{"id":418,"href":"http:\/\/www.sugata.in\/index.php\/wp-json\/wp\/v2\/posts\/409\/revisions\/418"}],"wp:attachment":[{"href":"http:\/\/www.sugata.in\/index.php\/wp-json\/wp\/v2\/media?parent=409"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.sugata.in\/index.php\/wp-json\/wp\/v2\/categories?post=409"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.sugata.in\/index.php\/wp-json\/wp\/v2\/tags?post=409"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}