SShortSingh.
Back to feed

Why a Senior Engineer Stopped an AI Code Suggestion Before It Leaked Customer Data

0
·56 views

During a pairing session to fix a failing webhook retry issue, an AI coding agent proposed a solution that introduced three serious problems: an unlisted dependency, an unauthorized environment key, and a console log that would have exposed customer payload data. A senior engineer identified these risks before the code was applied, noting that the surrounding environment — production config files, customer IDs in Slack, and an open model tab — posed equal or greater danger. The pair debated three ways to get a second AI opinion but rejected each: pasting into a browser chat risked leaking a merchant ID and lockfile details with no clear data retention policy, running a local model on the same laptop mixed inference with sensitive credentials, and looping the agent against existing tests would have returned false positives since the test suite never checked for logging or lockfile changes. Instead of seeking external model validation, the engineers wrote explicit constraints — no new dependency, no new env key, no payload in logs — and kept the draft as evidence rather than merging it. The session concluded that AI tools can generate plausible code quickly, but human-defined invariants and data-handling boundaries must be established before any model is consulted.

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 ·

Working citation links do not prove quotes are accurate, lab tests find

A DEV Community lab tested whether AI citation checks can rely on links that open successfully. In 60 simulated answers, every cited local file existed, yet the check had to confirm the quoted words themselves. Exact matching of the quote as a contiguous run of tokens in a stored source caught all wrong-document, merged, and reworded quotes. Simple normalization was needed because raw byte comparison wrongly rejected a third of genuine quotes. The author warns that normalization itself can erase meaning, such as signs, decimal points, and superscripts, so it should preserve numbers as written.

0
ProgrammingDEV Community ·

Governed retrieval for duplicate healthcare appointment evidence keeps source citations intact

The article argues that near-duplicate appointment records should not be discarded during retrieval, since collapsing them early removes the audit trail a reviewer needs. It recommends staged retrieval where each source keeps a stable document identifier and revision, and where citation tracing acts as a gate before any answer is shown. Possible duplicates are grouped after retrieval as an application-level decision, with both original records preserved until enough source context exists to merge or send them for review. The author also presents Infrai as a plain-HTTP retrieval option with a single key and bill across many routes, while stressing that the application itself must own evidence identity and citation policy.

0
ProgrammingDEV Community ·

Atomic claims stop AI agents from repeating each other's jobs, simulation finds

A simulation run on 2026-11-13 showed that multi-agent systems can waste work when agents check a shared task list and then mark a job as taken in separate steps. Uncoordinated workers duplicated about 15 of 30 jobs per trial on average, while an atomic claim that combines the check and the mark produced no duplicates across 100 trials. The approach pairs each claim with a time-limited lease, so a job held by a crashed agent is released and finished by another within about 650 virtual milliseconds on average. A single dispatcher also eliminated duplicates in the test. The author notes that leases reduce duplicates but cannot fully rule them out, since an agent may pause and lose its claim.

0
ProgrammingDEV Community ·

Why PCB autorouters fall short and how one handles unfinished boards

An autorouter converts schematic connections into copper across chosen layers while respecting design rules, but many tools fall short in practice. The article argues that a useful router should work across many layers, rework routing around difficult nets, and handle impedance during routing rather than afterward. It also stresses reporting every unrouted net by name instead of a vague completion figure. Using a four-layer RP2040 board as an example, the author describes a run that left nine nets open and refused to export Gerbers, which they present as the proper way to fail. Finally, the piece notes that component placement and dense fine-pitch parts often cause routing failures more than the router itself.