| 1 | usage: valley checks [--schema FILE] [--instance DIR] [--project DIR] [--names [--cost COST] | --json] [<base> [<head>]] |
| 2 | valley checks --build [--wait DURATION] |
| 3 | |
| 4 | checks [<base> [<head>]] |
| 5 | print the check names the composed verification policy |
| 6 | (dcr-f41f718) requires of the change between two |
| 7 | commits, which class made each one required, and the |
| 8 | change's carry mode: how far an approval of it carries |
| 9 | across a rebase, the strictest of exact, same-class and |
| 10 | same-paths among the classes it matched. It prints: no |
| 11 | check is run, nothing is gated, nothing is written. |
| 12 | base defaults to the merge base with main, head to HEAD. |
| 13 | by default both layers come from the target's tip |
| 14 | (origin/main), never from your checkout: the project's |
| 15 | own layer is policy/project there, and the owning valley |
| 16 | is named one line at policy/valley there, fetched and |
| 17 | read at policy/instance in that repository's integrated |
| 18 | tip. a valley's own config repository carries |
| 19 | policy/instance and uses it. a target carrying no |
| 20 | policy/project is derived under the floor alone; a floor |
| 21 | that is not there is refused. this is what the |
| 22 | integrator reads, so the answer is the same from any |
| 23 | branch, however stale. an option overrides each layer, |
| 24 | which is the only way to derive against a layer that |
| 25 | does not govern — the worked example under |
| 26 | examples/policy/, say: |
| 27 | --schema FILE default $VALLEY_VERIFICATION_SCHEMA |
| 28 | --instance DIR default the owning valley's floor |
| 29 | --project DIR default policy/project at the target |
| 30 | naming a layer stops this reading the source it |
| 31 | replaced. the schema is the shape a policy is written |
| 32 | in rather than a layer, so it ships with this tool: the |
| 33 | package sets VALLEY_VERIFICATION_SCHEMA to its own copy. |
| 34 | with that unset, as when valley runs outside its |
| 35 | package, it is schema/verification.cue in the |
| 36 | checkout. |
| 37 | a class's globs match bytes, whatever your locale |
| 38 | is: `?` is one byte, so `?.md` does not match |
| 39 | é.md, whose é is two. |
| 40 | after the report, two lines group the required checks |
| 41 | by the cost the policy declares, `quick` or `slow`. a |
| 42 | slow check takes minutes or needs special hardware. the |
| 43 | cost changes nothing required: approving runs every |
| 44 | required check whatever its cost, and the integrator |
| 45 | requires evidence for every one. |
| 46 | --names print only the required check names, |
| 47 | one per line |
| 48 | --cost COST with --names, only the quick or |
| 49 | the slow ones, e.g. |
| 50 | `valley checks --names --cost slow` |
| 51 | --json print the valley-checks/v1 document |
| 52 | instead of the report |
| 53 | |
| 54 | checks --build [--wait DURATION] |
| 55 | ask the host's check worker to build the nix checks |
| 56 | HEAD requires, and wait until origin holds evidence for |
| 57 | every one. when no check is required, it passes at |
| 58 | once. when origin holds evidence already, nothing is |
| 59 | filed. |
| 60 | otherwise a check request for HEAD is filed under git |
| 61 | config valley.principal, the worker is followed through |
| 62 | the host's telemetry (the observe grant), and the |
| 63 | request is deleted on exit. it passes (exit 0) only |
| 64 | when its last read of origin's evidence covers every |
| 65 | check. otherwise the outcome is not established (exit |
| 66 | 1): it says why it stopped, and prints the worker's |
| 67 | records for HEAD's tree, which are not this request's |
| 68 | result, with a failed check's build output, or the |
| 69 | nix build that reproduces it. |
| 70 | --wait DURATION the most the whole command takes, |
| 71 | such as 30m (default 2h) |
| 72 | limits: a helper in a process group of its own can |
| 73 | outlive the time limit. a command killed outright |
| 74 | leaves its request on origin. a request left behind |
| 75 | counts toward the 32 a principal may hold until the |
| 76 | next run in that worktree deletes it; list your own |
| 77 | with git ls-remote origin |
| 78 | 'refs/the-valley/check-requests/<principal>/*' and |
| 79 | delete one with git push |
| 80 | --force-with-lease=<ref>:<commit> origin :<ref>. |