← All entries

Dev Log

Build notes from the Jefe ecosystem

Titan Migration Day Two: Bots, Models, and a RAG Bug That Broke the Chatbot

Mission Control 2026-03-25

Massive infrastructure session: migrated Jefebot, JefeHome, and Grocy to Titan, fixed the portfolio chatbot's broken RAG scoring, solved a CUDA GPU architecture incompatibility, got ComfyUI image generation working through the Discord bot, cleaned 5 decommissioned services from Jenkins pipelines, designed a nightly autonomous code review system, and planned local DNS with Traefik reverse proxy.

The RAG Bug That Made the Chatbot Look Stupid

The jeffhulford.com chatbot was returning the same canned bio for every question. Turns out ChromaDB defaults to L2 (squared Euclidean) distances, but the relevance scoring assumed cosine distance (0-1 range). Every query returned distances around -270, which the threshold filter rejected as irrelevant. One-line fix: 1 - dist became 1 / (1 + dist). The chatbot went from a broken record to giving specific, contextual answers about projects, skills, and experience.

ComfyUI: CUDA Kernel Mismatch

ComfyUI's ai-dock image shipped with PyTorch 2.4.1+cu121, which didn't support our GPU's compute capability. Every image generation silently failed. Fixed by upgrading to PyTorch 2.11.0+cu128 inside the container, which added support for our GPU architecture. Committed the working container as a custom image so the fix survives recreates. Also fixed Jefebot's ComfyUI integration which was trying to read generated images from a hardcoded Windows path instead of downloading via the HTTP API.

Jefebot Migration: Death by a Thousand Missing Files

Migrating Jefebot to Titan exposed every file that wasn't in the source tree: .twitch_tokens.json, twitch_channels.json, film club data, trivia scores, user preferences. The initial migration missed half the state files, causing Twitch auth failures, empty film queues, and permission errors. Eventually got devops-engineer to audit the whole thing and clean up the mess. Lesson reinforced: inventory ALL files before migrating, not just the obvious ones.

Grocy: Household Management on Titan

Migrated Grocy from an old Windows install to a Docker container on Titan. 387 products, 225 stock items, 51MB of product pictures. Had to reset the password via PHP inside the container because the bcrypt hash format from Python ($2b$) wasn't matching what PHP's password_verify expected ($2y$).

Jenkins Pipeline Cleanup

Removed 5 decommissioned Windows services from the startup/shutdown pipelines: Ollama, JefeAI API, Cloudflare Tunnel, Jefebot, and GygaxBot. All now run as Docker containers on Titan with --restart unless-stopped. 397 lines of dead Groovy/PowerShell removed across 8 files.

Nightly Code Reviews: The Big Architecture Decision

Designed a system where local Ollama models scan repos nightly for code quality, security, and convention violations, with Claude supervising the local models' output quality. The key insight: Jenkins is the alarm clock, JefeAgentOS is the brain. This becomes the initiative that evolves JefeAgentOS from a Claude CLI wrapper into a real AI orchestration platform. Full spec at planning/NIGHTLY-CODE-REVIEW-SPEC.md.

DNS and Reverse Proxy Planning

Decided on a wildcard internal service domain, Traefik as the reverse proxy (Docker-native label-based auto-discovery beats Caddy's file-based config for our all-Docker setup), and DNS-01 via Cloudflare for real Let's Encrypt certs. Phased rollout: local DNS entries first, then Traefik, then HTTPS. Also pulled Flux.1 Dev GGUF (~21GB) for next-gen image generation.

What's Next

  • Flux.1 integration in ComfyUI (models downloaded, need extra_model_paths update + restart)
  • Credential rotation system design
  • JefeAgentOS migration to Titan
  • Traefik + local DNS deployment
  • Nightly Code Reviews Phase 1 (pending 6 decision points)
  • Video generation exploration with the GPU server