Dev Log: January 14, 2026
podcast-summarizer-v2
Designed and planned the round-robin channel variety and daily send limits features for the podcast summarizer. Both features integrate cleanly at the claim query level, requiring just one new column and smarter SQL rather than new tables or infrastructure. Went through multiple rounds of code review to get the concurrent claiming logic right, particularly around per-user partitioning for round-robin and in-flight counting for daily limits. Finalized a 12-task TDD implementation plan with 19 unit tests and 3 integration tests across 9 files.
Current Architecture (post-redesign):
- Orchestrator routes work → GPU Transcriber or CPU Processor
- Claim queries use LIFO (newest first) with validation priority
- Existing tier infrastructure:
UserTierenum,UserUsagetable,User.tiercolumn already exist - Throughput: ~150-200 deliveries/hour (token-limited by LLM quota)
Design Philosophy:
- Both features integrate at the same point (claim query) which keeps the architecture clean
- Round-robin + daily limits work together naturally: if your limit is 5 and you have 5+ channels, you get variety automatically
- No new tables or infrastructure needed - just one column + smarter SQL
Key learning from this review:
- The round-robin PARTITION BY needs to be per-user, not global, otherwise one user’s variety comes at the expense of others
- Atomic claiming with SQL Server hints (
UPDLOCK, READPAST, ROWLOCK) is essential for concurrent processors - Counting today’s sent emails must also account for in-flight (processing) deliveries
Key architectural improvements from review:
- The in-flight counting is crucial - without it, concurrent CPU processors could exceed limits
- Per-user partitioning for round-robin prevents unfair distribution across users
- SQL Server locking hints (
UPDLOCK, READPAST, ROWLOCK) are essential for concurrent claim safety
Plan Structure:
- 12 tasks, each with 3-7 steps (TDD: write failing test → implement → verify → commit)
- ~385 lines of code across 9 files
- SQLite query for unit tests, MSSQL query for production (both use CTEs + window functions)
- API tests cover auth, validation, tier defaults, and edge cases
TDD Flow: The plan follows strict TDD - failing tests are committed before implementation (Tasks 4→6, 5→6, 8→9). This ensures the implementation actually satisfies the test cases.
Query Duality: Maintaining two SQL dialects (SQLite for tests, MSSQL for prod) is common in Azure SQL projects. The SQLite query lacks locking hints because SQLite doesn’t support them, but the logic is identical.
Design-Implementation Traceability: The updated summary now includes a “Gaps addressed from design doc” table that maps each design section to its implementation. This makes it easy to verify during code review that nothing was missed.
Test Pyramid: The plan now has 19 unit tests (pre-merge safety net) and 3 integration tests (post-merge validation). This follows the test pyramid pattern - fast unit tests catch most issues, slower integration tests verify production behavior.
career
Researched the Anthropic TPM Launches role and began tailoring resume materials. The role is product-focused rather than infrastructure-focused, sitting at the intersection of research, engineering, product, and go-to-market. A key differentiator is the need to earn trust with ML researchers through deep technical fluency.
Anthropic TPM Launches Role Analysis:
- This is a product-focused TPM role (not infra TPM) - coordinating model launches to customers
- Key differentiator from typical TPM: requires earning trust with ML researchers - deep technical fluency to engage meaningfully on model capabilities
- The “Launches” function sits at the intersection of research → engineering → product → go-to-market
Template Strategy for Anthropic:
- Anthropic values density over length - elite small teams expect concise, high-signal resumes
- The JD emphasizes “earning trust through deep engagement with details” - bullets should show technical depth
- Launch-specific framing is critical: reposition “infrastructure TPM” → “launch-focused TPM”
courses
Built a PDF OCR tool using Apple’s Vision framework with GPU/Neural Engine acceleration, and continued studying distributed systems papers on transaction recovery protocols.
Key design choices in pdf_ocr.py:
- PyMuPDF (fitz) for PDF→image: This library is fast and reliable for rendering PDF pages at arbitrary DPI. Higher DPI = better OCR but slower processing.
- ThreadPoolExecutor for parallelism: Apple’s Vision framework releases the GIL during GPU work, so Python threads can effectively parallelize OCR across pages.
- Vision OCR sorting: Text observations are sorted by bounding box (top-to-bottom, left-to-right) to preserve reading order.
The pdf_ocr.py tool is now available at /Users/varunr/projects/tools/pdf_ocr.py
- Uses Apple Vision OCR with GPU/Neural Engine acceleration
- Usage:
python pdf_ocr.py <pdf_file> [-o output.md] [--dpi 200] [--workers 8] - Outputs markdown, text, or jsonl formats
The core trade in NPrC:
- Instead of logging each transaction’s start, track the range of possibly-active transaction IDs
- This avoids per-transaction forced writes at protocol start
- The cost is storing ~500 bytes permanently per crash (negligible)
- This is a classic “precise vs approximate” tradeoff — approximate bounds are cheaper to maintain
Why this paper matters (1993 → today):
- The “range tracking instead of per-item logging” pattern appears in many systems (LSM trees, write-ahead logs, etc.)
- Trading rare-event costs for common-event costs is a recurring optimization strategy
- The analysis style — precisely accounting for messages, forced writes, non-forced writes — is how real distributed systems are designed