# Preview, stage, and govern structural change Prerequisites: [research](research.md), [codegen](codegen.md), and [structural admission](transactions.md). Begin with the existing version's residency, source, and impact. `research_preview` can combine a candidate analysis with the selected frame's codegen verdict before any candidate is bound. The foresight example checks that preview leaves research heads unchanged and the original pricing object still returns its original result. A malformed candidate returns parse information that the caller can inspect. ## Staging is not promotion `bind_inactive` places a candidate into the existing SpellIndex while the selected member remains unchanged. Expert 17 asserts the member set, unchanged selection, and unchanged resolved result. The runtime's promoting verb is `notch_spell`, which accepts a Spell object. The saved public staging lesson deliberately stops before hand-driving that operation: its demonstrated lookup by the parked ID returns the currently active member. Do not substitute a private-map access or claim that this lesson performs a full swap. The README's notch sketch assumes those version objects are already held. ## Keep history and code reconciliation distinct An anchored research lane starts empty. A clean join checks its relation to the receiver's current tip. A forced join records explicit supersede; it does not merge source code. Compose and evaluate the candidate first, then record the chosen outcome through the applicable public operation. Archive hides a lane from the active view while retaining its history. It is not runtime object disposal. Keep deliberate version retirement and application cleanup separate from lane organization. ## The workflow in code These are the core steps from the saved example. Use its complete linked script for all class definitions and setup. ```{literalinclude} ../downloads/04_expert/22_asking_what_code_would_do_before_running_it.py :language: python :pyobject: main :linenos: ``` ## Runnable examples - [Asking what code would do before running it](../examples/expert/22-asking-what-code-would-do-before-running-it.md) — Expert 22 - [Notch swapping a live object](../examples/expert/17-notch-swapping-a-live-object.md) — Expert 17 - [Branching the record and joining back](../examples/expert/23-branching-the-record-and-joining-back.md) — Expert 23 - [Codegen create modify iterate](../examples/expert/26-codegen-create-modify-iterate.md) — Expert 26 [All expert examples](../examples/expert/index.md) · [Level contents](index.md) · [Full contents](../contents.md) [Canonical page source](https://github.com/Synaptic724/melder/blob/a30a754d0bb61db0b142936010cdb82cffecec6f/docs/expert/governed-change.md)