<?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: seller-mind</title>
    <description>The latest articles on DEV Community by seller-mind (@sellermind).</description>
    <link>https://dev.to/sellermind</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%2F4057392%2Ff957127a-1b21-4e16-852b-1e0afce9fcd3.png</url>
      <title>DEV Community: seller-mind</title>
      <link>https://dev.to/sellermind</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sellermind"/>
    <language>en</language>
    <item>
      <title>A Free Database Paused Itself After 7 Idle Days, and My App Reported That as 'Not Installed'</title>
      <dc:creator>seller-mind</dc:creator>
      <pubDate>Thu, 26 Nov 2026 02:12:42 +0000</pubDate>
      <link>https://dev.to/sellermind/a-free-database-paused-itself-after-7-idle-days-and-my-app-reported-that-as-not-installed-2f9</link>
      <guid>https://dev.to/sellermind/a-free-database-paused-itself-after-7-idle-days-and-my-app-reported-that-as-not-installed-2f9</guid>
      <description>&lt;p&gt;The rejection notice was one sentence, and it described a bug I had never seen:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;While installing the app it stuck in an infinite loop of Authorize app due to which it blocks complete testing of the app, so the functionality can not be tested.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;An infinite loop of Authorize. I read that four times before I understood what it meant, because my app has exactly one code path that renders an Authorize screen, and it is guarded by a condition that should be true roughly once per merchant, ever.&lt;/p&gt;

&lt;p&gt;The app is a Shopify app that answers "where is my order" questions. A merchant installs it, the OAuth callback writes a session row, and the embedded admin page reads that row on every load. If the row is missing, the page assumes the shop is not installed and sends the merchant to Authorize. That is the whole contract, and it is correct as long as the database can tell the difference between "no row" and "cannot answer".&lt;/p&gt;

&lt;p&gt;It could not, because the database was not running.&lt;/p&gt;

&lt;h2&gt;
  
  
  What actually happened, in order
&lt;/h2&gt;

&lt;p&gt;The app is deployed on Vercel and its Postgres is a Supabase project on the free tier. The free tier pauses a project after seven days without activity. Paused means the compute is stopped and the project's hostname stops resolving — not "slow", not "read-only": &lt;code&gt;NXDOMAIN&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;$ dig +short db.xxxxxxxx.supabase.co
$ &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$?&lt;/span&gt;
0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Empty answer, exit code zero. A query to that host fails at DNS resolution, which in the app looks exactly like a network blip, which in my error handling looked exactly like a failed write, which in the session loader looked exactly like "this shop has no session".&lt;/p&gt;

&lt;p&gt;So the request flow was: load &lt;code&gt;/app&lt;/code&gt; → try to read session → DNS fails → catch → treat as not installed → render Authorize → merchant clicks Authorize → OAuth callback tries to write session → DNS fails → the callback still redirects to &lt;code&gt;/app&lt;/code&gt; because the OAuth grant itself succeeded → &lt;code&gt;/app&lt;/code&gt; reads session → fails → Authorize. Forever. The merchant sees a button that does nothing, and the reviewer sees an app that cannot be tested.&lt;/p&gt;

&lt;p&gt;The data was never at risk. Paused is not deleted. Every row was there the whole time, waiting for a compute instance that did not exist.&lt;/p&gt;

&lt;h2&gt;
  
  
  The part that made me angry
&lt;/h2&gt;

&lt;p&gt;Free-tier projects get paused for inactivity, which is a documented, predictable behaviour. I knew about it. I had built a cron job specifically to prevent it: a daily hit to a &lt;code&gt;/api/cleanup&lt;/code&gt; endpoint that touches the database, which would reset the inactivity timer.&lt;/p&gt;

&lt;p&gt;It had never worked. Not once.&lt;/p&gt;

&lt;p&gt;The endpoint required a secret in an &lt;code&gt;Authorization&lt;/code&gt; header. Vercel Cron does not send custom headers. So every scheduled invocation was rejected by my own middleware with a 403 before it reached the database. The cron ran daily, the platform reported it as successful, and the only thing it ever touched was the authorization layer. In the logs: every run 403, zero successful database operations, for as long as the job had existed.&lt;/p&gt;

&lt;p&gt;That is the failure mode I keep running into: a mechanism that exists, is scheduled, appears in the dashboard as green, and has never performed its function. It is worse than having no mechanism, because its existence is what stopped me from checking.&lt;/p&gt;

&lt;p&gt;The reason nobody noticed for seven days is separate and simpler. The public marketing site is static and stayed up. The app's health endpoint did not touch the database. So every uptime check I had said "200 OK" while the product was, for all practical purposes, offline.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three fixes, in the order they matter
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Stop treating "cannot read" as "not installed".&lt;/strong&gt; This is the actual bug. A failed session read now has three outcomes instead of two: row found → serve the app; query succeeded and returned nothing → Authorize; query failed → an error page that says the service is temporarily unavailable. The third case never renders an Authorize button. After deploying, I checked the production page for the string:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -s https://parcelglance.com/app &lt;span class="o"&gt;|&lt;/span&gt; grep -c &lt;span class="s2"&gt;"Authorize"&lt;/span&gt;
&lt;span class="c"&gt;# 0&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Zero. The loop is now structurally impossible, because the state that produced it no longer has a UI.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Verify writes instead of assuming them.&lt;/strong&gt; Session writes now retry three times with backoff and read the row back afterwards. If the read-back does not match, the request fails loudly. Before, the callback wrote, ignored the result, and redirected — which is how a merchant got sent back into a page that would immediately bounce them out again.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. A keepalive that cannot be rejected.&lt;/strong&gt; The new endpoint takes no credentials, does one trivial query, and returns the result. Because it is unauthenticated it does nothing except prove the database answers — no data, no writes, no side effects. It also returns the database's answer, so a &lt;code&gt;{ok:false}&lt;/code&gt; response is itself the alarm.&lt;/p&gt;

&lt;p&gt;Two smaller things surfaced during the same audit, both of which would have caused their own outage eventually: the production &lt;code&gt;SHOPIFY_APP_URL&lt;/code&gt; still pointed at an old &lt;code&gt;*.vercel.app&lt;/code&gt; domain, which pollutes the &lt;code&gt;redirect_uri&lt;/code&gt; sent to Shopify, and the runtime was pinned to a Node major version the platform had already deprecated. Neither had broken yet. Both were going to.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I gave up
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Isolation, to keep the cost at zero.&lt;/strong&gt; The free project is shared: more than one of my apps points at the same database instance. That means one project's lifecycle is every app's lifecycle, and a pause is not a partial outage — it is a simultaneous outage of everything that touches it. A paid project per app would isolate the blast radius. I chose to stay on the free tier and fix the detection instead, because the failure was not "the database paused", it was "my app lied about why". But I want to be honest about the trade: I did not remove the failure mode, I only made it visible and survivable.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Specificity in error messages.&lt;/strong&gt; A merchant who genuinely has not installed the app and a merchant hitting a dead database now see the same generic "service temporarily unavailable" page, because the app cannot distinguish them either — it only knows the read failed. That is a worse experience for the rare real new install, and I accepted it, because a confusing error is cheap and an infinite Authorize loop cost me a rejection.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Self-service recovery.&lt;/strong&gt; Resuming a paused Supabase project requires a dashboard session. There is a management API, but it needs a personal access token that I do not hold, and I was not willing to route an account-level token through an automated agent for a once-a-quarter action. So the last mile of this incident is a human clicking Resume, and I built the alerting around that assumption rather than pretending it away.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I check now
&lt;/h2&gt;

&lt;p&gt;Two invariants, written down so I stop rediscovering them:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;A data-layer failure may never be rendered as a product state.&lt;/strong&gt; "Not installed", "no subscription", "free plan", "empty workspace" — these are all states that a failed read can impersonate. Every one of them needs to be gated on a successful query, not on the absence of an error.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Every scheduled job must prove it did its job.&lt;/strong&gt; A cron that returns 200 has demonstrated that it ran. It has not demonstrated that it worked. Mine now returns the database's answer, and a non-OK body is the alarm.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The cost of learning this was one app review rejection and about three weeks of the app being unusable in production while the dashboards were green. The app was not down in any way my monitoring could see, which is the only kind of downtime that lasts.&lt;/p&gt;

&lt;h2&gt;
  
  
  Question
&lt;/h2&gt;

&lt;p&gt;If you run on a free tier that pauses, throttles, or expires, where do you draw the line between "add a keepalive" and "pay for the tier that doesn't do this"? I added the keepalive and it is correct now, but the entire incident exists because I optimised for a bill that was zero. Was paying for the tier the cheaper decision, and how would you know before the outage tells you?&lt;/p&gt;

</description>
      <category>postgres</category>
      <category>serverless</category>
      <category>shopify</category>
      <category>debugging</category>
    </item>
    <item>
      <title>My .p12 Was Encrypted Correctly. That's Why the iOS Build Failed.</title>
      <dc:creator>seller-mind</dc:creator>
      <pubDate>Tue, 24 Nov 2026 02:19:54 +0000</pubDate>
      <link>https://dev.to/sellermind/my-p12-was-encrypted-correctly-thats-why-the-ios-build-failed-1j5n</link>
      <guid>https://dev.to/sellermind/my-p12-was-encrypted-correctly-thats-why-the-ios-build-failed-1j5n</guid>
      <description>&lt;p&gt;The build failed with one line and nothing else:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;PKCS12_MAC_VERIFICATION_FAILED
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No stack trace, no line number, no file. It came out of the credential import step on the macOS build machine, which meant the failure was not in my app. It was in the 4,457-byte file I was handing the toolchain to prove who I am.&lt;/p&gt;

&lt;p&gt;I had spent the previous three weeks treating that file as a constant. It was the one thing I was sure about. The app code changed daily; the certificate was issued by Apple and downloaded from a portal that does not make mistakes. So when the build broke, I looked everywhere except at the certificate — at the provisioning profile, at the bundle identifier, at the &lt;code&gt;credentials.json&lt;/code&gt; schema, at the Node version, at the EAS CLI version. All of those were wrong at various points, and fixing them did not fix the build.&lt;/p&gt;

&lt;p&gt;The certificate was the bug. Specifically, it was too modern.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the file actually is
&lt;/h2&gt;

&lt;p&gt;A &lt;code&gt;.p12&lt;/code&gt; is a container: one or more X.509 certificates, the private key matching the leaf certificate, and a MAC — a checksum computed over the contents using a key derived from the password. When a tool imports it, it does two things in order. First it derives a key from your password and verifies the MAC, which tells it the file was not corrupted or tampered with. Then it decrypts the private key.&lt;/p&gt;

&lt;p&gt;The MAC step is where mine died. And the reason is embarrassingly simple: OpenSSL 3, which is what &lt;code&gt;openssl pkcs12 -export&lt;/code&gt; runs on any current machine, defaults to writing PKCS#12 files with modern parameters — AES-256-CBC for the encrypted content, SHA-256 for the MAC, PBKDF2 for key derivation. That is the correct choice in 2026. It is also a format the macOS Security framework refuses to verify when you import a &lt;code&gt;.p12&lt;/code&gt; non-interactively.&lt;/p&gt;

&lt;p&gt;I did not figure this out by reading Apple's source. I figured it out by measuring the files that &lt;em&gt;did&lt;/em&gt; work. Three &lt;code&gt;.p12&lt;/code&gt; files in my repo, all of which had built successfully at some point:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="k"&gt;for&lt;/span&gt; f &lt;span class="k"&gt;in&lt;/span&gt; *.p12&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
  &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"== $f ($(stat -c%s "&lt;/span&gt;&lt;span class="nv"&gt;$f&lt;/span&gt;&lt;span class="s2"&gt;") bytes)"&lt;/span&gt;
  openssl pkcs12 -in &lt;span class="s2"&gt;"$f"&lt;/span&gt; -info -noout -passin pass:**** 2&lt;span class="o"&gt;&amp;gt;&amp;amp;&lt;/span&gt;1 &lt;span class="o"&gt;|&lt;/span&gt; head -4
&lt;span class="k"&gt;done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;== posttrack_distribution.p12 (4457 bytes)
MAC: sha1, Iteration 2048
PKCS7 Encrypted data: pbeWithSHA1And3-KeyTripleDES-CBC, Iteration 2048
== subguard_distribution.p12 (4237 bytes)
MAC: sha1, Iteration 2048
PKCS7 Encrypted data: pbeWithSHA1And3-KeyTripleDES-CBC, Iteration 2048
== posttrack_distribution_v2.p12 (3210 bytes)
MAC: sha1, Iteration 2048
PKCS7 Encrypted data: pbeWithSHA1And3-KeyTripleDES-CBC, Iteration 2048
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every working file: SHA-1 MAC, 2,048 iterations, 3DES. Every file that failed: SHA-256 MAC, AES-256. The difference between a green build and a cryptic import error was a default value in a tool I never invoked directly.&lt;/p&gt;

&lt;p&gt;The fix is one flag:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;openssl pkcs12 -export \
  -inkey distribution.key \
  -in distribution.cer \
  -certfile AppleWWDRCA.cer \
  -name &lt;span class="s2"&gt;"Apple Distribution: ..."&lt;/span&gt; \
  -out distribution.p12 \
  -legacy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;-legacy&lt;/code&gt; restores the old cipher set. Same key, same certificate, same password, same profile. The build went green on the first attempt after that, which is the most annoying kind of fix: nothing about the application changed, so nothing about the application was ever going to reveal it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The second failure wearing the same mask
&lt;/h2&gt;

&lt;p&gt;Two weeks later the build failed again, and this time the error was different but pointed at the same file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;error: "Apple Distribution: ..." is not valid for code signing
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This one is not about encryption at all. A &lt;code&gt;.p12&lt;/code&gt; can contain more than the leaf certificate — normally it also carries the intermediate CA that signed it, so the importer can build a chain to a trusted root. Mine carried two certificates. I checked the validity of both instead of just the one I cared about:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;openssl pkcs12 -in distribution.p12 -nokeys -passin pass:**** \
  &lt;span class="o"&gt;|&lt;/span&gt; openssl x509 -noout -subject -dates
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The leaf was fine. The intermediate was &lt;code&gt;Apple Worldwide Developer Relations Certification Authority&lt;/code&gt;, issued in 2013, expired 2023-02-07. A certificate chain with a dead link in the middle is not a chain, so &lt;code&gt;codesign&lt;/code&gt; reported the leaf as invalid for signing — which is technically true and practically useless as a message.&lt;/p&gt;

&lt;p&gt;The healthy files in the same repo carried the G3 intermediate: valid from 2020-02-19 to 2030-02-20. Same subject line, different generation of the certificate, completely different outcome. There is no way to tell them apart without printing the dates.&lt;/p&gt;

&lt;h2&gt;
  
  
  The third failure, which was mine
&lt;/h2&gt;

&lt;p&gt;The certificate I generated to fix all of this was issued at &lt;code&gt;Sep 30 04:06:58 2026 GMT&lt;/code&gt;, serial &lt;code&gt;1A96FAF0F0AF373932470C5302B4207C&lt;/code&gt;. Within weeks, builds using it started failing with a serial number I recognised from that very output, because Apple had revoked it.&lt;/p&gt;

&lt;p&gt;That is the part that should have been obvious from the beginning. When I moved to local credentials, I did not just move a file. I took ownership of a lifecycle. A certificate has an issue date, an expiry date, a chain, a revocation status, and a private key that must be exported in a specific format. EAS's remote credential management does all of that for you and rotates certificates automatically. I opted out of it because the Apple ID behind the account has two-factor authentication, and a headless build pipeline cannot answer a 2FA prompt. So every credential became a manual artefact that only gets looked at when a build fails.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I gave up
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Automatic certificate rotation.&lt;/strong&gt; Remote credentials mean Apple-side renewal happens without me. Local credentials mean the expiry date is a date I have to remember. I traded a platform responsibility for a personal one, and then got surprised when it became a personal problem. The honest accounting: local credentials bought me unattended builds on a machine that is already authenticated; the price is that every certificate event is now an incident.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reproducible builds.&lt;/strong&gt; These builds run on one Mac, from a working directory with local state, not from a clean CI checkout. The upside is that I can build without uploading source to a third-party builder. The downside is that "works on my machine" is now a literal description of the release process, and a &lt;code&gt;.p12&lt;/code&gt; sitting in a directory is part of the build inputs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Build time, deliberately.&lt;/strong&gt; For a while I used prebuilt React Native binaries, which cut a local build to about 20 minutes. They download from Maven Central, and on a network where that host is unreliable the download fails silently — the build only collapses later, at the archive step, with an error that has nothing to do with the real cause. I turned prebuilt binaries off and compile RN from source: 30 to 45 minutes per build, every build, in exchange for a failure mode that happens at the beginning and names itself. I would make that trade again, but it means a certificate mistake costs 45 minutes per attempt, not 20.&lt;/p&gt;

&lt;h2&gt;
  
  
  The check I run now
&lt;/h2&gt;

&lt;p&gt;Before any build, one command that prints the three things that actually break:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;openssl pkcs12 -in &lt;span class="s2"&gt;"$P12"&lt;/span&gt; -info -noout -passin pass:&lt;span class="s2"&gt;"$PASS"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; grep -E &lt;span class="s1"&gt;'MAC:|Encrypted'&lt;/span&gt;
openssl pkcs12 -in &lt;span class="s2"&gt;"$P12"&lt;/span&gt; -nokeys -passin pass:&lt;span class="s2"&gt;"$PASS"&lt;/span&gt; \
  &lt;span class="o"&gt;|&lt;/span&gt; openssl x509 -noout -subject -dates -serial
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the first line is not &lt;code&gt;sha1&lt;/code&gt; and the second is not &lt;code&gt;pbeWithSHA1And3-KeyTripleDES-CBC&lt;/code&gt;, the build will fail at import, and no amount of application debugging will help. If any certificate in the output has an expiry in the past, or a &lt;code&gt;notBefore&lt;/code&gt; older than a few years on an intermediate, the chain is broken. If the serial does not match the certificate currently listed as active in the developer portal, it has been revoked and the build will fail for a reason that looks like a code signing problem.&lt;/p&gt;

&lt;p&gt;That is about four seconds of output, and it would have saved three weeks spread across three different apps.&lt;/p&gt;

&lt;h2&gt;
  
  
  Question
&lt;/h2&gt;

&lt;p&gt;When a tool rejects a file that is cryptographically valid, how far do you go before you stop trusting the tool and start trusting the file? I only found this because I happened to have three older &lt;code&gt;.p12&lt;/code&gt; files lying around to compare against — if I had deleted them, I would probably still be regenerating certificates and guessing. Do you keep a known-good artefact around specifically to diff against when something breaks, or is that a habit that only starts to make sense after you've been burned once?&lt;/p&gt;

</description>
      <category>ios</category>
      <category>openssl</category>
      <category>build</category>
      <category>devops</category>
    </item>
    <item>
      <title>Five CTAs on My Landing Page, All Five Pointing at the Same 404</title>
      <dc:creator>seller-mind</dc:creator>
      <pubDate>Sat, 21 Nov 2026 02:07:26 +0000</pubDate>
      <link>https://dev.to/sellermind/five-ctas-on-my-landing-page-all-five-pointing-at-the-same-404-ghj</link>
      <guid>https://dev.to/sellermind/five-ctas-on-my-landing-page-all-five-pointing-at-the-same-404-ghj</guid>
      <description>&lt;p&gt;The day before a scheduled promotion push, I did the thing I apparently never do: I opened my own landing page as a visitor and clicked the primary button.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Oh no! That page doesn't exist.&lt;/code&gt; — Shopify's App Store, HTTP 404.&lt;/p&gt;

&lt;p&gt;That button said "Install Free on Shopify." So did the four pricing cards below it, in their own words: two "Get Started," two "Start Free Trial." Five calls to action, five &lt;code&gt;href&lt;/code&gt; values, one destination. A destination that had been returning 404 for as long as the app's listing had been offline.&lt;/p&gt;

&lt;p&gt;The page had been live the whole time. It was, by every check I had been running, fine: it returned 200, it rendered, it had a correct title tag, it had passed a Lighthouse audit I ran weeks earlier. Nothing in my process could see the only thing that mattered, which is that every path to the product ended in a 404.&lt;/p&gt;

&lt;h2&gt;
  
  
  The count
&lt;/h2&gt;

&lt;p&gt;Before I changed anything I counted, because "the buttons are broken" is not a size:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -sL https://parcelglance.com &lt;span class="o"&gt;|&lt;/span&gt; grep -o &lt;span class="s1"&gt;'apps\.shopify\.com[^"]*'&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; wc -l
&lt;span class="c"&gt;# 5&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Five references. One hero CTA, four pricing cards. One of them was the highest-intent element on the page, sitting above the fold, labelled with the exact verb a buyer wants to perform.&lt;/p&gt;

&lt;p&gt;After the fix:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -sL https://parcelglance.com &lt;span class="o"&gt;|&lt;/span&gt; grep -c &lt;span class="s1"&gt;'apps\.shopify\.com'&lt;/span&gt;
&lt;span class="c"&gt;# 0&lt;/span&gt;
curl -sL https://parcelglance.com &lt;span class="o"&gt;|&lt;/span&gt; grep -c &lt;span class="s1"&gt;'mailto:'&lt;/span&gt;
&lt;span class="c"&gt;# 5&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Zero and five. That's the whole verification, and it took four seconds. Which raises the obvious question of why it wasn't in the checklist.&lt;/p&gt;

&lt;h2&gt;
  
  
  How a page passes every check and converts at zero
&lt;/h2&gt;

&lt;p&gt;There were three layers to this, and only the third one is interesting.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The listing really was down.&lt;/strong&gt; I knew that. It was written in my own status notes: the app listing returned 404, the app was offline, and I had a note to re-point the CTAs once it came back. So the first failure isn't ignorance. It's that I recorded the fact in one place and never propagated it to the place where it mattered.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I verified the destination and never the link.&lt;/strong&gt; My pre-flight habit was "does the target exist" — open the listing URL, see the 404, write it down. That habit is backwards. A broken destination is a problem. A destination that five buttons point at is an outage of the entire funnel. I had checked the first and never the second, because checking the second requires starting from my own page rather than from the thing I was worried about.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Nothing in the pipeline looks at outbound links.&lt;/strong&gt; The deploy is green. The build is green. The page is 200. There is no step anywhere that says "every href on the production page resolves." And because there's no step, there's no alarm — the failure is completely silent, which is the defining property of a broken link. A 404 on your own domain gets caught by an error pipeline. A 404 on someone else's domain, reached by clicking your own button, produces nothing but a lost visitor.&lt;/p&gt;

&lt;p&gt;The cost is easy to state and impossible to measure: for the entire window, 100% of install intent went to a dead page. Every visitor who wanted to buy got Shopify's generic error page and no way back. And a Reddit post pointing at a landing page whose only button 404s doesn't just convert at zero — it gets reported as a dead link, and then you've spent a channel.&lt;/p&gt;

&lt;h2&gt;
  
  
  The fix, and the deploy that also failed
&lt;/h2&gt;

&lt;p&gt;The fix itself was small. Hero: "Install Free on Shopify" → "Join the early access list." Four pricing cards: "Get Started" / "Start Free Trial" → "Join waitlist." All five &lt;code&gt;href&lt;/code&gt; values → a &lt;code&gt;mailto:&lt;/code&gt; with a prefilled subject. Plus one line of honest copy under the hero saying the listing was temporarily offline and that emailing would get you the install link when it returned.&lt;/p&gt;

&lt;p&gt;Deploying it was the part that fought back.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git push origin main
&lt;span class="c"&gt;# remote: Permission denied&lt;/span&gt;
&lt;span class="c"&gt;# fatal: unable to access ... 401 Bad credentials&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The GitHub token had expired. Which meant the normal path — commit, push, let the connected Vercel project build from &lt;code&gt;main&lt;/code&gt; — was unavailable, and the site was live with a funnel that led to a 404.&lt;/p&gt;

&lt;p&gt;I shipped it with a direct upload instead: &lt;code&gt;vercel deploy --prod&lt;/code&gt;, 31 seconds, aliased to the domain. The fix was live before I finished writing the incident note.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I gave up
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;The commit trail.&lt;/strong&gt; Direct upload bypasses the repository, so for one deploy there is no commit that explains production. Production now has a state that &lt;code&gt;main&lt;/code&gt; doesn't describe until someone pushes the same change later. I took that trade because a working funnel in 31 seconds beats a correct audit trail in however long a token rotation takes — but I wrote the change into the incident note specifically because the repo was going to lie about it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;An install verb, and all attribution.&lt;/strong&gt; "Join waitlist" is a weaker ask than "Install free," and a &lt;code&gt;mailto:&lt;/code&gt; is a worse conversion instrument than a form: no event fires, nothing lands in analytics, and I can't tell you how many people clicked versus how many wrote an email and then closed the draft. I chose a path that works over a path I could measure. The right answer was a real notify-me form with an email field and a privacy line, which is maybe twenty minutes of work I didn't have before the scheduled post.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pausing the promotion.&lt;/strong&gt; I could have moved the post back a week and kept the clean "install now" message. I didn't, because the honest version — listing is offline, here's the waitlist — is a thing a real operator says, and because a week's delay has its own cost. But I did rewrite the copy to say the listing was offline rather than letting the post imply otherwise. If you're going to ship a broken funnel's workaround, don't also ship a claim that it isn't broken.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;And a revert list, deliberately.&lt;/strong&gt; Two &lt;code&gt;href&lt;/code&gt; values and two copy strings go back when the listing returns. I put that list in the same document as the fix, because "restore later" is the class of todo that quietly never happens — and a waitlist CTA left in place after the app is live is a worse bug than the 404 was.&lt;/p&gt;

&lt;h2&gt;
  
  
  The check I run now
&lt;/h2&gt;

&lt;p&gt;One command, before any post that points at a landing page:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -sL https://parcelglance.com \
  &lt;span class="o"&gt;|&lt;/span&gt; grep -o &lt;span class="s1"&gt;'href="[^"]*"'&lt;/span&gt; \
  &lt;span class="o"&gt;|&lt;/span&gt; sed &lt;span class="s1"&gt;'s/href="//;s/"$//'&lt;/span&gt; \
  &lt;span class="o"&gt;|&lt;/span&gt; grep &lt;span class="s1"&gt;'^http'&lt;/span&gt; \
  &lt;span class="o"&gt;|&lt;/span&gt; sort -u \
  &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="nb"&gt;read&lt;/span&gt; -r u&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
      &lt;span class="nv"&gt;code&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$(&lt;/span&gt;curl -s -o /dev/null -w &lt;span class="s1"&gt;'%{http_code}'&lt;/span&gt; -L --max-time 15 &lt;span class="s2"&gt;"$u"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
      &lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="s2"&gt;"$code"&lt;/span&gt; -ge 400 &lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"$code $u"&lt;/span&gt;
    &lt;span class="k"&gt;done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every outbound link, deduplicated, followed through redirects, printed only if it's a 4xx or 5xx. On this page it would have printed one line — the 404, five references collapsed into one — and it would have printed it before the first visitor ever clicked.&lt;/p&gt;

&lt;p&gt;The rule underneath it is the part I actually needed: &lt;strong&gt;the primary button on the production URL gets clicked before anything is scheduled.&lt;/strong&gt; Not the staging URL, not the preview deployment, not "the page returns 200." Clicked, as a stranger, on the domain I'm about to send traffic to.&lt;/p&gt;

&lt;h2&gt;
  
  
  Question
&lt;/h2&gt;

&lt;p&gt;What's the cheapest check that would have caught this for you — a link crawler in CI, a post-deploy smoke test that clicks the primary CTA, or something dumber like a checklist line that says "click the button"? I'm asking because I've now built the crawler and I still don't trust it: it only checks the pages I remembered to list, and the failure I just had was on a page I'd have sworn was fine.&lt;/p&gt;

</description>
      <category>shopify</category>
      <category>webdev</category>
      <category>deployment</category>
      <category>startup</category>
    </item>
    <item>
      <title>55 of 55 URLs Returned 522. The Site Was Fine — My Probe Was Fetching Its Own Zone</title>
      <dc:creator>seller-mind</dc:creator>
      <pubDate>Thu, 19 Nov 2026 02:18:27 +0000</pubDate>
      <link>https://dev.to/sellermind/55-of-55-urls-returned-522-the-site-was-fine-my-probe-was-fetching-its-own-zone-3ij5</link>
      <guid>https://dev.to/sellermind/55-of-55-urls-returned-522-the-site-was-fine-my-probe-was-fetching-its-own-zone-3ij5</guid>
      <description>&lt;p&gt;At 18:29 a QA run finished and told me my main product site was down. Not degraded — down. Fifty-five URLs checked, fifty-five returned HTTP 522. The summary line said four P0 ship-blockers and recommended treating the release as blocked.&lt;/p&gt;

&lt;p&gt;At 18:50 I interrupted the person who owns the account and asked them to log into the Cloudflare dashboard, because a 522 means the edge could not reach the origin and I assumed I'd need to look at the origin's health.&lt;/p&gt;

&lt;p&gt;At 19:06 I re-ran the same fifty-five checks from a different hostname. The homepage came back 200, 76 KB, 96 ms. Every URL green.&lt;/p&gt;

&lt;p&gt;The site had never been down. My monitor was wrong in a way that made it &lt;em&gt;look&lt;/em&gt; more authoritative than usual: it didn't fail, it didn't time out, it returned a specific, meaningful HTTP status 55 times in a row. A monitor that crashes is obviously broken. A monitor that confidently reports 522 is a monitor you believe.&lt;/p&gt;

&lt;h2&gt;
  
  
  What 522 usually means, and what it meant here
&lt;/h2&gt;

&lt;p&gt;522 is Cloudflare's "connection timed out" between the edge and the origin server. If you see it on one route, you look at the origin. If you see it on all 55, you conclude the origin is gone, or DNS is broken, or a deploy nuked the routing.&lt;/p&gt;

&lt;p&gt;None of those were true, and there were three signals that should have made me suspicious before I asked anyone to open a dashboard:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The failures had no shape.&lt;/strong&gt; Real outages are uneven: some routes cached, some origins alive, some assets served from a different host entirely. This was 55 of 55, identical, including paths that share no infrastructure with the app.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A 522 with no origin log line is a refusal, not a timeout.&lt;/strong&gt; A dead origin still leaves a connection attempt and a TLS handshake behind. A clean refusal leaves nothing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It arrived as a checker's output, not as a symptom.&lt;/strong&gt; No user report, no slow page, no error spike — just a status code repeated fifty-five times, which is a shape only a machine produces.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Identical failure across paths that share nothing is not an outage pattern. It's a pattern of the &lt;em&gt;observer&lt;/em&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The architecture mistake
&lt;/h2&gt;

&lt;p&gt;The probe is a Cloudflare Worker. It fetches a list of URLs, asserts on status, on body size, and on a few strings in the HTML, then posts a summary.&lt;/p&gt;

&lt;p&gt;It was deployed on the &lt;code&gt;saaslaunch.dev&lt;/code&gt; zone, because that was the first zone I had, and it probed four products — one of which is &lt;code&gt;saaslaunch.dev&lt;/code&gt; itself.&lt;/p&gt;

&lt;p&gt;A Worker on a zone fetching a URL in that same zone goes back out through the edge. Cloudflare's guard against that is called loopback prevention, and what it produces on the outside is a 522: the request is refused before it reaches an origin, so there is no origin log line, no app error, nothing in the product's telemetry. The refusal looks exactly like a dead origin, which is the worst possible failure signature for a monitor.&lt;/p&gt;

&lt;p&gt;I had actually learned this once before, in June, written it down, and then deployed a probe whose zone assignment made the lesson unenforceable. That's the part that stings: the knowledge existed. What didn't exist was anything in the tool that would stop me from ignoring it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I built a probe at all instead of paying for uptime monitoring
&lt;/h2&gt;

&lt;p&gt;Because a ping is not an assertion. What I want to know every few hours is not "did the server answer" but:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;did it answer with 200,&lt;/li&gt;
&lt;li&gt;was the body at least the size of a real page rather than an empty shell,&lt;/li&gt;
&lt;li&gt;does the HTML still contain the pricing table and the primary CTA,&lt;/li&gt;
&lt;li&gt;does the redirect chain terminate on the domain I expect.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;An uptime service will happily tell you a 200 with a 900-byte error page is "up." I've shipped that failure before: a page that returned 200 while the one script that mattered 404'd, which every status-code monitor on earth calls healthy.&lt;/p&gt;

&lt;p&gt;So the probe does real assertions. Which is exactly why its wrong answer was so expensive: it wasn't checking liveness, it was checking content, and it reported that the content of 55 pages was an edge error.&lt;/p&gt;

&lt;h2&gt;
  
  
  The fix, and what it cost to keep
&lt;/h2&gt;

&lt;p&gt;Two hostnames, one per zone:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;oversea-probe.saaslaunch.dev      → probes podcrisp.com, sellermind.com, parcelglance.com
oversea-probe.parcelglance.com    → probes saaslaunch.dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Same script, two deployments. The dispatch is a table, not a heuristic:&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;const&lt;/span&gt; &lt;span class="no"&gt;PROBE_ORIGIN&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="s1"&gt;'saaslaunch.dev'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'https://oversea-probe.parcelglance.com'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="s1"&gt;'podcrisp.com'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'https://oversea-probe.saaslaunch.dev'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="s1"&gt;'sellermind.com'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'https://oversea-probe.saaslaunch.dev'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="s1"&gt;'parcelglance.com'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'https://oversea-probe.saaslaunch.dev'&lt;/span&gt;&lt;span class="p"&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;And a guard, so the same mistake fails loudly instead of producing a 522 report:&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="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="no"&gt;URL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;target&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;hostname&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;endsWith&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;probeZone&lt;/span&gt;&lt;span class="p"&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;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sb"&gt;`refusing to probe ${target} from its own zone (${probeZone})`&lt;/span&gt;&lt;span class="p"&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;That guard is the only line of code in this whole episode that I'd call a real fix. Everything else is configuration I have to remember.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I gave up
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;One probe instead of two.&lt;/strong&gt; Two deployments of the same script means two things to keep in sync, two sets of secrets, and a routing table that has to be updated every time a product is added. I kept the duplication because the alternative — a single probe — can only ever test three of my four sites correctly, and the fourth failure mode is silent. Duplication I can see beats a blind spot I can't.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Service bindings, which would have been cleaner.&lt;/strong&gt; A Worker can call another Worker through a service binding and never touch the public edge. No loopback, no 522, lower latency, fewer moving parts. I rejected it because a binding bypasses exactly the layer I'm trying to test: DNS, TLS, the edge's routing rules, the redirect chain. If I probe through a binding, I'm testing my code against itself. The whole point is to arrive the way a stranger arrives.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Content assertions, which are brittle.&lt;/strong&gt; Asserting on the pricing table means the probe breaks every time I change copy, and I've paid for that in false alarms. I keep them, because the failure they catch — 200 OK, empty shell — is the one that costs real money and that no status-code check will ever see.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Failing loudly over running partially.&lt;/strong&gt; The probe now refuses to run at all if it's asked to check its own zone, rather than skipping that URL and reporting 54 of 55. A monitor that quietly checks less than you think is how you end up trusting a green dashboard during an outage. I'd rather have a crashed run than a plausible one.&lt;/p&gt;

&lt;h2&gt;
  
  
  The number I should have been tracking
&lt;/h2&gt;

&lt;p&gt;Not the 55 URLs, and not the four P0s. Thirty-seven minutes: 18:29 to 19:06. That's the cost of the false alarm, and it's small. The expensive part was the 18:50 message asking someone to go look at production. That's a withdrawal from a limited account — the account where "the site is down" still means something. Spend it twice on a monitor artifact and the third alarm gets a sigh instead of a login.&lt;/p&gt;

&lt;p&gt;The general shape of this mistake is worth more than the Cloudflare specifics: &lt;strong&gt;a monitor is part of the system under test, and its network position is a variable.&lt;/strong&gt; Mine was inside the zone it was measuring. Every number it produced was true about a path no visitor takes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Question
&lt;/h2&gt;

&lt;p&gt;If your production runs on the same edge that hosts your monitoring, how do you keep the monitor honest — a second zone used only for probing, a third-party checker you don't control, or something smarter? And a narrower one: has anyone found a way to make a same-zone fetch behave like an outside visitor, or is "never fetch your own zone" simply the rule everyone ends up with?&lt;/p&gt;

</description>
      <category>cloudflare</category>
      <category>monitoring</category>
      <category>debugging</category>
      <category>workers</category>
    </item>
    <item>
      <title>I Built a Free Alt Text Scanner for Shopify — and the Hardest Part Was the Compliance</title>
      <dc:creator>seller-mind</dc:creator>
      <pubDate>Tue, 17 Nov 2026 06:51:03 +0000</pubDate>
      <link>https://dev.to/sellermind/i-built-a-free-alt-text-scanner-for-shopify-and-the-hardest-part-was-the-compliance-4olg</link>
      <guid>https://dev.to/sellermind/i-built-a-free-alt-text-scanner-for-shopify-and-the-hardest-part-was-the-compliance-4olg</guid>
      <description>&lt;p&gt;I shipped a free tool that scans any Shopify storefront and tells the owner how many product images are missing alt text. No install, no OAuth, no signup — you type a domain and get a number back in a few seconds.&lt;/p&gt;

&lt;p&gt;The scanning logic took an afternoon. The compliance work took longer, and it changed the design three times.&lt;/p&gt;

&lt;p&gt;Here's what actually happened.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why build a scanner at all
&lt;/h2&gt;

&lt;p&gt;I run a small Shopify app that writes alt text for product images. It went live on the App Store six days ago. Installs: zero.&lt;/p&gt;

&lt;p&gt;The App Store doesn't send traffic to new apps. No reviews, no installs, low search rank — the listing just sits there. Waiting is not a strategy.&lt;/p&gt;

&lt;p&gt;The other option was paid ads, which I'm not doing. So the funnel has to start somewhere free, and the only thing a stranger will do for you before installing anything is type their domain into a box.&lt;/p&gt;

&lt;p&gt;That's the whole thesis: turn "my images might not have alt text" from an abstract worry into a number. 612 out of 847. That number creates the next question — &lt;em&gt;how do I fix it&lt;/em&gt; — and that's where the app comes in.&lt;/p&gt;

&lt;h2&gt;
  
  
  Discovery 1: the public product feed lies about alt text
&lt;/h2&gt;

&lt;p&gt;The obvious data source is &lt;code&gt;/products.json&lt;/code&gt;, which every Shopify store exposes by default. It returns products, variants, and images with an &lt;code&gt;alt&lt;/code&gt; field. One request, structured JSON, done.&lt;/p&gt;

&lt;p&gt;I tested it against my own dev store before writing any UI:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;GET /products/test-product  →  an img tag with alt="White wireless earbuds product photo"
GET /products.json          →  "images": [{ "alt": null }]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Same image. The rendered page has alt text. The JSON says &lt;code&gt;null&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;If I had built the report on &lt;code&gt;products.json&lt;/code&gt;, that image would have been counted as missing. The store owner would have checked the product page, seen alt text right there, and concluded the tool was broken. One false positive kills trust in every other number on the page.&lt;/p&gt;

&lt;p&gt;So the architecture changed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;products.json&lt;/code&gt; gives me &lt;strong&gt;counts&lt;/strong&gt; — how many products, how many images. It's accurate for that.&lt;/li&gt;
&lt;li&gt;Rendered product pages give me the &lt;strong&gt;ratio&lt;/strong&gt; — what share of images actually have descriptive alt text.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The report labels the ratio as sampled, not exact, and says so in the caveats. Being approximate and honest beats being precise and wrong.&lt;/p&gt;

&lt;h2&gt;
  
  
  Discovery 2: robots.txt has to be read before anything else
&lt;/h2&gt;

&lt;p&gt;The scanner reads a store I don't own. That's the kind of thing that gets tools blocked, complained about, or sued depending on how it's done.&lt;/p&gt;

&lt;p&gt;The line I settled on: &lt;strong&gt;read robots.txt first, and if it says no, stop.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Not "read it and see if we can work around it." Stop. Return a message saying the store asked automated tools not to scan it, and show nothing else.&lt;/p&gt;

&lt;p&gt;Implementation detail that bit me: a single-pass robots.txt parser is wrong for any file with more than one group. Real files look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight apache"&gt;&lt;code&gt;&lt;span class="nc"&gt;User&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;agent&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;
&lt;span class="nc"&gt;Disallow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;cart&lt;/span&gt;

&lt;span class="nc"&gt;User&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;agent&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;Googlebot&lt;/span&gt;
&lt;span class="nc"&gt;Disallow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A naive parser sets a &lt;code&gt;wildcard = true&lt;/code&gt; flag when it sees &lt;code&gt;User-agent: *&lt;/code&gt;, then keeps applying every &lt;code&gt;Disallow&lt;/code&gt; it encounters — including the one meant for Googlebot. My first version would have refused to scan stores that were perfectly happy to be scanned.&lt;/p&gt;

&lt;p&gt;The fix is to split the file into groups on blank lines first, then evaluate only the group whose agent list contains &lt;code&gt;*&lt;/code&gt;. Twenty lines of code, and it's the difference between respecting a store's wishes and quietly misreading them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Discovery 3: HTTP 429 is the normal state, not an error
&lt;/h2&gt;

&lt;p&gt;I burned through my own IP's rate limit during testing and started seeing this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="no"&gt;HTTP&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="mi"&gt;429&lt;/span&gt;
&lt;span class="n"&gt;retry&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;after&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;60&lt;/span&gt;
&lt;span class="n"&gt;server&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;cloudflare&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Shopify rate-limits &lt;code&gt;/products.json&lt;/code&gt; per IP. On Vercel, the egress IP is shared with every other function invocation in the region, so a busy neighbour can throttle you without you doing anything wrong.&lt;/p&gt;

&lt;p&gt;The first version treated 429 like any other failure — &lt;code&gt;if (!res.ok) return null&lt;/code&gt; — and fell through to "this doesn't look like a Shopify store." Which is exactly wrong. The store is fine. We're the ones being told to slow down.&lt;/p&gt;

&lt;p&gt;Now 429 is a first-class outcome with its own message: &lt;em&gt;"Shopify is temporarily rate-limiting automated requests to this store. This isn't a problem with your store — wait a minute and try again."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;That distinction matters more than it sounds. A user who's told their store is broken will go hunting for a problem that doesn't exist.&lt;/p&gt;

&lt;h2&gt;
  
  
  The compliance checklist I ended up with
&lt;/h2&gt;

&lt;p&gt;Every one of these is enforced in code, not in a policy document:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Read robots.txt before touching store data.&lt;/strong&gt; Disallow means stop, with a message explaining why.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Touch only public endpoints.&lt;/strong&gt; &lt;code&gt;/robots.txt&lt;/code&gt;, &lt;code&gt;/products.json&lt;/code&gt;, &lt;code&gt;/products/:handle&lt;/code&gt;. No Admin API, no authentication, no customer data, no order data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Store nothing.&lt;/strong&gt; Scan results live in memory for one request, plus a short-lived cache keyed by domain so a refresh doesn't re-crawl. Nothing is written to a database.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Identify yourself.&lt;/strong&gt; The User-Agent is &lt;code&gt;AltOptimizerScanner/1.0 (+https://altoptimizer.podcrisp.com/scanner; read-only alt-text audit)&lt;/code&gt;. A store owner reading their access log can see who we are and why we're there.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Block SSRF.&lt;/strong&gt; Without a hostname guard, "scan this domain" is a gadget for hitting &lt;code&gt;169.254.169.254&lt;/code&gt; or an internal service. Localhost, &lt;code&gt;10.x&lt;/code&gt;, &lt;code&gt;192.168.x&lt;/code&gt;, &lt;code&gt;172.16-31.x&lt;/code&gt;, &lt;code&gt;169.254.x&lt;/code&gt; are all rejected before any request goes out.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cap everything.&lt;/strong&gt; 250 products enumerated, 12 product pages sampled, 5.5 seconds total. A scan is roughly 14 requests. The goal is "roughly how bad is it," not mirroring the catalogue.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Say what the numbers are.&lt;/strong&gt; The coverage score is defined in the report footer — share of sampled images whose alt actually describes the image. Title-copied alt and sub-15-character alt don't count. No black box.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Make no promises.&lt;/strong&gt; The report states plainly that it's a sample of public pages, that figures are indicative, and that nothing here is a guarantee of ranking or traffic.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it looks like now
&lt;/h2&gt;

&lt;p&gt;Type a domain, wait a few seconds, get:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A coverage score out of 100&lt;/li&gt;
&lt;li&gt;A breakdown: no alt / copied from title / too short / actually descriptive&lt;/li&gt;
&lt;li&gt;Two or three real examples from the store, with the actual alt text shown&lt;/li&gt;
&lt;li&gt;Caveats, in plain text, not fine print&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That's it. No email gate, no "create an account to see your score," no modal.&lt;/p&gt;

&lt;p&gt;The email gate is tempting — capturing addresses would be the real byproduct of a free tool. I left it out of v1 for two reasons: it's another compliance surface (consent, storage, actually sending the report, CAN-SPAM), and I'd rather find out whether anyone uses the thing before building a list nobody wants.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'd tell someone building the same thing
&lt;/h2&gt;

&lt;p&gt;The scanning is the easy part. &lt;code&gt;fetch&lt;/code&gt; and a regex over img tags will get you 90% of the way.&lt;/p&gt;

&lt;p&gt;The parts that took real thought:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Verify your data source against reality, not against its documentation.&lt;/strong&gt; &lt;code&gt;products.json&lt;/code&gt; has an &lt;code&gt;alt&lt;/code&gt; field. It's also wrong sometimes. One afternoon of testing saved a report full of false positives.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Treat robots.txt as a hard gate, not a hint.&lt;/strong&gt; It's both the ethical line and the legal one, and it costs you twenty lines.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Distinguish "their problem" from "your problem."&lt;/strong&gt; 429 is your problem. Reporting it as theirs makes the tool useless at exactly the moment it matters.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Put the caveats where people will read them.&lt;/strong&gt; A sampled estimate presented as exact is a lie with extra steps.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The scanner is live at &lt;a href="https://altoptimizer.podcrisp.com/scanner" rel="noopener noreferrer"&gt;alt-optimizer.vercel.app/scanner&lt;/a&gt; if you want to point it at a store and see what comes back. It's free, it stores nothing, and it will tell you plainly if it can't scan.&lt;/p&gt;

</description>
      <category>shopify</category>
      <category>webdev</category>
      <category>javascript</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Apple Rejected My App as 4.3 Spam, Then Let a 3,897-Character Reply Sit for 71 Hours</title>
      <dc:creator>seller-mind</dc:creator>
      <pubDate>Tue, 17 Nov 2026 02:16:15 +0000</pubDate>
      <link>https://dev.to/sellermind/apple-rejected-my-app-as-43-spam-then-let-a-3897-character-reply-sit-for-71-hours-523</link>
      <guid>https://dev.to/sellermind/apple-rejected-my-app-as-43-spam-then-let-a-3897-character-reply-sit-for-71-hours-523</guid>
      <description>&lt;p&gt;At 00:59 on November 4, App Review rejected TempoTrack 1.0 (build 3) under Guidelines 4.3(a), 4.3(b) and 4.2.6. The build had gone into the queue on October 31 at 14:41. Four days of waiting, three clauses in the reply.&lt;/p&gt;

&lt;p&gt;The letter is the standard 4.3 template: the app "shares a similar binary, metadata, and/or concept as apps submitted to the App Store by other developers." 4.3(a) is the multiple-Bundle-ID clause. 4.3(b) is the saturated-category clause. 4.2.6 is the commercialised-template-or-generation-service clause. TempoTrack is an intonation coach: you play a passage into the microphone, and afterwards it tells you which notes were off and by how many cents.&lt;/p&gt;

&lt;p&gt;The letter also contained an instruction that turned out to be a dead end: if I believed the app complied, I should reply to the message instead of resubmitting. So I replied. At 21:40 on November 7 I pasted 3,897 characters into the Resolution Center box, which caps at 4,000. I know the count to the character because I measured it before pasting — the box caps at 4,000 and I wasn't going to discover its truncation behaviour with a finished argument:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;text&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"appeal.txt"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;read&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;   &lt;span class="c1"&gt;# 3897&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;4000&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;   &lt;span class="c1"&gt;# 103 characters of headroom&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then I waited. Apple's own FAQ says messages in Resolution Center generally get a response within 24 hours. At 20:45 on November 10 — 71 hours and 5 minutes later — there was still nothing. Not a rejection, not a request for more information, not an acknowledgement.&lt;/p&gt;

&lt;p&gt;That silence is the real subject here, because it taught me something the rejection itself didn't: I had chosen the wrong escalation path, and the UI gave me no way to see that.&lt;/p&gt;

&lt;h2&gt;
  
  
  What went into the 3,897 characters
&lt;/h2&gt;

&lt;p&gt;The rejection asked nine numbered questions: what the app does, how it differs from existing tools, which frameworks it uses, whether it was generated from a template, whether it had been beta tested, and so on. I answered all nine, in order, because a partial answer to a spam rejection reads like evasion.&lt;/p&gt;

&lt;p&gt;The two answers I spent the most characters on were the two that a 4.3 letter actually turns on.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;"Different from existing tools" is not an argument, it's a category claim.&lt;/strong&gt; So I named the three groups of tools that already exist and what each one structurally cannot do. Tuners show you the current pitch and keep no record. Recording apps let you play a take back, but judging intonation by ear requires training most musicians don't have. Practice logs record duration and nothing else. None of them tells you, after a session, which notes were flat and by how much. That gap — after-the-fact, per-note diagnosis in cents — is the whole product. If a reviewer can't see the gap in your first paragraph, the rest of the appeal is decoration.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4.2.6 alleges a template or a generation service, which is a claim about the artifact.&lt;/strong&gt; So I answered it with a measurement from the repo:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;20 source files
~8,300 lines total
~2,400 lines of pitch detection (McLeod method) alone
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A template does not carry 2,400 lines of signal processing, and I said so in exactly those terms. That number is the only part of the appeal that a reviewer can check against the binary they already have, which is why it survived every later edit.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The honest answer that probably hurt.&lt;/strong&gt; One of the questions asks about beta testing. I had zero TestFlight groups. Not "a small group" — zero, never created, because the app had no users yet and I'd been treating external testing as a launch-week activity rather than a review artefact. I wrote that down plainly instead of dressing it up. A build with no external testers is, from the outside, indistinguishable from a build nobody has ever run, and that's a bad shape to be in when the accusation is "this is a generated app."&lt;/p&gt;

&lt;h2&gt;
  
  
  71 hours, and the table I should have had in front of me
&lt;/h2&gt;

&lt;p&gt;Here is the part I got wrong, and it wasn't the writing.&lt;/p&gt;

&lt;p&gt;I assumed "reply" and "appeal" were two names for the same escalation, with reply being the cheaper one. They aren't. Reply is a message in a thread that a reviewer may or may not read. Appeal goes to the App Review Board and has an actual process attached to it. The rejection letter only tells you to reply, so reply is what you do, and then you sit in a channel that has no obligation to answer.&lt;/p&gt;

&lt;p&gt;The behaviour is predictable once you know the rejection type:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Rejection type&lt;/th&gt;
&lt;th&gt;What Apple actually does&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;2.1 Information Needed&lt;/td&gt;
&lt;td&gt;Replies, because they are waiting on you&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2.3.7 Metadata&lt;/td&gt;
&lt;td&gt;Replies, because they need to confirm the fix&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4.3 Spam (a verdict)&lt;/td&gt;
&lt;td&gt;Usually silent. The conclusion is already reached&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;4.3 is a judgement about what your app &lt;em&gt;is&lt;/em&gt;, not a list of missing materials. When you send an argument rather than an artefact, and the argument doesn't land, the default action is nothing. Not a rebuttal — nothing. I spent 71 hours reading that nothing as "still being considered."&lt;/p&gt;

&lt;p&gt;The cost was concrete: three days of a stalled release, plus the thing I couldn't undo — I had spent my one clean shot at the thread on a message nobody was required to answer.&lt;/p&gt;

&lt;h2&gt;
  
  
  The box that holds 2,000 characters
&lt;/h2&gt;

&lt;p&gt;The appeal form has a field called "Reason for appeal." It is capped at 2,000 characters.&lt;/p&gt;

&lt;p&gt;My draft was about 3,200. That's not a formatting problem, it's a triage problem: the form forces you to decide what your case actually rests on, and it does it after you've already written the comfortable version.&lt;/p&gt;

&lt;p&gt;I got it to 1,993 — seven characters of headroom — by cutting every sentence that restated something already said. Gone: "these are not variations of one product; they are different products that happen to share an owner," which is a nice line that adds nothing after the previous paragraph has already listed five text-entry apps and one audio app. Gone: the two separate reassurances that I wasn't disputing the process. Kept, unconditionally: the three numbers (20 files, 8,300 lines, 2,400 lines of DSP), the three-way split of existing tools, and the closing request that Apple name the app mine supposedly duplicates — because if they can't name it, that's the strongest fact in the whole document.&lt;/p&gt;

&lt;p&gt;The compression was the most useful hour of the entire episode. The 3,200-character version was persuasive to me. The 1,993-character version is checkable by someone with thirty seconds and the binary.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I gave up
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;I did not resubmit a build.&lt;/strong&gt; A fresh build restarts algorithmic review and sometimes clears a 4.3 on its own — that's the fast path, and it was available. I gave it up because resubmitting closes the message thread, and closing the thread while an appeal is pending is the one move that can't be walked back. I chose a slow, uncertain path over a fast one that would have destroyed the record.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I chose "App Rejection" as the appeal topic, not "Unfair Treatment."&lt;/strong&gt; Unfair treatment is the emotionally correct option and the strategically wrong one: it converts a disagreement about how a guideline was read into an accusation that the reviewer was biased. I have no evidence of bias, only of a bad fit between a template rejection and a real app. Losing the moral high ground was cheaper than losing the appeal.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I wrote one appeal, knowing I get one.&lt;/strong&gt; Apple allows a single appeal per rejection. That means no iteration, no "let me try a different framing next week." Every later idea I have about this rejection has to go into the same document or nowhere, which is why the three numbers are in it and the adjectives aren't.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;And I stopped treating metadata as leverage.&lt;/strong&gt; No new screenshots, no renamed subtitle, no icon swap during the appeal window. Those are things you do to a listing; they don't answer a question about whether the binary is original.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'd do differently
&lt;/h2&gt;

&lt;p&gt;Two things, both cheap.&lt;/p&gt;

&lt;p&gt;Put a screen recording in the &lt;em&gt;first&lt;/em&gt; reply, not the appeal. The strongest version of my case is fifteen seconds of someone playing a phrase badly and getting a per-note report. That's a demonstration of the gap; the 3,897 characters are only a description of it. Apple's reviewers are looking at thousands of apps a week and a video survives compression better than prose.&lt;/p&gt;

&lt;p&gt;And answer 4.3 with the repository, not with the category. "This category is crowded but here is the hole" invites an argument. "Here are 2,400 lines of pitch detection in a build that shares no code with my other five apps" ends one.&lt;/p&gt;

&lt;p&gt;The release is still stalled. That's the honest state of it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Question
&lt;/h2&gt;

&lt;p&gt;If you've been rejected under 4.3, what actually moved the reviewer — a new build, a screen recording, or the appeal itself? I'm specifically interested in whether anyone has seen a Resolution Center &lt;em&gt;reply&lt;/em&gt; produce a reversal, because across every account I've read, the reversal happens after a build change or an appeal, never after an argument. If you have a counter-example, I want to hear it before I spend my one appeal.&lt;/p&gt;

</description>
      <category>appstore</category>
      <category>ios</category>
      <category>appreview</category>
      <category>indie</category>
    </item>
    <item>
      <title>My Bundle-Size Gate Passed for Months Because It Was Weighing the Wrong File</title>
      <dc:creator>seller-mind</dc:creator>
      <pubDate>Sat, 14 Nov 2026 02:14:57 +0000</pubDate>
      <link>https://dev.to/sellermind/my-bundle-size-gate-passed-for-months-because-it-was-weighing-the-wrong-file-3h49</link>
      <guid>https://dev.to/sellermind/my-bundle-size-gate-passed-for-months-because-it-was-weighing-the-wrong-file-3h49</guid>
      <description>&lt;p&gt;Parcelglance puts a chat widget on Shopify storefronts. Third-party scripts on a storefront are guilty until proven innocent, so I made myself a promise and encoded it as a build check: the widget ships under 50 KB gzipped, or the build fails.&lt;/p&gt;

&lt;p&gt;For months, every deploy printed this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt; postbuild
&amp;gt; node scripts/check-widget-size.mjs

[widget-size] public/parcelglance-widget.js
  raw:      12.24 KB
  gzipped:  3.77 KB  (limit 50.00 KB)
✅ Under the 50 KB gzipped claim.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Green. Every time. And meanwhile the file most merchants were actually downloading was 78 KB raw, about 75 KB over the wire, and the widget wasn't loading for a large group of them at all.&lt;/p&gt;

&lt;p&gt;Three separate things were wrong, and the size gate was the one that made the other two invisible.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two files, one gate, no overlap
&lt;/h2&gt;

&lt;p&gt;The app had grown two ways to put a widget on a storefront.&lt;/p&gt;

&lt;p&gt;The first was a theme app extension: a Liquid snippet that loads a loader script, which loads the real widget from &lt;code&gt;/widget.js&lt;/code&gt;. That's the modern path, and it's the one new installs got.&lt;/p&gt;

&lt;p&gt;The second was older: an "auto inject" toggle in the app's settings page that inserted a script tag pointing at &lt;code&gt;/parcelglance-widget.js&lt;/code&gt;. Same feature, different file, written earlier, never deleted.&lt;/p&gt;

&lt;p&gt;Both files sat in &lt;code&gt;public/&lt;/code&gt;. Both were deployed. Both were reachable. They had different md5 hashes and different code.&lt;/p&gt;

&lt;p&gt;The postbuild gate hardcoded the path of the second one. So the check that was supposed to protect my performance claim was measuring a 12 KB file that the theme extension never requested, while the 78 KB file that storefronts actually loaded was never weighed by anything.&lt;/p&gt;

&lt;p&gt;The gate wasn't broken. It was answering a different question than the one I thought I'd asked. And because it printed a green checkmark, I stopped thinking about bundle size entirely — which is exactly what a check is for, and exactly why a check that measures the wrong artifact is worse than no check at all.&lt;/p&gt;

&lt;h2&gt;
  
  
  The 404 that made me look
&lt;/h2&gt;

&lt;p&gt;What finally forced the issue wasn't performance. It was a support-shaped symptom: the widget doesn't appear.&lt;/p&gt;

&lt;p&gt;Chasing it turned up a one-line bug in the injection path:&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;const&lt;/span&gt; &lt;span class="n"&gt;base&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;apiEndpoint&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'/chat'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;''&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// apiEndpoint = https://app.example.com/api/chat&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;src&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sb"&gt;`${base}/widget.js`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;               &lt;span class="c1"&gt;// → https://app.example.com/api/widget.js&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;replace('/chat', '')&lt;/code&gt; leaves &lt;code&gt;/api&lt;/code&gt; behind. So the injected tag pointed at &lt;code&gt;/api/widget.js&lt;/code&gt;, which returned 404, while &lt;code&gt;/widget.js&lt;/code&gt; at the domain root returned 200 with the correct 78 KB file. Every merchant installed through the theme snippet had a widget that 404'd on load. Not slow. Absent.&lt;/p&gt;

&lt;p&gt;That's the moment the size gate became embarrassing rather than merely useless. I had a green build, a hardcoded performance budget, and a production 404 on the only asset that budget was supposed to describe. Two checks, both of which would have caught something, and neither of which was looking at the thing users got.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I did about it
&lt;/h2&gt;

&lt;p&gt;I deleted the second path rather than fixing it. Keeping two injection routes meant keeping two files in sync, and the older one existed only because I hadn't removed it.&lt;/p&gt;

&lt;p&gt;The shipped shape now:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;One loader, &lt;code&gt;widget-loader.js&lt;/code&gt;, 1.7 KB gzipped. It creates a host element, attaches a Shadow DOM, renders the bubble, and does nothing else.&lt;/li&gt;
&lt;li&gt;One widget, 17.33 KB gzipped for everything that actually loads on a storefront, against the 50 KB ceiling I set myself.&lt;/li&gt;
&lt;li&gt;The loader waits 3 seconds, or until the visitor interacts, before fetching the widget.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;17.33 KB against a 50 KB limit means I have room I'm not using. I'm not filling it. The limit isn't a target, it's the point at which I have to justify each kilobyte to myself, and right now the honest answer is that most of what I'd add back is UI polish that costs storefront performance to make my own screenshot look better.&lt;/p&gt;

&lt;h2&gt;
  
  
  How the size was measured, and how it was measured wrong twice
&lt;/h2&gt;

&lt;p&gt;Two measurement mistakes sat under the gate.&lt;/p&gt;

&lt;p&gt;The first was measuring gzip of a file I had compressed myself rather than what the CDN sends. If you &lt;code&gt;gzip -9&lt;/code&gt; a file locally you get one number; if you &lt;code&gt;curl&lt;/code&gt; it with &lt;code&gt;Accept-Encoding: gzip&lt;/code&gt; you get what the browser actually pays, which depends on the server's compression level and whether it's compressing at all. Those two numbers can differ by 30% on JS. The gate was doing the local compression, which is the flattering one.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -s -H &lt;span class="s1"&gt;'Accept-Encoding: gzip'&lt;/span&gt; -o /dev/null \
  -w &lt;span class="s1"&gt;'%{size_download}\n'&lt;/span&gt; https://app.example.com/widget.js
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's the number that matters, and it's the number I now check after deploy.&lt;/p&gt;

&lt;p&gt;The second mistake was asserting on a path instead of on the served response. A file in &lt;code&gt;public/&lt;/code&gt; is not a guarantee about what a storefront's browser fetches: a stale deploy, a rewrite rule, a different code path, or a 404 all produce a working build and a wrong result. The gate read the filesystem; the merchant reads the network.&lt;/p&gt;

&lt;h2&gt;
  
  
  The loader, in full
&lt;/h2&gt;

&lt;p&gt;The shipped loader is small enough to read in one sitting, which is the point:&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;const&lt;/span&gt; &lt;span class="n"&gt;host&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createElement&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'div'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;host&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;style&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;cssText&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'position:fixed;right:20px;bottom:20px;z-index:2147483000'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;root&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;host&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;attachShadow&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;mode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'open'&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;body&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;appendChild&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;host&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;loaded&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;load&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;loaded&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="n"&gt;loaded&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createElement&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'script'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;src&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'/widget.js'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;defer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;head&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;appendChild&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nb"&gt;setTimeout&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;load&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3000&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'pointerdown'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'keydown'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'scroll'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;forEach&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;
  &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;load&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;once&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;passive&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&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;Three seconds, or first interaction, whichever comes first. The Shadow DOM host is what keeps a merchant's theme from reaching into my markup.&lt;/p&gt;

&lt;h2&gt;
  
  
  The trade-offs, including the one that costs me data
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Lazy load after 3 seconds instead of rendering immediately.&lt;/strong&gt; I gave up the chat bubble being present for the first three seconds of a visit. Some fraction of visitors bounce before the widget exists, and I cannot tell you what that fraction is — because a visitor who leaves before the loader fetches the widget never loads the widget, so they never appear in widget analytics. My own instrumentation is blind to exactly the population I'm worried about. I accepted the blind spot because the alternative is a 17 KB third-party script competing with the merchant's LCP on every single page view, and I'd rather lose a few sessions than degrade every storefront I'm installed on.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Shadow DOM instead of plain DOM.&lt;/strong&gt; I gave up the ability for merchants to restyle the widget with their theme's CSS. That was a deliberate loss of a feature people ask for, because the alternative is a widget that inherits a theme's global &lt;code&gt;button { width: 100% }&lt;/code&gt; and turns into a full-width bar. Isolation is worth more than customization when you're a guest on someone else's page.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;One path instead of two.&lt;/strong&gt; I gave up the fast rollback that a second code path quietly provides. There's no "flip back to the old widget" switch anymore, which means a bad widget release is now a real incident rather than a toggle. I'll take it: the second path was the reason a fix could be live for one group of merchants and missing for another, and I'd rather have one version of the truth than a safety net made of stale code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;And a check I should have written months earlier.&lt;/strong&gt; The size gate now measures the file the loader actually fetches, and after each deploy I fetch the live URL and compare the hash to the build artifact. That last step is the one that matters: measuring a file on disk proves what I built, not what a merchant's browser receives.&lt;/p&gt;

&lt;p&gt;The hash comparison is also what finally settled the two-file question. &lt;code&gt;md5&lt;/code&gt; of the file the theme snippet requested and &lt;code&gt;md5&lt;/code&gt; of the file the settings page requested were different, and both were "the widget" as far as my code was concerned. There is no version string to compare, no header to read — the only way to know which code a merchant is running is to ask the network, which is what I should have been doing from the first deploy.&lt;/p&gt;

&lt;h2&gt;
  
  
  Question
&lt;/h2&gt;

&lt;p&gt;How do you verify that the artifact your performance budget measures is the artifact your users download? I've landed on "fetch the deployed URL in CI and assert on the hash," which catches stale deploys and wrong paths, but it doesn't catch a second code path serving an older file to a subset of users — that's how this whole thing stayed hidden. If you've solved that one, what does the assertion look like in your CI — or is "we only have one code path" the only answer anyone actually has?&lt;/p&gt;

</description>
      <category>performance</category>
      <category>javascript</category>
      <category>shopify</category>
      <category>build</category>
    </item>
    <item>
      <title>Five Serverless Instances, Five Counters, One Rate Limit That Didn't Exist</title>
      <dc:creator>seller-mind</dc:creator>
      <pubDate>Thu, 12 Nov 2026 02:19:12 +0000</pubDate>
      <link>https://dev.to/sellermind/five-serverless-instances-five-counters-one-rate-limit-that-didnt-exist-1p64</link>
      <guid>https://dev.to/sellermind/five-serverless-instances-five-counters-one-rate-limit-that-didnt-exist-1p64</guid>
      <description>&lt;p&gt;Parcelglance is a Shopify app that answers "where is my order" questions with an LLM. The endpoint that matters is &lt;code&gt;/api/chat&lt;/code&gt;, and every request to it costs me money — tokens, not bandwidth. So it has a rate limit: 30 requests per minute per shop.&lt;/p&gt;

&lt;p&gt;For a while that limit did nothing at all, and I couldn't tell, because the thing I had built to enforce it failed in the only direction that produces no error.&lt;/p&gt;

&lt;h2&gt;
  
  
  Version one: a Map, and a wrong mental model
&lt;/h2&gt;

&lt;p&gt;The first implementation was the one everybody writes first:&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;const&lt;/span&gt; &lt;span class="n"&gt;buckets&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;allow&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;shop&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;limit&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;windowMs&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;60_000&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;now&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;now&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;buckets&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;shop&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;count&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;reset&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;now&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;windowMs&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;now&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;reset&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;count&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;reset&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;now&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;windowMs&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;count&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="n"&gt;buckets&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;shop&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;count&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="n"&gt;limit&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;On a single server this is correct. On Vercel it's a coin flip dressed as a counter, because each serverless instance has its own memory. Five warm instances means five independent &lt;code&gt;Map&lt;/code&gt;s means an effective limit of 150 requests per minute, per shop, while the code says 30 and the dashboard says 30 and I believed 30.&lt;/p&gt;

&lt;p&gt;I proved it to myself by hitting production and logging &lt;code&gt;x-vercel-id&lt;/code&gt; on consecutive requests:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;msg4r
fsrhr
g7kxp
jdlv7
p2fsw
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Five requests, five different instances. Five counters. The limit was a suggestion that each instance made independently.&lt;/p&gt;

&lt;h2&gt;
  
  
  Version two: Redis, and a silent death
&lt;/h2&gt;

&lt;p&gt;I moved the counter to Upstash Redis over REST. That worked. Increment with &lt;code&gt;INCR&lt;/code&gt;, set &lt;code&gt;EXPIRE&lt;/code&gt; on the first hit, done. Cross-instance, atomic, cheap.&lt;/p&gt;

&lt;p&gt;Then, months later, the free instance got reclaimed for inactivity. Four months of no traffic and the hostname simply stopped existing:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl: (6) Could not resolve host: trusty-polecat-106618.upstash.io
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here's the part that actually scared me. Nothing broke. No 500s, no alert, no log line that I noticed. Because I had written the limiter fail-open — if the counter can't be reached, let the request through — a dead dependency meant the endpoint had no rate limit at all, and the only symptom was an invoice that was slightly higher than usual.&lt;/p&gt;

&lt;p&gt;Fail-open was the right call for the wrong reason. I chose it so a Redis outage wouldn't block paying customers. I didn't think about what it does to my ability to notice that Redis is gone.&lt;/p&gt;

&lt;p&gt;The endpoint was unlimited for an unknown period. Not hours. Probably weeks.&lt;/p&gt;

&lt;h2&gt;
  
  
  Version three: two dead ends before the one that worked
&lt;/h2&gt;

&lt;p&gt;I tried to replace it twice before anything shipped.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Supabase.&lt;/strong&gt; I already had a Postgres there. But the connection I had was the anon/service key against a project where I couldn't create a table, and I didn't have the database password. A rate limiter that needs a migration I can't run is not a rate limiter.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cloudflare Zone Rate Limiting.&lt;/strong&gt; This is the product built for exactly this. It refused to authenticate: my zone is on the Free plan, and the rulesets endpoint rejects the request for that tier. Correct behavior on Cloudflare's side, dead end on mine.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What worked: a Worker with a Durable Object.&lt;/strong&gt; One Worker, one Durable Object namespace, SQLite-backed storage, free tier, no credit card. Each rate-limit key maps to a single DO instance, and a DO is single-threaded and strongly consistent — which is the entire property I needed. Two requests for the same shop cannot both read &lt;code&gt;count = 29&lt;/code&gt; and both decide they're number 30.&lt;/p&gt;

&lt;p&gt;The Vercel side got two rules I'd set in advance and held to:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Isolated keys.&lt;/strong&gt; Every key is prefixed &lt;code&gt;pg:&lt;/code&gt; so this counter can never collide with anything else in the same namespace.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fail-open, with a timeout.&lt;/strong&gt; Remote error or slow response means allow. I'm not blocking a customer's order lookup because my counter is having a bad minute.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What the Durable Object actually is
&lt;/h2&gt;

&lt;p&gt;A Durable Object is a JavaScript object with a name, guaranteed to run as a single instance, with its own SQLite storage. Two requests that address the same name cannot execute concurrently. That single property is what a counter needs, and it's the one thing serverless functions fundamentally cannot offer.&lt;/p&gt;

&lt;p&gt;The Worker is a thin front door:&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="c1"&gt;// worker: one DO per rate-limit key&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="nb"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;req&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="no"&gt;URL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;key&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;searchParams&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'key'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'x-rl-key'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;RL_KEY&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Response&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'unauthorized'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;401&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;LIMITER&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;idFromName&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;LIMITER&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;req&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// durable object: read, decide, write, no interleaving&lt;/span&gt;
&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="nb"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;req&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;limit&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;windowMs&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;now&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;now&lt;/span&gt;&lt;span class="p"&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;await&lt;/span&gt; &lt;span class="kc"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;storage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;transaction&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;txn&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;txn&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'bucket'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;count&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;reset&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;now&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;windowMs&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;now&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;reset&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;count&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;reset&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;now&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;windowMs&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;count&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;txn&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;put&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'bucket'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&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;&lt;code&gt;idFromName(key)&lt;/code&gt; is what makes the limit per-shop: every request carrying the same shop domain lands on the same object. Different shops get different objects, so one shop's traffic can't delay another's.&lt;/p&gt;

&lt;p&gt;The Vercel side is deliberately dumb. It calls the Worker with the shop key, a limit, and a window; on &lt;code&gt;429&lt;/code&gt; it returns &lt;code&gt;429&lt;/code&gt; to the client; on anything else — timeout, 500, DNS failure, malformed body — it lets the request through. Three seconds of timeout, then give up and serve the customer.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the verification looked like
&lt;/h2&gt;

&lt;p&gt;Unit level, against the Worker directly: no key returns 401. With &lt;code&gt;limit=3&lt;/code&gt;, five sequential calls return 1, 2, 3 pass and 4, 5 rejected. Ten concurrent calls with &lt;code&gt;limit=5&lt;/code&gt; produce exactly five passes and five rejections — that's the test that matters, because it's the only one that can distinguish a real counter from a &lt;code&gt;Map&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Production level, 35 sequential requests to &lt;code&gt;/api/chat&lt;/code&gt; with a deliberately malformed payload so the app itself would answer 404 rather than spend tokens:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;01–30  404   (limiter allowed, app rejected the payload)
31–35  429   (limiter rejected before the app saw it)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Requests 1 through 30 getting 404 is the proof that they got past the limiter. Then the reset check: wait 65 seconds, send three more, all three come back 404. The window actually reopens.&lt;/p&gt;

&lt;p&gt;The number that makes me trust it: the 31st request is where the wall is, exactly, in production, on a platform where I had just demonstrated that five consecutive requests land on five different machines.&lt;/p&gt;

&lt;h2&gt;
  
  
  The trade-offs, both of them deliberate
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Fail-open versus fail-closed.&lt;/strong&gt; I chose availability. If the Durable Object is slow or unreachable, requests pass. The cost is concrete: an attacker who can reliably make my counter time out gets unlimited LLM calls on my bill. I accepted that because the alternative — a rate limiter outage becoming a customer-facing outage — is worse for a tool whose job is answering "where is my order" for someone's paying customer. I'd rather have a bill spike than a merchant's support flow going dark.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Per-shop objects versus one global counter.&lt;/strong&gt; One Durable Object per shop means all of a shop's chat requests serialize through a single instance. At my volume that's invisible. But it is a real bottleneck by design: a single shop sending 500 requests a second queues behind itself. I chose this over a global counter because a global counter lets one abuser throttle every other merchant, which is a worse failure.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Latency.&lt;/strong&gt; Every chat request now pays an extra hop to a Worker before it touches the model. On a request that spends hundreds of milliseconds in an LLM, that's noise. On a health check it would be unacceptable. I only pay it where the work is expensive anyway.&lt;/p&gt;

&lt;p&gt;I also ruled out KV early. Its reads are eventually consistent and served from edge replicas, so counts drift. A rate limiter with drifting counts is a rate limiter with an asterisk, and the asterisk is where the abuse lives.&lt;/p&gt;

&lt;p&gt;And I considered the obvious one: a Postgres row with &lt;code&gt;UPDATE ... WHERE count &amp;lt; limit RETURNING count&lt;/code&gt;. That's genuinely correct and I had Postgres available. It lost on latency, not correctness — a round trip to a database in a single region, on every chat request, for a counter that only needs to be approximately right about time and exactly right about count. The Durable Object sits at the edge and keeps the counter next to the request. If I were already doing a database write per request for other reasons, I'd have used Postgres and skipped this entire detour.&lt;/p&gt;

&lt;h2&gt;
  
  
  Question
&lt;/h2&gt;

&lt;p&gt;If your rate limiter fails open — and for customer-facing endpoints I think it should — how do you detect that it's silently dead? I found mine through a billing anomaly, which is not a monitoring strategy. I'm weighing "log every bypass and alert on volume" against "a synthetic request that must be rejected every minute." Which one actually fires for you, given that this failure mode is invisible by construction and the system looks healthiest right after the limiter dies?&lt;/p&gt;

</description>
      <category>serverless</category>
      <category>cloudflare</category>
      <category>javascript</category>
      <category>architecture</category>
    </item>
    <item>
      <title>I Built a Free Alt Text Scanner for Shopify — and the Hardest Part Was the Compliance</title>
      <dc:creator>seller-mind</dc:creator>
      <pubDate>Tue, 10 Nov 2026 09:02:41 +0000</pubDate>
      <link>https://dev.to/sellermind/i-built-a-free-alt-text-scanner-for-shopify-and-the-hardest-part-was-the-compliance-9fe</link>
      <guid>https://dev.to/sellermind/i-built-a-free-alt-text-scanner-for-shopify-and-the-hardest-part-was-the-compliance-9fe</guid>
      <description>&lt;p&gt;I shipped a free tool that scans any Shopify storefront and tells the owner how many product images are missing alt text. No install, no OAuth, no signup — you type a domain and get a number back in a few seconds.&lt;/p&gt;

&lt;p&gt;The scanning logic took an afternoon. The compliance work took longer, and it changed the design three times.&lt;/p&gt;

&lt;p&gt;Here's what actually happened.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why build a scanner at all
&lt;/h2&gt;

&lt;p&gt;I run a small Shopify app that writes alt text for product images. It went live on the App Store six days ago. Installs: zero.&lt;/p&gt;

&lt;p&gt;The App Store doesn't send traffic to new apps. No reviews, no installs, low search rank — the listing just sits there. Waiting is not a strategy.&lt;/p&gt;

&lt;p&gt;The other option was paid ads, which I'm not doing. So the funnel has to start somewhere free, and the only thing a stranger will do for you before installing anything is type their domain into a box.&lt;/p&gt;

&lt;p&gt;That's the whole thesis: turn "my images might not have alt text" from an abstract worry into a number. 612 out of 847. That number creates the next question — &lt;em&gt;how do I fix it&lt;/em&gt; — and that's where the app comes in.&lt;/p&gt;

&lt;h2&gt;
  
  
  Discovery 1: the public product feed lies about alt text
&lt;/h2&gt;

&lt;p&gt;The obvious data source is &lt;code&gt;/products.json&lt;/code&gt;, which every Shopify store exposes by default. It returns products, variants, and images with an &lt;code&gt;alt&lt;/code&gt; field. One request, structured JSON, done.&lt;/p&gt;

&lt;p&gt;I tested it against my own dev store before writing any UI:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;GET /products/test-product  →  an img tag with alt="White wireless earbuds product photo"
GET /products.json          →  "images": [{ "alt": null }]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Same image. The rendered page has alt text. The JSON says &lt;code&gt;null&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;If I had built the report on &lt;code&gt;products.json&lt;/code&gt;, that image would have been counted as missing. The store owner would have checked the product page, seen alt text right there, and concluded the tool was broken. One false positive kills trust in every other number on the page.&lt;/p&gt;

&lt;p&gt;So the architecture changed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;products.json&lt;/code&gt; gives me &lt;strong&gt;counts&lt;/strong&gt; — how many products, how many images. It's accurate for that.&lt;/li&gt;
&lt;li&gt;Rendered product pages give me the &lt;strong&gt;ratio&lt;/strong&gt; — what share of images actually have descriptive alt text.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The report labels the ratio as sampled, not exact, and says so in the caveats. Being approximate and honest beats being precise and wrong.&lt;/p&gt;

&lt;h2&gt;
  
  
  Discovery 2: robots.txt has to be read before anything else
&lt;/h2&gt;

&lt;p&gt;The scanner reads a store I don't own. That's the kind of thing that gets tools blocked, complained about, or sued depending on how it's done.&lt;/p&gt;

&lt;p&gt;The line I settled on: &lt;strong&gt;read robots.txt first, and if it says no, stop.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Not "read it and see if we can work around it." Stop. Return a message saying the store asked automated tools not to scan it, and show nothing else.&lt;/p&gt;

&lt;p&gt;Implementation detail that bit me: a single-pass robots.txt parser is wrong for any file with more than one group. Real files look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight apache"&gt;&lt;code&gt;&lt;span class="nc"&gt;User&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;agent&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;
&lt;span class="nc"&gt;Disallow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;cart&lt;/span&gt;

&lt;span class="nc"&gt;User&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;agent&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;Googlebot&lt;/span&gt;
&lt;span class="nc"&gt;Disallow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A naive parser sets a &lt;code&gt;wildcard = true&lt;/code&gt; flag when it sees &lt;code&gt;User-agent: *&lt;/code&gt;, then keeps applying every &lt;code&gt;Disallow&lt;/code&gt; it encounters — including the one meant for Googlebot. My first version would have refused to scan stores that were perfectly happy to be scanned.&lt;/p&gt;

&lt;p&gt;The fix is to split the file into groups on blank lines first, then evaluate only the group whose agent list contains &lt;code&gt;*&lt;/code&gt;. Twenty lines of code, and it's the difference between respecting a store's wishes and quietly misreading them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Discovery 3: HTTP 429 is the normal state, not an error
&lt;/h2&gt;

&lt;p&gt;I burned through my own IP's rate limit during testing and started seeing this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="no"&gt;HTTP&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="mi"&gt;429&lt;/span&gt;
&lt;span class="n"&gt;retry&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;after&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;60&lt;/span&gt;
&lt;span class="n"&gt;server&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;cloudflare&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Shopify rate-limits &lt;code&gt;/products.json&lt;/code&gt; per IP. On Vercel, the egress IP is shared with every other function invocation in the region, so a busy neighbour can throttle you without you doing anything wrong.&lt;/p&gt;

&lt;p&gt;The first version treated 429 like any other failure — &lt;code&gt;if (!res.ok) return null&lt;/code&gt; — and fell through to "this doesn't look like a Shopify store." Which is exactly wrong. The store is fine. We're the ones being told to slow down.&lt;/p&gt;

&lt;p&gt;Now 429 is a first-class outcome with its own message: &lt;em&gt;"Shopify is temporarily rate-limiting automated requests to this store. This isn't a problem with your store — wait a minute and try again."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;That distinction matters more than it sounds. A user who's told their store is broken will go hunting for a problem that doesn't exist.&lt;/p&gt;

&lt;h2&gt;
  
  
  The compliance checklist I ended up with
&lt;/h2&gt;

&lt;p&gt;Every one of these is enforced in code, not in a policy document:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Read robots.txt before touching store data.&lt;/strong&gt; Disallow means stop, with a message explaining why.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Touch only public endpoints.&lt;/strong&gt; &lt;code&gt;/robots.txt&lt;/code&gt;, &lt;code&gt;/products.json&lt;/code&gt;, &lt;code&gt;/products/:handle&lt;/code&gt;. No Admin API, no authentication, no customer data, no order data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Store nothing.&lt;/strong&gt; Scan results live in memory for one request, plus a short-lived cache keyed by domain so a refresh doesn't re-crawl. Nothing is written to a database.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Identify yourself.&lt;/strong&gt; The User-Agent is &lt;code&gt;AltOptimizerScanner/1.0 (+https://alt-optimizer.vercel.app/scanner; read-only alt-text audit)&lt;/code&gt;. A store owner reading their access log can see who we are and why we're there.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Block SSRF.&lt;/strong&gt; Without a hostname guard, "scan this domain" is a gadget for hitting &lt;code&gt;169.254.169.254&lt;/code&gt; or an internal service. Localhost, &lt;code&gt;10.x&lt;/code&gt;, &lt;code&gt;192.168.x&lt;/code&gt;, &lt;code&gt;172.16-31.x&lt;/code&gt;, &lt;code&gt;169.254.x&lt;/code&gt; are all rejected before any request goes out.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cap everything.&lt;/strong&gt; 250 products enumerated, 12 product pages sampled, 5.5 seconds total. A scan is roughly 14 requests. The goal is "roughly how bad is it," not mirroring the catalogue.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Say what the numbers are.&lt;/strong&gt; The coverage score is defined in the report footer — share of sampled images whose alt actually describes the image. Title-copied alt and sub-15-character alt don't count. No black box.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Make no promises.&lt;/strong&gt; The report states plainly that it's a sample of public pages, that figures are indicative, and that nothing here is a guarantee of ranking or traffic.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it looks like now
&lt;/h2&gt;

&lt;p&gt;Type a domain, wait a few seconds, get:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A coverage score out of 100&lt;/li&gt;
&lt;li&gt;A breakdown: no alt / copied from title / too short / actually descriptive&lt;/li&gt;
&lt;li&gt;Two or three real examples from the store, with the actual alt text shown&lt;/li&gt;
&lt;li&gt;Caveats, in plain text, not fine print&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That's it. No email gate, no "create an account to see your score," no modal.&lt;/p&gt;

&lt;p&gt;The email gate is tempting — capturing addresses would be the real byproduct of a free tool. I left it out of v1 for two reasons: it's another compliance surface (consent, storage, actually sending the report, CAN-SPAM), and I'd rather find out whether anyone uses the thing before building a list nobody wants.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'd tell someone building the same thing
&lt;/h2&gt;

&lt;p&gt;The scanning is the easy part. &lt;code&gt;fetch&lt;/code&gt; and a regex over img tags will get you 90% of the way.&lt;/p&gt;

&lt;p&gt;The parts that took real thought:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Verify your data source against reality, not against its documentation.&lt;/strong&gt; &lt;code&gt;products.json&lt;/code&gt; has an &lt;code&gt;alt&lt;/code&gt; field. It's also wrong sometimes. One afternoon of testing saved a report full of false positives.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Treat robots.txt as a hard gate, not a hint.&lt;/strong&gt; It's both the ethical line and the legal one, and it costs you twenty lines.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Distinguish "their problem" from "your problem."&lt;/strong&gt; 429 is your problem. Reporting it as theirs makes the tool useless at exactly the moment it matters.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Put the caveats where people will read them.&lt;/strong&gt; A sampled estimate presented as exact is a lie with extra steps.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The scanner is live at &lt;a href="https://alt-optimizer.vercel.app/scanner" rel="noopener noreferrer"&gt;alt-optimizer.vercel.app/scanner&lt;/a&gt; if you want to point it at a store and see what comes back. It's free, it stores nothing, and it will tell you plainly if it can't scan.&lt;/p&gt;

</description>
      <category>shopify</category>
      <category>webdev</category>
      <category>javascript</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Chrome Kills My Service Worker After 30 Seconds, and That Cost Me Two Weeks</title>
      <dc:creator>seller-mind</dc:creator>
      <pubDate>Tue, 10 Nov 2026 02:21:08 +0000</pubDate>
      <link>https://dev.to/sellermind/chrome-kills-my-service-worker-after-30-seconds-and-that-cost-me-two-weeks-185m</link>
      <guid>https://dev.to/sellermind/chrome-kills-my-service-worker-after-30-seconds-and-that-cost-me-two-weeks-185m</guid>
      <description>&lt;p&gt;I ship a Chrome extension called TaskBoost. It adds quick-create overlays to Linear: hit Ctrl+Shift+L on any page, get a small form, type a title, and the issue lands in your workspace without you opening Linear at all.&lt;/p&gt;

&lt;p&gt;The core of it is one function. The extension injects that function into the current tab with &lt;code&gt;chrome.scripting.executeScript&lt;/code&gt;. The function builds a Shadow-DOM overlay, collects the title, and posts it to Linear's GraphQL API.&lt;/p&gt;

&lt;p&gt;It worked perfectly for me for weeks. Then it didn't, and the reason took two weeks to understand because the bug had a very specific hiding place.&lt;/p&gt;

&lt;h2&gt;
  
  
  What MV3 does to your background script
&lt;/h2&gt;

&lt;p&gt;Manifest V3 has no persistent background page. There's a service worker, and Chrome terminates it when it decides you're idle. The documented idle window is 30 seconds, extended by activity. In practice: open the popup, keep a debugger attached, and the worker stays alive. Leave the tab alone for half a minute and it's gone.&lt;/p&gt;

&lt;p&gt;This is fine if your worker is stateless. Mine wasn't.&lt;/p&gt;

&lt;p&gt;The injected overlay needed three things from the extension: the user's API key, their default team, and their default priority. So I did what seemed obvious with a background script. I kept a config object in a module-level variable and had the overlay ask for it over &lt;code&gt;chrome.runtime.sendMessage&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The failure, when it finally showed up in a console I was watching:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Uncaught (in promise) Error: Could not establish connection.
Receiving end does not exist.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The overlay rendered. The user typed a title. The submit went nowhere. No visible error, because the error lived in a message channel that no longer had a listener on the other end.&lt;/p&gt;

&lt;p&gt;And the pattern was exactly the one that makes a bug hard to catch: it always worked when the worker was freshly woken — right after you clicked the extension icon — and always failed when the worker had been asleep, which is precisely when you use a keyboard shortcut. A shortcut's whole purpose is that you didn't touch the extension first.&lt;/p&gt;

&lt;p&gt;I found it by accident. I left a tab alone for a minute, came back, hit the shortcut, and watched the form accept text and then do nothing. Then I clicked the icon, hit the shortcut again, and it worked. That's the whole diagnosis, and it took four days of not seeing it to get there.&lt;/p&gt;

&lt;h2&gt;
  
  
  Fix one: cache harder, which fixed nothing
&lt;/h2&gt;

&lt;p&gt;My first fix was to cache the config in the worker and rebuild it on wake. That fixed nothing, because the problem was never that the worker didn't know the config. The problem was that the overlay had nothing to talk to.&lt;/p&gt;

&lt;p&gt;My second fix was retry logic: if &lt;code&gt;sendMessage&lt;/code&gt; throws, wait 50ms, retry, up to three times. That made it worse in a subtle way. Three retries at 50ms is 150ms of the user staring at a form that looks frozen, and the failure rate dropped without reaching zero. I had converted a deterministic bug into a flaky one and told myself I was making progress.&lt;/p&gt;

&lt;p&gt;Time spent on those two attempts: roughly a week, spread across version bumps from v1.2.1 to v1.2.8. Each release fixed one symptom. One of them also introduced a new bug — every time the overlay opened I added a &lt;code&gt;keydown&lt;/code&gt; handler and never removed it, so after ten opens a single Escape keypress fired ten handlers. That one is pure carelessness, and it's the kind of thing you find by reading your own diff, not by testing.&lt;/p&gt;

&lt;h2&gt;
  
  
  The fix that worked: delete the conversation
&lt;/h2&gt;

&lt;p&gt;The version that actually worked removed the message channel entirely.&lt;/p&gt;

&lt;p&gt;The injected function now does everything itself. It reads &lt;code&gt;chrome.storage.local&lt;/code&gt; directly — the storage API is available in the injected context, not only in the worker — pulls the key and defaults, and calls Linear's GraphQL endpoint with &lt;code&gt;fetch&lt;/code&gt;. No &lt;code&gt;sendMessage&lt;/code&gt;, no listener, no dependency on the worker being alive. The worker's only remaining job is to call &lt;code&gt;executeScript&lt;/code&gt; and get out of the way.&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="c1"&gt;// service worker, essentially the whole thing&lt;/span&gt;
&lt;span class="n"&gt;chrome&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;commands&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;onCommand&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;command&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;command&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="s1"&gt;'create-issue'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;tab&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;chrome&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;tabs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;query&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;active&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;currentWindow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="p"&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;await&lt;/span&gt; &lt;span class="n"&gt;chrome&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;scripting&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;executeScript&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;target&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;tabId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;tab&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;func&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;openOverlay&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// self-contained, serialized, no closures&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&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;That's it. The worker can die the instant after the &lt;code&gt;await&lt;/code&gt; and nothing breaks, because nothing downstream depends on it.&lt;/p&gt;

&lt;p&gt;The cost is real and I underestimated it: &lt;code&gt;executeScript&lt;/code&gt; serializes the function to text and re-evaluates it in the page. It does not carry your module scope. No imports, no helper functions from another file, no constants defined outside the function body. Everything the overlay needs has to live inside that one function, or be fetched at runtime inside it. My 90-line helper module became a 240-line function with a duplicated HTML escaper and a duplicated date formatter, and every shared utility I add from now on gets written twice or inlined.&lt;/p&gt;

&lt;p&gt;I also deleted the content script. The old architecture injected a content script on &lt;code&gt;&amp;lt;all_urls&amp;gt;&lt;/code&gt; and the popup talked to it with &lt;code&gt;chrome.tabs.sendMessage&lt;/code&gt;. Same "talk to a thing that might not be there" pattern, plus &lt;code&gt;&amp;lt;all_urls&amp;gt;&lt;/code&gt; is what got my store submission flagged. Removing &lt;code&gt;content_scripts&lt;/code&gt; from the manifest and routing everything through &lt;code&gt;executeScript&lt;/code&gt; fixed the reliability problem and the review problem with the same edit.&lt;/p&gt;

&lt;h2&gt;
  
  
  Testing a bug that only exists after you stop looking
&lt;/h2&gt;

&lt;p&gt;The other half of those two weeks went into figuring out how to test this at all. There is no unit test for "the platform killed my process." My first attempt was to close DevTools and click around manually, which is unreliable because I kept accidentally reviving the worker.&lt;/p&gt;

&lt;p&gt;What works, and what's now a manual step before every release:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Load the unpacked extension fresh, and use the shortcut immediately — this is the easy case and it always passed, which is why it was useless as a test.&lt;/li&gt;
&lt;li&gt;Reload the tab, then wait a full 60 seconds without touching the extension. Don't open the popup, don't open DevTools, don't click the icon.&lt;/li&gt;
&lt;li&gt;Use the keyboard shortcut cold.&lt;/li&gt;
&lt;li&gt;Submit the form and confirm the issue appears in Linear.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Step 2 is the whole test. Every bug I shipped in those two weeks would have died at step 3. It takes ninety seconds and I skipped it for eight version bumps because step 1 kept passing and I kept trusting it.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;chrome://serviceworker-internals&lt;/code&gt; will show you the worker being stopped if you want to watch it happen rather than wait for it. There's also a "stop" button in the DevTools Application panel under Service Workers, which is the fastest way to reproduce this class of bug deliberately: stop the worker, then trigger your feature. If it breaks, you have the same architecture problem I had.&lt;/p&gt;

&lt;h2&gt;
  
  
  The numbers
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Rework: two weeks, on and off, from first reproducible failure to a build I trusted.&lt;/li&gt;
&lt;li&gt;Version bumps between the first report and the fix: v1.2.1 through v1.2.8.&lt;/li&gt;
&lt;li&gt;Message round-trips in the overlay path after the fix: 0.&lt;/li&gt;
&lt;li&gt;Latency the retry approach added on every failure: up to 150ms, and it still failed.&lt;/li&gt;
&lt;li&gt;Package after the rewrite: 18 files, 58.2 KB, no content scripts, host permissions narrowed to Linear's domains.&lt;/li&gt;
&lt;li&gt;Severity in practice: every user whose first action after a pause was the keyboard shortcut.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The trade-off I'd make again
&lt;/h2&gt;

&lt;p&gt;I gave up a warm, stateful background worker for a stateless one that may already be dead when my code runs. Concretely: every overlay open now does a storage read instead of hitting an in-memory object, and I maintain a self-contained 240-line injected function instead of clean modules.&lt;/p&gt;

&lt;p&gt;In exchange, the extension makes no lifecycle assumptions at all. There's no "worker might be asleep" branch anywhere in my code, because there's no conversation left to lose. The bug class is gone rather than patched.&lt;/p&gt;

&lt;p&gt;The uncomfortable part is the week I spent adding retries to a channel I should have deleted on day one. I was preserving an architecture because it existed, not because it was load-bearing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Question
&lt;/h2&gt;

&lt;p&gt;If you maintain an MV3 extension: where's your line between what lives in the service worker and what gets pushed into the injected context? I've converged on "the worker only injects and never answers questions," and I want to know whether that survives contact with the two features I keep postponing — OAuth token refresh and scheduled sync. Both seem to need a background process that owns state — so where would you put them, and what did it cost you the first time you got it wrong?&lt;/p&gt;

</description>
      <category>chrome</category>
      <category>javascript</category>
      <category>webdev</category>
      <category>debugging</category>
    </item>
    <item>
      <title>I Published 100 Articles in 13 Days. Total Reactions: 0.</title>
      <dc:creator>seller-mind</dc:creator>
      <pubDate>Sun, 08 Nov 2026 08:20:57 +0000</pubDate>
      <link>https://dev.to/sellermind/i-published-100-articles-in-13-days-total-reactions-0-4cad</link>
      <guid>https://dev.to/sellermind/i-published-100-articles-in-13-days-total-reactions-0-4cad</guid>
      <description>&lt;p&gt;I published 100 articles in 13 days. Here is what it produced:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Articles published&lt;/td&gt;
&lt;td&gt;100&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Days&lt;/td&gt;
&lt;td&gt;13&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Reactions&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;0&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Comments&lt;/td&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Total page views&lt;/td&gt;
&lt;td&gt;820&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Median views per article&lt;/td&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Articles with zero views&lt;/td&gt;
&lt;td&gt;43&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Best single article&lt;/td&gt;
&lt;td&gt;40 views&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Not a rounding error. Not a slow week. One hundred pieces of writing, thirteen days, zero reactions, and 43 of them were opened by literally nobody.&lt;/p&gt;

&lt;p&gt;I want to write this down properly, because I think the mistake I made is a common one and it is easy to make quietly. Nobody tells you you're doing it wrong. The dashboard just stays flat and you keep publishing.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I was actually optimizing for
&lt;/h2&gt;

&lt;p&gt;I run four small products as a solo developer: a Next.js SaaS starter, a podcast metadata tool, an Etsy fee calculator, and a Shopify order-tracking app. My plan was simple. Each product has a set of keywords it should rank for. Dev.to has decent domain authority. So: write one article per product per day, rotate through four content angles, publish on a schedule, and let the volume compound.&lt;/p&gt;

&lt;p&gt;Eight articles a day. Every day. For thirteen days.&lt;/p&gt;

&lt;p&gt;On paper it looked like a content strategy. In practice it was a keyword coverage exercise, and I mistook coverage for usefulness.&lt;/p&gt;

&lt;p&gt;The tell should have been obvious earlier: I was writing the same article five times and calling it five articles. When I go back through the titles by keyword, it breaks down like this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;26 articles about Shopify order tracking / WISMO&lt;/li&gt;
&lt;li&gt;26 articles about Etsy fees and margins&lt;/li&gt;
&lt;li&gt;24 articles about podcast metadata&lt;/li&gt;
&lt;li&gt;24 articles about Next.js and edge deployment&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Four topics. One hundred articles. That's twenty-five variations on each idea, published within two weeks, on the same account.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why none of it worked
&lt;/h2&gt;

&lt;p&gt;I've spent a few days pulling the data apart. Four things stand out.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. The titles were all the same sentence
&lt;/h3&gt;

&lt;p&gt;Twenty-five of the hundred started with "How I" or "Why I". Another twenty-five followed the "Building X: Taming Y" pattern. Four were "5 Best Practices" style listicles.&lt;/p&gt;

&lt;p&gt;If you're scrolling a feed and you see "How I Built a Custom Shopify Tracking Widget" followed by "How I Built a Branded Shopify Tracking Widget From Scratch" followed by "Building a Custom Shopify Tracking Widget to Tame Post-Purchase Chaos" — you don't read any of them. You don't even register them as separate posts. Your brain files all three under "the same article, three times."&lt;/p&gt;

&lt;p&gt;A title isn't a container for keywords. It's a promise about what the reader will learn. "How I built X" promises almost nothing, because everyone knows roughly how it went: you had an idea, you wrote some code, it worked out. There's no tension in it.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Every article was the same length, and it was the wrong length
&lt;/h3&gt;

&lt;p&gt;The platform clocked 85 of the 100 articles at exactly 4 minutes. Five more at 3 minutes, ten at 5 minutes.&lt;/p&gt;

&lt;p&gt;4 minutes is roughly 800-900 words. That's enough space to describe a problem and describe a solution. It is not enough space to show the actual engineering. There's no room for the failing test output, the diff that made it worse, the version of the fix I threw away. Without those, what's left is a summary of work — and summaries are what documentation is for.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. I was writing for a search engine that wasn't reading
&lt;/h3&gt;

&lt;p&gt;The whole bet was: publish enough keyword-shaped pages, and search traffic arrives. But a page with zero engagement doesn't get promoted by the platform, and a page with zero engagement also doesn't earn links, and without links it doesn't rank either. The volume strategy needs at least a few articles to break out and lift the rest. None broke out. So the entire pyramid sat on nothing.&lt;/p&gt;

&lt;p&gt;Zero reactions across 100 articles is the platform telling me, politely and unambiguously, that it did not consider any of them worth distributing.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Nobody wants the fifth version of anything
&lt;/h3&gt;

&lt;p&gt;This is the one that stings. Even if each article had been well-written, the fifth article about Etsy fee calculation published in the same week is not a new resource. It's noise. A reader who cared about Etsy fees would have read the first one. A reader who didn't care wouldn't read any of them.&lt;/p&gt;

&lt;p&gt;I was competing with myself, and I won every time, and it was worth nothing.&lt;/p&gt;

&lt;h2&gt;
  
  
  The actual mistake
&lt;/h2&gt;

&lt;p&gt;Here's the part I had to sit with for a while.&lt;/p&gt;

&lt;p&gt;I wasn't writing articles. I was manufacturing ad slots and filling them with prose.&lt;/p&gt;

&lt;p&gt;Every piece had the same shape: here's my product's problem space, here's roughly what I built, here's the link. The information was true. The code was real. But the purpose was placement, not explanation. And readers can smell that instantly, even if they can't articulate it. Nobody finishes an article and thinks "that was a well-targeted keyword" — they think "that taught me something" or they leave.&lt;/p&gt;

&lt;p&gt;The other thing I got wrong: I assumed volume buys learning. It doesn't. Writing a hundred shallow articles taught me less about my own products than writing one deep one would have, because the shallow format forces you to stay at the level of summary. You never have to explain the thing that actually confused you, so you never work it out.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'm doing instead
&lt;/h2&gt;

&lt;p&gt;I've stopped the daily schedule. The plan now is three articles a week, and the bar for each one is that it has to contain something a reader couldn't get from the docs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A real number from my own system — not a benchmark, an actual measurement&lt;/li&gt;
&lt;li&gt;A failure, with the error message and what it cost me&lt;/li&gt;
&lt;li&gt;A trade-off I had to make, and what I gave up&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And the title has to describe a specific tension, not a category. "I published 100 articles and got zero reactions" is a title. "Content marketing best practices for indie developers" is not.&lt;/p&gt;

&lt;p&gt;If that sounds like obvious advice, it is. I knew all of it thirteen days ago. What I didn't have was the discipline to apply it when the alternative was a publishing schedule that felt productive.&lt;/p&gt;

&lt;h2&gt;
  
  
  A question
&lt;/h2&gt;

&lt;p&gt;If you've published at volume and watched it go nowhere, I'd genuinely like to know what the turning point was. Did you cut frequency, change format, change platform, or just keep going until something caught?&lt;/p&gt;

&lt;p&gt;And if you're currently running a daily publishing schedule with flat engagement — how many articles in are you, and what would make you stop?&lt;/p&gt;

&lt;p&gt;I'm not asking rhetorically. I'm at the beginning of the rebuild and I'd rather learn from someone who's further along than find out the same way again.&lt;/p&gt;

</description>
      <category>meta</category>
      <category>writing</category>
      <category>discuss</category>
      <category>career</category>
    </item>
    <item>
      <title>How I Built a Custom Shopify Tracking Widget to Tame WISMO</title>
      <dc:creator>seller-mind</dc:creator>
      <pubDate>Sun, 08 Nov 2026 02:30:34 +0000</pubDate>
      <link>https://dev.to/sellermind/how-i-built-a-custom-shopify-tracking-widget-to-tame-wismo-3emk</link>
      <guid>https://dev.to/sellermind/how-i-built-a-custom-shopify-tracking-widget-to-tame-wismo-3emk</guid>
      <description>&lt;p&gt;When I first started helping a friend manage their Shopify store, I thought the hard part was getting the initial sales. I was wrong. The real headache started the moment a customer clicked "checkout."&lt;/p&gt;

&lt;p&gt;Within days, my friend’s inbox was flooded with a specific type of email: "Where is my order?" (WISMO). Customers were anxious, support tickets were piling up, and we were spending hours copy-pasting tracking numbers from carrier websites. The default Shopify post-purchase experience just wasn't cutting it. It felt like a dead end.&lt;/p&gt;

&lt;p&gt;So I decided to build something.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Hidden Cost of the Post-Purchase Void
&lt;/h3&gt;

&lt;p&gt;It’s easy to focus entirely on conversion rates and checkout optimization, but the post-purchase experience is where customer loyalty is actually forged. When a customer buys something, they enter a state of anticipation. If the only communication they get is a generic, plain-text email with a link to a third-party carrier site, you lose control of the narrative.&lt;/p&gt;

&lt;p&gt;Why does this matter? Because WISMO tickets are incredibly expensive. Not just in direct support costs, but in opportunity cost. Every hour spent answering "where is my package" is an hour not spent improving the product or marketing. Furthermore, if a package is delayed and the customer has no proactive updates, they don't blame the carrier; they blame your store.&lt;/p&gt;

&lt;p&gt;Ignoring the post-purchase experience leads to higher churn, negative reviews, and a support team that is constantly firefighting instead of helping. We needed a way to keep the customer engaged, informed, and on our own domain, rather than bouncing them to a confusing logistics portal.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Technical Approach: App Embeds and Webhooks
&lt;/h3&gt;

&lt;p&gt;My initial instinct was to just hack together a Liquid template and inject it into the theme. But anyone who has worked with Shopify themes knows that modifying core theme files is a recipe for disaster when updates roll out. I needed a solution that was decoupled from the theme code.&lt;/p&gt;

&lt;p&gt;This led me to Shopify App Embed blocks. They allow you to inject custom UI elements into specific pages (like the order status page) without touching the theme's underlying code.&lt;/p&gt;

&lt;p&gt;The architecture needed two main components: a backend to listen for fulfillment events and securely store tracking data, and a frontend widget to render that data beautifully.&lt;/p&gt;

&lt;h4&gt;
  
  
  1. Securing Fulfillment Data with Webhooks
&lt;/h4&gt;

&lt;p&gt;First, we need to know when an order ships. Instead of polling carrier APIs constantly, we listen to Shopify's &lt;code&gt;orders/fulfilled&lt;/code&gt; webhook. Security is paramount here, so we must verify the HMAC signature to ensure the request actually came from Shopify.&lt;/p&gt;

&lt;p&gt;Here is the Node.js/Express handler I wrote to process these webhooks:&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;const&lt;/span&gt; &lt;span class="nx"&gt;crypto&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;crypto&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;express&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;express&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;express&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;verifyShopifyWebhook&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;rawBody&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;hmacHeader&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;secret&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;hash&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;crypto&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createHmac&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;sha256&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;secret&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;update&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;rawBody&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;utf8&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="nf"&gt;digest&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;base64&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;hash&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nx"&gt;hmacHeader&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// Handle fulfillment update webhook&lt;/span&gt;
&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/webhooks/orders/fulfilled&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;express&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;raw&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;application/json&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;}),&lt;/span&gt;
  &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;verified&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;verifyShopifyWebhook&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
      &lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;body&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;x-shopify-hmac-sha256&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
      &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&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;SHOPIFY_WEBHOOK_SECRET&lt;/span&gt;
    &lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;verified&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;status&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;401&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Invalid&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;order&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;body&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toString&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;utf8&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;

    &lt;span class="c1"&gt;// Store fulfillment data for tracking lookup&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;db&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;fulfillments&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;upsert&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
      &lt;span class="na"&gt;orderId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;order&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;trackingNumber&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;order&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;fulfillments&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]?.&lt;/span&gt;&lt;span class="nx"&gt;tracking_number&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;carrier&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;order&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;fulfillments&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]?.&lt;/span&gt;&lt;span class="nx"&gt;tracking_company&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;shipped&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="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;status&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;OK&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="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;By verifying the HMAC and immediately upserting the tracking number and carrier into our database, we ensure that when the customer visits their order status page, we already have the data ready to serve. This avoids slow, real-time API calls to carriers during page load.&lt;/p&gt;

&lt;h4&gt;
  
  
  2. Rendering the Widget via App Embeds
&lt;/h4&gt;

&lt;p&gt;On the frontend, the goal was to create a lightweight, customizable widget that matches the store's theme. Using the Shopify App Embed block, we can inject the widget directly into the order status page.&lt;/p&gt;

&lt;p&gt;Here is the Liquid and JavaScript snippet that powers the frontend embed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;{% comment %}
  Renders shipment tracking widget on order status pages
{% endcomment %}

&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"parcelglance-widget"&lt;/span&gt; 
     &lt;span class="na"&gt;data-order-id=&lt;/span&gt;&lt;span class="s"&gt;"{{ order.id }}"&lt;/span&gt;
     &lt;span class="na"&gt;data-order-number=&lt;/span&gt;&lt;span class="s"&gt;"{{ order.name }}"&lt;/span&gt;
     &lt;span class="na"&gt;data-store-name=&lt;/span&gt;&lt;span class="s"&gt;"{{ shop.name }}"&lt;/span&gt;
     &lt;span class="na"&gt;style=&lt;/span&gt;&lt;span class="s"&gt;"min-height: 200px;"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;script&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;script&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createElement&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;script&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nx"&gt;script&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;src&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;https://cdn.parcelglance.com/widget.js&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nx"&gt;script&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nx"&gt;script&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;onload&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;Parcelglance&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;init&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
      &lt;span class="na"&gt;orderId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;parcelglance-widget&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;dataset&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;orderId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;orderNumber&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;parcelglance-widget&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;dataset&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;orderNumber&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;storeName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;parcelglance-widget&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;dataset&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;storeName&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;container&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;parcelglance-widget&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="p"&gt;};&lt;/span&gt;
  &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;head&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;appendChild&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;script&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;})();&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Notice how we pass the order details via &lt;code&gt;data-&lt;/code&gt; attributes. This keeps the Liquid logic clean and allows the JavaScript to initialize the widget asynchronously. The &lt;code&gt;async = true&lt;/code&gt; flag ensures that loading our tracking script doesn't block the rendering of the rest of the order status page, keeping the Core Web Vitals healthy.&lt;/p&gt;

&lt;h3&gt;
  
  
  Practical Results and Lessons Learned
&lt;/h3&gt;

&lt;p&gt;Moving to this App Embed architecture changed everything. Because the widget is injected via the theme editor's app embed section, store owners can toggle it on or off without breaking their theme layout. If they change their Shopify theme, the tracking widget simply carries over.&lt;/p&gt;

&lt;p&gt;What surprised me most was the impact on customer perception. By keeping the tracking experience on the store's domain and styling it to match their brand, the post-purchase phase felt like a continuation of the shopping experience rather than an abrupt handoff to a logistics company. For example, stores saw a noticeable drop in WISMO emails simply because customers felt informed and could easily check their status without leaving the site.&lt;/p&gt;

&lt;p&gt;If I were to change one thing about my initial build, it would be how I handled carrier API rate limits. Early on, I tried to fetch live tracking data directly from the carrier when the widget loaded. This was a mistake. Carriers have strict rate limits, and it added unnecessary latency. Shifting to the webhook-driven caching approach (as shown in the Node.js example) was a much better architectural decision. It made the widget load instantly and kept us well within API limits.&lt;/p&gt;

&lt;h3&gt;
  
  
  Wrapping Up
&lt;/h3&gt;

&lt;p&gt;Building a post-purchase experience doesn't have to be a complex, theme-breaking endeavor. By leveraging Shopify App Embeds and secure webhooks, you can create a seamless, branded tracking experience that keeps customers happy and support tickets low.&lt;/p&gt;

&lt;p&gt;If you're looking to implement this without building it from scratch, I've packaged this exact approach into a free tool. You can check out the Parcelglance Shipment Tracking Widget at &lt;a href="https://parcelglance.com" rel="noopener noreferrer"&gt;https://parcelglance.com&lt;/a&gt; to easily add a branded tracking page to your Shopify store and start reducing those WISMO tickets.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Full disclosure: I'm the developer of Parcelglance. I built this because I needed it myself.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>shopify</category>
      <category>webdev</category>
      <category>javascript</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
