POST /api/v2/resources/clone renames the cloned app but not its data source(s) (ImportExportResourcesService.clone, server/src/modules/import-export-resources/service.ts:160). When the app has a custom data source, the clone tries to insert an active data_source_versions row with the same name on the same branch as the still-existing original — violating idx_unique_active_name_branch (422, Postgres 23505).
Repro: Create an app with a custom data source, clone it in the same workspace → 422.
Fix: Rename/dedupe the cloned data source's name (like the app name already is) before import.
Related: Quarantined test should be able to clone the app if user is a super admin in apps.spec.ts (QUARANTINE(apps), blocked on #17258). DoD: fix + test un-skipped and green in run-ci.
POST /api/v2/resources/clone renames the cloned app but not its data source(s) (ImportExportResourcesService.clone, server/src/modules/import-export-resources/service.ts:160). When the app has a custom data source, the clone tries to insert an active data_source_versions row with the same name on the same branch as the still-existing original — violating idx_unique_active_name_branch (422, Postgres 23505).
Repro: Create an app with a custom data source, clone it in the same workspace → 422.
Fix: Rename/dedupe the cloned data source's name (like the app name already is) before import.
Related: Quarantined test should be able to clone the app if user is a super admin in apps.spec.ts (QUARANTINE(apps), blocked on #17258). DoD: fix + test un-skipped and green in run-ci.