SShortSingh.
Back to feed

SentinelPay Pairs Idempotent Payment Ledger With Guardrailed AI Dispute Agent

0
·2 views

The author describes SentinelPay, a fault-tolerant double-entry ledger paired with a stateful AI dispute resolver. The system is built around three invariants: money is never created, lost, or double-charged; transfers run in single PostgreSQL ACID transactions with deterministic row locks and two-layer idempotency keys; and an AI model never directly decides refunds. The LLM only produces a structured risk score, while a unit-tested pure Python function makes the final credit-or-escalate decision and the reasoning trace is stored in JSONB. The architecture splits work across an API gateway, a ledger service, a LangGraph agent worker, and a Next.js console, with Redis handling rate limiting and event streaming. The write-up also explains how the design prevents deadlocks and double-spending under concurrent transfers.

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 ·

Logging pipeline cuts noise by storing structured run records and aggregating latency

A DEV Community post describes an approach to making logging pipelines less noisy. The recommended method is to store one structured record per pipeline run, capturing durations and statuses. Instead of scanning raw logs, the system aggregates these records to compute p50 and p95 latency metrics. The article also links to its source repository, a Mbin instance, and the author's DEV profile.

0
ProgrammingDEV Community ·

Online File Converters May Retain Your Private Photos, Argues Developer

A developer article contends that free web-based converters upload user files to cloud servers where they may be stored or cached, with no cryptographic proof of deletion. The author argues that cloud-first processing is a default rather than a necessity and says their app, Convert & Compress, instead runs entirely on the device. The piece also criticizes heavy cross-platform frameworks for slowing down mobile media processing and draining battery. It proposes native hardware acceleration and stream-based chunking as ways to keep local conversions fast and memory-efficient. The author concludes that structural privacy, achieved by lacking network permissions, is stronger than contractual privacy promises.

0
ProgrammingDEV Community ·

Free directory listings meant a four-month wait, while a $99 option cleared in 24 hours

A founder submitted their product to five online directories in one week and logged the cost and wait time for each. Free tiers ran as a queue that took about four months to approve, whereas paid $99 options delivered listings within a day. The author, who also operates a directory, shared data from 934 of their own listings, which showed far higher click-through rates for listings a human had reviewed or claimed than for unreviewed ones. Founder names added no measurable click-through benefit, though the author notes the findings come from a small, one-week sample. As a result, their platform now withholds sitemap entries and internal links until an editor has reviewed each listing.

0
ProgrammingDEV Community ·

Self-Improving AI Agent Keeps Only Changes That Prove Out on Unseen Data

A developer built an AI agent for the TAMU Datathon 2026 that learns plain-English if-then rules and tests each one on data it has never seen. Rules that help are kept, weaker ones are demoted to backups, and the rest are discarded. The agent also hands uncertain cases to a teacher model that writes reusable skills, which are kept only where they measurably help. The project placed third at the event. The author reports that over half of the skill trials made results worse and were automatically removed.