backend
Technical notes on web development, DevOps, and AI integration.
84 articles
- 21:24tooling
Version-aware preflight without breaking v2
Preflight v3 without breaking the frozen v2 validator.
TL;DR: V2 preflight blocked v3 configs, so a new pagesync preflight now validates v3 decisions and Pages while leaving the frozen v2 engine alone. Duplicate validators stay aligned via a shared adversarial test table that requires matching accept/reject outcomes and surfaces traversal errors first. Page sync verifies what Plane stored via retrieve-after-write name and hash checks instead of trusting hidden markers.
#plane#python#testing - 17:17tooling
Binding Mirrored Pages by Content, Not Names
Name-based bindings fork silently under renames; pagesync moves page identity into a hidden HTML marker plus a normalized sha256 drift hash.
TL;DR: The doc-sync tool mirrors markdown files from the docs folder to Plane Pages using content-shaped identity rather than names. A hidden HTML comment holding the source path sits as the first line and Plane preserves it verbatim as the sync authority. Strict tiers, sha256 drift checks on normalized markdown, and hard config validation keep sync reliable through renames and edits.
#plane#python#markdown - 23:25backend
Two-way document sync: the trustworthy tool refuses precisely
A pull returned different content than my push, with no error. The fix was not a smarter parser but a precise map of what the sync refuses to do.
TL;DR: My Markdown quietly broke after a pull because Plane sanitizes HTML and drops unsupported formatting without warning. Instead of forcing acceptance, I built a sync engine that refuses risky work, storing Markdown safely and using stripped text as the stable identity. It classifies every outcome into six explicit statuses and fails loudly rather than guessing, prioritizing data integrity over convenience.
#plane#self-hosting#sync - 22:30devops
Live probe vs my Plane spec: two assumptions died in 27 minutes
My 905-line Plane sync spec lost two assumptions to a live probe: HTML markers stripped by server-side sanitization, archive endpoint 404.
TL;DR: A live probe against Plane Community Edition broke two assumptions in a 905-line sync spec before any code was written. Hidden HTML comments for identity were stripped by server sanitization, and the archive endpoint returned 404 because CE trails cloud. Fix stores metadata in visible text and a config file, uses Done instead of archive, and hashes normalized text.
#plane#self-hosting#rest-api - 17:27backend
Not Just SQL: When API Fan-out Kills Your Monitor
Fixing an N+1 API fan-out in commitcheck: one pagination pass replaces 250 requests, SSL timeout gone, runtime down to 27.5s.
TL;DR: The monitor hung for over 100 seconds because each candidate triggered full pagination, creating roughly 250 requests per run. Replacing per-candidate checks with a single paginated fetch into a commit-to-slug map removed the N+1 overhead. Runtime dropped to 27.5 seconds with only a few requests and no change to the API contract.
#pagination#performance#api - 10:01ai
Hidden instructions in media files: prove they stay data
The transcript must carry the hijack sentence verbatim as data. That is exactly how you prove a media file never acted as an instruction.
TL;DR: The author deliberately embedded a prompt-injection sentence into an audio fixture to test a media pipeline's defenses. Counterintuitively, the test requires the hostile transcript to stay verbatim and labeled untrusted, since injection is about text switching from data to instructions. The real defense is a contract proving content never becomes commands, not filtering text or trusting the model's intelligence.
#prompt-injection#llm-security#whisper - 09:55backend
Replacing WordPress database URLs with WP-CLI, not raw SQL
WP_HOME only fools new pages; old URLs live in the database. WP-CLI search-replace with dry-run and skip-columns=guid is the fix.
TL;DR: Moving a WordPress production dump locally means changing WP_HOME and WP_SITEURL won't fix URLs already stored across posts, meta, and serialized options. Raw SQL REPLACE() is risky because it breaks PHP serialized length prefixes and can overflow column limits. Instead, use wp search-replace with a --dry-run first, always skipping the guid column since those permalinks must never change.
#wordpress#wp-cli#php - 09:01devops
The Status Value That Shouldn't Exist Yet
A weeks-old file carried a status value the old reader never wrote. The vocabulary changed without a schema version bump. A lesson in data contracts.
TL;DR: A checker warning revealed a transcript file whose status value didn't exist in the old reader's vocabulary. The fix splits failures into unknown-status, where the reader lags, and legacy-enum-status, where a writer changed vocabulary without bumping the schema version. Lesson learned: treat enum changes as schema changes and bump versions in the same commit.
#python#schema#backward-compatibility - 04:03devops
Event Log Integrity the Git Way: A Frame Tamper Story
A one-byte frame tamper taught me how content-addressed sidecars, an append-only event log, and disk-truth verification keep a pipeline recoverable.
TL;DR: When a corrupted frame triggered media-quarantine instead of a crash, the kernel proved it rebuilds state from events and verifies files from disk, never trusting recorded hashes. Content-addressed caption sidecars give free deduplication, while the append-only log enables clean recovery through full rebuilds. But hash chains prove tamper-evidence, not authenticity—integrity is an architecture, not a checksum ritual.
#git#event-sourcing#automation