# Reading your own recorded code **🔵 Expert · Lesson 29** THE CRYSTAL WELL - reading the code your world RECORDED, at four grains, and the one comparison law that makes any of it trustworthy. Expert 04 said diffs are derived, never stored. This is what they are derived FROM. THE FOUR GRAINS, WIDEST TO NARROWEST research_source(spell_id) the whole module WORLD research_module(spell_id, module_name) ONE module, full dossier research_parts(spell_id) every part, with code research_part(spell_id, part_name) ONE named class/function They are not four ways to do one thing. `research_parts` is the INVENTORY - it needs no names up front, which is exactly what you want before you know what is in there. `research_part` is the lookup for when you do. `research_module` is the one-call dossier: text, fingerprint, path, dependencies BOTH ways, export surface and drift together, because separately fetching those is five calls and a join. THE COMPARISON LAW, AND IT IS THE POINT `research_part_diff(left, right, part)` compares RECORDED MATERIAL ONLY and never the live disk. That refusal is correctness, not caution: both sides of a version comparison would read the SAME present-day file, so a disk-backed diff would report "no change" between two genuinely different versions and be confidently wrong about both. The record is the only place where two versions exist at the same time. Diff material drinks BOTH carriers - synthetic first, user-retained filling the gaps - so it speaks the full module whether the code was generated or hand-written. IMPACT STAYS MODULE-GRAIN ON PURPOSE. A part's honest blast radius IS its module's radius, because nothing imports half a file. A part-grain number would be smaller and mean nothing. CUSTODY IS REQUIRED AND THE REFUSAL IS LOUD. These read from the recorded world, so an absent or inactive crystallizer raises rather than returning empty - a silent empty read is indistinguishable from "this world has no code", which is never true. This lesson catches that refusal and says so rather than pretending every environment can serve it. ## Before you run Use the [Expert guide](../../expert/index.md) for prerequisite concepts. Run from a checkout with Melder installed and Python 3.14 free-threading selected. The collection download includes the level's local helper modules. ## Run the saved script ```bash python UX_and_AIX_experiences/04_expert/29_reading_your_own_recorded_code.py ``` ```powershell py -3.14t UX_and_AIX_experiences/04_expert/29_reading_your_own_recorded_code.py ``` {download}`Download this collection <../../downloads/expert-examples.zip>` · [Source on GitHub](https://github.com/Synaptic724/melder/blob/1211e838099a342c9dde48f064b1e772b6060e13/UX_and_AIX_experiences/04_expert/29_reading_your_own_recorded_code.py) ## Public surface validate_codegen / materialize_codegen, research_source / research_module / research_parts / research_part / research_part_diff / research_module_graph / research_source_drift / research_impact / research_residency / research_history / research_recent, Conduit.bind_inactive ## Code ```{literalinclude} ../../downloads/04_expert/29_reading_your_own_recorded_code.py :language: python :linenos: ``` ## Check the outcome The script contains its own assertions or demonstrated refusal paths. Run it to evaluate those checks against your installed version. The code above is taken directly from the saved file; no run output is invented here. [More expert examples](index.md) · [Level guide](../../expert/index.md) ## Related guides - [Research sets, lanes, residency, and recorded source](../../expert/research.md) ## API contracts - [Conduit](../../reference/api/resolution/conduit.md)