People retain useful questions and run them again with current values and authority. The examples connect recipe origins, library audiences and execution without treating shared definitions as permission grants.
Sharing changes discovery without granting source records. The combined example checks the dependent outcome after another capability changes its source or authority. The lifecycle and regression examples revisit retained state after a later change rather than repeating individual rule rows.
A recipe can produce a contact draft and the author can save it.
Steps
Draft it, retain a requested date input, save the question and run it with two valid dates.
Expected
Each run uses its supplied date and the retained definition preserves the author’s exact values and recipe origin.
Data
Use an isolated workspace, named fixture records and the caller grants described by the prerequisites.
Source
services-platform:modules/queries/tests/e2e/query-recipes.e2e.spec.js#records which recipe and which version the draft came from,services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#leaves a criterion’s value exactly as the person typed it, spaces and all,services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#runs with the value given, answering only the contacts it keeps
02Sharing changes discovery without granting source recordsinteractionproposed
An earlier recipe derivative is retained and a report uses it.
Steps
Retire the recipe, run the retained question, create a draft from a restored release and attempt to delete the retained source.
Expected
The retained derivative stays independent, the restored recipe supplies a new draft and the report dependency still blocks source deletion.
Data
Use an isolated workspace, named fixture records and the caller grants described by the prerequisites.
Source
services-platform:modules/queries/tests/e2e/query-recipes.e2e.spec.js#records which recipe and which version the draft came from,services-platform:modules/queries/tests/integration/services/recipe-registration/register-query-recipes.integration.spec.js#writes nothing for a manifest that declares exactly what is stored, and answers them as unchanged,services-platform:modules/queries/tests/e2e/reports.e2e.spec.js#refuses to delete a saved query a report presents as 409 saved_query_reported
04Read access supports consumption while sharing stays controlledpermissionnegativeproposed
A shared question and an active recipe exist; one reader has library read but no write or share power.
Steps
Open and run the shared question, attempt replacement and sharing, then request a recipe using a denied joined dataset.
Expected
Permitted consumption succeeds; writes and sharing fail, and the recipe does not bypass the joined-dataset refusal.
Data
Use an isolated workspace, named fixture records and the caller grants described by the prerequisites.
Source
services-platform:modules/queries/tests/e2e/read-tier.e2e.spec.js#lists the organization’s saved query,services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#refuses making the query the organization’s without the power to share it as 403,services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#runs the organization’s query for a colleague who may query the dataset
05Refinement cannot answer a required input or widen resultsregressionnegativeproposed
A retained question has a required input, intentional text whitespace and a bounded population.
Steps
Run with the required value and additional criteria, then omit the input and try supplying it through refinement.
Expected
The valid result narrows the original population; the missing value is still refused and the stored text is unchanged.
Data
Use an isolated workspace, named fixture records and the caller grants described by the prerequisites.
Source
services-platform:modules/queries/tests/integration/services/saved-queries/run-with-refinement.integration.spec.js#narrows to the rows that also meet the refinement’s criteria,services-platform:modules/queries/tests/integration/services/saved-queries/run-with-refinement.integration.spec.js#refuses criteria that ask for a value when run, which only a stored definition may,services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#leaves a criterion’s value exactly as the person typed it, spaces and all