<?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: afunnyrat</title>
    <description>The latest articles on DEV Community by afunnyrat (@afunnyrat).</description>
    <link>https://dev.to/afunnyrat</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%2F4189552%2Ff877a7f3-81f4-4c39-afeb-bc1495800df8.jpg</url>
      <title>DEV Community: afunnyrat</title>
      <link>https://dev.to/afunnyrat</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/afunnyrat"/>
    <language>en</language>
    <item>
      <title>I built a site where you rate everything. Six silent failures cost me the most.</title>
      <dc:creator>afunnyrat</dc:creator>
      <pubDate>Fri, 16 Oct 2026 22:47:36 +0000</pubDate>
      <link>https://dev.to/afunnyrat/i-built-a-site-where-you-rate-everything-six-silent-failures-cost-me-the-most-4no1</link>
      <guid>https://dev.to/afunnyrat/i-built-a-site-where-you-rate-everything-six-silent-failures-cost-me-the-most-4no1</guid>
      <description>&lt;p&gt;I built &lt;a href="https://tier.fcthq.com" rel="noopener noreferrer"&gt;TIER EVERYTHING&lt;/a&gt; — a site where you drag anything (dishes, mobs, languages, cities) into tier rows from &lt;strong&gt;GOATED&lt;/strong&gt; down to &lt;strong&gt;Cooked&lt;/strong&gt;, and then argue about each item in its own thread. 80 boards, ~830 items, real photos, no account needed to vote.&lt;/p&gt;

&lt;p&gt;Most of the interesting work wasn't building features. It was chasing bugs that &lt;strong&gt;didn't throw&lt;/strong&gt;. Six of them, in rough order of how long they hid.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. A link preview that lied about its own size
&lt;/h2&gt;

&lt;p&gt;Every board page emitted:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;property=&lt;/span&gt;&lt;span class="s"&gt;"og:image"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"https://tierhq-api.example.workers.dev/image/abc.webp"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;property=&lt;/span&gt;&lt;span class="s"&gt;"og:image:width"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"1200"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;property=&lt;/span&gt;&lt;span class="s"&gt;"og:image:height"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"630"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The declared size was 1200×630. The actual file was a 512×288 &lt;strong&gt;WebP&lt;/strong&gt;, served from a &lt;em&gt;different origin&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Two separate lies in one tag. Facebook, LinkedIn and Discord won't render a WebP link preview, and several crawlers refuse a cross-origin image outright. So every link anyone shared rendered a blank card — and nothing in my test suite noticed, because &lt;strong&gt;the markup was syntactically valid&lt;/strong&gt;. The tag was well-formed. It was just wrong.&lt;/p&gt;

&lt;p&gt;The fix was to generate real cards: 80 JPEGs at exactly 1200×630, same-origin, built with Pillow — a blurred cover crop, a gradient scrim, and the board name in the board's own tier colour.&lt;/p&gt;

&lt;p&gt;The lesson I keep re-learning: &lt;em&gt;a test that asserts a tag exists is not a test that the tag is true.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;So the new assertion reads the &lt;strong&gt;actual bytes&lt;/strong&gt; of the file and compares them to the declared dimensions:&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;function&lt;/span&gt; &lt;span class="nf"&gt;imageSize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;buf&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// JPEG: walk to the SOF marker. PNG: read IHDR.&lt;/span&gt;
  &lt;span class="c1"&gt;// Returns { w, h } or null.&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;res&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;ogImage&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;sz&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;imageSize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;Buffer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;from&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;await&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;arrayBuffer&lt;/span&gt;&lt;span class="p"&gt;()));&lt;/span&gt;
&lt;span class="nf"&gt;check&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;og:image size claim matches the actual file&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;sz&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;w&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nx"&gt;claimW&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;sz&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;h&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nx"&gt;claimH&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That one assertion would have caught the bug on day one.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. &lt;code&gt;run_worker_first&lt;/code&gt; matches paths, not prefixes
&lt;/h2&gt;

&lt;p&gt;I'm on Cloudflare Workers. My Worker rewrites &lt;code&gt;&amp;lt;title&amp;gt;&lt;/code&gt;, description, canonical and OG tags per route, so those routes have to hit the Worker &lt;em&gt;before&lt;/em&gt; the static asset handler:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight toml"&gt;&lt;code&gt;&lt;span class="nn"&gt;[assets]&lt;/span&gt;
&lt;span class="py"&gt;run_worker_first&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
  &lt;span class="s"&gt;"/sitemap.xml"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="s"&gt;"/robots.txt"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="s"&gt;"/view"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="s"&gt;"/item"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="s"&gt;"/u"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="s"&gt;"/topic"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="s"&gt;"/share/*"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;   &lt;span class="c"&gt;# &amp;lt;- a glob, and this is the whole point&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;/share/abc.jpg&lt;/code&gt; returned a 404. Because those list entries are &lt;strong&gt;exact paths&lt;/strong&gt;, not prefixes — &lt;code&gt;/share&lt;/code&gt; matches &lt;code&gt;/share&lt;/code&gt; and nothing else. It needed to be &lt;code&gt;/share/*&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The nasty part: it failed &lt;em&gt;silently&lt;/em&gt;. The asset handler answered first, the Worker never ran, and the page still returned &lt;strong&gt;HTTP 200&lt;/strong&gt;. No error, no log, no exception. The route simply didn't execute.&lt;/p&gt;

&lt;p&gt;If you're debugging a Worker that appears not to run, check &lt;code&gt;run_worker_first&lt;/code&gt; before you check your code.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. A fallback that quietly became the thing it was replacing
&lt;/h2&gt;

&lt;p&gt;Same Worker, same file. When a share card was missing I wanted to fall back to a generic one:&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;// Wrong&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;fb&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&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;ASSETS&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Request&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;OG_CARD&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt; &lt;span class="c1"&gt;// absolute URL&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;fb&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ok&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="c1"&gt;// returns the 404 we were trying to avoid&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;ASSETS.fetch&lt;/code&gt; with an &lt;strong&gt;absolute&lt;/strong&gt; URL doesn't resolve against the incoming request's host and port, so it returns &lt;code&gt;not ok&lt;/code&gt; — and my "graceful fallback" cheerfully returned the 404 it existed to prevent.&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;// Right — resolve relative to the incoming request&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;fb&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&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;ASSETS&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Request&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;URL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/assets/og.png&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;method&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;GET&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A fallback path that is itself broken is worse than no fallback, because it &lt;em&gt;looks&lt;/em&gt; handled.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Headless Chrome reports &lt;code&gt;prefers-reduced-motion: reduce&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;This is my favourite, because it's a bug in my &lt;strong&gt;testing&lt;/strong&gt;, and it produced a false green.&lt;/p&gt;

&lt;p&gt;I added an animation layer — a score that rolls, a ring that expands when you vote and contracts when you take it back. Every animation is gated:&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;function&lt;/span&gt; &lt;span class="nf"&gt;dxMotion&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="o"&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;matchMedia&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;(prefers-reduced-motion: reduce)&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;matches&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&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="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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then I ran my four browser fixtures. &lt;strong&gt;All green.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Except: headless Chrome reports &lt;code&gt;prefers-reduced-motion: reduce&lt;/code&gt;. So &lt;code&gt;dxMotion()&lt;/code&gt; returned &lt;code&gt;false&lt;/code&gt; on every run, and &lt;strong&gt;not one line of the new code executed&lt;/strong&gt;. My fixtures had proven the layer was &lt;em&gt;inert&lt;/em&gt;. They had proven nothing about whether it &lt;em&gt;worked&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;I only caught it because I asked what the fixture was actually exercising. The fix is one call before navigating:&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;await&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;Emulation.setEmulatedMedia&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="na"&gt;media&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;screen&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;features&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;prefers-reduced-motion&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;no-preference&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then assert the motion is genuinely running, not merely present:&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;running&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;getAnimations&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;animationName&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nf"&gt;startsWith&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;dx-&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)).&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;"The node exists" and "the animation is playing" are different claims.&lt;/strong&gt; Only one of them is testable by checking the DOM.&lt;/p&gt;

&lt;p&gt;There's a sibling trap: one of my assertions passed &lt;em&gt;trivially&lt;/em&gt;. I wanted to prove the entrance stagger doesn't re-fire on re-render — but a single vote doesn't trigger a re-render, so the assertion was vacuously true. A green check that couldn't have failed is not evidence. I had to force a re-render (click a filter chip) before asserting.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Anonymous opinions, accountable content
&lt;/h2&gt;

&lt;p&gt;I wanted voting to cost nothing. No signup, no email, just an opinion.&lt;/p&gt;

&lt;p&gt;But "anonymous" and "unmoderated" aren't the same thing, and I didn't want to conflate them. So the site draws a line:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Votes and ratings are opinions&lt;/strong&gt; → anonymous. A browser-local voter id, plus IP rate limiting server-side.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Content is content&lt;/strong&gt; → still needs an account. Boards, comments, covers. Because content has an owner, and an owner gives me a cleanup path.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One deliberate exception: board &lt;em&gt;likes&lt;/em&gt; stay behind the wall. It's a bare counter with no per-voter dedupe, so opening it would just be a score-inflation hole.&lt;/p&gt;

&lt;p&gt;For comments I wanted anonymous posting &lt;em&gt;without&lt;/em&gt; the usual disaster, so there are three guardrails:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A per-voter, per-board flood cap (5/hour), with a coarse per-IP backstop.&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;15-minute self-delete window&lt;/strong&gt;, decided server-side from the stored voter id — never from what the page claims.&lt;/li&gt;
&lt;li&gt;An admin override, and cascade deletion of replies when a parent goes (breadth-first, with a node cap so a pathological thread can't blow the request budget).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The subtle bug here was mine again: my fixture asserted the POST returned &lt;code&gt;200&lt;/code&gt;. It returns &lt;code&gt;201&lt;/code&gt;. So five &lt;em&gt;successful&lt;/em&gt; posts were all counted as rejections, and the flood cap looked like it was firing on the first comment.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. &lt;code&gt;content-visibility&lt;/code&gt; vs. the DOM I thought I had
&lt;/h2&gt;

&lt;p&gt;A directory page with 80 boards rendered all 80 cards. Fine for 80. Not fine for the direction it was heading.&lt;/p&gt;

&lt;p&gt;I didn't want to write a virtualiser — the complexity rarely pays for itself at this scale. Instead:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.card&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="py"&gt;content-visibility&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;auto&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="py"&gt;contain-intrinsic-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;auto&lt;/span&gt; &lt;span class="m"&gt;250px&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;Layout and paint get skipped for off-screen cards while the DOM stays complete, so search, find-in-page and my fixtures all still work.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'd tell you
&lt;/h2&gt;

&lt;p&gt;The pattern across all six: &lt;strong&gt;the failure mode was never an exception.&lt;/strong&gt; It was a well-formed tag pointing at the wrong file, a 200 from a route that didn't run, a green test that exercised nothing, a fallback that returned the error it was meant to hide.&lt;/p&gt;

&lt;p&gt;If you take one thing: when something "works", ask what your test would have looked like if it had been broken. If the answer is "identical", you don't have a test.&lt;/p&gt;




&lt;p&gt;I'd genuinely like to know where the tiers are wrong. &lt;strong&gt;&lt;a href="https://tier.fcthq.com" rel="noopener noreferrer"&gt;tier.fcthq.com&lt;/a&gt;&lt;/strong&gt; — no account needed, just drag something and tell me my taste is bad.&lt;/p&gt;

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