wayglass policy test
Replay recent commits through the local policy, shadow rules included.
Classifies each recent commit on the current branch (first parent only) and decides it with the local policy file, so a rule can be tried before it is enforced: add it with mode: shadow, run this, and read what it would have decided. Nothing is recorded and the Worker is not contacted. Commits with a why note also show the decision recorded when they landed.
wayglass policy test [flags]Examples
Section titled “Examples”wayglass policy testwayglass policy test --since v0.1.0wayglass policy test --file ../drafts/policy.yaml --json| Flag | Default | Description |
|---|---|---|
--file string |
policy file to try (default .wayglass/policy.yaml) | |
--jurisdiction string |
jurisdiction to tag changes with (default from .wayglass/config.yaml) | |
-n, --limit int |
20 |
replay at most this many commits (max 500) |
--rev string |
HEAD |
replay commits reachable from this revision |
--since string |
replay commits after this revision (since..rev) |
Global flags
Section titled “Global flags”| Flag | Default | Description |
|---|---|---|
--json |
print a JSON envelope for agents (no colour, prompts or spinners) |
Exit codes and the --json envelope are the same for every command; see For agents.
See also
Section titled “See also”wayglass policy: Work with .wayglass/policy.yaml