livery.workshop._materialise¶
livery.workshop._materialise ¶
Link wheel-shipped content into a checkout, the way the fragment engine does it.
The fragment engine delivers skills and hooks as links into the listed extensions' shipped content (livery.workshop._fragment_engine) and calls these for the mechanism. Links are the zero-drift way (an extension upgrade moves every checkout at once, nothing to re-copy) but they are an optimisation, not the contract: where a link cannot be made, the same content is copied and refreshed on every sync.
Link mechanism, in order of preference: a relative os.symlink (a
relative target survives the repository moving; in the monorepo the
target sits inside the repository, so containment holds by
construction); a Windows directory junction, which needs no privilege
where symlinks do; a copy, whose digest the engine records so the next
sync tells a stale copy of ours from a local edit.
Local content always wins. A real entry whose content differs from
the shipped one is a deliberate override: it is kept and named, and the
engine's self-scoped .gitignore leaves it out, so the override
commits like any repository file.
Editing through a link writes into the wheel. In the monorepo that is correct: the target is the source tree. In an instance it edits site-packages, machine-wide and lost on the next upgrade; the escape is to copy the entry to a real directory of the same name, which then takes precedence.