Lesson 2: Structuring a server: layers, settings, checks and logs
24 min read·13 Oct 2026
Module 5 · Lesson 2 · About 45 minutes · Needs: Lesson 1 of this module (the package); Module 3 Lesson 3 (ToolError,leaks())
The situation
Monday 21 September 2026, week 3. Lesson 1 turned the notes server into the package notes_assistant/. This week it runs three ways: in memory in your tests, over stdio when Nare's desktop host starts it, and over HTTP on 127.0.0.1:8050. Nare's host gives it a command and a few environment variables, nothing else.
What lives where decides whether that works. This lesson traces one call, search_notes("nap study participants", limit=3), and one launch, through the package's parts, and fixes what breaks.