Issue
Migrating selected public workspaces through Admin Settings > Data Management silently omits current public workspace prompts.
Current public prompts are created in the public_prompts Cosmos container with their owning workspace stored in public_id. The selected-scope migration definition queries that container using public_workspace_id, so no current prompt records match.
Steps to Reproduce
- Create a prompt in a public workspace.
- Configure a Data Management migration target.
- Select only that public workspace and execute migration.
- Inspect the destination
public_prompts container or the migration artifact counts.
Expected Behavior
All current prompts owned by the selected public workspace are copied to the destination, and prompts belonging to unselected workspaces are not copied.
Actual Behavior
The migration completes without surfacing this as an error, but copies zero current public prompts for the selected workspace.
Impact
Administrators can complete a selective workspace migration believing the workspace is intact while its reusable prompts are missing from the destination. Selecting all public workspaces does not expose the same failure because that path copies the entire container without an ownership filter.
Notes
functions_prompts.create_prompt_doc(...) stores public workspace ownership as public_id.
DATA_MANAGEMENT_MIGRATION_COSMOS_CONTAINERS["public_workspaces"] currently configures public_prompts with filter_field: "public_workspace_id".
- Keep this fix focused on current public prompts; legacy prompt handling should remain compatible.
Acceptance Criteria
Issue
Migrating selected public workspaces through Admin Settings > Data Management silently omits current public workspace prompts.
Current public prompts are created in the
public_promptsCosmos container with their owning workspace stored inpublic_id. The selected-scope migration definition queries that container usingpublic_workspace_id, so no current prompt records match.Steps to Reproduce
public_promptscontainer or the migration artifact counts.Expected Behavior
All current prompts owned by the selected public workspace are copied to the destination, and prompts belonging to unselected workspaces are not copied.
Actual Behavior
The migration completes without surfacing this as an error, but copies zero current public prompts for the selected workspace.
Impact
Administrators can complete a selective workspace migration believing the workspace is intact while its reusable prompts are missing from the destination. Selecting all public workspaces does not expose the same failure because that path copies the entire container without an ownership filter.
Notes
functions_prompts.create_prompt_doc(...)stores public workspace ownership aspublic_id.DATA_MANAGEMENT_MIGRATION_COSMOS_CONTAINERS["public_workspaces"]currently configurespublic_promptswithfilter_field: "public_workspace_id".Acceptance Criteria
public_promptsrecords whosepublic_idmatches a selected workspace ID.