<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Morningstar Lucifer&#x27;s Blog</title>
    <link>https://myaiwebdev.com/en/blog/</link>
    <description>Field notes from an AI engineering systems architect: each post takes one real problem from AllyOS and explains the fix with measured numbers. Claude Code, multi-agent pipelines, incident reviews.</description>
    <language>en</language>
    <lastBuildDate>Fri, 04 Dec 2026 08:00:00 +0800</lastBuildDate>
    <atom:link href="https://myaiwebdev.com/en/blog/feed.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Postgres migrations: why reset lock_timeout after SET?</title>
      <link>https://myaiwebdev.com/en/blog/postgres-migration-lock-timeout-reset/</link>
      <guid isPermaLink="true">https://myaiwebdev.com/en/blog/postgres-migration-lock-timeout-reset/</guid>
      <pubDate>Fri, 04 Dec 2026 08:00:00 +0800</pubDate>
      <category>Data &amp; Access Control</category>
      <description>Use a plain SET lock_timeout before the DDL it protects and RESET lock_timeout right after; avoid SET LOCAL. Without the reset, a later backfill in the same file inherits the limit and is cancelled; SET LOCAL can be silently discarded. Measured 2026-12-04 on local PostgreSQL 16: backfill cancelled at 5.03 s without the reset, finished at 7.04 s with it.</description>
    </item>
    <item>
      <title>How do you stop two sales reps from calling the same lead?</title>
      <link>https://myaiwebdev.com/en/blog/stop-two-sales-reps-calling-same-lead/</link>
      <guid isPermaLink="true">https://myaiwebdev.com/en/blog/stop-two-sales-reps-calling-same-lead/</guid>
      <pubDate>Thu, 03 Dec 2026 08:00:00 +0800</pubDate>
      <category>For Business Owners</category>
      <description>Don&#x27;t make the first caller the owner. Add a separate &quot;working this lead&quot; mark: the first rep to call, text or email gets it; it is derived from contact history you already keep, so no backfill; it never expires; a second rep gets a warning with &quot;Call anyway&quot;, not a block; only a manager can move or clear it, and each change is logged.</description>
    </item>
    <item>
      <title>How to match a new lead to an existing account by email domain</title>
      <link>https://myaiwebdev.com/en/blog/match-leads-to-company-by-email-domain/</link>
      <guid isPermaLink="true">https://myaiwebdev.com/en/blog/match-leads-to-company-by-email-domain/</guid>
      <pubDate>Thu, 03 Dec 2026 08:00:00 +0800</pubDate>
      <category>For Business Owners</category>
      <description>Use the email domain as the company key, but give public mailboxes (Gmail, Outlook, Yahoo), throwaway domains and your own domain no key. Keep public mailboxes in a maintained list, not a heuristic. Don&#x27;t fold subdomains. A match only flags the lead for its existing owner; staff confirm attaching the contact. If one domain fits several owned companies, tell a manager.</description>
    </item>
    <item>
      <title>Self-hosted LLM with cloud fallback: what timeout should you set?</title>
      <link>https://myaiwebdev.com/en/blog/local-llm-cloud-fallback-timeout/</link>
      <guid isPermaLink="true">https://myaiwebdev.com/en/blog/local-llm-cloud-fallback-timeout/</guid>
      <pubDate>Wed, 02 Dec 2026 08:00:00 +0800</pubDate>
      <category>Architecture Decisions</category>
      <description>Give the self-hosted hop its own timeout, or a hung local server means the cloud fallback never runs. Use 25 seconds when a person watches a page and 60 for background jobs, so &quot;local timeout + one cloud call&quot; fits the platform&#x27;s 150-second limit. Fall back on a local 401/403 or HTML page, but still stop on a cloud 401.</description>
    </item>
    <item>
      <title>Why does incremental sync by updated_at silently miss records?</title>
      <link>https://myaiwebdev.com/en/blog/incremental-sync-timestamp-watermark-ties/</link>
      <guid isPermaLink="true">https://myaiwebdev.com/en/blog/incremental-sync-timestamp-watermark-ties/</guid>
      <pubDate>Tue, 01 Dec 2026 08:00:00 +0800</pubDate>
      <category>Incident Review</category>
      <description>If a sync asks for &quot;updated_at &gt; last max timestamp&quot; and each run has a page cap, a cap that cuts through records sharing one timestamp loses the rest of that group for good. Fix it by storing &quot;within this instant, read up to id X&quot; next to the watermark, and never let a failed run blank the cursor. Measured 2026-12-01: 6 of 7 reproduction tests failed before the fix, all 7 pass after.</description>
    </item>
    <item>
      <title>Add plpgsql_check to CI Without Drowning in Legacy Errors</title>
      <link>https://myaiwebdev.com/en/blog/static-analysis-baseline-legacy-codebase/</link>
      <guid isPermaLink="true">https://myaiwebdev.com/en/blog/static-analysis-baseline-legacy-codebase/</guid>
      <pubDate>Mon, 30 Nov 2026 08:00:00 +0800</pubDate>
      <category>AI Dev Pipeline</category>
      <description>PostgreSQL plans PL/pgSQL queries only on first run, so a dropped column silently breaks functions that still name it. Run plpgsql_check in CI inside a rolled-back transaction, report only until you know the backlog, then freeze it in a shrink-only baseline that fails on any new error. Of 1,632 functions, 7 had errors; 2 were real bugs.</description>
    </item>
    <item>
      <title>Claude Code in Production: One Week of Real Engineering Numbers</title>
      <link>https://myaiwebdev.com/en/blog/claude-code-one-week-engineering-numbers/</link>
      <guid isPermaLink="true">https://myaiwebdev.com/en/blog/claude-code-one-week-engineering-numbers/</guid>
      <pubDate>Sun, 29 Nov 2026 08:00:00 +0800</pubDate>
      <category>Weekly Numbers</category>
      <description>From Nov 22 to Nov 28, 2026, the AllyOS integration branch took 160 merged pull requests and 378 non-merge commits, 94% of them co-authored by Claude. Test commits (90) outnumbered feature commits (79), 294 test files were added, and pre-push guards grew from 109 to 121. Production was updated 25 times, but only 7 of those were scheduled releases; the other 18 were hotfixes, which is the number I most need to fix.</description>
    </item>
    <item>
      <title>Fix Python subprocess UnicodeDecodeError on Windows for good</title>
      <link>https://myaiwebdev.com/en/blog/python-subprocess-utf8-windows-ai-scripts/</link>
      <guid isPermaLink="true">https://myaiwebdev.com/en/blog/python-subprocess-utf8-windows-ai-scripts/</guid>
      <pubDate>Sat, 28 Nov 2026 08:00:00 +0800</pubDate>
      <category>Tools &amp; Tips</category>
      <description>Without an explicit encoding, Python decodes subprocess output and encodes print() with the OS code page (gbk on Chinese Windows). Telling the AI in project instructions was not enough, so AllyOS runs two AST checks before every push - every text-mode subprocess call must pass encoding=&quot;utf-8&quot;, and every script&#x27;s main() must pin stdout to UTF-8. Scanning 612 files takes about 1.5 s, and the checks caught 7 AI misses in 30 days.</description>
    </item>
    <item>
      <title>Why Claude Code Subagent Worktrees Silently Break Your Git Hooks</title>
      <link>https://myaiwebdev.com/en/blog/claude-code-subagent-worktree-git-hooks/</link>
      <guid isPermaLink="true">https://myaiwebdev.com/en/blog/claude-code-subagent-worktree-git-hooks/</guid>
      <pubDate>Fri, 27 Nov 2026 08:00:00 +0800</pubDate>
      <category>Incident Review</category>
      <description>When Claude Code creates a worktree, including a subagent&#x27;s isolated worktree, it rewrites the relative core.hooksPath in the shared .git/config to an absolute path, so every unpinned worktree runs the main checkout&#x27;s hooks. Run one idempotent repair script from SessionStart, PostToolUse (EnterWorktree) and SubagentStart; we measured recovery in 68 ms.</description>
    </item>
  </channel>
</rss>
