<?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: Gbolahan Olawunmi</title>
    <description>The latest articles on DEV Community by Gbolahan Olawunmi (@gbolaww).</description>
    <link>https://dev.to/gbolaww</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%2F3988738%2F1252ff39-7d5b-404b-b8f7-cb47a2c5acef.jpeg</url>
      <title>DEV Community: Gbolahan Olawunmi</title>
      <link>https://dev.to/gbolaww</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/gbolaww"/>
    <language>en</language>
    <item>
      <title>The Bug That Wasn't a Networking Bug: A Railway Healthcheck Timeout in Disguise published: false tags: devchallenge, bugsmash</title>
      <dc:creator>Gbolahan Olawunmi</dc:creator>
      <pubDate>Tue, 21 Jul 2026 08:37:25 +0000</pubDate>
      <link>https://dev.to/gbolaww/the-bug-that-wasnt-a-networking-bug-a-railway-healthcheck-timeout-in-disguise-published-false-4bdm</link>
      <guid>https://dev.to/gbolaww/the-bug-that-wasnt-a-networking-bug-a-railway-healthcheck-timeout-in-disguise-published-false-4bdm</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for &lt;a href="https://dev.to/bugsmash"&gt;DEV's Summer Bug Smash: Clear the Lineup&lt;/a&gt; powered by &lt;a href="https://sentry.io/" rel="noopener noreferrer"&gt;Sentry&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Project Overview
&lt;/h2&gt;

&lt;p&gt;supermarket--bot is a WhatsApp order bot written in Go, built for small businesses to take orders directly through WhatsApp. It handles the full order flow — Twilio for messaging, Paystack for live payments, and Cloudinary for product image uploads — plus an admin dashboard for managing orders. I was preparing to demo it to a restaurant client when this bug hit.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bug Fix or Performance Improvement
&lt;/h2&gt;

&lt;p&gt;The night before a client demo, a routine deploy to Railway stopped going live. Every deploy failed its healthcheck and got killed. No error in the app itself — it just never came up healthy.&lt;/p&gt;

&lt;p&gt;I assumed it was a networking/port-binding problem, since that's a classic Docker + Railway gotcha. I spent a few hours chasing that theory before discovering the real bug: my app's boot sequence (connecting to Postgres on cold start) was taking longer than Railway's default 30-second healthcheck window. Railway wasn't rejecting an unreachable app — it was killing a container that hadn't finished booting yet. The fix ended up costing the client demo a two-day delay.&lt;/p&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;p&gt;Here's the chronological trail of the debugging session — including the wrong turns, which I think are worth showing:&lt;/p&gt;

&lt;p&gt;fix port — changed hardcoded EXPOSE 8080 to EXPOSE $PORT in the Dockerfile&lt;br&gt;
let railway set port — removed EXPOSE entirely, since Dockerfile EXPOSE resolves at build time and can't read Railway's runtime $PORT&lt;br&gt;
add railway config — added explicit railway.toml with healthcheck path&lt;br&gt;
bind to 0.0.0.0 — made the bind address explicit (in hindsight, functionally identical to what was already there)&lt;br&gt;
debug port — added a log line to confirm Railway was injecting $PORT correctly (it was — this ruled out the networking theory entirely)&lt;br&gt;
increase healthcheck timeout — the actual fix: bumped healthcheckTimeout from 30s to 60s&lt;br&gt;
increase timeout — bumped it again to 120s with a retry-on-failure restart policy&lt;/p&gt;

&lt;p&gt;Full diff: &lt;a href="https://github.com/Gbolaww/supermarket--bot/compare/b30254e%7E1...c2d09b1" rel="noopener noreferrer"&gt;https://github.com/Gbolaww/supermarket--bot/compare/b30254e~1...c2d09b1&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  My Improvements
&lt;/h2&gt;

&lt;p&gt;The interesting part of this bug wasn't the fix itself — it was how long I spent solving the wrong problem. Every symptom (deploy fails, healthcheck red, container restarts) looked like a networking issue, and Docker/Railway's EXPOSE and port-binding quirks are common enough that it was a reasonable first guess. But EXPOSE only matters at build time, and Go's ":8080" already binds all interfaces — neither of those theories held up once I added a debug log and saw the port was correct all along.&lt;/p&gt;

&lt;p&gt;The real fix was config, not code: my healthcheck window needed to match my app's actual cold-start time, not an assumed one. Once healthcheckTimeout was long enough to cover the real DB-connect duration, the deploy went green on the first try.&lt;/p&gt;

&lt;h2&gt;
  
  
  Best Use of Sentry
&lt;/h2&gt;

&lt;p&gt;To make this bug visible instead of a mystery next time, I went back and instrumented the exact code path that caused it — the database connection during boot — using sentry-go's distributed tracing. I wrapped the DB connect step in a db.connect span with a child db.ping span, wired Sentry's HTTP middleware across all routes, and added an env-var-controlled artificial delay (SIMULATE_SLOW_BOOT_SECONDS) so I could reproduce the original slow-boot failure on demand.&lt;/p&gt;

&lt;p&gt;Instrumentation diff: &lt;a href="https://github.com/Gbolaww/supermarket--bot/commit/ec097c0" rel="noopener noreferrer"&gt;https://github.com/Gbolaww/supermarket--bot/commit/ec097c0&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Reproducing the original failure — a simulated 35-second slow boot, the kind of delay that would blow past a 30s healthcheck window. Sentry flagged it automatically as 296% slower than average:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5isr0yfnie21wae52bur.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5isr0yfnie21wae52bur.png" alt=" " width="800" height="423"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The healthy boot — same span, no artificial delay, 249.23ms, flagged 97% faster than average:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F58y0hab6y3vat1o66dwp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F58y0hab6y3vat1o66dwp.png" alt=" " width="800" height="425"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Side by side, this is exactly the signal that would have caught the original bug in minutes instead of a multi-hour debugging session — a slow-boot span, automatically flagged as anomalous, instead of a healthcheck failure with zero visibility into why.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>bugsmash</category>
    </item>
    <item>
      <title>World Cup Rivalry Bot — AI-Voiced Hype for Every Goal</title>
      <dc:creator>Gbolahan Olawunmi</dc:creator>
      <pubDate>Sun, 12 Jul 2026 17:10:46 +0000</pubDate>
      <link>https://dev.to/gbolaww/world-cup-rivalry-bot-ai-voiced-hype-for-every-goal-2l71</link>
      <guid>https://dev.to/gbolaww/world-cup-rivalry-bot-ai-voiced-hype-for-every-goal-2l71</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for &lt;a href="https://dev.to/challenges/weekend-2026-07-09"&gt;Weekend Challenge: Passion Edition&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;I built the &lt;strong&gt;World Cup Rivalry Bot&lt;/strong&gt; — a Telegram bot for fans who want their World Cup rivalry to feel alive in their own group chat. You set your team and your rival, and whenever a real goal happens in the tournament, the bot fires back an AI-generated hype line in your team's voice — followed by an imagined clapback from the rival's fans, spoken in a completely different voice.&lt;/p&gt;

&lt;p&gt;It works in DMs and in group chats, and each person in a group can root for their own team independently. Since World Cup passion isn't just about scoring — it's about the back-and-forth banter between rival fans — I wanted the bot to capture both sides of that rivalry, not just one team's celebration.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmubwd9u1rhvsrq4ks0w5.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmubwd9u1rhvsrq4ks0w5.gif" alt=" " width="286" height="642"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Try it on Telegram: &lt;a href="https://t.me/worldcup_rivalry_bot" rel="noopener noreferrer"&gt;@worldcup_rivalry_bot&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Quick flow:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;/start&lt;/code&gt; → set your team (e.g. &lt;code&gt;/team Brazil&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/rival Argentina&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/autohype&lt;/code&gt; → the bot starts watching real World Cup 2026 results for both your team and your rival&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/simulate&lt;/code&gt; or &lt;code&gt;/simulaterival&lt;/code&gt; → instantly demo the celebration pipeline without waiting for a real goal&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;p&gt;GitHub: &lt;a href="https://github.com/Gbolaww/worldcup-rivalry-bot" rel="noopener noreferrer"&gt;https://github.com/Gbolaww/worldcup-rivalry-bot&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;p&gt;The bot is written in Go and runs as a single long-polling process against the Telegram Bot API, deployed on Railway.&lt;/p&gt;

&lt;p&gt;A few decisions worth calling out:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Two voices, two AI models working together.&lt;/strong&gt; Every goal celebration is a two-part exchange: Google's &lt;strong&gt;Gemini&lt;/strong&gt; generates a short hype/trash-talk line for whichever team scored, and a second, different clapback line from the other side's perspective. Each line is converted to speech with &lt;strong&gt;ElevenLabs&lt;/strong&gt;, using two distinct voice IDs — one for the "home" team's fans, one for the rival's — so it genuinely sounds like two different people talking past each other, not one narrator switching sides.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Real tournament data, not mocked results.&lt;/strong&gt; The bot polls a public, free World Cup 2026 dataset to detect when a tracked team's goal total increases, and auto-fires the celebration — no manual trigger needed once &lt;code&gt;/autohype&lt;/code&gt; is on. Since that data isn't second-by-second live, I added &lt;code&gt;/simulate&lt;/code&gt; and &lt;code&gt;/simulaterival&lt;/code&gt; so the exact same detection-and-celebrate code path can be demoed instantly, without waiting on an actual goal.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Per-user state, not per-chat.&lt;/strong&gt; Team and rival are tracked by Telegram user ID rather than chat ID, so a group of friends can all use the bot in the same group chat, each rooting for their own team, without stepping on each other's setup.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Getting the AI stack working was its own adventure.&lt;/strong&gt; Both &lt;code&gt;gemini-1.5-flash&lt;/code&gt; and &lt;code&gt;gemini-2.0-flash&lt;/code&gt; were already fully deprecated by the time I built this, and ElevenLabs had recently locked free-tier API access to preset "library" voices — so most of Saturday went into just finding which models and voices were actually still available before I could write a single hype line.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Prize Categories
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of Google AI&lt;/strong&gt; — Gemini generates both the hype line and the rival's comeback line for every goal.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of ElevenLabs&lt;/strong&gt; — Two distinct ElevenLabs voices bring each side of the rivalry to life as actual voice notes in the chat.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>devchallenge</category>
      <category>weekendchallenge</category>
    </item>
  </channel>
</rss>
