# One config every book **🟡 Intermediate · Lesson 35** ONE SPELLBOOK CONFIGURATION SHARED BY EVERY BOOK. When several books make up one subsystem, per-book configs drift - one book's teardown vocabulary says "close", another forgot it. The fix is ONE SpellbookConfiguration for the whole subsystem. KNOW WHICH OBJECT YOU ARE TALKING ABOUT. A frame has two: * the FRAME POSTURE (AethericFrameConfiguration) - narrow: system state, ai-native, rift, the devops brakes. It is SHARED WITH EVERY BOOK ON THE FRAME ALREADY, by default, with no opt-in. The frame mints exactly one and every Spellbook only borrows that reference. Set posture through any one book and every book on that frame reads it. * the RICH CONFIG (SpellbookConfiguration) - wide: disposal, disposal method names, scheduler workers, barrier timeout, singleton specialization. THIS one is PER-BOOK by default. Two books on the same frame mint two separate ones. This lesson is about making the RICH one shared. Two shapes: SHAPE 1 - MANUAL SHARE (fully public, works today, shown below): 1. build ONE SpellbookConfiguration for the frame 2. set the policy on it once 3. hand THE SAME OBJECT to every Spellbook you construct Every book now reads one policy, by reference. The first conjure freezes that object; every later book's conjure re-enters the freeze and locks against the same object. SHAPE 2 - FRAME-OWNED SHARE (the frame holds the config and later books ADOPT it with nothing passed). The machinery is complete and it takes exactly two things, in this order: 1. THE SWITCH - the frame posture must carry shared_framewide_spellbook_configuration=True. Every sharing path early-outs while it is False. It must be flipped BEFORE the frame's first conjure, because the posture freezes on that first bind and the switch is refused once frozen. 2. PUBLICATION - one book binds its rich config to the frame. Two doors do this, whichever runs first: configure_aether_ frame(), and conjure() itself (conjure freezes and binds whenever the book is not already locked). FIRST ONE WINS. Then every book constructed AFTER that adopts the frame-owned object at construction and reports is_configuration_locked() True; a book that already existed converges at its own conjure, swapping to the shared object and cleaning up its local one. Handing a DIFFERENT config to a later book on that frame is refused. Adoption is total - no per-book override - and a book's cleanup() leaves the shared object alone. HONEST GAP: shape 2 has NO public switch today. Nothing in the public API sets shared_framewide_spellbook_configuration - every construction site in the runtime passes False or omits it, and no Spellbook door exposes the retained posture. So shape 1 is the answer to "one config for every book" until a door exists. The probes pin shape 2's machinery through the private seam so it cannot rot while it waits. ## 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/35_one_config_every_book.py ``` ```powershell py -3.14t UX_and_AIX_experiences/02_intermediate/35_one_config_every_book.py ``` {download}`Download this collection <../../downloads/intermediate-examples.zip>` · [Source on GitHub](https://github.com/Synaptic724/melder/blob/0895ce795453cd87e35d70665957b4e89aad3317/UX_and_AIX_experiences/02_intermediate/35_one_config_every_book.py) ## Public surface one configuration object across multiple books ## Code ```{literalinclude} ../../downloads/02_intermediate/35_one_config_every_book.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 - [Configuration before conjure](../../intermediate/configuration.md)