<?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: FuryCow</title>
    <description>The latest articles on DEV Community by FuryCow (@furycow).</description>
    <link>https://dev.to/furycow</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%2F4217749%2F36ddb414-2b8c-4051-a658-5441beab5bec.png</url>
      <title>DEV Community: FuryCow</title>
      <link>https://dev.to/furycow</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/furycow"/>
    <language>en</language>
    <item>
      <title>Nothing was broken. Nothing was watching.</title>
      <dc:creator>FuryCow</dc:creator>
      <pubDate>Thu, 05 Nov 2026 18:00:21 +0000</pubDate>
      <link>https://dev.to/furycow/nothing-was-broken-nothing-was-watching-2acb</link>
      <guid>https://dev.to/furycow/nothing-was-broken-nothing-was-watching-2acb</guid>
      <description>&lt;p&gt;I built a pipeline that finds open PRs in OSS repos, runs an AI review on them, and drafts a cold email to the maintainer. Sending stays manual - I press the button.&lt;/p&gt;

&lt;p&gt;It worked. Then it didn't, and the logs were empty.&lt;/p&gt;

&lt;h3&gt;
  
  
  The pipeline
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;scheduler (daily)
  → search GitHub for PRs waiting for review
  → filter: repo size, activity, author is human
  → dedup: one email per person, ever
  → score: "is this maintainer drowning?"
  → add target + run review
  → poll review → build draft
  → [human reads it, presses Send]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The last step is deliberate. More on that later.&lt;/p&gt;

&lt;h3&gt;
  
  
  Four loud bugs
&lt;/h3&gt;

&lt;p&gt;Getting this to run end-to-end cost four bugs in a row. Each looked like a one-liner. Each only appeared after I fixed the previous one.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. The job that didn't exist.&lt;/strong&gt; &lt;code&gt;NameError: uninitialized constant OutreachReviewJob&lt;/code&gt;. The Que worker loads its job list from an entrypoint script baked into the Docker image, not from the repo. I added the file, forgot the list, and the image didn't know the class existed. Fix: add to the entrypoint, rebuild the image.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. The container that restarted forever.&lt;/strong&gt; &lt;code&gt;exec /usr/local/bin/docker-entrypoint-que.sh: no such file or directory&lt;/code&gt;. The file was there. The problem: I copied it from Windows, and it arrived with CRLF line endings. CRLF breaks the shebang, so the kernel can't find the interpreter. Fix: &lt;code&gt;.gitattributes&lt;/code&gt; with &lt;code&gt;*.sh text eol=lf&lt;/code&gt;, plus converting the file itself.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. The API that changed.&lt;/strong&gt; &lt;code&gt;ArgumentError: wrong number of arguments (given 3, expected 1..2)&lt;/code&gt;. Que 2.x moved delayed jobs from kwargs to &lt;code&gt;job_options: { run_at: ... }&lt;/code&gt;. My code was written against the old API.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. The config that drifted.&lt;/strong&gt; One container had a required setting; the other - the one that actually ran the work - didn't. Same image, different environment. Fix: make the two environments match, and add a startup check so a missing setting fails loudly instead of at the first job.&lt;/p&gt;

&lt;p&gt;Four bugs, four different layers: image build, file encoding, library version, container config. None of them were about the feature I was building.&lt;/p&gt;

&lt;h3&gt;
  
  
  The fifth bug was silent
&lt;/h3&gt;

&lt;p&gt;After those four fixes, discovery ran. It found PRs, added them, started reviews. The reviews completed - I could see them in the database, findings and all.&lt;/p&gt;

&lt;p&gt;But in the outreach panel, every target sat in &lt;code&gt;reviewing&lt;/code&gt;. Forever. No errors in the worker logs. No failed jobs. Nothing.&lt;/p&gt;

&lt;p&gt;Here's why. There are two jobs in the chain:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CodeReviewJob      → runs the LLM review
OutreachReviewJob  → waits for it, then builds the email draft
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The panel's "Review" button did this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="n"&gt;target&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="ss"&gt;status: &lt;/span&gt;&lt;span class="s1"&gt;'reviewing'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="no"&gt;OutreachReviewJob&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;enqueue&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="nf"&gt;id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;   &lt;span class="c1"&gt;# the poller&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;My discovery service did this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="no"&gt;OutreachService&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run_review!&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="c1"&gt;# starts the review, no poller&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;run_review!&lt;/code&gt; creates the review and enqueues &lt;code&gt;CodeReviewJob&lt;/code&gt;. It does not enqueue the poller. So the review ran, finished, and wrote its results - and then nothing happened, because the only thing that would have built the draft was never scheduled.&lt;/p&gt;

&lt;p&gt;Nothing was broken. Nothing was watching.&lt;/p&gt;

&lt;p&gt;The fix was one line - enqueue the poller instead of calling the service directly. But finding it took longer than any of the four loud bugs, because there was no error to grep for. The system was in a state that looked like "in progress" and stayed there.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I took from it:&lt;/strong&gt; when you add a second path to an operation that already exists, copy the whole chain, not the obvious first step. The button and the service were doing "the same thing" - except one of them also scheduled the follow-up. I read the service method, saw it started a review, and assumed that was the whole operation. It wasn't.&lt;/p&gt;

&lt;p&gt;I also added a recovery task:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="n"&gt;rake&lt;/span&gt; &lt;span class="n"&gt;outreach&lt;/span&gt;&lt;span class="ss"&gt;:resume_stuck&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It finds targets stuck in &lt;code&gt;reviewing&lt;/code&gt; and re-enqueues the poller. Idempotent: if the review is done, it builds the draft; if not, it keeps polling. Ten minutes to write, and it would have saved an hour of staring at logs.&lt;/p&gt;

&lt;h3&gt;
  
  
  Two things GitHub's API taught me
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;stars:&lt;/code&gt; doesn't work in issue search.&lt;/strong&gt; I wanted to filter PRs by repo popularity inside the search query, to avoid fetching repo info for every result. The query returned zero results. Not an error - zero. The &lt;code&gt;stars:&lt;/code&gt; qualifier only works in repository search, not issue search. It fails silently.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GraphQL batches.&lt;/strong&gt; Since I couldn't filter by stars in the query, I needed repo info per result - about 250 repos. REST would be 250 requests, which is how I'd been hitting GitHub's secondary rate limit (an anti-abuse limit on request density, separate from the quota). GraphQL lets you alias 40 repositories into one query:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight graphql"&gt;&lt;code&gt;&lt;span class="k"&gt;query&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="n"&gt;r0&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;repository&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;owner&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"acme"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"widget"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="n"&gt;stargazerCount&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;isArchived&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;pushedAt&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="n"&gt;pullRequests&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;states&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;OPEN&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;totalCount&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="n"&gt;r1&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;repository&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;owner&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"acme"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"gadget"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;250 requests became 7. The discovery run went from over an hour to a few minutes.&lt;/p&gt;

&lt;h3&gt;
  
  
  The honest part: AI review is wrong about 20% of the time
&lt;/h3&gt;

&lt;p&gt;I check every finding by hand before sending. On the first batch of 9 drafts, 2 contained a false finding:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"these annotations are evaluated at definition time" - in a file that had a future-import at the top that changes exactly that. The model didn't notice.&lt;/li&gt;
&lt;li&gt;"this query adds a filter" - the filter was already there in the association.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Both were plausible. Both were wrong. That's the failure mode: not nonsense, but confident and specific.&lt;/p&gt;

&lt;p&gt;So the pipeline stops before sending. It drafts, I read, I press Send. The automation saves the boring 90% - finding PRs, fetching diffs, running reviews, formatting emails - and leaves the judgment call to a human.&lt;/p&gt;

&lt;p&gt;I also had to fix drafts cutting findings mid-sentence. The limit was 220 characters; real findings run 150-700. I raised it to 600, then to 2000, and made truncation prefer sentence boundaries. Any limit you set on LLM output will eventually cut the most interesting part.&lt;/p&gt;

&lt;h3&gt;
  
  
  What I'd tell someone building this
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Log the "nothing happened" case.&lt;/strong&gt; Every silent failure I've hit was a missing log line, not a missing check. If a job finishes without doing anything, say so.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Write the recovery task before you need it.&lt;/strong&gt; &lt;code&gt;resume_stuck&lt;/code&gt; took ten minutes and turned a mystery into a one-command fix.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Two paths to one operation is a bug waiting to happen.&lt;/strong&gt; Extract the shared chain into one function, or accept that they will drift.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keep the human where the cost of being wrong is reputation.&lt;/strong&gt; My false positive rate is 20%. That's fine when a human reads the output. It's not fine when the output goes to a stranger's inbox.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The tool is &lt;a href="https://code-critic.com" rel="noopener noreferrer"&gt;CodeCritic&lt;/a&gt; - an AI code review tool. The outreach pipeline is internal, but the review Action is public: &lt;a href="https://github.com/CodeCritic-Reviews/review-action" rel="noopener noreferrer"&gt;review-action&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you've built something with a silent failure mode, I'd like to hear how you found it. Those are the bugs that don't teach you anything until you've already lost the afternoon.&lt;/p&gt;

</description>
      <category>debugging</category>
      <category>devops</category>
      <category>ai</category>
      <category>github</category>
    </item>
    <item>
      <title>62 clicks in 3 months: what Search Console taught me about launching a devtool</title>
      <dc:creator>FuryCow</dc:creator>
      <pubDate>Tue, 03 Nov 2026 17:45:16 +0000</pubDate>
      <link>https://dev.to/furycow/62-clicks-in-3-months-what-search-console-taught-me-about-launching-a-devtool-2g68</link>
      <guid>https://dev.to/furycow/62-clicks-in-3-months-what-search-console-taught-me-about-launching-a-devtool-2g68</guid>
      <description>&lt;p&gt;I run a small AI code review tool. Over the last three months my site got 62 clicks from Google search. Not 62 thousand. 62.&lt;/p&gt;

&lt;p&gt;Most launch postmortems are written by people who succeeded. This one is written by someone still in the trench, with the raw CSV exports open. Here is what three months of Search Console data actually taught me - including two wrong conclusions I almost shipped.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. A report written from memory is fiction
&lt;/h3&gt;

&lt;p&gt;I once wrote an SEO report from what I remembered of the dashboards. When I later sat down with the actual CSV exports, almost every number was wrong. Positions, impressions, which pages were "winning" - all of it. The conclusions happened to survive; the evidence behind them didn't.&lt;/p&gt;

&lt;p&gt;The rule I follow now: no analysis without the export loaded. Memory smooths curves into stories.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. "3 months vs 7 days" is a trap
&lt;/h3&gt;

&lt;p&gt;My first report compared a 3-month average against the last 7 days and concluded "monotonic decline". Then I bucketed the daily data by week and saw something different: a floor in late September, then three weeks of recovery. The "decline" was rotation inside unequal windows, not a trend.&lt;/p&gt;

&lt;p&gt;Worse, the rotation was directional. Pages I had recently consolidated into hubs grew up to 5x their baseline. Old template landing pages lost half their visibility in the same weeks. An aggregate chart hid the only interesting thing happening.&lt;/p&gt;

&lt;p&gt;Equal windows or nothing.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Two pages moving toward each other are not necessarily related
&lt;/h3&gt;

&lt;p&gt;After I merged two weak landing pages into a hub page, the hub jumped 24 positions and the old flagship page dropped 24 - the same week. Textbook keyword cannibalization, right? I was ready to write a post about it.&lt;/p&gt;

&lt;p&gt;One screenshot killed the theory. Filtered by the money query, the hub had 0 impressions in 28 days. The old page served 75 of 77 impressions for that query. The hub had risen on its own narrow queries; the old page was being thinned by Google for being thin. Two independent processes that happened to cross.&lt;/p&gt;

&lt;p&gt;Correlation between two moving lines is not a mechanism. Check who actually serves the query before you restructure anything.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. One mention beat six months of on-page SEO
&lt;/h3&gt;

&lt;p&gt;Over the summer I ran six rounds of title and description edits on head terms. Result: zero movement on any head position. The pages ranked where they ranked, and meta text was not the bottleneck.&lt;/p&gt;

&lt;p&gt;Then one external mention happened in early August: 14 clicks in a single day on my brand query - more than half of all brand clicks for the entire quarter, on a day when normal brand traffic was about 2 searches.&lt;/p&gt;

&lt;p&gt;Distribution beats on-page tweaks. It is not close.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Page one with zero clicks means your snippet lies
&lt;/h3&gt;

&lt;p&gt;For one day, Google put one of my blog posts at the bottom of page one. 100 impressions that day. 0 clicks.&lt;/p&gt;

&lt;p&gt;The post could hold the position - the content was good enough. The snippet answered a different question than the one people asked. That is fixable, but only if you know which query it ranked for. And I don't: 80% of that day's impressions came from anonymized queries that Search Console never shows, in the UI or the API.&lt;/p&gt;

&lt;p&gt;The queries report is a shop window. The real inventory is behind it.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. You don't own your brand query
&lt;/h3&gt;

&lt;p&gt;Searching my own product name, foreign projects sharing the name outrank me. Same fight as on GitHub search, where dozens of repositories use the same name and mine is not in the top 10.&lt;/p&gt;

&lt;p&gt;If brand demand is small, squatters win by default. The fix is unglamorous: consistent naming, organization schema, and enough real mentions that the brand query has something to attach to.&lt;/p&gt;

&lt;h3&gt;
  
  
  What I am doing about it
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Stopped snippet edits on head terms - proven dead end for a low-authority domain.&lt;/li&gt;
&lt;li&gt;Deepened the one page that actually serves the money query, instead of spreading effort across 30 templates.&lt;/li&gt;
&lt;li&gt;Moved the effort budget to links and mentions: awesome-lists, writeups, communities. The 14-click day came from distribution, so distribution is where the hours go.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;No growth hack at the end of this post. The honest summary of three months: the site is small, the data is noisy, and the only signals that survived scrutiny were "make fewer, deeper pages" and "get mentioned".&lt;/p&gt;

&lt;p&gt;The tool behind the post: &lt;a href="https://github.com/CodeCritic-Reviews/review-action" rel="noopener noreferrer"&gt;review-action&lt;/a&gt;, an AI code review GitHub Action. Product site: &lt;a href="https://code-critic.com" rel="noopener noreferrer"&gt;code-critic.com&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you have run a Search Console postmortem on your own launch, I would love to hear what surprised you - especially the conclusions you had to walk back.&lt;/p&gt;

</description>
      <category>seo</category>
      <category>startup</category>
      <category>devtools</category>
      <category>analytics</category>
    </item>
    <item>
      <title>How I built an AI code review GitHub Action</title>
      <dc:creator>FuryCow</dc:creator>
      <pubDate>Sun, 01 Nov 2026 12:28:08 +0000</pubDate>
      <link>https://dev.to/furycow/how-i-built-an-ai-code-review-github-action-3184</link>
      <guid>https://dev.to/furycow/how-i-built-an-ai-code-review-github-action-3184</guid>
      <description>&lt;p&gt;Code review quality depended on which senior was on duty. That was the bug.&lt;/p&gt;

&lt;p&gt;Not a missing linter, not a bad process doc - the review you got depended on who was around. So I built a GitHub Action to set a floor. This post is about the boring parts that actually took time: a Rack 3.2 gotcha that ate my webhook, a Sequel JSONB trap, and teaching an LLM to shut up.&lt;/p&gt;

&lt;h3&gt;
  
  
  The shape of the thing
&lt;/h3&gt;

&lt;p&gt;The flow is simple on paper:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;PR opened/updated
  → GitHub sends a webhook
  → API pulls the diff
  → LLM reviews it against a ruleset
  → Action posts inline comments on the PR
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The Action itself is thin - it just calls the API and posts results. All the logic lives server-side, which means I can fix a prompt without asking anyone to update a workflow file.&lt;/p&gt;

&lt;h3&gt;
  
  
  Gotcha 1: Rack 3.2 ate my request body
&lt;/h3&gt;

&lt;p&gt;The API is Grape on Rack 3.2. First version used standard declared params. Worked in tests, died in production: every webhook came through with all fields "missing".&lt;/p&gt;

&lt;p&gt;The reason: something upstream consumed the request body before the endpoint read it, and under Rack 3.2 the input stream is not rewindable. By the time Grape validated params, the body was an empty string.&lt;/p&gt;

&lt;p&gt;The fix was to stop fighting the framework:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="n"&gt;post&lt;/span&gt; &lt;span class="s1"&gt;'/v1/webhooks/github'&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
  &lt;span class="n"&gt;payload&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&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="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;body&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="c1"&gt;# symbolize keys, validate manually, move on&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Dropped Grape param validation for that endpoint entirely. Manual parse, manual check. Less elegant, but it works and it's obvious.&lt;/p&gt;

&lt;p&gt;Lesson: when a body is consumed once and can't be rewound, middleware order is part of your API contract whether you like it or not.&lt;/p&gt;

&lt;h3&gt;
  
  
  Gotcha 2: Sequel JSONB is a DelegateClass
&lt;/h3&gt;

&lt;p&gt;Second bug was quieter. Review results are stored as JSONB in Postgres via Sequel. At some point the dashboard started showing "0 issues, score null" for reviews that clearly had findings.&lt;/p&gt;

&lt;p&gt;The cause: &lt;code&gt;Sequel::Postgres::JSONBHash&lt;/code&gt; is a &lt;code&gt;DelegateClass(Hash)&lt;/code&gt;. Which means &lt;code&gt;value.is_a?(Hash)&lt;/code&gt; returns &lt;strong&gt;false&lt;/strong&gt;. My serialization code checked &lt;code&gt;is_a?(Hash)&lt;/code&gt; and silently skipped every JSONB field.&lt;/p&gt;

&lt;p&gt;I've hit this twice now. The rule I follow: never check &lt;code&gt;is_a?(Hash)&lt;/code&gt; on a JSONB column - coerce explicitly first.&lt;/p&gt;

&lt;h3&gt;
  
  
  The LLM part: teaching it to shut up
&lt;/h3&gt;

&lt;p&gt;The hardest part wasn't the plumbing, it was calibration. An LLM reviewer's default setting is to have opinions about everything - and a reviewer that nitpicks every import gets muted within a week.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The diff alone is useless.&lt;/strong&gt; My first prompt was "here's the diff, review it". The model reviewed the diff - and invented problems in code it couldn't see. It flagged a renamed method as "possibly unused" because the caller lived in a file outside the diff. The fix: give it the diff plus the surrounding context of touched files, and explicitly tell it which files it can and cannot see. A model that knows the limits of its visibility stops guessing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Structured output, not prose.&lt;/strong&gt; I ask for JSON: file, line, severity, comment. Free-form markdown reviews look impressive and are useless to post as inline comments - you end up regex-parsing your own LLM output. With structured output, posting is mechanical, and I can drop findings before they reach the PR.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Filtering before posting.&lt;/strong&gt; Not every finding deserves a comment. I filter out:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;style nits a linter already covers (rubocop, eslint exist for a reason)&lt;/li&gt;
&lt;li&gt;"consider adding a docstring" on internal helpers&lt;/li&gt;
&lt;li&gt;anything the model marks below a severity threshold&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What survives gets posted. The ratio of dropped-to-posted findings is the single most important number in the whole system, and it's tuned by hand, not by a benchmark.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;"No comment" is a valid outcome.&lt;/strong&gt; Early versions felt compelled to say something on every PR. Now the prompt explicitly says: if the change is fine, return an empty list. A reviewer that stays silent on a clean PR builds trust; one that invents a nit to justify its existence destroys it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rulesets instead of one giant prompt.&lt;/strong&gt; Instead of one prompt trying to be an expert in everything, the review runs against a ruleset - a set of focused instructions (security, error handling, naming). This makes behavior explainable: when a user asks "why did it flag this", the answer is a rule, not "the model felt like it". It also means I can improve one area without regressing the others.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I'd do differently.&lt;/strong&gt; I'd start with fewer, stricter rules and expand. Starting broad means weeks of tuning noise down; starting narrow means weeks of adding value up. Same effort, opposite morale.&lt;/p&gt;

&lt;p&gt;I don't have hard numbers to share - this is a young project - but the direction is clear: the value of an automated reviewer is measured by what it &lt;em&gt;doesn't&lt;/em&gt; say.&lt;/p&gt;

&lt;h3&gt;
  
  
  Fail-closed, not fail-open
&lt;/h3&gt;

&lt;p&gt;One design decision I'd defend: when the AI is unavailable, the Action does nothing graceful like auto-approving. It escalates to human review. A reviewer that makes things up when confused is worse than no reviewer.&lt;/p&gt;

&lt;h3&gt;
  
  
  What's next
&lt;/h3&gt;

&lt;p&gt;GitLab support, configurable rulesets per repo, a summary report on the PR. It's early - the repo is &lt;a href="https://github.com/CodeCritic-Reviews/review-action" rel="noopener noreferrer"&gt;review-action&lt;/a&gt;, the product page is &lt;a href="https://code-critic.com" rel="noopener noreferrer"&gt;code-critic.com&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you've built something similar, I'm curious what your false-positive experience looks like - that's the part nobody writes about honestly.&lt;/p&gt;

</description>
      <category>ruby</category>
      <category>github</category>
      <category>devops</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
