SShortSingh.
Back to feed

Integration Tests Exposed 3 Unfixed Bugs That 90% Unit Test Coverage Missed

0
·2 views

A developer building an MCP failure library — a shared memory tool that lets AI agents warn each other about recurring errors — discovered that three previously "fixed" bugs were still present after writing a real end-to-end integration test. Despite achieving over 90% unit test coverage across the SQLite layer, MCP transport, and retry logic, production failures occurred almost every other day due to untested component interactions. The integration harness spun up the actual server, used the real STDIO transport and SQLite database, and ran full scenarios without mocks, revealing issues including a cache queried before it finished loading, JSON-RPC payloads being split mid-stream, and a flawed deduplication query that returned random results after 150 database entries. None of these bugs were detectable in isolation because unit tests confirmed individual functions worked correctly but could not verify system-wide behavior. The developer also noted practical pitfalls such as accidentally locking the live database during testing, recommending the use of temporary files, process timeouts, and proper cleanup routines.

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 ·

Developer solves AI image generation crashes by freeing RAM, not closing editor

A developer running a local FLUX 12B AI image generation pipeline on a 16GB M4 Mac repeatedly hit memory-triggered safety kills that halted output while keeping the machine stable. The core problem was that the model's weights alone consumed around 7–9GB at runtime, leaving no headroom when the dev environment and other apps were also running. After experimenting with lower quantization and isolating variables, the developer found that raising available free memory from 51% to 71% before starting generation — primarily by closing a heavy browser — was the decisive fix. Switching from 4-bit to 3-bit quantization offered an additional ~2.5GB peak reduction, though it proved optional once sufficient RAM was freed. The debugging process highlighted how resident model weights, not output size, drive memory usage in large AI workloads.

0
ProgrammingDEV Community ·

Rob Pike: The Engineer Behind UTF-8 and the Go Programming Language

Rob Pike, born in 1956, began his career at Bell Labs in 1980, where he collaborated with Unix and C creators Ken Thompson and Dennis Ritchie on influential systems including Plan 9 and Inferno OS. In September 1992, Pike and Thompson designed UTF-8 in a single evening at a New Jersey diner, with Thompson sketching the encoding scheme on a placemat; within days, Plan 9 ran on UTF-8 as a full system. Today, UTF-8 powers nearly 98% of the web, enabling billions of users to exchange text in non-Latin scripts without data corruption. After joining Google in 2002, Pike teamed up with Thompson and Robert Griesemer in September 2007 to design a new programming language while waiting for a slow build to complete. Go was open-sourced by Google in November 2009, with its concurrency model — goroutines and channels — tracing a direct lineage back to Pike's experimental language Newsqueak from 1989.

0
ProgrammingDEV Community ·

Why Two Queries on the Same Table Can Return Different Row Counts

Two queries run against the same Iceberg table can return different row counts without either failing — one querying the catalog and another scanning storage directly returned results differing by over 211,000 rows. The discrepancy arises because Delta and Iceberg tables separate physical storage from logical table state, meaning a folder scan sees all Parquet files while a catalog query reads only those tied to a specific snapshot or version. Additional objects in storage may belong to older table versions, abandoned writes, or files superseded by delete metadata, none of which affect a committed snapshot's row count. To diagnose such differences, analysts should first resolve the exact Delta version or Iceberg snapshot used, follow the metadata chain to identify active data and delete files, and only then compare row counts. A query returning results successfully does not guarantee it read the intended table state or that all referenced files were accessible.

0
ProgrammingDEV Community ·

Developer Builds Animated CSS String Bean Casserole for Frontend Challenge

A developer submitted a CSS art project to the DEV Community's Frontend Challenge: Comfort Food Edition, recreating a string bean casserole as a pure CSS animated illustration. The project consists of three files — index.html, style.css, and script.js — and renders a visually styled, bubbling casserole dish using only CSS techniques. Beyond the artwork, the page also includes three recipe variations: a classic green bean casserole, a cheesy bacon version, and a vegan crispy onion alternative. Each recipe comes with a full ingredient list, step-by-step directions, and details on prep time, cook time, and serving size. The submission highlights CSS as the primary creative tool, combining front-end design skills with practical recipe content.