5 min read

Building BuchhalterPython: Types, Tests, and a Hallucinated API Key (Part 4)

After Part 3 left four LXC containers running and the src/ directories empty, Phase 4 starts writing actual code. The first day of implementation produces two closed issues, one rejected framework, and one bug that had already been caught once. Part 4 of the Building BuchhalterPython series. Part 3 covers provisioning four LXC containers with OpenTofu and Ansible. The Bug That Appeared Twice Issue #12 had already documented a type error in the Pydantic model for the Paperless API: tags: list[str] instead of list[int]. Paperless returns tag IDs as integers. The model had used strings. That bug was fixed, documented in llm/domain-knowledge/01-paperless-api-reference.md, and noted in ERROR_PATTERNS.md.

pydantic tdd python agentic-coding langchain microservices domain-knowledge testing