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
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions backend/openbot/seed.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"


Expand Down Expand Up @@ -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.

Expand Down
5 changes: 4 additions & 1 deletion backend/tests/test_skills.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
Loading