Faultless AI

Production AI agent guardrails & zero-dep Python reliability kits. Founded by Tharusha Nuwansara.
1 joined
Profile picture
Tharusha NuwansaraProfile picture@widerrung53·6h

[Day 17/30] What Happens When Scripts Farm Multi-Account AI Quotas (Pure Pyth...

[Day 17/30] What Happens When Scripts Farm Multi-Account AI Quotas (Pure Python Guardrails)


How to stop multi-account free-tier farming, shared-IP burst scripts, and replayed requests from draining your OpenAI/Anthropic/Gemini API budget using atomic SQLite spend ledgers.


Verified inside an isolated python3 -I sandbox (169.46 ms across 2 executable blocks, 100% Python 3.11+ standard library):

Profile picture
Tharusha NuwansaraProfile picture@widerrung53·18h

[Day 16/30] Per-Tenant Bulkhead Semaphores: Stopping One Noisy API Key From S...

[Day 16/30] Per-Tenant Bulkhead Semaphores: Stopping One Noisy API Key From Starving Worker Pools


Partitioning shared worker pools with non-blocking per-tenant bulkheads so a single runaway integration cannot starve every other customer.


Verified inside an isolated python3 -I sandbox (110.67 ms across 2 executable blocks, 100% Python 3.11+ standard library):

Profile picture
Tharusha NuwansaraProfile picture@widerrung53·1d

[Day 15/30] Modeling Two-Phase Payment Holds, Partial Captures, and Releases...

[Day 15/30] Modeling Two-Phase Payment Holds, Partial Captures, and Releases in Double-Entry SQL


Preventing over-capture and orphaned holds in two-phase payment flows using immutable SQLite double-entry authorization and settlement accounts.


Verified inside an isolated python3 -I sandbox (50.34 ms across 2 executable blocks, 100% Python 3.11+ standard library):

Profile picture
Tharusha NuwansaraProfile picture@widerrung53·3d

[Day 14/30] Eliminating Dual-Write Split-Brain With a SQLite WAL Transactiona...

[Day 14/30] Eliminating Dual-Write Split-Brain With a SQLite WAL Transactional Outbox Relay


Preventing silent lost notifications when HTTP calls fail mid-request by committing business rows and outbox events inside one SQLite WAL transaction.


Verified inside an isolated python3 -I sandbox (77.45 ms across 2 executable blocks, 100% Python 3.11+ standard library):

Profile picture
Tharusha NuwansaraProfile picture@widerrung53·4d
Pinned post

Start Here: Free Python 3.11 Reliability Kit ($0) + Full Production Toolkits

Welcome — Pick Your Zero-Dependency Python & AI Reliability Toolkit (MIT Licensed, Unit-Tested .zip Downloads)


Every module in this catalog runs on Python 3.11+ stdlib (0 pip bloat) and is verified inside an isolated python3 -I test suite before release:


  1. Free $0 Mini-Kit (1-Click Instant Download) — Atomic SQLite WAL idempotent cron lock (idempotent_cron.py) + HTTP 429/503 circuit breaker (api_guard.py) + unittest suite:


  1. $14 Production AI Agent & Backend Starter Kit (Python + Node/TS + SQL + 4 GitHub Actions) — Transactional SQLite WAL job queue & dead-letter CLI, self-repairing LLM JSON circuit breakers, constant-time HMAC webhook guard, and integer-cent double-entry SQL ledger:


  1. $15 7-Day Fault-Tolerant Python & AI Reliability Challenge Pack — 7 runnable failure-injection daily labs (--demo telemetry) + 45-min/day CHALLENGE_WORKBOOK.md:

Profile picture
Tharusha NuwansaraProfile picture@widerrung53·4d

[Day 13/30] Cutting P99 LLM & API Tail Latency With Speculative Hedged Reques...

[Day 13/30] Cutting P99 LLM & API Tail Latency With Speculative Hedged Requests and Token Caps


Eliminating P99 upstream latency spikes by launching speculative backup requests only after the P95 delay threshold—keeping extra call overhead under 6%.


Verified inside an isolated python3 -I sandbox (41.94 ms across 2 executable blocks, 100% Python 3.11+ standard library):

Profile picture
Tharusha NuwansaraProfile picture@widerrung53·5d

[Day 12/30] Zero-Downtime Webhook Secret Rotation With Dual-Key Constant-Time...

[Day 12/30] Zero-Downtime Webhook Secret Rotation With Dual-Key Constant-Time HMAC Verification


Rotating compromised or expiring payment webhook secrets with zero dropped orders by verifying ordered active/retiring HMAC key rings in constant time.


Verified inside an isolated python3 -I sandbox (48.0 ms across 2 executable blocks, 100% Python 3.11+ standard library):

Profile picture
Tharusha NuwansaraProfile picture@widerrung53·5d

[Day 10/30] Idle-Chunk Watchdogs & Partial JSON Recovery for Stalled SSE LLM...

[Day 10/30] Idle-Chunk Watchdogs & Partial JSON Recovery for Stalled SSE LLM Streams in Python


Detecting mid-stream SSE socket stalls in 1.5 seconds instead of hanging worker threads for two minutes—and recovering valid partial payloads cleanly.


Verified inside an isolated python3 -I sandbox (92.67 ms across 2 executable blocks, 100% Python 3.11+ standard library):

Profile picture
Tharusha NuwansaraProfile picture@widerrung53·5d

[Day 9/30] Zero-Drift Payment Reconciliation: Auditing Payment Webhooks Again...

[Day 9/30] Zero-Drift Payment Reconciliation: Auditing Payment Webhooks Against Immutable SQL Postings


Detecting dropped payment webhooks, recording append-only compensating refunds, and proving zero-cent balance invariants with pure SQL views.


Verified inside an isolated python3 -I sandbox (135.55 ms across 2 executable blocks, 100% Python 3.11+ standard library):

Profile picture
Tharusha NuwansaraProfile picture@widerrung53·5d

[Day 8/30] Poison-Pill Isolation: Designing Exponential NACK Backoff and Dead...

[Day 8/30] Poison-Pill Isolation: Designing Exponential NACK Backoff and Dead-Letter Replay in SQLite


How to prevent two malformed high-priority webhooks from starving 150 healthy background jobs—and replay quarantined dead-letter payloads cleanly after deploying a hotfix.


Verified inside an isolated python3 -I sandbox (166.06 ms across 2 executable blocks, 100% Python 3.11+ standard library):