SShortSingh.
Back to feed

Dev Guide: Use a Mini Evidence Card to Catch State-Change Bugs at Release

0
·1 views

A software development practice proposes attaching a small 'evidence card' to pull requests when releasing features that involve shared state, such as booking reschedules. The card documents intended behavior, adjacent paths tested, production signals to monitor, and a named rollback owner with a clear decision threshold. The approach addresses a common gap where a passing CI test confirms the changed feature but leaves adjacent behaviors — like reminders tied to an old appointment time — unverified. A pure-function JavaScript example illustrates how targeted unit tests can surface forgotten state updates, while the author notes that integration and production checks remain separately necessary. The goal is to make the scope of verification explicit and to record what was actually observed after deployment, rather than treating a green build as full proof of correctness.

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 ·

Hybrid AI-Graph System Separates LLM Reasoning from Fraud Policy Decisions

Engineers at the TigerGraph × Hacker House Goa IEEE Fraud Challenge built an autonomous fraud detection system that prevents Large Language Models from directly controlling banking actions such as blocking cards or filing regulatory reports. The architecture splits responsibilities across three tiers: an LLM reasoning layer, a TigerGraph topology layer processing over 590,000 transactions, and a deterministic Python-based policy engine that makes all final decisions. The design addresses key risks of unconstrained LLMs in finance, including hallucinations, non-reproducible outputs, and inability to meet FinCEN and SEC audit requirements. A calibrated machine learning model achieving an AUC of 0.9950 feeds into a rules-based policy engine, ensuring decisions are mathematically deterministic and auditable. The team argues this separation is essential in production fraud defense, where false positives from raw ML scores routinely disrupt legitimate customers and generate regulatory liability.

0
ProgrammingDEV Community ·

How to Build Safe LLM Invoice Extraction in Node.js with Idempotency and Observability

Developers building Node.js pipelines for LLM-based supplier invoice extraction must distinguish between three separate identities: the business operation, the queue delivery, and the execution attempt. Collapsing these into one can cause duplicate records or hide retry costs, since a worker may complete a model call and write a database row before losing its broker acknowledgement, triggering a repeat run. The recommended approach enforces idempotency at the database write boundary using a tenant-scoped operation ID that persists across the webhook, worker queue, and JSON extraction pipeline. Structured logs should capture identifiers and state transitions rather than raw invoice content, as invoices often contain sensitive personal and financial data that increases exposure risk if logged in full. Tenant-level metrics, correlated logs, and distributed traces together diagnose duplication, but only a unique database constraint can reliably prevent it.

0
ProgrammingDEV Community ·

Developer Rebuilds Final-Year Project Using npm Workspaces Monorepo Setup

A developer is rebuilding their university final-year Document Management System (DMS), this time structuring it as a monorepo using npm workspaces. The approach consolidates the frontend, backend, and shared types into a single repository instead of maintaining multiple separate ones. This setup allows centralized tooling, such as a shared TypeScript version, and simplifies onboarding for potential future contributors. The developer chose npm workspaces specifically to minimize configuration overhead, noting that more advanced tools like Nx and Turborepo exist but felt too complex for this stage. Other package managers such as pnpm and Yarn also offer monorepo capabilities, each differing in performance, features, and dependency management.

Dev Guide: Use a Mini Evidence Card to Catch State-Change Bugs at Release · ShortSingh