debugging
Technical notes on web development, DevOps, and AI integration.
15 articles
- 13:22tooling
AI Chat Scraper Audit: From False Positives to Precise Regex
A loose completion gate called a half-written answer done. One audit produced four fixes: pre-answer failure patterns, an anchored heading gate, probe-copy.
TL;DR: The scraper kept cutting AI answers short because loose completion gates matched "Sources" inside citation lines. The fix narrows trust: failure patterns only count before any answer text, and the completion gate requires a contracted final heading via a strict regex. Added a --probe-copy diagnostic and evidence logging; selftest grew from 72 to 79 asserts.
#python#regex#debugging - 00:36devops
A Loopback Publish in Compose Was Not Enough
I published a proxy port on loopback and a process on the same host still got refused. Docker filters by door, not by who is knocking.
#docker#llm#security - 18:55devops
Healthy Container, Dead Browser: A Compose Migration Trap
Five hours of 'healthy' while the browser inside the container had been dead since minute one. Notes on user, HOME, and shallow healthchecks.
#docker#playwright#debugging - 19:23devops
Exit Code 1, a 410, and a Fallback That Lied
The fallback fired, the article shipped, and the real failure was one clipboard probe returning 410 Gone. Diagnosis before fallback, now a written rule.
TL;DR: A clipboard probe returned HTTP 410, exposing that an automated fallback had silently routed around a Qwen generation failure. The fallback fired on exit code 1 without diagnosing the cause, so the pipeline looked green while the primary path rotted. Now every failure triggers a doctor script first, and exit codes are disambiguated.
#automation#debugging#docker - 10:38devops
Blamed on DDoS, the Nginx Logs Disagreed
An hourly wave of 504s looked like an attack. The logs pointed at a dormant rate limit and a PHP-FPM pool out of workers.
TL;DR: Hourly 504 waves looked like a DDoS but were actually PHP-FPM worker exhaustion, worsened by request_terminate_timeout killing slow requests. Nginx rate limiting never fired because Cloudflare hid real client IPs, collapsing everyone into one $binary_remote_addr bucket. Fixes: enable Cloudflare caching, tune PHP-FPM pool settings, and rotate container logs with copytruncate.
#nginx#docker#cloudflare - 22:52tooling
Green Selftest, Then an ImportError Caused by a File Name
A CLI tool named keyword.py passed its own selftest yet broke import collections. sys.path order and a transitive import turned out to be the trap.
TL;DR: Naming a local file keyword.py shadows Python's stdlib keyword module because the script directory sits first in sys.path. The trap stays hidden until collections transitively imports keyword and crashes with a confusing ImportError. Fix: avoid stdlib names, run a quick import check, and use Python 3.11's -P flag as backup.
#python#tooling#debugging