Lab: Rewrite and route every incoming message
63 min read·13 Oct 2026
Module 7 · Lab · About 80 minutes · Needs: lessons 1 to 3 of this module, and the Module 6 lab (or the cells in Step 1)
What you are building
On Friday 9 October Ellie sends four messages: "Is it covered?" after her E7 chat, where her blender is, what a jar and blades cost with delivery, and thanks. Module 6 would search all four as typed. This lab puts hollin/query/ in front. rewrite.py merges Lessons 1 and 2: the code guard, free fixes, condensing and multi-query, each falling back to the question as asked. router.py is Lesson 3: rules first, the model only when needed, a session-scoped case lookup, a calculator and a cache. Documents go to one filtered index, as Lesson 3 measured. Then you measure each transformation on the 32 labelled questions and commit.