provision, resolve and exec answer the workspace's path, and a tool
result goes to the vendor in the agent's next request. With the default
root ~/.magpie-layerfs every provision named magpie upstream.
The default root is now ~/.layerfs-tools. A ~/.magpie-layerfs made by
0.7.2 or earlier is renamed to it once, at the first backend made, and
a link is left at the old path, so a session still holding an old
workspace path keeps working. A legacy root that is itself a link (the
user's own setup) is used where it is, as is one the rename is refused
on. MAGPIE_LAYERFS_HOME set by the user is unchanged. A second host
racing the rename finds the new root and uses it.
Run, in a sandbox HOME:
- bun test packages/layerfs: 53 pass, 0 fail. bun scripts/check.mjs
layerfs: ok.
- The three #360 tests against the old default (defaultRoot answering
~/.magpie-layerfs): 2 of them red, the third (a user's link) is
unchanged behaviour.
- Through magpie's real plugin host (origin/main 4dfd88206,
plugin.Add of this package + plugin.RunTool "provision" in a
testenv sandbox HOME): a fresh home answers
~/.layerfs-tools/workspaces/demo/main and makes nothing at the old
name; a home with a ~/.magpie-layerfs holding a marker answers the
new path, the marker is under ~/.layerfs-tools, and ~/.magpie-layerfs
is a symlink.
Not tried: Windows (the link is a junction there), and moving a root
while an agent's exec runs in it.