Part b of the Go deriver. Part a, oc-8307a6d, built the `derive` package and `valley-go checks`, proven equal to the Bash deriver by differential tests.
Four callers still run the Bash deriver in `bin/valley`:
- the `valley checks` verb;
- the integrator, which runs `valley checks` and parses its report (`integrator/policy.go`);
- `valley pending`'s check counts, which run `valley checks` through `VALLEY_COMMAND` (`status/pending.go`);
- `valley approve`.
Outcome: everything but approve uses the Go deriver.
- The `valley checks` verb is Go, with the same layer resolution, report, `--names` and `--cost`.
- The integrator calls `derive` in-process, keeping its own resolution of the policy sources.
- pending derives in-process.
Two leftovers from part a are fixed here: `integrator/policy.go` `openProject` decides whether the project layer exists with `filepath.Glob`, and `composed.readLayer` copies dotfile `.cue` names out of git. Implementation-dependent tests are replaced (`policy-deriver.sh`'s Bash rendering, `valley-request.sh`'s `diff_paths` extraction, `integrator/policy_test.go`'s report-producing executable), keeping their behavioural assertions.
The Bash deriver then has one caller, approve. It is deleted when approve runs in Go (oc-1fb4a99). The part-b critique is in oc-8307a6d's comments.
Done when the `checks` verb, the integrator and pending run no Bash deriver, and the behavioural assertions pass against the Go one.
Comments
contributor2026-11-09 14:10 UTCedited2026-11-09 14:10 UTC by contributor
Split into three changes after a cross-family critique of the first brief: oc-d14bc0a (a layer that cannot be read is refused; Go's readLayer read every listing failure as absence), then oc-ab7a546 (the integrator derives in-process) and oc-26551e1 (valley checks and pending derive in Go), each blocked by oc-d14bc0a. Each states the compatibility contract: the Go deriver's answer on the three edges TestKnownDivergences records, refusals still refuse, and approve stays on the Bash deriver until it runs in Go.
contributor2026-11-10 00:41 UTC
Every child is done, and the Bash deriver is deleted (e2dd787b).