F.                                                                       [100%]
=================================== FAILURES ===================================
__________ test_runtime_accepts_configured_installed_profile_package ___________

tmp_path = PosixPath('/tmp/pytest-of-cube/pytest-8668/test_runtime_accepts_configure0')

    def test_runtime_accepts_configured_installed_profile_package(
        tmp_path: Path,
    ) -> None:
        profile_root = tmp_path / "profile"
        profile_root.mkdir()
        package_root = tmp_path / "installed" / "site-packages"
        shutil.copytree(
            Path(onboarding_domain.__file__).resolve().parent,
            package_root / "checkin_cli",
        )
        env = os.environ.copy()
        env["DUALCOACH_PROFILE_PACKAGE"] = str(package_root)
        env["PYTHONPATH"] = os.pathsep.join(
            (str(package_root), str(Path(__file__).resolve().parents[2]))
        )
    
        completed = subprocess.run(
            [
                sys.executable,
                "-c",
                "\n".join(
                    (
                        "from pathlib import Path",
                        "from types import SimpleNamespace",
                        "from gateway.platforms.telegram_nutrition_onboarding_runtime import TelegramNutritionOnboardingRuntime",
                        "runtime = TelegramNutritionOnboardingRuntime(",
                        "    adapter=SimpleNamespace(),",
                        f"    profile_root=Path({str(profile_root)!r}),",
                        "    bootstrap_transport=SimpleNamespace(),",
                        ")",
                        "print(Path(runtime.domain.__file__).resolve())",
                    )
                ),
            ],
            cwd=Path(__file__).resolve().parents[2],
            env=env,
            capture_output=True,
            text=True,
            check=False,
        )
    
        expected = (package_root / "checkin_cli" / "nutrition_onboarding.py").resolve()
>       assert completed.returncode == 0, completed.stderr
E       AssertionError: Traceback (most recent call last):
E           File "<string>", line 4, in <module>
E           File "/home/cube/.hermes/profiles/dualcoachtest/.strict-runtime/c6ec9cec605d3605/venv/lib/python3.12/site-packages/gateway/platforms/telegram_nutrition_onboarding_runtime.py", line 89, in __init__
E             raise NutritionOnboardingRuntimeError(
E         gateway.platforms.telegram_nutrition_onboarding_runtime_errors.NutritionOnboardingRuntimeError: nutrition onboarding module is outside configured profile
E         
E       assert 1 == 0
E        +  where 1 = CompletedProcess(args=['/home/cube/.hermes/profiles/dualcoachtest/.strict-runtime/c6ec9cec605d3605/venv/bin/python', '...nboarding_runtime_errors.NutritionOnboardingRuntimeError: nutrition onboarding module is outside configured profile\n').returncode

tests/gateway/test_telegram_nutrition_onboarding.py:171: AssertionError
=========================== short test summary info ============================
FAILED tests/gateway/test_telegram_nutrition_onboarding.py::test_runtime_accepts_configured_installed_profile_package
1 failed, 1 passed in 0.58s
