SShortSingh.
Back to feed

Silent billing bug charged customers nothing for weeks despite green status

0
·1 views

A software team discovered that their nightly billing job had been silently failing for weeks, successfully running and exiting without errors but never actually charging customers for overages. The job was rejected by the payment provider each time because it sent the previous day's usage events, which were too old to be accepted — a rule requiring timestamps no older than one hour. A second bug involved usage being reported against a subscription with no meter attached, returning a success response while nothing reached the invoice. A third issue involved faulty overage arithmetic that was never tested with actual computed values, only checked for the presence of certain lines in the source code. The team identified all three flaws by verifying state directly from the integrated system rather than trusting API responses, and by writing tests that confirmed failures before being relied upon.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Flawed LLM Eval Harnesses Can Blame Models for Their Own Congestion

A common mistake in LLM evaluation occurs when a test harness opens too many concurrent requests, triggers rate-limiting (HTTP 429 errors), and then retries those requests — effectively doubling the intended load on the endpoint. This causes client-side queueing delays to inflate observed latency figures, meaning the harness is measuring its own congestion rather than the model's true performance. The result is misleading metrics: a reported p99 latency of 8.4 seconds, for example, may include roughly 6 seconds of queue-wait time that has nothing to do with the model. The recommended fix is a closed-loop harness that caps in-flight requests and separates queue-wait time from actual service time, ensuring measured latency reflects endpoint behavior. This approach also enables systematic discovery of an endpoint's concurrency limits by sweeping the concurrency gate upward until throughput plateaus and 429 rates rise.

0
ProgrammingDEV Community ·

Fix Shopify Google Ads tracking gaps with free server-side conversion pipeline

Shopify stores using browser-based Google Ads pixels miss 20–40% of conversions due to Safari tracking protections, cookie lifespan limits, and ad-blocking extensions. Google's Enhanced Conversions offers a server-side alternative by sending SHA-256 hashed customer identifiers directly to Google's API, which then matches purchases to logged-in Google accounts. This approach recovers attribution even when a user clicks an ad on one device and completes checkout days later on another. Rather than using paid Google Tag Manager server containers costing $10–$30 per month, developers can build a direct webhook pipeline triggered by Shopify's orders/paid event. The middleware hashes customer data and posts it to the Google Ads API endpoint, eliminating third-party infrastructure while restoring accurate conversion data for smart bidding.

0
ProgrammingDEV Community ·

Why Defaulting to Global State Management Often Creates More Problems Than It Solves

A software developer reflects on three years of over-relying on global state management tools like Redux and Zustand for every data-sharing need in frontend applications. The core mistake, they argue, is conflating 'shared state' with 'global state,' which leads to tightly coupled components, harder testing, and unnecessary re-renders. The developer now follows a decision hierarchy — local state, lifted state, server cache, then global state — before deciding where data should live. A key insight is that API responses are better treated as a server cache using dedicated tools, which can eliminate up to 60 percent of global state code. The advice concludes that simpler, more targeted state management is more maintainable and scalable than defaulting to a global store.

0
ProgrammingDEV Community ·

Nashville invokes eminent domain to block hyperscale data center near city zoo

The Nashville Metropolitan Council has used eminent domain to acquire land that had been designated for a large-scale data center development. The decision was driven by concerns over the facility's potential impact on local aquifers, natural habitat, and its proximity to the Nashville Zoo. Hyperscale data centers typically demand between 50MW and 200MW of power and consume significant volumes of water for cooling, raising environmental red flags for urban sites. The move is legally notable because the proposed development was reportedly compliant with existing zoning rules, marking an unusual use of eminent domain to block rather than enable infrastructure. Experts warn the decision creates regulatory uncertainty that could deter future infrastructure investment across the jurisdiction.