(late-binding-with-spellcontract)= # Late binding with SpellContract: runnable example **🟡 Intermediate · Lesson 36** SpellContract - the LATE-BOUND socket. A SpellMap says "resolve this from MY book" and must be satisfiable at conjure. A SpellContract says "someone will hand me this later", and stays OPEN until a linked conduit supplies the provider. That is the difference: SpellMap is a lookup, SpellContract is a PROMISE. The socket closes with normal verbs only - link, grant, meld. Nothing reaches into another book; the provider conduit GRANTS the spell across the link and the consumer melds as usual. Contracts are dynamic-mode only. In an automatic world Phase 4 refuses them outright, which is why this lesson settles a dynamic world first. ## Before you run Use the [Intermediate guide](../../intermediate/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/02_intermediate/36_late_binding_with_spellcontract.py ``` ```powershell py -3.14t UX_and_AIX_experiences/02_intermediate/36_late_binding_with_spellcontract.py ``` {download}`Download this collection <../../downloads/intermediate-examples.zip>` · [Source on GitHub](https://github.com/Synaptic724/melder/blob/90d52e0a12cb0743d62568d5a19ce954a54443bc/UX_and_AIX_experiences/02_intermediate/36_late_binding_with_spellcontract.py) ## Public surface md.SpellContract(spellframe=..., binding_name=...), conduit.link(...), conduit.add_spell_to_contract(...) ## Code ```{literalinclude} ../../downloads/02_intermediate/36_late_binding_with_spellcontract.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 intermediate examples](index.md) · [Level guide](../../intermediate/index.md) ## Related guides - [Late binding with SpellContract](../../intermediate/late-binding.md) - [Connected subsystem walkthrough](../../intermediate/connected-subsystems.md) ## API contracts - [SpellContract](../../reference/api/resolution/spellcontract.md)