diff --git a/backend/openbot/db/migrations/versions/0022_bot_skill_names.py b/backend/openbot/db/migrations/versions/0022_bot_skill_names.py index c2edff4..160546f 100644 --- a/backend/openbot/db/migrations/versions/0022_bot_skill_names.py +++ b/backend/openbot/db/migrations/versions/0022_bot_skill_names.py @@ -1,7 +1,7 @@ """bot skill_names: which skills a bot may load on demand -Revision ID: 0021 -Revises: 0020 +Revision ID: 0022 +Revises: 0021 """ import sqlalchemy as sa diff --git a/backend/openbot/seed.py b/backend/openbot/seed.py index ba6e5ca..18480ae 100644 --- a/backend/openbot/seed.py +++ b/backend/openbot/seed.py @@ -183,6 +183,7 @@ async def seed_demo_bots(services) -> int: SYNCED_FIELDS = ("instructions", "tool_names", "approval_tools", "model_settings", "icon", "load_repository_instructions", "skill_names") + SCRATCHPAD_GRANT_DONE_KEY = "_scratchpad_grant_done" @@ -213,6 +214,7 @@ async def grant_scratchpad_to_existing_bots(services) -> None: if granted: log.info("granted the scratchpad tool to %d existing bots", granted) + async def sync_demo_bots(services) -> int: """Rewrite the demo bots' instructions, tools, approval tools and model settings from DEMO_BOTS. diff --git a/backend/tests/test_skills.py b/backend/tests/test_skills.py index aa785d6..1544083 100644 --- a/backend/tests/test_skills.py +++ b/backend/tests/test_skills.py @@ -86,7 +86,10 @@ def test_workspace_roots_shadow_the_state_dir(tmp_path): state = tmp_path / "state" write_skill(state, "deep") # same id, different content: first root wins (skills,) = discover_skills(tmp_path, state) - assert skills.id != "Deep Review" + # Same id in both roots: exactly one skill survives and it comes from the + # workspace root ("Deep Review" here), not the shadowed state-dir copy + # ("Git Rebasing"). + assert skills.name == "Deep Review" def test_discovery_prunes_junk_dirs(tmp_path):