SShortSingh.
Back to feed

Hidden bug in CLI tool only emerged when new adapters started returning real data

0
·1 views

A software bug in a CLI tool called 'gx' went undetected for an extended period because both sides of a key data comparison were consistently returning the same placeholder value by coincidence. The flaw resided in a function called Engine::rehydrate_committed, which was responsible for rebuilding transformation data from a journal during undo operations but used a hardcoded placeholder instead of reconstructing the 'target' field. The bug only surfaced after two new adapters, 'fs' and 'git', were shipped and began populating the target field with real values, causing cold-process undo operations to fail with an internal error. An initial fix resolved the undo failure but broke redo functionality by incorrectly re-deriving a prediction for rows that were never meant to have one. The final solution distinguished between the two cases using existing data — specifically, whether a row had empty or non-empty parent records — requiring no schema changes.

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 ·

Open-Source Tool Combines Anti-Detection Tricks for Bulk Google Image Scraping

An open-source project called Universal Google Image Bulk Downloader Pro, developed by GitHub user hariompatel61, is designed to download large batches of images from Google without triggering anti-bot blocks. The tool uses an undetected Chrome browser instance and stores session cookies locally so that once a CAPTCHA is solved manually, future runs reuse the trusted session. Searches are executed in two tiers, first targeting reputable stock photo sites like Unsplash and Pexels, then falling back to general Google Images with configurable negative filters to improve result quality. All scraping behavior is defined through a config.json file, allowing multiple independent jobs with different search strategies to run in a single execution. Built-in randomized delays and a resume mechanism that skips already-downloaded files round out the architecture, making interrupted large-scale jobs easier to manage.

0
ProgrammingDEV Community ·

Open-Source Python Tool Automates Bulk Google Image Downloads From Excel Lists

A developer named hariompatel61 has released Universal Google Image Bulk Downloader Pro, a free, open-source Python tool that automates bulk image downloading from Google using Excel or CSV input files. The tool requires Python 3.8+, Google Chrome, and a handful of dependencies installable via a single pip command. Users can configure preferred stock photo sources, minimum image resolutions, and multiple job queues — allowing different spreadsheets to be processed in one run with separate search logic. The script handles CAPTCHA prompts on first launch, then saves session cookies locally to avoid repeat interruptions. Built-in rate limiting of roughly 10–15 requests per minute is included to reduce the risk of IP blocks during automated searches.

0
ProgrammingDEV Community ·

How a Mark-Recapture Ecology Method Exposed Silent Job Scraper Data Gaps

A developer building a LinkedIn job-scraping tool discovered it was silently returning only about 75% of available job listings, with no error or warning in the output. The platform's pagination endpoint proved unstable, returning a different random subset of jobs on each request rather than a consistent ordered list, meaning a simple loop-until-empty approach only collected an unreliable sample. This flaw corrupted a change-tracking feature built on top, which falsely reported dozens of job openings and closures between runs just minutes apart. Standard completion heuristics — stopping after empty pages or requiring two identical passes — both failed, either firing too early or never firing at all. The developer ultimately found a reliable solution by applying the Lincoln-Petersen mark-recapture method used by ecologists to estimate population size, using overlap between two independent scrape samples to calculate total job count rather than assuming completeness.

0
ProgrammingDEV Community ·

Developer Switches from Gemini Pro to Flash High Mode After Costly Bugs and Token Overruns

A developer building a Point of Sale SaaS project initially relied on Gemini 3.1 Pro for agentic coding but encountered severe regressions, including broken dashboard analytics caused by the model rewriting SQL queries without respecting cross-module dependencies. Switching to GPT-based models resolved some issues but quickly became unsustainable due to rapid token quota exhaustion and high API costs. Community benchmarks on Agent Arena suggested Flash models outperformed 3.1 Pro on agentic tasks, prompting a trial of Gemini 3.6 Flash, which proved faster and more cost-efficient. The developer later upgraded to Gemini 3.7 Flash in High Mode, which handled complex multi-table queries cleanly, avoided unintended file changes, and kept token usage low. The project was ultimately delivered on time, with the developer crediting the model switch as the key turning point.

Hidden bug in CLI tool only emerged when new adapters started returning real data · ShortSingh