Lab: The defences in the repository, measured
Module 8 · Lab · About 75 minutes · Needs: lessons 1 to 4 of this module, and the Module 1, 5 and 6 labs (this lab rebuilds what is missing)
What you are building
Wednesday 30 September 2026, the end of the security review. The lessons stopped each attack in a notebook file of its own. This lab moves the defences into the repository: pinning.py blocks changed tools, guard.py checks writes and scopes sessions and environments, examples/m08_gateway.py holds the copy rule, and examples/m08_lab.py holds the planted notes, one stand-in and the outcome matrix, now with pinning and the restricted environment, as Lesson 4 promised. Ten tests and a commit answer Priya's question: "How do we know the fixes work?"
No step calls a model. Attacks are labelled placeholders, and the stand-in follows a fixed plan without reading note text.