From 192614565e7fd40c2775904f8199b1ac2fe7d06e Mon Sep 17 00:00:00 2001 From: pk-zipstack Date: Thu, 6 Aug 2026 14:54:48 +0530 Subject: [PATCH] [FIX] Patch the lookups bridge in the profile-fallback tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The profile-resolution tests added in #2203 patch every collaborator of build_fetch_response_payload except get_lookup_config. In OSS that bridge is a no-op, so the suite is green here — but cloud CI runs this same suite against the merged tree, where the bridge resolves to the real lookups implementation and feeds the test's MagicMock prompt into an ORM query. Since 892be3271 landed, every cloud run fails four of these tests with: django.core.exceptions.ValidationError: ['"[]" is not a valid UUID.'] Patch the bridge out like every other collaborator (returning None, exactly what the OSS bridge does), so the suite pins profile resolution in both trees. Co-Authored-By: Claude Fable 5 --- .../tests/test_profile_resolution_fallback.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/backend/prompt_studio/prompt_studio_core_v2/tests/test_profile_resolution_fallback.py b/backend/prompt_studio/prompt_studio_core_v2/tests/test_profile_resolution_fallback.py index 2bbebe7367..f5acfc3c17 100644 --- a/backend/prompt_studio/prompt_studio_core_v2/tests/test_profile_resolution_fallback.py +++ b/backend/prompt_studio/prompt_studio_core_v2/tests/test_profile_resolution_fallback.py @@ -162,6 +162,11 @@ def _get_explicit(profile_manager_id: str) -> Any: autospec=True, side_effect=lambda _doc, _prompt, _org, _user, _tool, output: output, ), + # The lookups bridge is a no-op in OSS, but cloud CI runs this suite + # against the merged tree where it resolves to the real lookups + # implementation — which then feeds this test's MagicMock prompt into + # an ORM query. Patch it out like every other collaborator. + patch.object(psh, "get_lookup_config", autospec=True, return_value=None), patch.object(psh, "EnvHelper", MagicMock()), patch.object(psh, "PromptIdeBaseTool", MagicMock()), patch.object(psh, "IndexingUtils", MagicMock()), @@ -332,9 +337,7 @@ def _get_explicit(profile_manager_id: str) -> Any: autospec=True, side_effect=seen.append, ), - patch.object( - helper, "validate_profile_manager_owner_access", autospec=True - ), + patch.object(helper, "validate_profile_manager_owner_access", autospec=True), patch.object( helper, "_resolve_llm_ids", autospec=True, return_value=("m", "c") ),