Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/tin_lite/catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
19 changes: 18 additions & 1 deletion tests/test_registry_recipe_publication.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down
Loading