refactor(backend): rename search_space -> workspace across app bulk (Phase 2 Wave D)

Scoped codemod over surfsense_backend/app (excluding routes/, Wave E): renames
search_space_id -> workspace_id, search_space -> workspace, SearchSpace -> Workspace
across services, utils, tasks, agents, gateway, event_bus, notifications, podcasts,
automations, observability params, and prompt .md files. Also flips the camelCase
payload key searchSpaceId -> workspaceId (no backend reader; hard cutover).

Preserved carve-outs (verbatim): Celery task names "delete_search_space_background"
and "ai_sort_search_space" (wire names), and the OTel/metric key "search_space.id"
(dashboards depend on it). Enum values 'SEARCH_SPACE' and SearchSourceConnector
untouched.
This commit is contained in:
CREDO23 2026-06-26 18:30:47 +02:00
parent 0c53d884eb
commit 7fb0707933
259 changed files with 1996 additions and 1996 deletions

View file

@ -108,7 +108,7 @@ def _build_template_ctx(
automation_id=run.automation_id,
automation_name=automation.name if automation else None,
automation_version=automation.version if automation else None,
search_space_id=automation.search_space_id if automation else None,
workspace_id=automation.workspace_id if automation else None,
creator_id=automation.created_by_user_id if automation else None,
trigger_id=run.trigger_id,
trigger_type=trigger.type.value if trigger else None,
@ -130,7 +130,7 @@ def _build_action_ctx(
session=session,
run_id=run.id,
step_id=step.step_id,
search_space_id=automation.search_space_id,
workspace_id=automation.workspace_id,
creator_user_id=automation.created_by_user_id,
chat_model_id=models.chat_model_id if models else None,
image_gen_model_id=models.image_gen_model_id if models else None,