<?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: Lucas Lu</title>
    <description>The latest articles on DEV Community by Lucas Lu (@lucaswenbo).</description>
    <link>https://dev.to/lucaswenbo</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%2F4142884%2F1573a99a-dc19-4e8f-941f-4bf81a0660dd.jpg</url>
      <title>DEV Community: Lucas Lu</title>
      <link>https://dev.to/lucaswenbo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/lucaswenbo"/>
    <language>en</language>
    <item>
      <title>My CI Was Green. Production Returned 403. So I Built ProdDoctor.</title>
      <dc:creator>Lucas Lu</dc:creator>
      <pubDate>Sat, 26 Sep 2026 11:46:52 +0000</pubDate>
      <link>https://dev.to/lucaswenbo/my-ci-was-green-production-returned-403-so-i-built-proddoctor-50h6</link>
      <guid>https://dev.to/lucaswenbo/my-ci-was-green-production-returned-403-so-i-built-proddoctor-50h6</guid>
      <description>&lt;p&gt;Everything looked fine.&lt;/p&gt;

&lt;p&gt;CI was green. ✅&lt;br&gt;&lt;br&gt;
The deployment succeeded. ✅&lt;br&gt;&lt;br&gt;
The platform URL worked. ✅  &lt;/p&gt;

&lt;p&gt;Then I opened the domain that actual users were supposed to visit.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;403.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That was the moment I realized something obvious in hindsight:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A successful deployment does not necessarily mean your production site works.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;
  
  
  The weird part
&lt;/h2&gt;

&lt;p&gt;The application itself wasn't broken.&lt;/p&gt;

&lt;p&gt;The build completed successfully.&lt;/p&gt;

&lt;p&gt;The deployment platform said everything was healthy.&lt;/p&gt;

&lt;p&gt;Even the platform-provided URL worked.&lt;/p&gt;

&lt;p&gt;But my real production domain didn't.&lt;/p&gt;

&lt;p&gt;In my case, the real production domain was returning a Cloudflare 403, while the platform-provided URL still worked.&lt;/p&gt;

&lt;p&gt;That immediately pointed the investigation away from the build itself and toward the production edge layer: custom-domain routing, Cloudflare, or WAF behavior.&lt;/p&gt;

&lt;p&gt;So from the CI pipeline's point of view:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;build → deploy → success
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;From the user's point of view:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;open website → 403
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Two completely different realities.&lt;/p&gt;

&lt;h2&gt;
  
  
  CI was telling the truth
&lt;/h2&gt;

&lt;p&gt;The strange thing is that CI wasn't wrong.&lt;/p&gt;

&lt;p&gt;It did exactly what I asked it to do.&lt;/p&gt;

&lt;p&gt;It verified that the code built successfully and that the deployment command completed.&lt;/p&gt;

&lt;p&gt;What it didn't verify was everything that existed &lt;em&gt;after&lt;/em&gt; deployment:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;DNS
 ↓
custom domain
 ↓
TLS
 ↓
redirects
 ↓
CDN / proxy
 ↓
WAF
 ↓
JavaScript + CSS
 ↓
browser runtime
 ↓
what the user actually sees
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A green CI checkmark only tells me that the pipeline finished.&lt;/p&gt;

&lt;p&gt;It doesn't necessarily tell me that the production experience works.&lt;/p&gt;

&lt;p&gt;That gap bothered me.&lt;/p&gt;

&lt;h2&gt;
  
  
  So I started checking the real production path
&lt;/h2&gt;

&lt;p&gt;The obvious first solution was adding a request after deployment:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-f&lt;/span&gt; https://example.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's already better than doing nothing.&lt;/p&gt;

&lt;p&gt;But then I started thinking about all the ways production can still be broken.&lt;/p&gt;

&lt;p&gt;A page can return HTTP 200 but contain the wrong deployment.&lt;/p&gt;

&lt;p&gt;The HTML can load while a critical JavaScript bundle returns 404.&lt;/p&gt;

&lt;p&gt;A custom domain can reach a different route from the platform URL.&lt;/p&gt;

&lt;p&gt;A CDN or WAF can block the request.&lt;/p&gt;

&lt;p&gt;The server response can look healthy while the browser crashes on a JavaScript error.&lt;/p&gt;

&lt;p&gt;A redirect can quietly send users somewhere completely different.&lt;/p&gt;

&lt;p&gt;So checking one status code wasn't really what I wanted.&lt;/p&gt;

&lt;p&gt;I wanted something that could answer:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Does the production experience users actually hit work, and if not, where did it break?&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  That became &lt;a href="https://github.com/lucaswenbo/ProdDoctor" rel="noopener noreferrer"&gt;ProdDoctor&lt;/a&gt; 🩺
&lt;/h2&gt;

&lt;p&gt;I turned that debugging workflow into an open-source GitHub Action called &lt;strong&gt;ProdDoctor&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Instead of trusting the deployment result, ProdDoctor checks the real production URL after deployment.&lt;/p&gt;

&lt;p&gt;It currently validates things like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;DNS resolution&lt;/li&gt;
&lt;li&gt;HTTP status and redirects&lt;/li&gt;
&lt;li&gt;expected page content&lt;/li&gt;
&lt;li&gt;TLS certificates&lt;/li&gt;
&lt;li&gt;same-origin JavaScript and CSS assets&lt;/li&gt;
&lt;li&gt;common Cloudflare Challenge / WAF behavior&lt;/li&gt;
&lt;li&gt;optional real Chromium rendering&lt;/li&gt;
&lt;li&gt;uncaught JavaScript errors&lt;/li&gt;
&lt;li&gt;failed critical browser requests&lt;/li&gt;
&lt;li&gt;screenshots&lt;/li&gt;
&lt;li&gt;Playwright traces&lt;/li&gt;
&lt;li&gt;HTML and JSON reports&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The part I care about most isn't adding another red or green checkmark.&lt;/p&gt;

&lt;p&gt;It's narrowing the failure down to the layer that probably broke.&lt;/p&gt;

&lt;p&gt;Instead of getting:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;❌ Production check failed
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I want something closer to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;DNS            PASS
TLS            PASS
HTTP           FAIL (403)
Cloudflare     Challenge / WAF suspected
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now I know where to start looking.&lt;/p&gt;

&lt;p&gt;The current stable release, &lt;strong&gt;&lt;a href="https://github.com/lucaswenbo/ProdDoctor/releases/tag/v2.1.0" rel="noopener noreferrer"&gt;v2.1.0&lt;/a&gt;&lt;/strong&gt;, also adds a likely-cause summary to make failed checks easier to diagnose.&lt;/p&gt;

&lt;h2&gt;
  
  
  The setup ended up being tiny
&lt;/h2&gt;

&lt;p&gt;For a basic production check:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;lucaswenbo/ProdDoctor@v2.1.0&lt;/span&gt;
  &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;url&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;https://example.com&lt;/span&gt;
    &lt;span class="na"&gt;expect&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;My Website&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's a GitHub Actions step.&lt;/p&gt;

&lt;p&gt;Put it after your deployment step and point it at the &lt;strong&gt;real public production URL&lt;/strong&gt;, not the platform preview URL.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Deploy and verify&lt;/span&gt;

&lt;span class="na"&gt;on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;push&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;branches&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;main&lt;/span&gt;

&lt;span class="na"&gt;jobs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;deploy&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;runs-on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ubuntu-latest&lt;/span&gt;

    &lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="c1"&gt;# Your existing build and deployment steps go here.&lt;/span&gt;

      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Verify real production domain&lt;/span&gt;
        &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;lucaswenbo/ProdDoctor@v2.1.0&lt;/span&gt;
        &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;url&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;https://example.com&lt;/span&gt;
          &lt;span class="na"&gt;expect&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;My Website&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The default mode stays lightweight.&lt;/p&gt;

&lt;p&gt;No Cloudflare API token is required.&lt;/p&gt;

&lt;p&gt;If I need deeper evidence, I can enable browser validation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;lucaswenbo/ProdDoctor@v2.1.0&lt;/span&gt;
  &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;url&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;https://example.com&lt;/span&gt;
    &lt;span class="na"&gt;browser&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;ProdDoctor can then launch Chromium and preserve evidence such as a full-page screenshot, browser failures, a Playwright trace, and reports.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why HTTP 200 isn't enough
&lt;/h2&gt;

&lt;p&gt;This was another thing that became obvious while building it.&lt;/p&gt;

&lt;p&gt;Imagine this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;HTML              ✅ 200
app.js            ✅ 200
TLS               ✅
Browser render    ❌ white screen
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;HTTP              ✅ 200
Expected content  ❌ missing
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or even:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Platform URL      ✅
Custom domain     ❌ 403
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;All three can happen after a deployment system happily reports success.&lt;/p&gt;

&lt;p&gt;That's why ProdDoctor separates lightweight HTTP-level checks from optional browser-level validation.&lt;/p&gt;

&lt;p&gt;Most sites don't need Chromium on every run.&lt;/p&gt;

&lt;p&gt;But when the problem only appears after JavaScript executes, a simple HTTP request can't see the whole picture.&lt;/p&gt;

&lt;h2&gt;
  
  
  I'm not trying to build another giant monitoring platform
&lt;/h2&gt;

&lt;p&gt;I want ProdDoctor to stay focused on one question:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Did the thing I just deploy actually work for the user?&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;There are already great monitoring and observability platforms.&lt;/p&gt;

&lt;p&gt;ProdDoctor is aimed at a slightly different moment:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;code
 ↓
CI
 ↓
deploy
 ↓
real production URL
 ↓
verify what users actually get
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That last step was the one missing from my own workflow.&lt;/p&gt;

&lt;h2&gt;
  
  
  One important limitation
&lt;/h2&gt;

&lt;p&gt;Cloudflare / WAF detection is heuristic.&lt;/p&gt;

&lt;p&gt;ProdDoctor doesn't access your Cloudflare account or read private WAF logs.&lt;/p&gt;

&lt;p&gt;It looks at what a public client can observe, including status codes and common Challenge markers.&lt;/p&gt;

&lt;p&gt;So if it says a Cloudflare Challenge or WAF is &lt;em&gt;likely&lt;/em&gt; involved, that's a debugging direction, not magical access to Cloudflare's internal decision logs.&lt;/p&gt;

&lt;p&gt;I think that distinction matters.&lt;/p&gt;

&lt;h2&gt;
  
  
  The lesson I took from this
&lt;/h2&gt;

&lt;p&gt;I used to think the pipeline ended here:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;code → CI → deploy ✅
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now I think it should end here:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;code
 ↓
CI
 ↓
deploy
 ↓
production
 ↓
user-visible behavior ✅
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The deployment platform knows whether it successfully deployed something.&lt;/p&gt;

&lt;p&gt;The production URL tells you whether users can actually reach and use it.&lt;/p&gt;

&lt;p&gt;Those are not always the same thing.&lt;/p&gt;

&lt;h2&gt;
  
  
  I'm still building it
&lt;/h2&gt;

&lt;p&gt;ProdDoctor is open source, and I'm deliberately keeping it focused on production validation.&lt;/p&gt;

&lt;p&gt;👉 &lt;strong&gt;&lt;a href="https://github.com/lucaswenbo/ProdDoctor" rel="noopener noreferrer"&gt;Check out ProdDoctor on GitHub&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Current stable release: &lt;strong&gt;&lt;a href="https://github.com/lucaswenbo/ProdDoctor/releases/tag/v2.1.0" rel="noopener noreferrer"&gt;v2.1.0&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I'm especially interested in failures that slip through normal CI:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;custom-domain failures&lt;/li&gt;
&lt;li&gt;CDN / WAF surprises&lt;/li&gt;
&lt;li&gt;broken assets&lt;/li&gt;
&lt;li&gt;browser-only crashes&lt;/li&gt;
&lt;li&gt;stale or wrong deployments&lt;/li&gt;
&lt;li&gt;weird redirect behavior&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;What's the strangest "CI was green, production was broken" incident you've run into?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If there's a failure mode ProdDoctor doesn't catch yet, tell me about it.&lt;/p&gt;

&lt;p&gt;Real production failures are exactly what I want to turn into the next checks.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>cloudflarechallenge</category>
      <category>webdev</category>
      <category>github</category>
    </item>
  </channel>
</rss>
