# Organising lanes after the fact **🔵 Expert · Lesson 31** LANES ARE ORGANISED AFTER THE FACT, NOT PLANNED IN ADVANCE. Expert 23 cut branches and joined them. This is the other three verbs - the ones for when you got the shape wrong the first time. research_attach(lane, onto=, at_spell_id=) re-anchor ancestry research_detach(lane) forget the anchor research_archive(lane) retire a dead end ANCESTRY IS ORGANISATION, NOT CONTENT. Every one of these moves where a lane SAYS it came from. None of them copies, moves or deletes a version. That separation is why re-organising is cheap and safe: the nodes never move, so a wrong anchor is a wrong label rather than lost work. ATTACH IS ALL-OR-NOTHING, and it refuses before taking a lock: `onto` and `at_spell_id` must both be supplied. There is no "anchor to whatever the tip is" shorthand, because the anchor is the one fact a later join reasons about - a shorthand would let you record a different anchor than you meant. DETACH IS NOT A DELETE. It removes the anchor, leaving a lane that remembers nothing about where it came from. A detached lane can still be joined, but the join is DIVERGENT by definition - no anchor means nothing for the receiver's tip to agree with - so it needs the same explicit `force=True` supersede. ARCHIVE RETIRES A LANE WITHOUT LOSING IT. Residence is permanent: the versions stay resident in the archived container, rediscovery still points at it, and a network snapshot can restore a view that contained it. Archiving hides a dead end from the ACTIVE view; it does not unmake it. AND THE DEFAULT LANE NEVER ARCHIVES. It is the guaranteed world-entry record - `register_spell` without a lane records there, and `default_lane` resolves by well-known name - so a set that archived it could not serve its own default. The refusal is checked at the door rather than discovered later. ## 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/31_organising_lanes_after_the_fact.py ``` ```powershell py -3.14t UX_and_AIX_experiences/04_expert/31_organising_lanes_after_the_fact.py ``` {download}`Download this collection <../../downloads/expert-examples.zip>` · [Source on GitHub](https://github.com/Synaptic724/melder/blob/4b364a338debcb1c010d0f6e9dcbbabb62945ba0/UX_and_AIX_experiences/04_expert/31_organising_lanes_after_the_fact.py) ## Public surface research_create_lane / research_attach / research_detach / research_archive / research_join / research_heads, ResearchSet.lane_names, Conduit.bind_inactive ## Code ```{literalinclude} ../../downloads/04_expert/31_organising_lanes_after_the_fact.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) - [ResearchSet](../../reference/api/research/researchset.md)