You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A layer is admitted by its clone's working tree but planned from a HEAD snapshot: an emptied Home/ fails the tree build instead of contributing nothing #819
a workaround branch on the team repository removed every packages-manifest.yaml (the #818 detour).
Observed
Error: build tree: layer team: open C:\Users\david-noble\.cache\devlore\snapshots\team-1e6b7535106f\Home: The system cannot find the file specified.
The team clone's working tree still shows Home/ with five directories (noblefactor, .Darwin, .Linux, .Unix, .Windows) — empty, because git leaves directories behind when their last tracked file is deleted. The commit at
HEAD tracks nothing under Home/. The base layer's clone has no Home/ at all and passes.
Mechanism
cmd/writ/writ/layer.goCollectLayerSources admits a (layer, target) pair when dirExists(<clone>/Home) is
true — a check against the clone's working tree.
cmd/writ/writ/snapshot/snapshot.goRewriteSources then replaces each admitted source root with the snapshot
worktree of HEAD (<layer>-<short hash>). A fresh worktree of a commit with no files under Home/ has no Home/.
cmd/writ/writ/segmentMatchDirectories does os.ReadDir(sourceRoot) on the missing directory and returns the
error; the tree build fails for the whole deploy.
Two trees decide one question: existence is judged on the working tree, content is read from HEAD. The .safe
rename in #813's workaround hit the same split from the other side (an edit that HEAD does not carry is invisible).
Base only passes because its working tree has no Home/ either.
Expected
A layer whose HEAD carries nothing under a target directory contributes nothing to that target — the same outcome
as a layer with no such directory — and the deploy proceeds. The existence check reads the same tree the planner
reads.
Evidence of completion
admission of a (layer, target) pair is decided against the snapshot (or HEAD's tree), not the clone's working
tree; a target directory absent from HEAD is skipped with a note, never an error
a unit test: a layer whose commit has an empty Home/ (directories only in the working tree) builds a tree with
zero entries from that layer
writ deploy noblefactor on DANOBLE-WD11-3 with the team workaround branch checked out gets past the tree build
Activity