`composed.readLayer` (`composed/composed.go`) lists a layer with `git ls-tree <treeish>:<dir>`. It treats every failure of that listing as "no such directory". A project layer that cannot be read therefore composes as the floor alone, so fewer checks are required, from a read that never happened.
The Bash deriver's `copy_layer` (`bin/valley`) lists with a pathspec instead. A missing directory is an empty listing, and a failed read is a refusal.
Two more differences:
- `integrator/policy.go`'s `openProject` decides whether the project layer exists with `filepath.Glob`.
- A `*.cue` entry that is not a file is copied as whatever `git show` prints.
Outcome: every Go reader of a policy layer decides presence as `copy_layer` does:
- a directory with at least one `*.cue` entry is present;
- a missing directory, or one with no `*.cue` entry, is absent;
- a failed listing, a failed read, or a `*.cue` entry that is not a file is refused.
The Go readers are the worker, the restacker, the integrator and `valley-go checks`. Directory names are matched literally.
Done when each reader refuses an unreadable layer (shown by tests that make the listing and a document read fail), absent and empty layers still compose as the floor alone, and the readers agree with `copy_layer` on a directory holding only dotfile `.cue` names and on a `*.cue` entry that is a directory.
Comments
contributor2026-11-09 18:59 UTC
Change valley:the-valley/rrwmkysswlrvxzxwqtwnszxupnyzxqzt landed: v2 as 533c1d7e7da447d49c4e263f73738c067bed7bbf.
Every change the knot links has landed and it has no active children, so klaus set it done.