SShortSingh.
Back to feed

Seven Failure Scenarios Test a Verifiable Supply-Chain Ledger's Resilience

0
·1 views

The third experiment in a verifiable supply-chain series tests how a state-transition primitive behaves under violations rather than only on the happy path. An 18-test scenario matrix runs a shipment through offer, handoff, settlement and verification on an in-memory ledger, covering seven scenarios from undeclared telemetry to double settlement. Each scenario asserts that advisory flags fire only for the violation they name and that settlement stays exactly-once under concurrency. Assertions check both the write payload and the replayed read model, so the tests confirm the projection and not just that calls succeeded. The suite was extended after an adversarial AI audit found six high-severity gaps, each now covered by a dedicated regression test.

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 ·

AI Decoy With Persistent Memory Wastes Time of Digital Arrest Scammers

A developer built ScamSathi, an AI decoy that poses as a 72-year-old retired schoolteacher named Ajji to waste the time of 'digital arrest' scammers. Digital arrest scams reportedly cost Indians over ₹1,900 crore in 2024, typically involving fake CBI or customs officials, fabricated case numbers and warrants, and demands for transfers to UPI accounts. The system extracts identifiers such as phone numbers, UPI IDs, case numbers and claimed agencies from each scammer message and stores them in SQLite alongside a memory layer. Unlike memory-less scambait bots that restart with each call, ScamSathi recalls earlier conversations so it can catch inconsistencies, such as a caller who previously claimed to be from Income Tax now claiming to be from the CBI. The developer confirms these contradictions with exact SQL checks on the stored identifiers rather than relying only on semantic recall.

0
ProgrammingDEV Community ·

How the main AMM families differ mathematically: constant product, concentrated liquidity, and stable curves

Automated market makers replace order books with curves, and each design's choice of curve determines how swap outputs are computed, how depth is measured, and where it can fail. The constant-product model keeps the product of two reserves fixed, offering a closed-form output that depends only on balances and fees, with liquidity spread across all prices. Concentrated-liquidity pools instead place capital within chosen price bands, behaving like constant-product pools with larger virtual reserves inside those bands. That approach has a hazard: a single-band formula assumes liquidity continues beyond the band, so it can quote outputs larger than the pool actually holds. Stable-asset curves are designed for assets that should trade near parity, concentrating depth around the balance point and steepening away from it. Because these families are not interchangeable, integrators should treat their formulas and depth measures as distinct.

0
ProgrammingDEV Community ·

Anthropic's New Claude Code Rule Blocks Some Game Projects, and Users Can Work Around It

Anthropic added two sentences to Claude Code's system prompt on Opus 5.5, rolled out around October 27, 2026, and confirmed by engineer Addy Osmani on October 30. The rule tells Claude to refuse building recreations of specific existing games, even renamed ones, while still supporting original games, genre games, and projects based on the user's own designs and assets. The company cites copyright and its usage policy as the reason, following its $1.5 billion authors' copyright settlement in September 2025. The change is a prompt-level instruction rather than a hard filter, so refusals can be inconsistent and some users report legitimate work being blocked. Users are advised to identify which refusal they received, reframe requests around original mechanics, start fresh sessions, and report false positives.

0
ProgrammingDEV Community ·

Three Manual Checks to Run Before Shipping AI-Generated Website Code

The author, who is building a local prototype tool for checking declared file scope and static HTML evidence, offers a free manual review method for AI-written code. The core idea is to define allowed files, protected files, and explicit acceptance criteria before an agent starts work. A test case showed a page with the right heading and button still failing a strict local-link rule, since the link used a bare href='#' instead of the declared anchor. The piece argues that a diff against a saved Git baseline, including untracked files, reveals which paths changed, though a scope pass only shows files were allowed, not that features work. It also recommends replacing subjective criteria with inspectable static checks, while noting that even those don't prove a browser interaction succeeds.