diff --git a/src/tin_lite/catalog.py b/src/tin_lite/catalog.py index 211143a2..3a6658b1 100644 --- a/src/tin_lite/catalog.py +++ b/src/tin_lite/catalog.py @@ -4613,6 +4613,9 @@ def executor_replaced_by(builtin_key: str, executor: str) -> str | None: organic_system.REFRESH_KEY, # v7 pins the two weekly measurement packages, with their code, beside the steps. *organic_system.MEASURE_STEPS.values(), + # v6 on, the technical and delivery steps run website.change; without it here a fresh + # registry has no website.change file at the system's revision. + organic_system.WEBSITE_KEY, ), growth_onboarding.KEY: tuple(growth_onboarding.STEPS.values()), # content.plan 1.0.0 starts its planning agent at the plan's own pinned revision. diff --git a/tests/test_registry_recipe_publication.py b/tests/test_registry_recipe_publication.py index 340b6f69..e4eb2787 100644 --- a/tests/test_registry_recipe_publication.py +++ b/tests/test_registry_recipe_publication.py @@ -52,7 +52,12 @@ async def test_parent_publication_pins_children_on_first_sync_and_child_only_upg await catalog.sync_builtin_workflows(database=db, storage=storage, system_wiki=WIKI) first = db.rows[parent.id].current_commit_sha for child in catalog.BUILTIN_WORKFLOWS: - if child.key not in (*organic_system.STEPS.values(), organic_system.REFRESH_KEY): + if child.key not in ( + *organic_system.STEPS.values(), + *organic_system.WEBSITE_STEPS.values(), + *organic_system.MEASURE_STEPS.values(), + organic_system.REFRESH_KEY, + ): continue definition, resources = child.definition_and_files_with_wiki(WIKI) assert json.loads(storage.revisions[first][child.definition_path]) == definition @@ -74,6 +79,18 @@ async def test_parent_publication_pins_children_on_first_sync_and_child_only_upg assert json.loads(storage.revisions[first][child.definition_path])["title"] == child.title +def test_the_organic_system_pins_every_workflow_its_prepare_step_reads(): + # A fresh registry (staging, a new install) only has these files at the system's revision + # if they are pinned; an older registry hid the gap because earlier commits carried them. + read = { + *organic_system.STEPS.values(), + *organic_system.WEBSITE_STEPS.values(), + *organic_system.MEASURE_STEPS.values(), + organic_system.REFRESH_KEY, + } + assert read <= set(catalog.pinned_children(organic_system.KEY)) + + async def test_content_plan_revisions_carry_the_planning_agent(): # content.plan 1.0.0 starts content.plan_research at its own pinned revision, and the # organic system starts content.plan at the system's: both revisions carry the agent.