Lab: Search tools for the returns desk
Module 9 · Lab · About 75 minutes · Needs: the Module 3 lab'stools.py, and lessons 1 and 2 (hybrid search,SearchBudgetand the category filter; grep, structured queries, the run log and the citation check)
What you are building
The lessons built search in a notebook. This lab moves it into returns_desk/search.py, the file Module 9 adds to the repository. It holds Lesson 1's hybrid engine and search budget, and Lesson 2's file search, order query, run log and citation check, all as tools.
Module 3's tools.py already has a search_help_centre(query, page, max_chars), and Module 3's door, call, refuses any argument its definition does not list. Lesson 1's search added category. The lab reconciles the two in the new file: search.py defines a wider search_help_centre with the same arguments and result shape plus an optional category, and a door that checks its own definitions and passes every other call to Module 3's call. tools.py is imported, never rewritten. Then tests, and Aisha's repeat request, R-1006, worked end to end. Everything at BrightCart is simulated.