The AI Bug Taxonomy: Hallucinations & Phantom APIs

Prerequisite: Familiarity with the concepts introduced in Part 2 — Context Engineering Codebase. Review it first if the terminology in this part is unfamiliar. Part 3 — The AI Bug Taxonomy: Hallucinations & Phantom APIs Answer-first: AI-generated code introduces a unique class of subtle defects distinct from traditional human coding errors. Understanding the AI Bug Taxonomy—encompassing Phantom API methods, Typosquatted Package Imports, Silent Type Coercions, and Logical Edge-Case Hallucinations—allows engineering teams to construct targeted AST static analysis filters that catch 95% of AI defects before code reaches production. ...

May 26, 2026 · 7 min · Lê Tuấn Anh

Goroutine Leak Detection and Fix in Production Go Services

Goroutine Leak Detection and Fix in Production Go Services Answer-first: Detecting goroutine leaks in production Go applications relies on goleak unit testing, pprof/goroutine stack inspections, and context cancellation hygiene to prevent RAM exhaustion. Implementing this architecture enforces sub-50ms P99 latency guarantees, zero-allocation memory pooling with Go 1.24 unique.Handle, and fault-tolerant Dapr 1.15 component orchestration for resilient production scaling. This design guarantees sub-50ms P99 latency bounds and zero-allocation memory pooling. Writing automated test cases that detect goroutine leaks before deploying. Analyzing production runtime stack traces to locate orphaned channels. A Kubernetes pod abruptly restarts with exit code 137. The memory metrics dashboard shows a slow, perfectly linear staircase pattern stretching over three days. There are no panic logs in stdout, no database errors, and no abnormal CPU spikes. Just a slow, silent OOM (Out Of Memory) death. ...

May 26, 2026 · 16 min · Lê Tuấn Anh