Skip to content

Commit 9f99d63

Browse files
torimwhaleyclaude
andauthored
docs: document CLI write support for content verification (#563)
* docs: document CLI write support for content verification Update verified-content.mdx to remove the read-only caveat and document the new `verified: boolean` field with three-state semantics (true/false/absent), permissions behavior, and example workflow. Add `verification` and `verified` fields to both YAML examples in dashboards-as-code.mdx so the canonical YAML reference reflects what users will see after `lightdash download`. Pairs with lightdash#22139. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * docs: remove example workflow section from verified-content Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
1 parent a280796 commit 9f99d63

2 files changed

Lines changed: 63 additions & 7 deletions

File tree

guides/developer/dashboards-as-code.mdx

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,18 @@ slug: my-cool-dashboard
419419
spaceSlug: my-space
420420
version: 1
421421
downloadedAt: "2025-01-02T10:15:47.406Z"
422+
# Verification fields (only present if the dashboard has been verified):
423+
verification:
424+
# Read-only audit info, ignored on upload.
425+
verifiedAt: "2025-01-02T09:30:00.000Z"
426+
verifiedBy:
427+
firstName: David
428+
lastName: Attenborough
429+
userUuid: b264d83a-9000-426a-85ec-3f9c20f368ce
430+
verified: true
431+
# `verified` is the writable flag. Set to true/false to verify/unverify on upload,
432+
# or omit to leave verification state unchanged.
433+
# See /guides/verified-content for full semantics.
422434
```
423435

424436
### Charts
@@ -565,7 +577,18 @@ tableConfig:
565577
spaceSlug: my-space
566578
version: 1
567579
downloadedAt: "2025-04-09T10:44:01.104Z"
568-
580+
# Verification fields (only present if the chart has been verified):
581+
verification:
582+
# Read-only audit info, ignored on upload.
583+
verifiedAt: "2025-04-09T08:15:00.000Z"
584+
verifiedBy:
585+
firstName: David
586+
lastName: Attenborough
587+
userUuid: b264d83a-9000-426a-85ec-3f9c20f368ce
588+
verified: true
589+
# `verified` is the writable flag. Set to true/false to verify/unverify on upload,
590+
# or omit to leave verification state unchanged.
591+
# See /guides/verified-content for full semantics.
569592
```
570593

571594
<Warning>

guides/verified-content.mdx

Lines changed: 39 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,45 @@ This guarantees that a verified badge always reflects content that an admin has
5252

5353
## Verification in charts and dashboards as code
5454

55-
Verification status is included in [charts and dashboards as code](/guides/developer/dashboards-as-code). When you run `lightdash download`, verified content includes verification metadata right in the YAML, so you can see which downloaded files represent approved content.
55+
Verification status is included in [charts and dashboards as code](/guides/developer/dashboards-as-code). When you run `lightdash download`, verified content includes verification metadata in the YAML, and `lightdash upload` can apply or remove the verified badge based on what your YAML says.
5656

57-
<Note>
58-
Verification metadata is currently **read-only** in content-as-code workflows. Running `lightdash download` includes verification status in the YAML, but `lightdash upload` does not write verification back. To apply or remove the verified badge, use the three-dot menu on a chart or dashboard in the Lightdash UI.
57+
### Two fields: `verification` and `verified`
5958

60-
Full CLI support for writing verification status is being tracked in [this issue](https://github.com/lightdash/lightdash/issues/22138).
61-
</Note>
59+
Verified content has two related fields in the YAML:
6260

63-
Even though verification is read-only in the CLI today, you can still build on top of verified content. Anything marked as verified in the UI is visible in the downloaded YAML, so your trusted repository can reference those charts and dashboards as the source of truth for downstream work. This is especially useful when you're using an AI agent, the [Lightdash CLI](/references/lightdash-cli), or [agent skills](/guides/developer/agent-skills) to build on top of trusted content.
61+
- **`verification`** — read-only audit metadata showing who verified the content and when. Emitted on download for visibility in version control. Ignored on upload.
62+
- **`verified`** — a boolean that controls verification state on upload. This is the field you edit to change verification.
63+
64+
Here's what a verified chart looks like after `lightdash download`:
65+
66+
```yaml
67+
name: Total orders
68+
slug: total-orders
69+
description: Count of all orders
70+
# ... other chart fields ...
71+
verification:
72+
verifiedAt: "2026-04-22T17:48:43.394Z"
73+
verifiedBy:
74+
firstName: David
75+
lastName: Attenborough
76+
userUuid: b264d83a-9000-426a-85ec-3f9c20f368ce
77+
verified: true
78+
```
79+
80+
### How `verified` behaves on upload
81+
82+
The `verified` field has three states:
83+
84+
| Value | Behavior on upload |
85+
|---|---|
86+
| `verified: true` | Verifies the content. No-op if already verified. |
87+
| `verified: false` | Unverifies the content. No-op if already unverified. |
88+
| `verified` absent | Leaves verification state unchanged. |
89+
90+
The "absent = leave alone" semantic means that downloading and re-uploading a YAML file you haven't touched will not unintentionally change verification state, even if you delete the `verified` line.
91+
92+
### Permissions
93+
94+
Only users with permission to verify content (organization admins and project admins) can change verification state via the CLI. If you upload a YAML containing `verified: true` or `verified: false` but you don't have verify permissions, the upload still succeeds — the rest of your changes go through, but the verification field is silently skipped and a warning is logged on the server.
95+
96+
This means CI pipelines run by non-admin deployers (for example, with the `developer` role) won't fail just because a YAML file contains a `verified` field they can't act on.

0 commit comments

Comments
 (0)