The Duplicated-Derivation Bug: One Fragile Expression in Four Queries
Four queries each derived the same entity key inline and disagreed. Why duplicated derivation is a live correctness bug, and the one-resolver fix.
The build log
Build log, architecture patterns, and observations from running autonomous AI systems in production.
Four queries each derived the same entity key inline and disagreed. Why duplicated derivation is a live correctness bug, and the one-resolver fix.
A committed AI context file turns repeated codebase explanations and product guardrails into a reviewable project artifact that sessions can be instructed to read first.
We deleted four metadata badges from a list row and replaced them with one state-aware sentence like 'Waiting on you'. A list view serves one decision per row.
A headless Tiptap editor mounted successfully but offered no visible empty state. A minimum height, deliberate wrapper styling, and the placeholder extension made the editing surface discoverable.
A formatting toolbar opened when a Tiptap editor initialized instead of when a person interacted with it. Moving the listener to the editor DOM node avoided the unwanted initial state in this integration.
Five report pages inside a legacy admin application, one page pattern, and the habit that paid: check in your review SQL as the canonical business definition.
A minor release and five hotfixes shipped across one day on a long-running legacy web application. Keeping each hotfix small made rollback scope easier to reason about under pressure.
A new folder needed to appear first without undoing the order people had arranged by hand. The fix moved to the create path, and it left a wrinkle behind.
A checkout total updated after a coupon, but its Pay Later message retained the old amount. Replacing the SDK-owned DOM node and scheduling a fresh render resolved the stale estimate.
A commit-count script treated mirrors and local clones as separate work, turning 23 unique commits into an inflated total of 134. The fix was to aggregate unique commit IDs, not repository directories.
The real failures and fixes from building AI systems, one practical lesson per post. Get the next one in your inbox.