docs: document label passthrough from catalog items to policy engine - #15
Merged
chadcrum merged 3 commits intoApr 29, 2026
Merged
Conversation
Connect the dots across catalog items, instances, and policies pages so policy authors understand that metadata labels must be declared as catalog item fields to reach input.spec in Rego policies. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Chad Crum <chadcrum@users.noreply.github.com>
chadcrum
marked this pull request as ready for review
April 28, 2026 21:40
chadcrum
requested review from
gabriel-farache,
gciavarrini,
jenniferubah,
machacekondra and
ygalblum
April 28, 2026 21:40
There was a problem hiding this comment.
Hey - I've found 1 issue, and left some high level feedback:
- In the new explanations of how
input.specis built, consider explicitly stating how conflicts between catalog itemdefaultvalues anduser_valuesare resolved (i.e., thatuser_valueseffectively override defaults), so policy authors aren't left to infer the precedence. - The description of the governance boundary (“only catalog item fields are visible to policies”) is repeated across the three pages; you might centralize the full explanation in one place and keep the others shorter with a pointer to avoid future drift between them.
- In the catalog item instances note, you reference
input.spec.metadata.labels.env“for the label shown above,” but the immediate example usesmetadata.labels.region; aligning the example label name across sections would reduce potential confusion.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In the new explanations of how `input.spec` is built, consider explicitly stating how conflicts between catalog item `default` values and `user_values` are resolved (i.e., that `user_values` effectively override defaults), so policy authors aren't left to infer the precedence.
- The description of the governance boundary (“only catalog item fields are visible to policies”) is repeated across the three pages; you might centralize the full explanation in one place and keep the others shorter with a pointer to avoid future drift between them.
- In the catalog item instances note, you reference `input.spec.metadata.labels.env` “for the label shown above,” but the immediate example uses `metadata.labels.region`; aligning the example label name across sections would reduce potential confusion.
## Individual Comments
### Comment 1
<location path="content/docs/user-guide/catalog-item-instances.md" line_range="53" />
<code_context>
+> **Note:** Each value provided in `user_values` will be validated against its corresponding item in the catalog item's `fields` list. If the `field` is not editable (`editable=false`) or the `value` does not pass the `validation_schema` the request will be rejected. After validation, these values become part of the resource spec evaluated by placement [policies](../policies/), accessible as `input.spec.*` in Rego code (e.g., `input.spec.metadata.labels.env` for the label shown above). Only fields declared in the catalog item are included; see [How `input.spec` is Constructed](../policies/#how-inputspec-is-constructed) for details.
</code_context>
<issue_to_address>
**suggestion (typo):** Add a comma before "the request will be rejected" for smoother grammar.
In this sentence, add a comma before "the request will be rejected" so it reads: "...does not pass the `validation_schema`, the request will be rejected."
```suggestion
> **Note:** Each value provided in `user_values` will be validated against its corresponding item in the catalog item's `fields` list. If the `field` is not editable (`editable=false`) or the `value` does not pass the `validation_schema`, the request will be rejected. After validation, these values become part of the resource spec evaluated by placement [policies](../policies/), accessible as `input.spec.*` in Rego code (e.g., `input.spec.metadata.labels.env` for the label shown above). Only fields declared in the catalog item are included; see [How `input.spec` is Constructed](../policies/#how-inputspec-is-constructed) for details.
```
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Chad Crum <chadcrum@users.noreply.github.com>
gciavarrini
approved these changes
Apr 29, 2026
ygalblum
approved these changes
Apr 29, 2026
ygalblum
left a comment
Contributor
There was a problem hiding this comment.
Small comment, I'm fine also if you disagree.
Move policy-related content out of the validation note into a dedicated "Policy Evaluation" subsection to better target the policy author audience. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Chad Crum <chadcrum@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Connects the dots across the catalog items, catalog item instances, and policies user-guide pages so policy authors understand that metadata labels must be declared as catalog item fields to reach
input.specin Rego policies.input.specinput.specis Constructed" section and an end-to-end label policy example to the Policies pageResolves: FLPATH-4124
🤖 Generated with Claude Code
Summary by Sourcery
Clarify how catalog item fields and instance user_values populate input.spec for policy evaluation and provide an end-to-end label-based policy example.
Documentation:
Preview: https://chadcrum.github.io/dcm-project.github.io/
Changed sections: