Blog

Notes on engineering decisions, AI systems, web tooling, and project details.

Every Node Reported Success and the Output Was Still Wrong: Debugging Partial Success in a Content Pipeline

A reader said "every post has a fair few typos", but that month no node in the pipeline had failed once. Six defects, none of them a failure: every one was a component doing exactly what it was told, returning 200, then going wrong in the inch it was never told about. Plus the question I now keep on my review list: is this success signal load-bearing?

Predeclare and Three Gates: Building Internal Controls for Factor Research

Researcher degrees of freedom are the real adversary in quantitative research. From predeclaration, orthogonality prescreens, and Gate A to the neutralization ladder and a forward shadow book: a control process I have run for over a year and violated a few times myself. It does not guarantee profit; it guarantees I can tell when a result is fake.

The Last Mile of a Cloud Exit: Moving 140GB of Media and Every Secret Onto My Own VPS

Large immutable files and small highly sensitive config are the two poles a database migration never covers: an in-place storage-layer swap, a three-tier secret resolution order, half-finished-work archaeology, and the discipline of export, off-site backup, reconcile, only then delete.

From a Document Database Back to PostgreSQL: A Six-Phase Data Layer Exit Playbook

How to cut a migration that touches every read and write path into six independently shippable, independently reversible phases: same-interface swaps, the dual-write safety net, write-stop as the only irreversible point, and the fourteen production bombs adversarial review caught.

When the Cloud Bill Jumps 20x Overnight: A Full Forensic Trail of a Database Traffic Leak

The bill went from a few hundred NTD to over forty thousand, and nobody broke in — every cent was spent by my own code. A five-layer drill-down from invoice total to function name, and why payload x distance costs more than read count.

Automating Portfolio Tracking and Broker Report Ingestion: From Encrypted PDFs to Daily Account Equity Pipelines

Resident Personal Assistant Series: Parsing encrypted PDF statements, integrating multi-broker APIs, handling T+2 settlement lags, and building automated research report crawlers.

My Personal Assistant Is Not a Chatbot

Building a resident assistant on Hermes Agent: six traits that stop it being a chatbot, what is genuinely clever about the Hermes agent mechanism, and the day it became trustworthy.

FastAPI + Redis: Tiered Cache Design for Read-Heavy APIs

Full-Stack Architecture Series: Not all APIs deserve the same TTL. How to combine Edge CDNs, Redis in-memory caching, and Cache-Aside patterns to prevent Cache Stampedes.

Dev / Staging / Production: Environment Layering Strategies for Small Teams

Environment layering is not enterprise ceremony, but a risk-reduction pattern: how to boost release reliability using branch-to-environment mapping, preview deploys, secrets isolation, and production guardrails.

Designing a Reliable Agentic Ingestion Pipeline (Part 2): Step-by-Step Checkpoints, Reasoning Token Budgets, and Pre-Persistence Gates

Production lessons: Step-by-step checkpoints and rerun_from recovery, preventing reasoning model token truncation, pre-persistence gates, and concurrency budgets.

Designing a Reliable Agentic Ingestion Pipeline (Part 1): From Single-Prompt Bottlenecks to LangGraph Multi-Agent Workflows

How an unstructured financial podcast data pipeline evolved from a single prompt into a decoupled multi-agent topology using LangGraph.