docs: document calculated field params dictionary & restore Starlark docs changes#1350
Conversation
Adds a reference table for built-in params keys on inventory and artifact calculation fields to close the documentation gap identified in sc-15239.
validbeck
left a comment
There was a problem hiding this comment.
Can you shift the instructions to BEFORE the giant dictionaries? I think it makes more sense that way; I'm approving this otherwise but please don't merge until you make that change?
I think the params / available helpers being in a tabset would also help the sheer amount of text we have in this section as well — if you don't want to do it please leave this PR open so I can adjust?
PR SummaryThis PR updates the documentation for calculated fields in the inventory guide by migrating code examples and explanatory text from a Python dot notation style to the new Starlark dictionary-access style. The key changes include:
Overall, these modifications enhance the clarity of the documentation and assist developers in adapting to the new Starlark-based formula system. Test Suggestions
|
Yes, that totally makes sense. Here's how the content now appears after b8fb6d7 (it would be nice to also shift the examples, but that would break single sourcing):
|
Validate docs site✓ INFO: A live preview of the docs site is available — Open the preview |


Pull Request Description
What and why?
This PR adds a Params dictionary reference table to
site/guide/inventory/_field-types.qmd, which is included on both Manage inventory fields and Manage artifact fields.The table documents built-in params keys, including
params["model_stage"]for inventory record formulas, along withparams["stakeholders"],params["integrations"],params["finding_type"], andparams["model"].Context: While investigating sc-15239, I realized that:
paramsdictionary at all, only that formulas read selected field keys. So we weren't missing just model_stage info, we were missing all the params ...mainby #1328, which squash-merged a stale copy of_field-types.qmd. This PR restores that docs: Calculated fields formula reference #1323 content and places the params dictionary immediately above the available helpers section.I did not add worked examples in this PR, ran out of time, but the reference tables should unblock the core documentation gap for sc-15239.
How to test
After the PR preview deploys, spot-check:
Confirm the Calculation section order is: Starlark intro → Params dictionary → Available helpers → setup steps/examples.
Local:
quarto render guide/inventory/manage-inventory-fields.qmd guide/validation/manage-artifact-fields.qmd --profile developmentfromsite/.What needs special review?
params["integrations"]andparams["stakeholders"]descriptions are accurate enough without examples._field-types.qmd._field-types.qmdinclude (affects both inventory and artifact field guides).Dependencies, breaking changes, and deployment notes
Release notes
Documentation now includes a reference table for built-in calculated field
paramskeys, including model stage, and restores the Starlark formula helpers reference. Learn more ...Checklist