Urgent.News

What's breaking now, across thousands of outlets.

Tech

The Silent Alert Bug: When Your Instant Push Exists but Never Fires

Your alert formatter is probably fine. The problem is that nobody calls it. The Symptom A user reports that instant push notifications stopped working. The daily report arrives on schedule. The formatting looks correct in the report. But the moment a position opens, nothing hits their phone. The first instinct is to blame the transport layer: the push service, the API key, the network. You check…

The issue at hand is not with the alert formatter itself, but rather with the fact that it is never invoked. A user reported that instant push notifications suddenly stopped working, yet the daily report was generated as usual and looked correct. The first assumption was that the problem lay within the transport layer, such as the push service, API key, or network.

However, upon testing manually, a test push was sent successfully, revealing that the problem was not with the pipeline but rather with the code responsible for invoking the push.

Upon examining the code, it was discovered that a function named `format_instant_alert` was present, which built a single-line push message for newly opened positions. This function was clean, tested, and correct for months. However, a closer inspection revealed that there were no calls to this function anywhere in the codebase. The function was essentially a dead code, as it was never invoked.

The real problem stemmed from the fact that the push notifications were wired into four separate code paths for opening positions. These paths included manual entry from the CLI, scheduled strategy execution, signal-driven entry from a webhook, and recovery/reconciliation after a restart. Each path contained copy-pasted blocks of open-position logic, along with comments stating that the push was integrated into the daily report.

This led to four separate code paths, each containing the same false assumption that the push was handled during daily report generation.

The issue here was that the comments were merely claims about code that lived somewhere else. There was no enforcement mechanism to ensure that the push was indeed handled. When the "elsewhere" changed or when it never actually handled the case, the comments remained, confidently lying. The propagation of this lie across four code paths further exacerbated the problem.

The solution to this issue was straightforward: audit for call sites, not just definitions. To find dead code, it is essential to search for how a function is used, rather than just where it is defined. By enumerating the functions that should be firing but aren't, specifically the alert formatters and senders, the problem could be identified. Automating the search for call sites using a script helped to flag functions that only appear at their definition, revealing the dead code that had gone unnoticed for months.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

The License Layer — Or, Who Can Rewrite the Terms Underneath You?

Twelve essays into this series, the line has never moved: the layer you don't own is the layer that owns you. I've named distribution (#45), the model (#46), identity (#47), access (#48), the harness…

  • License Layer controls software use, modification, distribution
  • Bitwarden switched to dual-license model, sparking debate
  • Nvidia acquisition, Apple removal highlight license control risks

From One Prompt to 39 Finished Products: What Actually Broke

Last March I ran a batch of 40 uploads to Adobe Stock overnight. I woke up to a rejection screen and a bad feeling. The art was fine. The CSV was not.

  • Single prompt generated 39 finished products
  • Metadata mismatch caused initial 40 uploads rejection
  • Scripts automate metadata and upload tracking

A good prediction doesn't always make a good decision

I started building an FPL tool because I kept coming back to one question: what's the point of predicting the best player if signing him isn't actually the best move?

  • Predicting best player doesn't guarantee best decision
  • FPL Decision Engine merges data, AI, rules to evaluate real decisions
  • Engine's effectiveness in improving FPL performance still under testing

A five-file Laravel release when the production worktree has drifted

On 5 October I shipped a design refresh to the storefront I run: one stylesheet and four Blade templates, the hero, catalog, operations and homepage views. Nothing else moved.

  • Laravel released five files on October 5th
  • Production worktree diverged from branch
  • Release ensured production templates matched committed versions

When Does Your Business Need a Software Architecture Review?

A software architecture review is not an academic exercise. It is a business tool for understanding whether the system can support the next stage of growth, product change, compliance pressure or…

  • Conduct review before system issues arise, not after outages or cost escalations
  • Identify unified technical and business perspective among engineering leaders
  • Review outcomes include architecture map, risk register, action plan, and roadmap

More from Monday 12 October →