-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
Labels
P1Priority 1: Critical, fix as soon as possiblePriority 1: Critical, fix as soon as possiblebugSomething isn't workingSomething isn't workingoperationsOperations, monitoring, and observabilityOperations, monitoring, and observability
Description
Bug
All CLI sync commands fail with "Unknown community" for every community because src/cli/sync.py imports registry but never calls discover_assistants(). The registry is empty when CLI sync commands run.
$ osa sync github --community hed
Error: Unknown community 'hed'
Available communities:
Root Cause
sync.py imports from src.assistants import registry at module level, but discover_assistants() is never called -- neither in sync.py nor in main.py. The API server calls it at startup via lifespan, but the CLI path doesn't.
Fix
Add a @sync_app.callback() that calls discover_assistants() before any sync command runs:
@sync_app.callback()
def sync_callback() -> None:
"""Ensure assistants are discovered before sync commands."""
from src.assistants import discover_assistants
discover_assistants()Workaround
Trigger syncs directly via Python instead of CLI:
docker exec osa python -c "
from src.assistants import discover_assistants; discover_assistants()
from src.knowledge.github_sync import sync_repos
sync_repos('hed')
"Introduced in
PR #218 (Release 0.7.0) -- the CLI refactor moved sync commands to a separate module without ensuring discovery runs.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P1Priority 1: Critical, fix as soon as possiblePriority 1: Critical, fix as soon as possiblebugSomething isn't workingSomething isn't workingoperationsOperations, monitoring, and observabilityOperations, monitoring, and observability