From 1f5b6a5fcf53a6811ad3104836b01ed812748d8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Gr=C3=B8ndahl?= Date: Thu, 9 Apr 2026 09:59:26 +0200 Subject: [PATCH] docs: fix assert artifact scopes - only --environment and --policy are mutually exclusive --flow is an independent filter, not a separate exclusive mode. Matches the actual server-side behavior and the updated CLI help text. --- getting_started/enforce_policies.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/getting_started/enforce_policies.md b/getting_started/enforce_policies.md index 8b9f704..fb41b7a 100644 --- a/getting_started/enforce_policies.md +++ b/getting_started/enforce_policies.md @@ -15,14 +15,17 @@ All methods use the same assertion: checking an artifact's fingerprint against a ## Assertion scopes -`kosli assert artifact` (and its API equivalent) supports four mutually exclusive scopes: +`kosli assert artifact` (and its API equivalent) supports three assertion modes: -| Scope | CLI flag | When to use | -|-------|----------|-------------| +| Mode | CLI flag | When to use | +|------|----------|-------------| | Environment | `--environment` | Check all policies attached to the target environment. The most common choice for deployment gates. | | Specific policies | `--policy` | Check one or more named policies, regardless of environment attachment. Useful for promotion gates between stages. | -| Flow template | `--flow` | Check the artifact against a flow's template requirements. | -| All flows | _(no scope flag)_ | Check against the templates of every flow the artifact appears in. | +| Flow templates | _(no scope flag)_ | Check against the template files of the flows the artifact appears in. | + +`--environment` and `--policy` are mutually exclusive. + +`--flow` can be combined with any mode to narrow the lookup to a specific flow. Without `--flow`, all flows containing the artifact (by fingerprint) are considered. See [`kosli assert artifact`](/client_reference/kosli_assert_artifact) for the full flag reference.