# Rewiring a running world **🔵 Expert · Lesson 16** CHANGING THE WIRING WHILE THE WORLD RUNS. A dynamic world can gain a relationship after it is built: two conduits link, one pulls a spell it does not own into its contract, and the next meld resolves through the new edge. Three verbs, no ceremony. owner.link(borrower) borrower.add_spell_to_contract(spell_id=..., conduit=owner, ...) borrower.meld(...) EACH VERB IS COMPLETE IN ITSELF. There is no window to open, no session to hold, nothing to commit afterwards. A structural verb does its own bookkeeping and either finishes or refuses - so the only thing a caller has to get right is the ORDER, and the order is just dependency order. SHARING IS A PULL, AND THE DIRECTION IS THE COMMON MISTAKE borrower.add_spell_to_contract(spell_id=S, conduit=owner) reads "borrower pulls S from owner", and the conduit NAMED in the call must OWN S. An owner trying to PUSH its spell into someone else's contract is refused with "not owned by this conduit". The receiver asks; the provider does not give. THE ORDER OF OPERATIONS, PER DEPENDENCY EDGE 1. conjure the PROVIDER conduit 2. conjure the CONSUMER conduit 3. link() - only after BOTH exist 4. the consumer pulls the provider's spell into the contract 5. meld - this completes the late binding for that world Chains assemble edge by edge. Skip step 5 on a middle world and its consumer constructs with its Python default instead of the melded object - that is a usage error with a visible symptom, not a runtime gap. WHY YOU DO NOT HAVE TO THINK ABOUT CONCURRENCY HERE Melder serializes structural change internally, at a grain fine enough that independent work overlaps: two agents adding to the same spellbook do not wait on each other, while an operation that changes what that spellbook IS excludes them both. None of that vocabulary belongs in your code. If it ever shows up in a traceback you will get the blocking holder named, not a hang. AND A WORLD CAN BE TOLD IT DOES NOT DO THIS `link()` asks the frame posture FIRST, and the posture gate answers for both of the obvious cases: a dynamic world with disable_linking=True -> refused an ordinary static world -> refused BOTH GET THE SAME SENTENCE - "Linking is disabled for the current frame posture." - and that surprised the author of this lesson, who expected the static world to complain about dynamic mode. It does not, because an unconfigured non-dynamic frame is already "not allowed to link" as far as the posture gate is concerned; the separate dynamic-mode message sits behind that gate and only surfaces when the posture passes and the CONDUIT was nevertheless conjured non-dynamic. The lesson: the message names the GATE that refused, not the property you were thinking about. Two different worlds, one gate, one sentence. ## 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/16_rewiring_a_running_world.py ``` ```powershell py -3.14t UX_and_AIX_experiences/04_expert/16_rewiring_a_running_world.py ``` {download}`Download this collection <../../downloads/expert-examples.zip>` · [Source on GitHub](https://github.com/Synaptic724/melder/blob/0895ce795453cd87e35d70665957b4e89aad3317/UX_and_AIX_experiences/04_expert/16_rewiring_a_running_world.py) ## Public surface md.Spellbook.bind / conjure / configure_aether_frame, Conduit.link / add_spell_to_contract / meld ## Code ```{literalinclude} ../../downloads/04_expert/16_rewiring_a_running_world.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 - [Structural transactions and admission](../../expert/transactions.md) ## API contracts - [Spellbook](../../reference/api/binding/spellbook.md) - [Conduit](../../reference/api/resolution/conduit.md)